@webqit/oohtml 4.1.1-debug.8 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.lite.js CHANGED
@@ -2,7 +2,7 @@
2
2
  `).join(`
3
3
  `);e=`return ${i==="async-function"?"async ":""}function**(${o.join(", ")}) {
4
4
  ${g}
5
- }`,l.quantumMode=!1}else if(!["script","async-script"].includes(i))throw new Error(`Unrecognized sourceType specified: "${i}".`);a.sourceType=i,l.inBrowser=d,a.base64=f&&d&&"export default async function(%0) {%1}";let p=t(e,{parserParams:l,compilerParams:a});if(p instanceof Promise&&!["async-function","async-script","module"].includes(i))throw new Error("Parse-compile can only return a Promise for sourceTypes: async-function, async-script, module.");return u.sourceType=i,u.inBrowser=d,u.exportNamespace=s,u.fileName=c,U(p,g=>{let y=["function","async-function"].includes(i);return U(((h,b)=>u.compileFunction?u.compileFunction(b.toString(),[h]):a.base64?(()=>import(`data:text/javascript;base64,${b.toString("base64")}`).then(_=>_.default))():new(f?async function(){}.constructor:Function)(h,b.toString()))(g.identifier+"",g),h=>{let b=(O,_=n)=>{let m=h;O&&(m=m.bind(O));let w="global",x=new W(void 0,w,globalThis);return(i.endsWith("script")||_)&&(w="env",x=new W(x,w,_)),i==="module"&&(w="module",x=new W(x,w)),typeof O<"u"&&(x=new W(x,"this",{this:O})),new gt(void 0,w,{...u,originalSource:g.originalSource,quantumMode:g.isQuantumProgram},x,m)};return y?b().execute():{createRuntime:b,compilation:g}})})}var At=class{constructor(...t){let e=this.constructor,r=typeof t[t.length-1]=="object"?t.pop():{},n=t.pop()||"";this.$program=se(e.sourceType,e.parseCompileCallback,n,r)}execute(){return U(this.$program,({createRuntime:t})=>t().execute())}bind(t,e=void 0){return U(this.$program,({createRuntime:r})=>r(t,e))}toString(t=!1){return U(this.$program,({compilation:e})=>t?e+"":e.originalSource)}};var si;function dr(...i){let{source:t,params:e}=ur(i),r=se("async-function",Me,t,e);if(!(r instanceof Promise))return r;let n=async function(...o){return(await r).call(this,...o)};return Object.defineProperty(n,"toString",{value:async function(...o){return(await r).toString(...o)}}),n}var ai=dr,ci,Et=class extends At{};H(Et,"sourceType","async-script"),H(Et,"parseCompileCallback",Me);var li=Et,Bt=class extends At{};H(Bt,"sourceType","module"),H(Bt,"parseCompileCallback",Me);function Me(...i){let t=typeof i[i.length-1]=="object"?i.pop():{},e=i.pop()||"";if(globalThis.webqit?.$qCompiler){let{parse:r,compile:n}=globalThis.webqit.$qCompiler,o=r(e,t.parserParams);return n(o,t.compilerParams)}if(globalThis.webqit=globalThis.webqit||{},!globalThis.webqit.$qCompilerWorker){let o=`
5
+ }`,l.quantumMode=!1}else if(!["script","async-script"].includes(i))throw new Error(`Unrecognized sourceType specified: "${i}".`);a.sourceType=i,l.inBrowser=d,a.base64=f&&d&&"export default async function(%0) {%1}";let p=t(e,{parserParams:l,compilerParams:a});if(p instanceof Promise&&!["async-function","async-script","module"].includes(i))throw new Error("Parse-compile can only return a Promise for sourceTypes: async-function, async-script, module.");return u.sourceType=i,u.inBrowser=d,u.exportNamespace=s,u.fileName=c,U(p,g=>{let y=["function","async-function"].includes(i);return U(((h,b)=>{if(u.compileFunction)return u.compileFunction(b.toString(),[h]);if(a.base64){let O=`data:text/javascript;base64,${b.toString("base64")}`;return(()=>import(O).then(m=>m.default))()}return new(f?async function(){}.constructor:Function)(h,b.toString())})(g.identifier+"",g),h=>{let b=(O,_=n)=>{let m=h;O&&(m=m.bind(O));let w="global",x=new W(void 0,w,globalThis);return(i.endsWith("script")||_)&&(w="env",x=new W(x,w,_)),i==="module"&&(w="module",x=new W(x,w)),typeof O<"u"&&(x=new W(x,"this",{this:O})),new gt(void 0,w,{...u,originalSource:g.originalSource,quantumMode:g.isQuantumProgram},x,m)};return y?b().execute():{createRuntime:b,compilation:g}})})}var At=class{constructor(...t){let e=this.constructor,r=typeof t[t.length-1]=="object"?t.pop():{},n=t.pop()||"";this.$program=se(e.sourceType,e.parseCompileCallback,n,r)}execute(){return U(this.$program,({createRuntime:t})=>t().execute())}bind(t,e=void 0){return U(this.$program,({createRuntime:r})=>r(t,e))}toString(t=!1){return U(this.$program,({compilation:e})=>t?e+"":e.originalSource)}};var si;function dr(...i){let{source:t,params:e}=ur(i),r=se("async-function",Me,t,e);if(!(r instanceof Promise))return r;let n=async function(...o){return(await r).call(this,...o)};return Object.defineProperty(n,"toString",{value:async function(...o){return(await r).toString(...o)}}),n}var ai=dr,ci,Et=class extends At{};H(Et,"sourceType","async-script"),H(Et,"parseCompileCallback",Me);var li=Et,Bt=class extends At{};H(Bt,"sourceType","module"),H(Bt,"parseCompileCallback",Me);function Me(...i){let t=typeof i[i.length-1]=="object"?i.pop():{},e=i.pop()||"";if(globalThis.webqit?.$qCompiler){let{parse:r,compile:n}=globalThis.webqit.$qCompiler,o=r(e,t.parserParams);return n(o,t.compilerParams)}if(globalThis.webqit=globalThis.webqit||{},!globalThis.webqit.$qCompilerWorker){let o=`
6
6
  const compilerUrls = [ '${(document.querySelector('meta[name="$q-compiler-url"]')?.content.split(",")||[]).concat("https://unpkg.com/@webqit/quantum-js/dist/compiler.js").join("','")}' ];
7
7
  ( function importScript() {
8
8
  try { importScripts( compilerUrls.shift().trim() ) } catch( e ) { if ( compilerUrls.length ) { importScript(); } }