"use strict";(()=>{function b(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}var O=!!(typeof window<"u"&&window.document&&window.document.createElement);var c=O;var f={disallowedGridSandboxAttributes:["allow-popups","allow-top-navigation-by-user-activation"],sandboxAttributes:{safari:["allow-downloads","allow-forms","allow-modals","allow-pointer-lock","allow-popups-to-escape-sandbox","allow-popups","allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation"],default:["allow-downloads","allow-forms","allow-modals","allow-pointer-lock","allow-popups-to-escape-sandbox","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation"]},allowAttributes:{chrome:["accelerometer","bluetooth","camera","clipboard-read","clipboard-write","display-capture","encrypted-media","geolocation","gyroscope","language-detector","language-model","local-network-access","microphone","midi","rewriter","serial","summarizer","translator","web-share","writer","xr-spatial-tracking"],firefox:["camera","display-capture","geolocation","microphone","web-share"],default:["accelerometer","ambient-light-sensor","camera","display-capture","encrypted-media","geolocation","gyroscope","microphone","midi","payment","serial","vr","web-share","xr-spatial-tracking"]}};function y(e=c?navigator.userAgent:null,t=c?new URLSearchParams(window.location.search):null){let r=L(e,t);return Object.fromEntries(Object.entries(r).map(([o,i])=>[o.toLowerCase(),i.toString()]))}function L(e=c?navigator.userAgent:null,t=c?new URLSearchParams(window.location.search):null){let r=!1,o=!1,i=!1;if(e&&(r=/^((?!chrome|android).)*safari/i.test(e),o=/Chrome/.test(e),o&&c&&(o=/Google Inc/.test(navigator.vendor)),i=e.toLowerCase().includes("firefox")),t?.has("turn_off_js"))return{sandbox:"allow-pointer-lock"};let l=(r?f.sandboxAttributes.safari:f.sandboxAttributes.default).join(" "),a=f.allowAttributes.default;i?a=f.allowAttributes.firefox:o&&(a=f.allowAttributes.chrome);let s=a.join("; ");return{sandbox:l,allow:s,allowpaymentrequest:"true",allowFullScreen:!0}}var j={_HTML_TYPES:["html","xml","haml","markdown","slim","pug","application/x-slim"],_CSS_TYPES:["css","less","scss","sass","stylus","postcss","text/css","text/x-sass","text/x-scss","text/x-less","text/x-styl"],_JS_TYPES:["js","javascript","jsx","coffeescript","livescript","typescript","babel","text/javascript","text/x-coffeescript","text/x-livescript","text/typescript"],_CUSTOM_EDITOR_TYPES:{vue:"js",flutter:"js"},cmModeToType:function(e){let t=this._getSafeInputMode(e);return this._getType(t)},_getSafeInputMode:function(e){let t="";return typeof e=="string"?t=e:e&&typeof e=="object"&&"name"in e&&(t=e.name),t.toLowerCase()},syntaxToType:function(e){return this._getType(e)},_getType:function(e){return this._HTML_TYPES.includes(e)?"html":this._CSS_TYPES.includes(e)?"css":this._JS_TYPES.includes(e)?"js":this._CUSTOM_EDITOR_TYPES[e]?this._CUSTOM_EDITOR_TYPES[e]:"unknown"}},h=j;var w=(n=>(n.activeTabColor="active-tab-color",n.activeLinkColor="active-link-color",n.animations="animations",n.border="border",n.borderColor="border-color",n.class="class",n.customCssUrl="custom-css-url",n.defaultTab="default-tab",n.editable="editable",n.file="file",n.height="height",n.host="host",n.href="proxy.php?url=href",n.linkLogoColor="link-logo-color",n.penTitle="pen-title",n.prefill="prefill",n.preview="preview",n.safe="safe",n.slugHash="slug-hash",n.tabBarColors="tab-bar-colors",n.tabLinkColor="tab-link-color",n.themeId="theme-id",n.token="token",n.type="type",n.user="user",n.version="version",n.zoom="zoom",n))(w||{}),d=e=>{document.readyState==="loading"?setTimeout(()=>{d(e)},8):e()},_=()=>{typeof __CodePenIFrameAddedToPage=="function"&&__CodePenIFrameAddedToPage()},P=e=>{if(Object.prototype.hasOwnProperty.call(e.dataset,"prefill")){(e.dataset.prefill===void 0||e.dataset.prefill==="")&&(e.dataset.prefill="{}");let t=M(e.dataset.prefill),r=e.querySelectorAll("[data-lang]");for(let o of r){let i=o.dataset.lang;o.dataset.optionsAutoprefixer&&t&&(t.css_prefix="autoprefixer");let a=h.syntaxToType(i||"");t&&(t[a]=o.textContent,i==="jsx"?t.js_pre_processor="babel":i!==a&&(t[a+"_pre_processor"]=i));let s=o.dataset.langVersion;s&&t&&(t[a+"_version"]=s)}return JSON.stringify(t)}},T=(s=>(s.description="description",s.head="head",s.html_classes="html_classes",s.scripts="scripts",s.stylesheets="stylesheets",s.tags="tags",s.title="title",s))(T||{}),M=e=>{let t=JSON.parse(decodeURI(e)),r={};if(b(t))for(let o of Object.values(T))o in t&&(r[o]=t[o]);return r},S=e=>{let t={},r=e.attributes;for(let o=0,i=r.length;o"prefill"in e||e["slug-hash"],I=e=>(e.href&&(e["slug-hash"]=e.href),e.type&&(e["default-tab"]=e.type),e.safe&&(e.animations=e.safe==="true"?"run":"stop-after-5"),e),p=e=>{let t=H(e),r=e.preview&&(e.preview==="true"||e.preview===!0)?"embed/preview":"embed",o=e.version==="2";if("prefill"in e){let m=[t,o?"cpe":"",r,"prefill"].filter(Boolean).join("/"),g=x(e);return g?`${m}?${g}`:m}let i=x(e),l=e.user||"anon",a=e["slug-hash"];e.token!==void 0&&(a+="/"+e.token);let s=[l,r,a+"?"+i];o&&s.unshift("/editor");let A=s.join("/").replace(/\/+/g,"/");return new URL(A,t).toString()},H=e=>e.host?R(e.host):"https://codepen.io",R=e=>e.match(/^\/\//)||!e.match(/https?:/)?document.location.protocol+"//"+e:e,x=e=>{let t="";for(let r in e){if(r==="prefill"||r==="data")continue;t!==""&&(t+="&");let o=e[r],i;if(typeof o=="string"||typeof o=="number"||typeof o=="boolean")i=encodeURIComponent(o);else throw new TypeError("Invalid parameter type");t+=r+"="+i}return t},E=e=>e.height||300,D=e=>Object.values(w).includes(e);var C=(e,t)=>{let r,o=document.createDocumentFragment();o.append(F(e)),"prefill"in e&&(r=U(e,t),o.append(r)),B(t,o),r&&r.submit()},u=(e,t)=>{let r=document.createElement(e);for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.setAttribute(o,t[o]);return r},U=(e,t)=>{let r=u("form",{class:"cp_embed_form",style:"display: none;",method:"post",action:p(e),target:e.name});e.data=P(t);for(let o in e)o!=="prefill"&&r.append(u("input",{type:"hidden",name:o,value:e[o]}));return r},F=e=>{let t=p(e),r=typeof e["pen-title"]=="string"?e["pen-title"]:"CodePen Embed",i={...y(),allowTransparency:"true",class:"cp_embed_iframe "+(e.class||""),frameborder:"0",height:E(e).toString(),width:"100%",name:typeof e.name=="string"?e.name:"CodePen Embed",scrolling:"no",src:t,style:"width: 100%; overflow:hidden; display:block;",title:r};return"prefill"in e||(i.loading="lazy"),e["slug-hash"]&&(i.id="cp_embed_"+e["slug-hash"].replace("/","_")),u("iframe",i)},B=(e,t)=>{if(e.parentNode){let r=document.createElement("div");return r.className="cp_embed_wrapper",r.append(t),e.parentNode.replaceChild(r,e),r}return e.append(t),e};var N=1;function k(e){e=typeof e=="string"?e:".codepen";let t=document.querySelectorAll(e);for(let r=0,o=t.length;r