var Yt=Object.create;var Se=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var rr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var sr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var nr=(e,t,o,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let g of tr(t))!or.call(e,g)&&g!==o&&Se(e,g,{get:()=>t[g],enumerable:!(m=er(t,g))||m.enumerable});return e};var ar=(e,t,o)=>(o=e!=null?Yt(rr(e)):{},nr(t||!e||!e.__esModule?Se(o,"default",{value:e,enumerable:!0}):o,e));var Rt=sr((ga,Y)=>{var Pr=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",m={};function g(s,c){if(!m[s]){m[s]={};for(var b=0;b>>8,b[u*2+1]=C%256}return b},decompressFromUint8Array:function(s){if(s==null)return x.decompress(s);for(var c=new Array(s.length/2),b=0,u=c.length;b>1}else{for(y=1,u=0;u>1}T--,T==0&&(T=Math.pow(2,i),i++),delete E[k]}else for(y=C[k],u=0;u>1;T--,T==0&&(T=Math.pow(2,i),i++),C[A]=B++,k=String(q)}if(k!==""){if(Object.prototype.hasOwnProperty.call(E,k)){if(k.charCodeAt(0)<256){for(u=0;u>1}else{for(y=1,u=0;u>1}T--,T==0&&(T=Math.pow(2,i),i++),delete E[k]}else for(y=C[k],u=0;u>1;T--,T==0&&(T=Math.pow(2,i),i++)}for(y=2,u=0;u>1;for(;;)if(l=l<<1,p==c-1){d.push(b(l));break}else p++;return d.join("")},decompress:function(s){return s==null?"":s==""?null:x._decompress(s.length,32768,function(c){return s.charCodeAt(c)})},_decompress:function(s,c,b){var u=[],y,C=4,E=4,q=3,A="",k=[],T,B,i,d,l,p,w,h={val:b(0),position:c,index:1};for(T=0;T<3;T+=1)u[T]=T;for(i=0,l=Math.pow(2,2),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;switch(y=i){case 0:for(i=0,l=Math.pow(2,8),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;w=e(i);break;case 1:for(i=0,l=Math.pow(2,16),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;w=e(i);break;case 2:return""}for(u[3]=w,B=w,k.push(w);;){if(h.index>s)return"";for(i=0,l=Math.pow(2,q),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;switch(w=i){case 0:for(i=0,l=Math.pow(2,8),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;u[E++]=e(i),w=E-1,C--;break;case 1:for(i=0,l=Math.pow(2,16),p=1;p!=l;)d=h.val&h.position,h.position>>=1,h.position==0&&(h.position=c,h.val=b(h.index++)),i|=(d>0?1:0)*p,p<<=1;u[E++]=e(i),w=E-1,C--;break;case 2:return k.join("")}if(C==0&&(C=Math.pow(2,q),q++),u[w])A=u[w];else if(w===E)A=B+B.charAt(0);else return null;k.push(A),u[E++]=B+A.charAt(0),C--,B=A,C==0&&(C=Math.pow(2,q),q++)}}};return x}();typeof Y<"u"&&Y!=null&&(Y.exports=Pr)});var se=(e,t=!0)=>e.replace(/\\/g,t?"\\\\":"\\").replace(/`/g,"\\`").replace(/<\/script>/g,"<\\/script>");var Q=e=>(globalThis.structuredClone||(t=>JSON.parse(JSON.stringify(t,(o,m)=>m===void 0?null:m))))(e);var S=(e,t)=>({...t.customSettings[e]});var ve=e=>{let t=e.querySelector("textarea")||e.querySelector('[role="textbox"]');if(t){let o=()=>t.tabIndex=-1;new MutationObserver(g=>{for(let x of g)x.type==="attributes"&&x.attributeName==="tabindex"&&t.tabIndex!==-1&&o()}).observe(t,{attributes:!0}),o()}};var Le={APP_VERSION:"46",SDK_VERSION:"0.11.1",COMMIT_SHA:"43f0982",REPO_URL:"https://github.com/live-codes/livecodes",DOCS_BASE_URL:"/docs/"};var G={title:"Untitled Project",description:"",head:` `,htmlAttrs:'lang="en" class=""',tags:[],autoupdate:!0,autosave:!1,autotest:!1,delay:1500,formatOnsave:!1,view:"split",mode:"full",theme:"dark",themeColor:void 0,layout:"responsive",editorTheme:void 0,appLanguage:void 0,recoverUnsaved:!0,showSpacing:!1,welcome:!0,readonly:!1,allowLangChange:!0,activeEditor:void 0,languages:void 0,markup:{language:"html",content:""},style:{language:"css",content:""},script:{language:"javascript",content:""},stylesheets:[],scripts:[],cssPreset:"",imports:{},types:{},tests:{language:"typescript",content:""},tools:{enabled:"all",active:"",status:""},zoom:1,processors:[],customSettings:{},editor:void 0,fontFamily:void 0,fontSize:void 0,useTabs:!1,tabSize:2,lineNumbers:!0,wordWrap:!1,closeBrackets:!0,foldRegions:!1,semicolons:!0,singleQuote:!1,trailingComma:!0,emmet:!0,enableAI:!1,editorMode:void 0,version:"46"};var je=["esm.sh","skypack","esm.run","jsdelivr.esm","fastly.jsdelivr.esm","gcore.jsdelivr.esm","testingcf.jsdelivr.esm","jsdelivr.b-cdn.esm","jspm"],Te=["jsdelivr","fastly.jsdelivr","unpkg","gcore.jsdelivr","testingcf.jsdelivr","jsdelivr.b-cdn","npmcdn"],Ce=["jsdelivr.gh","fastly.jsdelivr.gh","statically","gcore.jsdelivr.gh","testingcf.jsdelivr.gh","jsdelivr.b-cdn.gh"],_={getModuleUrl:(e,{isModule:t=!0,defaultCDN:o="esm.sh",external:m}={})=>{e=e.replace(/#nobundle/g,"");let g=s=>!m||!s.includes("https://esm.sh")?s:s.includes("?")?`${s}&external=${m}`:`${s}?external=${m}`,x=we(e,t,o);return x?g(x):t?g("https://esm.sh/"+e):"https://cdn.jsdelivr.net/npm/"+e},getUrl:(e,t)=>e.startsWith("http")||e.startsWith("data:")?e:we(e,!1,t||ke())||e,cdnLists:{npm:Te,module:je,gh:Ce},checkCDNs:async(e,t)=>{let o=[t,..._.cdnLists.npm].filter(Boolean);for(let m of o)try{if((await fetch(_.getUrl(e,m),{method:"HEAD"})).ok)return m}catch{}return _.cdnLists.npm[0]}},ke=()=>{if(globalThis.appCDN)return globalThis.appCDN;try{return new URL(location.href).searchParams.get("appCDN")||_.cdnLists.npm[0]}catch{return _.cdnLists.npm[0]}},we=(e,t,o)=>{let m=t&&e.startsWith("unpkg:")?"?module":"";e.startsWith("gh:")?e=e.replace("gh",Ce[0]):e.includes(":")||(e=(o||(t?je[0]:Te[0]))+":"+e);for(let g of ir){let[x,s]=g;if(x.test(e))return e.replace(x,s)+m}return null},ir=[[/^(esm\.sh:)(.+)/i,"https://esm.sh/$2"],[/^(npm:)(.+)/i,"https://esm.sh/$2"],[/^(node:)(.+)/i,"https://esm.sh/$2"],[/^(jsr:)(.+)/i,"https://esm.sh/jsr/$2"],[/^(skypack:)(.+)/i,"https://cdn.skypack.dev/$2"],[/^(jsdelivr:)(.+)/i,"https://cdn.jsdelivr.net/npm/$2"],[/^(fastly\.jsdelivr:)(.+)/i,"https://fastly.jsdelivr.net/npm/$2"],[/^(gcore\.jsdelivr:)(.+)/i,"https://gcore.jsdelivr.net/npm/$2"],[/^(testingcf\.jsdelivr:)(.+)/i,"https://testingcf.jsdelivr.net/npm/$2"],[/^(jsdelivr\.b-cdn:)(.+)/i,"https://jsdelivr.b-cdn.net/npm/$2"],[/^(jsdelivr\.gh:)(.+)/i,"https://cdn.jsdelivr.net/gh/$2"],[/^(fastly\.jsdelivr\.gh:)(.+)/i,"https://fastly.jsdelivr.net/gh/$2"],[/^(gcore\.jsdelivr\.gh:)(.+)/i,"https://gcore.jsdelivr.net/gh/$2"],[/^(testingcf\.jsdelivr\.gh:)(.+)/i,"https://testingcf.jsdelivr.net/gh/$2"],[/^(jsdelivr\.b-cdn\.gh:)(.+)/i,"https://jsdelivr.b-cdn.net/gh/$2"],[/^(statically:)(.+)/i,"https://cdn.statically.io/gh/$2"],[/^(esm\.run:)(.+)/i,"https://esm.run/$2"],[/^(jsdelivr\.esm:)(.+)/i,"https://cdn.jsdelivr.net/npm/$2/+esm"],[/^(fastly\.jsdelivr\.esm:)(.+)/i,"https://fastly.jsdelivr.net/npm/$2/+esm"],[/^(gcore\.jsdelivr\.esm:)(.+)/i,"https://gcore.jsdelivr.net/npm/$2/+esm"],[/^(testingcf\.jsdelivr\.esm:)(.+)/i,"https://testingcf.jsdelivr.net/npm/$2/+esm"],[/^(jsdelivr\.b-cdn\.esm:)(.+)/i,"https://jsdelivr.b-cdn.net/npm/$2/+esm"],[/^(jspm:)(.+)/i,"https://jspm.dev/$2"],[/^(esbuild:)(.+)/i,"https://esbuild.vercel.app/$2"],[/^(bundle\.run:)(.+)/i,"https://bundle.run/$2"],[/^(unpkg:)(.+)/i,"https://unpkg.com/$2"],[/^(npmcdn:)(.+)/i,"https://npmcdn.com/$2"],[/^(bundlejs:)(.+)/i,"https://deno.bundlejs.com/?file&q=$2"],[/^(bundle:)(.+)/i,"https://deno.bundlejs.com/?file&q=$2"],[/^(deno:)(.+)/i,"https://deno.bundlejs.com/?file&q=https://deno.land/x/$2/mod.ts"],[/^(https:\/\/deno\.land\/.+)/i,"https://deno.bundlejs.com/?file&q=$1"],[/^(github:|https:\/\/github\.com\/)(.[^\/]+?)\/(.[^\/]+?)\/(?!releases\/)(?:(?:blob|raw)\/)?(.+?\/.+)/i,"https://deno.bundlejs.com/?file&q=https://cdn.jsdelivr.net/gh/$2/$3@$4"],[/^(gist\.github:)(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i,"https://gist.githack.com/$2"],[/^(gitlab:|https:\/\/gitlab\.com\/)([^\/]+.*\/[^\/]+)\/(?:raw|blob)\/(.+?)(?:\?.*)?$/i,"https://deno.bundlejs.com/?file&q=https://gl.githack.com/$2/raw/$3"],[/^(bitbucket:|https:\/\/bitbucket\.org\/)([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+?)(?:\?.*)?$/i,"https://deno.bundlejs.com/?file&q=https://bb.githack.com/$2/raw/$3"],[/^(bitbucket:)snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i,"https://bb.githack.com/!api/2.0/snippets/$2/$3/files/$4"],[/^(bitbucket:)snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i,"https://bb.githack.com/!api/2.0/snippets/$2/HEAD/files/$3"],[/^(bitbucket:)\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i,"https://bb.githack.com/!api/2.0/snippets/$2/files/$3"],[/^(api\.bitbucket:)2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i,"https://bb.githack.com/!api/2.0/snippets/$2/files/$3"],[/^(rawgit:)(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i,"https://gist.githack.com/$2"],[/^(rawgit:|https:\/\/raw\.githubusercontent\.com)(\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i,"https://deno.bundlejs.com/?file&q=https://raw.githack.com/$2/$3"]];var{getUrl:a,getModuleUrl:as}=_,n=a("@live-codes/browser-compilers@0.22.3/dist/");var Ee=a("art-template@4.13.2/lib/template-web.js");var Me=a("@assemblyscript/loader@0.27.29/umd/index.js");var Ue=a("@hatemhosny/astro-internal@0.0.4/");var He=a("@babel/standalone@7.26.4/babel.js");var ne=a("brython@3.12.4/");var X=a("cherry-cljs@0.2.19/");var ae=a("@live-codes/clio-browser-compiler@0.0.3/public/build/"),qe=a("cm6-theme-basic-light@0.2.0/dist/index.js"),Pe=a("cm6-theme-basic-dark@0.2.0/dist/index.js"),Ae=a("cm6-theme-gruvbox-light@0.2.0/dist/index.js"),Be=a("cm6-theme-gruvbox-dark@0.2.0/dist/index.js"),Ie=a("cm6-theme-material-dark@0.2.0/dist/index.js"),Re=a("cm6-theme-nord@0.2.0/dist/index.js"),_e=a("cm6-theme-solarized-light@0.2.0/dist/index.js"),Ne=a("cm6-theme-solarized-dark@0.2.0/dist/index.js");var N=a("@ddietr/codemirror-themes@1.4.2/dist/theme/");var Fe=a("dot@1.1.3/doT.js"),De=a("ejs@3.1.10/ejs.js");var Oe=a("eta@3.4.0/dist/eta.umd.js");var We=a("@fontsource/anonymous-pro@4.5.9/index.css"),$e=a("gh:hatemhosny/astigmata-font@6d0ee00a07fb1932902f0b81a504d075d47bd52f/index.css");var ze=a("@fontsource/cascadia-code@4.2.1/index.css"),Je=a("https://fonts.cdnfonts.com/css/code-new-roman-2"),Ve=a("comic-mono@0.0.1/index.css"),Ge=a("@fontsource/courier-prime@4.5.9/index.css"),Ke=a("https://fonts.cdnfonts.com/css/dec-terminal-modern"),Ze=a("@fontsource/dejavu-mono@4.5.4/index.css"),Qe=a("@typopro/web-fantasque-sans-mono@3.7.5/TypoPRO-FantasqueSansMono.css"),Xe=a("firacode@6.2.0/distr/fira_code.css"),Ye=a("https://fonts.cdnfonts.com/css/fixedsys-62"),et=a("hack-font@3.3.0/build/web/hack.css"),tt=a("typeface-hermit@0.0.44/index.css"),rt=a("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap"),ot=a("https://fonts.googleapis.com/css2?family=Inconsolata&display=swap");var st=a("@fontsource/iosevka@4.5.4/index.css"),nt=a("@fontsource/jetbrains-mono@4.5.11/index.css");var at=a("https://fonts.cdnfonts.com/css/menlo"),O=a("monaspace-font@0.0.2/"),it=a("https://fonts.cdnfonts.com/css/monofur"),lt=a("@typopro/web-monoid@3.7.5/TypoPRO-Monoid.css"),ct=a("https://fonts.googleapis.com/css2?family=Noto+Sans+Mono&display=swap"),pt=a("https://fonts.googleapis.com/css2?family=Nova+Mono&display=swap"),mt=a("@fontsource/opendyslexic@4.5.4/index.css"),ut=a("https://fonts.cdnfonts.com/css/profontwindows"),dt=a("@fontsource/roboto-mono@4.5.8/index.css"),gt=a("https://fonts.cdnfonts.com/css/sf-mono"),ft=a("@fontsource/source-code-pro@4.5.12/index.css"),yt=a("@fontsource/space-mono@4.5.10/index.css"),ht=a("https://fonts.cdnfonts.com/css/sudo-var"),xt=a("@fontsource/ubuntu-mono@4.5.11/index.css"),bt=a("victormono@1.5.4/dist/index.css");var W=a("@live-codes/go2js@0.5.0/build/");var ie=a("handlebars@4.7.8/dist/");var le=a("imba@2.0.0-alpha.229/dist/");var St=a("liquidjs@10.14.0/dist/liquid.browser.min.js");var vt=a("malinajs@0.7.19/"),Lt=a("marked@13.0.2/marked.min.js");var wt=a("mjml-browser@4.15.3/lib/index.js");var f=a("monaco-themes@0.4.4/themes/");var jt=a("mustache@4.2.0/mustache.js");var ce=a("nunjucks@3.2.4/browser/"),K=a("https://cdn.opalrb.com/opal/1.8.2/"),Tt=a("parinfer@3.13.1/parinfer.js");var F=a("prettier@3.3.2/"),Ct=a("@prettier/plugin-php@0.22.2/standalone.js");var D=a("prismjs@1.29.0/themes/"),L=a("prism-themes@1.9.0/themes/"),kt=a("gh:GalenWong/nord-prism-js@9f085d2a64b37f72a516540ba3f87877d12d7e2d/prism-nord.css"),Et=a("gh:PrismJS/prism-themes@447479fc7b2be2051fe27e561aceed7cc87a589f/themes/prism-laserwave.css");var pe=a("riot@9.2.2/");var me=a("sql-formatter@12.2.1/dist/sql-formatter.min.js"),Mt=a("sql.js@1.10.3/dist/"),$=a("squint-cljs@0.4.81/"),Ut=a("@stencil/core@3.2.2/compiler/stencil.js");var U=a("svelte@5.12.0/");var H=a("thememirror@2.0.1/dist/themes/"),Ht=a("twig@1.17.1/twig.min.js"),qt=a("typescript@5.6.2/lib/typescript.js");var Pt=a("uniter@2.18.0/dist/uniter.js");var ue=a("vue@2"),At=a("vue@3/dist/vue.runtime.esm-browser.prod.js"),Bt=a("livecodes@0.11.1/vue.js"),It=a("vue3-sfc-loader@0.9.5/dist/");var ds=F+"standalone.js",r={babel:F+"plugins/babel.js",estree:F+"plugins/estree.js",glimmer:F+"plugins/glimmer.js",html:F+"plugins/html.js",markdown:F+"plugins/markdown.js",postcss:F+"plugins/postcss.js",php:Ct,pug:n+"prettier/parser-pug.js",java:n+"prettier/parser-java.js"};var lr={name:"art-template",title:"art",longTitle:"art-template",parser:{name:"html",pluginUrls:[r.html]},compiler:{url:Ee,factory:(e,t)=>(self.importScripts(t+"lang-art-template-compiler.f7f28bfde1988e977306171ed26474d0.js"),self.createArtTemplateCompiler())},extensions:["art","art-template"],editor:"markup",editorLanguage:"html"};var cr={name:"lightningcss",title:"Lightning CSS",isPostcssPlugin:!1,compiler:{url:n+"lightningcss/lightningcss.js",factory:(e,t)=>(self.importScripts(t+"processor-lightningcss-compiler.bfb68fd433e1548d10fee6992259f228.js"),self.createLightningcssCompiler())},editor:"style"};var pr={name:"autoprefixer",title:"Autoprefixer",isPostcssPlugin:!0,compiler:{url:n+"autoprefixer/autoprefixer.js",factory:e=>self.autoprefixer.autoprefixer({...S("autoprefixer",e)})},editor:"style"},mr={name:"cssnano",title:"cssnano",isPostcssPlugin:!0,compiler:{url:n+"cssnano/cssnano.js",factory:()=>{let e=self.cssnano.cssnanoPresetDefault().plugins,t=[];for(let o of e){let[m,g]=o;(typeof g>"u"||typeof g=="object"&&!g.exclude||typeof g=="boolean"&&g===!0)&&t.push(m(g))}return t}},editor:"style"};var ur={name:"postcssPresetEnv",title:"Preset Env",isPostcssPlugin:!0,compiler:{url:n+"postcss-preset-env/postcss-preset-env.js",factory:e=>self.postcssPresetEnv.postcssPresetEnv({autoprefixer:!1,...S("postcssPresetEnv",e)})},editor:"style"},dr={name:"purgecss",title:"PurgeCSS",isPostcssPlugin:!0,needsHTML:!0,compiler:{url:n+"purgecss/purgecss.js",factory:(e,t,o)=>self.purgecss.purgecss({...S("purgecss",e),content:[{raw:`