Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-wasm

Package Overview
Dependencies
Maintainers
1
Versions
464
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-wasm - npm Package Compare versions

Comparing version 0.17.13 to 0.17.14

6

esm/browser.min.js

@@ -6,3 +6,3 @@ var Ie=Object.defineProperty;var We=(e,t)=>{for(var n in t)Ie(e,n,{get:t[n],enumerable:!0})};var be={};We(be,{analyzeMetafile:()=>st,analyzeMetafileSync:()=>ct,build:()=>nt,buildSync:()=>ot,context:()=>rt,default:()=>pt,formatMessages:()=>lt,formatMessagesSync:()=>ut,initialize:()=>ft,transform:()=>it,transformSync:()=>at,version:()=>tt});function xe(e){let t=l=>{if(l===null)n.write8(0);else if(typeof l=="boolean")n.write8(1),n.write8(+l);else if(typeof l=="number")n.write8(2),n.write32(l|0);else if(typeof l=="string")n.write8(3),n.write(Z(l));else if(l instanceof Uint8Array)n.write8(4),n.write(l);else if(l instanceof Array){n.write8(5),n.write32(l.length);for(let f of l)t(f)}else{let f=Object.keys(l);n.write8(6),n.write32(f.length);for(let i of f)n.write(Z(i)),t(l[i])}},n=new de;return n.write32(0),n.write32(e.id<<1|+!e.isRequest),t(e.value),ve(n.buf,n.len-4,0),n.buf.subarray(0,n.len)}function Ee(e){let t=()=>{switch(n.read8()){case 0:return null;case 1:return!!n.read8();case 2:return n.read32();case 3:return re(n.read());case 4:return n.read();case 5:{let d=n.read32(),s=[];for(let y=0;y<d;y++)s.push(t());return s}case 6:{let d=n.read32(),s={};for(let y=0;y<d;y++)s[re(n.read())]=t();return s}default:throw new Error("Invalid packet")}},n=new de(e),l=n.read32(),f=(l&1)===0;l>>>=1;let i=t();if(n.ptr!==e.length)throw new Error("Invalid packet");return{id:l,isRequest:f,value:i}}var de=class{constructor(t=new Uint8Array(1024)){this.buf=t;this.len=0;this.ptr=0}_write(t){if(this.len+t>this.buf.length){let n=new Uint8Array((this.len+t)*2);n.set(this.buf),this.buf=n}return this.len+=t,this.len-t}write8(t){let n=this._write(1);this.buf[n]=t}write32(t){let n=this._write(4);ve(this.buf,t,n)}write(t){let n=this._write(4+t.length);ve(this.buf,t.length,n),this.buf.set(t,n+4)}_read(t){if(this.ptr+t>this.buf.length)throw new Error("Invalid packet");return this.ptr+=t,this.ptr-t}read8(){return this.buf[this._read(1)]}read32(){return Re(this.buf,this._read(4))}read(){let t=this.read32(),n=new Uint8Array(t),l=this._read(n.length);return n.set(this.buf.subarray(l,l+t)),n}},Z,re,we;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let e=new TextEncoder,t=new TextDecoder;Z=n=>e.encode(n),re=n=>t.decode(n),we='new TextEncoder().encode("")'}else if(typeof Buffer!="undefined")Z=e=>Buffer.from(e),re=e=>{let{buffer:t,byteOffset:n,byteLength:l}=e;return Buffer.from(t,n,l).toString()},we='Buffer.from("")';else throw new Error("No UTF-8 codec found");if(!(Z("")instanceof Uint8Array))throw new Error(`Invariant violation: "${we} instanceof Uint8Array" is incorrectly false

is not a problem with esbuild. You need to fix your environment instead.
`);function Re(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function ve(e,t,n){e[n++]=t,e[n++]=t>>8,e[n++]=t>>16,e[n++]=t>>24}var V=JSON.stringify,Se="warning",ke="silent";function $e(e){if(J(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",h=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",se=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=e=>typeof e=="function"?null:"a function",z=e=>Array.isArray(e)?null:"an array",ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ke=e=>typeof e=="object"&&e!==null?null:"an array or an object",_e=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Me=e=>typeof e=="object"&&!Array.isArray(e)?null:"an object or null",De=e=>typeof e=="string"||typeof e=="boolean"?null:"a string or a boolean",Ve=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Ye=e=>typeof e=="string"||Array.isArray(e)?null:"a string or an array",Pe=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array",Je=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,l){let f=e[n];if(t[n+""]=!0,f===void 0)return;let i=l(f);if(i!==null)throw new Error(`${V(n)} must be ${i}`);return f}function K(e,t,n){for(let l in e)if(!(l in t))throw new Error(`Invalid option ${n}: ${V(l)}`)}function Fe(e){let t=Object.create(null),n=r(e,t,"wasmURL",Je),l=r(e,t,"wasmModule",_e),f=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:l,worker:f}}function Te(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let l=e[n];if(typeof l=="string"||l===!1)t[n]=l;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,l,f){let i=r(t,n,"color",I),d=r(t,n,"logLevel",h),s=r(t,n,"logLimit",se);i!==void 0?e.push(`--color=${i}`):l&&e.push("--color=true"),e.push(`--log-level=${d||f}`),e.push(`--log-limit=${s||0}`)}function J(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+V(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let l=r(t,n,"legalComments",h),f=r(t,n,"sourceRoot",h),i=r(t,n,"sourcesContent",I),d=r(t,n,"target",Ye),s=r(t,n,"format",h),y=r(t,n,"globalName",h),w=r(t,n,"mangleProps",ye),v=r(t,n,"reserveProps",ye),P=r(t,n,"mangleQuoted",I),U=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),j=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),T=r(t,n,"drop",z),W=r(t,n,"charset",h),Y=r(t,n,"treeShaking",I),R=r(t,n,"ignoreAnnotations",I),g=r(t,n,"jsx",h),c=r(t,n,"jsxFactory",h),o=r(t,n,"jsxFragment",h),O=r(t,n,"jsxImportSource",h),S=r(t,n,"jsxDev",I),$=r(t,n,"jsxSideEffects",I),E=r(t,n,"define",ee),a=r(t,n,"logOverride",ee),u=r(t,n,"supported",ee),b=r(t,n,"pure",z),M=r(t,n,"keepNames",I),k=r(t,n,"platform",h);if(l&&e.push(`--legal-comments=${l}`),f!==void 0&&e.push(`--source-root=${f}`),i!==void 0&&e.push(`--sources-content=${i}`),d&&(Array.isArray(d)?e.push(`--target=${Array.from(d).map($e).join(",")}`):e.push(`--target=${$e(d)}`)),s&&e.push(`--format=${s}`),y&&e.push(`--global-name=${y}`),k&&e.push(`--platform=${k}`),U&&e.push("--minify"),B&&e.push("--minify-syntax"),j&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),W&&e.push(`--charset=${W}`),Y!==void 0&&e.push(`--tree-shaking=${Y}`),R&&e.push("--ignore-annotations"),T)for(let m of T)e.push(`--drop:${J(m,"drop")}`);if(w&&e.push(`--mangle-props=${w.source}`),v&&e.push(`--reserve-props=${v.source}`),P!==void 0&&e.push(`--mangle-quoted=${P}`),g&&e.push(`--jsx=${g}`),c&&e.push(`--jsx-factory=${c}`),o&&e.push(`--jsx-fragment=${o}`),O&&e.push(`--jsx-import-source=${O}`),S&&e.push("--jsx-dev"),$&&e.push("--jsx-side-effects"),E)for(let m in E){if(m.indexOf("=")>=0)throw new Error(`Invalid define: ${m}`);e.push(`--define:${m}=${J(E[m],"define",m)}`)}if(a)for(let m in a){if(m.indexOf("=")>=0)throw new Error(`Invalid log override: ${m}`);e.push(`--log-override:${m}=${J(a[m],"log override",m)}`)}if(u)for(let m in u){if(m.indexOf("=")>=0)throw new Error(`Invalid supported: ${m}`);let x=u[m];if(typeof x!="boolean")throw new Error(`Expected value for supported ${V(m)} to be a boolean, got ${typeof x} instead`);e.push(`--supported:${m}=${x}`)}if(b)for(let m of b)e.push(`--pure:${J(m,"pure")}`);M&&e.push("--keep-names")}function Qe(e,t,n,l,f){var le;let i=[],d=[],s=Object.create(null),y=null,w=null;he(i,t,s,n,l),Be(i,t,s);let v=r(t,s,"sourcemap",De),P=r(t,s,"bundle",I),U=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),j=r(t,s,"metafile",I),Q=r(t,s,"outfile",h),T=r(t,s,"outdir",h),W=r(t,s,"outbase",h),Y=r(t,s,"tsconfig",h),R=r(t,s,"resolveExtensions",z),g=r(t,s,"nodePaths",z),c=r(t,s,"mainFields",z),o=r(t,s,"conditions",z),O=r(t,s,"external",z),S=r(t,s,"packages",h),$=r(t,s,"alias",ee),E=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),u=r(t,s,"publicPath",h),b=r(t,s,"entryNames",h),M=r(t,s,"chunkNames",h),k=r(t,s,"assetNames",h),m=r(t,s,"inject",z),x=r(t,s,"banner",ee),F=r(t,s,"footer",ee),L=r(t,s,"entryPoints",Ke),C=r(t,s,"absWorkingDir",h),D=r(t,s,"stdin",ee),A=(le=r(t,s,"write",I))!=null?le:f,q=r(t,s,"allowOverwrite",I),_=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),v&&i.push(`--sourcemap${v===!0?"":`=${v}`}`),P&&i.push("--bundle"),q&&i.push("--allow-overwrite"),U&&i.push("--splitting"),B&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),Q&&i.push(`--outfile=${Q}`),T&&i.push(`--outdir=${T}`),W&&i.push(`--outbase=${W}`),Y&&i.push(`--tsconfig=${Y}`),S&&i.push(`--packages=${S}`),R){let p=[];for(let N of R){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}i.push(`--resolve-extensions=${p.join(",")}`)}if(u&&i.push(`--public-path=${u}`),b&&i.push(`--entry-names=${b}`),M&&i.push(`--chunk-names=${M}`),k&&i.push(`--asset-names=${k}`),c){let p=[];for(let N of c){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}i.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}i.push(`--conditions=${p.join(",")}`)}if(O)for(let p of O)i.push(`--external:${J(p,"external")}`);if($)for(let p in $){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);i.push(`--alias:${p}=${J($[p],"alias",p)}`)}if(x)for(let p in x){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);i.push(`--banner:${p}=${J(x[p],"banner",p)}`)}if(F)for(let p in F){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);i.push(`--footer:${p}=${J(F[p],"footer",p)}`)}if(m)for(let p of m)i.push(`--inject:${J(p,"inject")}`);if(E)for(let p in E){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);i.push(`--loader:${p}=${J(E[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);i.push(`--out-extension:${p}=${J(a[p],"out extension",p)}`)}if(L)if(Array.isArray(L))for(let p=0,N=L.length;p<N;p++){let G=L[p];if(typeof G=="object"&&G!==null){let X=Object.create(null),ne=r(G,X,"in",h),fe=r(G,X,"out",h);if(K(G,X,"in entry point at index "+p),ne===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(fe===void 0)throw new Error('Missing property "out" for entry point at index '+p);d.push([fe,ne])}else d.push(["",J(G,"entry point at index "+p)])}else for(let p in L)d.push([p,J(L[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Pe),G=r(D,p,"resolveDir",h),X=r(D,p,"sourcefile",h),ne=r(D,p,"loader",h);K(D,p,'in "stdin" object'),X&&i.push(`--sourcefile=${X}`),ne&&i.push(`--loader=${ne}`),G&&(w=G),typeof N=="string"?y=Z(N):N instanceof Uint8Array&&(y=N)}let H=[];if(g)for(let p of g)p+="",H.push(p);return{entries:d,flags:i,write:A,stdinContents:y,stdinResolveDir:w,absWorkingDir:C,nodePaths:H,mangleCache:Te(_)}}function He(e,t,n,l){let f=[],i=Object.create(null);he(f,t,i,n,l),Be(f,t,i);let d=r(t,i,"sourcemap",De),s=r(t,i,"tsconfigRaw",Ve),y=r(t,i,"sourcefile",h),w=r(t,i,"loader",h),v=r(t,i,"banner",h),P=r(t,i,"footer",h),U=r(t,i,"mangleCache",ee);return K(t,i,`in ${e}() call`),d&&f.push(`--sourcemap=${d===!0?"external":d}`),s&&f.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),y&&f.push(`--sourcefile=${y}`),w&&f.push(`--loader=${w}`),v&&f.push(`--banner=${v}`),P&&f.push(`--footer=${P}`),{flags:f,mangleCache:Te(U)}}function Ue(e){let t={},n={didClose:!1,reason:""},l={},f=0,i=0,d=new Uint8Array(16*1024),s=0,y=R=>{let g=s+R.length;if(g>d.length){let o=new Uint8Array(g*2);o.set(d),d=o}d.set(R,s),s+=R.length;let c=0;for(;c+4<=s;){let o=Re(d,c);if(c+4+o>s)break;c+=4,j(d.subarray(c,c+o)),c+=o}c>0&&(d.copyWithin(0,c,s),s-=c)},w=R=>{n.didClose=!0,R&&(n.reason=": "+(R.message||R));let g="The service was stopped"+n.reason;for(let c in l)l[c](g,null);l={}},v=(R,g,c)=>{if(n.didClose)return c("The service is no longer running"+n.reason,null);let o=f++;l[o]=(O,S)=>{try{c(O,S)}finally{R&&R.unref()}},R&&R.ref(),e.writeToStdin(xe({id:o,isRequest:!0,value:g}))},P=(R,g)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:R,isRequest:!1,value:g}))},U=async(R,g)=>{try{if(g.command==="ping"){P(R,{});return}if(typeof g.key=="number"){let c=t[g.key];if(c){let o=c[g.command];if(o){await o(R,g);return}}}throw new Error("Invalid command: "+g.command)}catch(c){P(R,{errors:[ie(c,e,null,void 0,"")]})}},B=!0,j=R=>{if(B){B=!1;let c=String.fromCharCode(...R);if(c!=="0.17.13")throw new Error(`Cannot start service: Host version "0.17.13" does not match binary version ${V(c)}`);return}let g=Ee(R);if(g.isRequest)U(g.id,g.value);else{let c=l[g.id];delete l[g.id],g.value.error?c(g.value.error,{}):c(null,g.value)}};return{readFromStdout:y,afterClose:w,service:{buildOrContext:({callName:R,refs:g,options:c,isTTY:o,defaultWD:O,callback:S})=>{let $=0,E=i++,a={},u={ref(){++$===1&&g&&g.ref()},unref(){--$===0&&(delete t[E],g&&g.unref())}};t[E]=a,u.ref(),Ge(R,E,v,P,u,e,a,c,o,O,(b,M)=>{try{S(b,M)}finally{u.unref()}})},transform:({callName:R,refs:g,input:c,options:o,isTTY:O,fs:S,callback:$})=>{let E=je(),a=u=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:M}=He(R,o,O,ke),k={command:"transform",flags:b,inputFS:u!==null,input:u!==null?Z(u):typeof c=="string"?Z(c):c};M&&(k.mangleCache=M),v(g,k,(m,x)=>{if(m)return $(new Error(m),null);let F=oe(x.errors,E),L=oe(x.warnings,E),C=1,D=()=>{if(--C===0){let A={warnings:L,code:x.code,map:x.map,mangleCache:void 0,legalComments:void 0};"legalComments"in x&&(A.legalComments=x==null?void 0:x.legalComments),x.mangleCache&&(A.mangleCache=x==null?void 0:x.mangleCache),$(null,A)}};if(F.length>0)return $(ue("Transform failed",F,L),null);x.codeFS&&(C++,S.readFile(x.code,(A,q)=>{A!==null?$(A,null):(x.code=q,D())})),x.mapFS&&(C++,S.readFile(x.map,(A,q)=>{A!==null?$(A,null):(x.map=q,D())})),D()})}catch(b){let M=[];try{he(M,o,{},O,ke)}catch(m){}let k=ie(b,e,E,void 0,"");v(g,{command:"error",flags:M,error:k},()=>{k.detail=E.load(k.detail),$(ue("Transform failed",[k],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let u=a;a=()=>S.writeFile(c,u)}a(null)},formatMessages:({callName:R,refs:g,messages:c,options:o,callback:O})=>{let S=te(c,"messages",null,"");if(!o)throw new Error(`Missing second argument in ${R}() call`);let $={},E=r(o,$,"kind",h),a=r(o,$,"color",I),u=r(o,$,"terminalWidth",se);if(K(o,$,`in ${R}() call`),E===void 0)throw new Error(`Missing "kind" in ${R}() call`);if(E!=="error"&&E!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${R}() call`);let b={command:"format-msgs",messages:S,isWarning:E==="warning"};a!==void 0&&(b.color=a),u!==void 0&&(b.terminalWidth=u),v(g,b,(M,k)=>{if(M)return O(new Error(M),null);O(null,k.messages)})},analyzeMetafile:({callName:R,refs:g,metafile:c,options:o,callback:O})=>{o===void 0&&(o={});let S={},$=r(o,S,"color",I),E=r(o,S,"verbose",I);K(o,S,`in ${R}() call`);let a={command:"analyze-metafile",metafile:c};$!==void 0&&(a.color=$),E!==void 0&&(a.verbose=E),v(g,a,(u,b)=>{if(u)return O(new Error(u),null);O(null,b.result)})}}}}function Ge(e,t,n,l,f,i,d,s,y,w,v){let P=je(),U=e==="context",B=(T,W)=>{let Y=[];try{he(Y,s,{},y,Se)}catch(g){}let R=ie(T,i,P,void 0,W);n(f,{command:"error",flags:Y,error:R},()=>{R.detail=P.load(R.detail),v(ue(U?"Context failed":"Build failed",[R],[]),null)})},j;if(typeof s=="object"){let T=s.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(i.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Xe(t,n,l,f,i,d,s,j,P).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let R=i.hasFS,{entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$,nodePaths:E,mangleCache:a}=Qe(e,s,y,Se,R);if(o&&!i.hasFS)throw new Error('The "write" option is unavailable in this environment');let u={command:"build",key:t,entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$||w,nodePaths:E,context:U};T&&(u.plugins=T),a&&(u.mangleCache=a);let b=(m,x)=>{let F={errors:oe(m.errors,P),warnings:oe(m.warnings,P),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=F.errors.slice(),C=F.warnings.slice();m.outputFiles&&(F.outputFiles=m.outputFiles.map(Ze)),m.metafile&&(F.metafile=JSON.parse(m.metafile)),m.mangleCache&&(F.mangleCache=m.mangleCache),m.writeToStdout!==void 0&&console.log(re(m.writeToStdout).replace(/\n$/,"")),W(F,(D,A)=>{if(L.length>0||D.length>0){let q=ue("Build failed",L.concat(D),C.concat(A));return x(q,null,D,A)}x(null,F,D,A)})},M,k;U&&(d["on-end"]=(m,x)=>new Promise(F=>{b(x,(L,C,D,A)=>{let q={errors:D,warnings:A};k&&k(L,C),M=void 0,k=void 0,l(m,q),F()})})),n(f,u,(m,x)=>{if(m)return v(new Error(m),null);if(!U)return b(x,(C,D)=>(Y(),v(C,D)));if(x.errors.length>0)return v(ue("Context failed",x.errors,x.warnings),null);let F=!1,L={rebuild:()=>(M||(M=new Promise((C,D)=>{let A;k=(_,H)=>{A||(A=()=>_?D(_):C(H))};let q=()=>{n(f,{command:"rebuild",key:t},(H,le)=>{H?D(new Error(H)):A?A():q()})};q()})),M),watch:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(C,{},"in watch() call"),n(f,{command:"watch",key:t},H=>{H?A(new Error(H)):D(void 0)})}),serve:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(C,q,"port",se),H=r(C,q,"host",h),le=r(C,q,"servedir",h),p=r(C,q,"keyfile",h),N=r(C,q,"certfile",h),G=r(C,q,"onRequest",Ae);K(C,q,"in serve() call");let X={command:"serve",key:t,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),le!==void 0&&(X.servedir=le),p!==void 0&&(X.keyfile=p),N!==void 0&&(X.certfile=N),n(f,X,(ne,fe)=>{if(ne)return A(new Error(ne));G&&(d["serve-request"]=(Le,Ne)=>{G(Ne.args),l(Le,{})}),D(fe)})}),cancel:()=>new Promise(C=>{if(F)return C();n(f,{command:"cancel",key:t},()=>{C()})}),dispose:()=>new Promise(C=>{if(F)return C();F=!0,n(f,{command:"dispose",key:t},()=>{C(),Y(),f.unref()})})};f.ref(),v(null,L)})}}var Xe=async(e,t,n,l,f,i,d,s,y)=>{let w=[],v=[],P={},U={},B=[],j=0,Q=0,T=[],W=!1;s=[...s];for(let g of s){let c={};if(typeof g!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(g,c,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let O=r(g,c,"setup",Ae);if(typeof O!="function")throw new Error("Plugin is missing a setup function");K(g,c,`on plugin ${V(o)}`);let S={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let E=O({initialOptions:d,resolve:(a,u={})=>{if(!W)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),M=r(u,b,"pluginName",h),k=r(u,b,"importer",h),m=r(u,b,"namespace",h),x=r(u,b,"resolveDir",h),F=r(u,b,"kind",h),L=r(u,b,"pluginData",me);return K(u,b,"in resolve() call"),new Promise((C,D)=>{let A={command:"resolve",path:a,key:e,pluginName:o};if(M!=null&&(A.pluginName=M),k!=null&&(A.importer=k),m!=null&&(A.namespace=m),x!=null&&(A.resolveDir=x),F!=null)A.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(A.pluginData=y.store(L)),t(l,A,(q,_)=>{q!==null?D(new Error(q)):C({errors:oe(_.errors,y),warnings:oe(_.warnings,y),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:y.load(_.pluginData)})})})},onStart(a){let u='This error came from the "onStart" callback registered here:',b=pe(new Error(u),f,"onStart");w.push({name:o,callback:a,note:b}),S.onStart=!0},onEnd(a){let u='This error came from the "onEnd" callback registered here:',b=pe(new Error(u),f,"onEnd");v.push({name:o,callback:a,note:b}),S.onEnd=!0},onResolve(a,u){let b='This error came from the "onResolve" callback registered here:',M=pe(new Error(b),f,"onResolve"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onResolve() call for plugin ${V(o)}`),m==null)throw new Error("onResolve() call is missing a filter");let F=j++;P[F]={name:o,callback:u,note:M},S.onResolve.push({id:F,filter:m.source,namespace:x||""})},onLoad(a,u){let b='This error came from the "onLoad" callback registered here:',M=pe(new Error(b),f,"onLoad"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onLoad() call for plugin ${V(o)}`),m==null)throw new Error("onLoad() call is missing a filter");let F=j++;U[F]={name:o,callback:u,note:M},S.onLoad.push({id:F,filter:m.source,namespace:x||""})},onDispose(a){B.push(a)},esbuild:f.esbuild});E&&await E,T.push(S)}catch(O){return{ok:!1,error:O,pluginName:o}}}i["on-start"]=async(g,c)=>{let o={errors:[],warnings:[]};await Promise.all(w.map(async({name:O,callback:S,note:$})=>{try{let E=await S();if(E!=null){if(typeof E!="object")throw new Error(`Expected onStart() callback in plugin ${V(O)} to return an object`);let a={},u=r(E,a,"errors",z),b=r(E,a,"warnings",z);K(E,a,`from onStart() callback in plugin ${V(O)}`),u!=null&&o.errors.push(...te(u,"errors",y,O)),b!=null&&o.warnings.push(...te(b,"warnings",y,O))}}catch(E){o.errors.push(ie(E,f,y,$&&$(),O))}})),n(g,o)},i["on-resolve"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=P[E]);let a=await S({path:c.path,importer:c.importer,namespace:c.namespace,resolveDir:c.resolveDir,kind:c.kind,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"path",h),k=r(a,u,"namespace",h),m=r(a,u,"suffix",h),x=r(a,u,"external",I),F=r(a,u,"sideEffects",I),L=r(a,u,"pluginData",me),C=r(a,u,"errors",z),D=r(a,u,"warnings",z),A=r(a,u,"watchFiles",z),q=r(a,u,"watchDirs",z);K(a,u,`from onResolve() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M!=null&&(o.path=M),k!=null&&(o.namespace=k),m!=null&&(o.suffix=m),x!=null&&(o.external=x),F!=null&&(o.sideEffects=F),L!=null&&(o.pluginData=y.store(L)),C!=null&&(o.errors=te(C,"errors",y,O)),D!=null&&(o.warnings=te(D,"warnings",y,O)),A!=null&&(o.watchFiles=ge(A,"watchFiles")),q!=null&&(o.watchDirs=ge(q,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)},i["on-load"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=U[E]);let a=await S({path:c.path,namespace:c.namespace,suffix:c.suffix,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"contents",Pe),k=r(a,u,"resolveDir",h),m=r(a,u,"pluginData",me),x=r(a,u,"loader",h),F=r(a,u,"errors",z),L=r(a,u,"warnings",z),C=r(a,u,"watchFiles",z),D=r(a,u,"watchDirs",z);K(a,u,`from onLoad() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M instanceof Uint8Array?o.contents=M:M!=null&&(o.contents=Z(M)),k!=null&&(o.resolveDir=k),m!=null&&(o.pluginData=y.store(m)),x!=null&&(o.loader=x),F!=null&&(o.errors=te(F,"errors",y,O)),L!=null&&(o.warnings=te(L,"warnings",y,O)),C!=null&&(o.watchFiles=ge(C,"watchFiles")),D!=null&&(o.watchDirs=ge(D,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)};let Y=(g,c)=>c([],[]);v.length>0&&(Y=(g,c)=>{(async()=>{let o=[],O=[];for(let{name:S,callback:$,note:E}of v){let a,u;try{let b=await $(g);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let M={},k=r(b,M,"errors",z),m=r(b,M,"warnings",z);K(b,M,`from onEnd() callback in plugin ${V(S)}`),k!=null&&(a=te(k,"errors",y,S)),m!=null&&(u=te(m,"warnings",y,S))}}catch(b){a=[ie(b,f,y,E&&E(),S)]}if(a){o.push(...a);try{g.errors.push(...a)}catch(b){}}if(u){O.push(...u);try{g.warnings.push(...u)}catch(b){}}}c(o,O)})()});let R=()=>{for(let g of B)setTimeout(()=>g(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:R}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let l=t++;return e.set(l,n),l}}}function pe(e,t,n){let l,f=!1;return()=>{if(f)return l;f=!0;try{let i=(e.stack+"").split(`
`);function Re(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function ve(e,t,n){e[n++]=t,e[n++]=t>>8,e[n++]=t>>16,e[n++]=t>>24}var V=JSON.stringify,Se="warning",ke="silent";function $e(e){if(J(e,"target"),e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var me=()=>null,I=e=>typeof e=="boolean"?null:"a boolean",h=e=>typeof e=="string"?null:"a string",ye=e=>e instanceof RegExp?null:"a RegExp object",se=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Ae=e=>typeof e=="function"?null:"a function",z=e=>Array.isArray(e)?null:"an array",ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ke=e=>typeof e=="object"&&e!==null?null:"an array or an object",_e=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",Me=e=>typeof e=="object"&&!Array.isArray(e)?null:"an object or null",De=e=>typeof e=="string"||typeof e=="boolean"?null:"a string or a boolean",Ve=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Ye=e=>typeof e=="string"||Array.isArray(e)?null:"a string or an array",Pe=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array",Je=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function r(e,t,n,l){let f=e[n];if(t[n+""]=!0,f===void 0)return;let i=l(f);if(i!==null)throw new Error(`${V(n)} must be ${i}`);return f}function K(e,t,n){for(let l in e)if(!(l in t))throw new Error(`Invalid option ${n}: ${V(l)}`)}function Fe(e){let t=Object.create(null),n=r(e,t,"wasmURL",Je),l=r(e,t,"wasmModule",_e),f=r(e,t,"worker",I);return K(e,t,"in initialize() call"),{wasmURL:n,wasmModule:l,worker:f}}function Te(e){let t;if(e!==void 0){t=Object.create(null);for(let n in e){let l=e[n];if(typeof l=="string"||l===!1)t[n]=l;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return t}function he(e,t,n,l,f){let i=r(t,n,"color",I),d=r(t,n,"logLevel",h),s=r(t,n,"logLimit",se);i!==void 0?e.push(`--color=${i}`):l&&e.push("--color=true"),e.push(`--log-level=${d||f}`),e.push(`--log-limit=${s||0}`)}function J(e,t,n){if(typeof e!="string")throw new Error(`Expected value for ${t}${n!==void 0?" "+V(n):""} to be a string, got ${typeof e} instead`);return e}function Be(e,t,n){let l=r(t,n,"legalComments",h),f=r(t,n,"sourceRoot",h),i=r(t,n,"sourcesContent",I),d=r(t,n,"target",Ye),s=r(t,n,"format",h),y=r(t,n,"globalName",h),w=r(t,n,"mangleProps",ye),v=r(t,n,"reserveProps",ye),P=r(t,n,"mangleQuoted",I),U=r(t,n,"minify",I),B=r(t,n,"minifySyntax",I),j=r(t,n,"minifyWhitespace",I),Q=r(t,n,"minifyIdentifiers",I),T=r(t,n,"drop",z),W=r(t,n,"charset",h),Y=r(t,n,"treeShaking",I),R=r(t,n,"ignoreAnnotations",I),g=r(t,n,"jsx",h),c=r(t,n,"jsxFactory",h),o=r(t,n,"jsxFragment",h),O=r(t,n,"jsxImportSource",h),S=r(t,n,"jsxDev",I),$=r(t,n,"jsxSideEffects",I),E=r(t,n,"define",ee),a=r(t,n,"logOverride",ee),u=r(t,n,"supported",ee),b=r(t,n,"pure",z),M=r(t,n,"keepNames",I),k=r(t,n,"platform",h);if(l&&e.push(`--legal-comments=${l}`),f!==void 0&&e.push(`--source-root=${f}`),i!==void 0&&e.push(`--sources-content=${i}`),d&&(Array.isArray(d)?e.push(`--target=${Array.from(d).map($e).join(",")}`):e.push(`--target=${$e(d)}`)),s&&e.push(`--format=${s}`),y&&e.push(`--global-name=${y}`),k&&e.push(`--platform=${k}`),U&&e.push("--minify"),B&&e.push("--minify-syntax"),j&&e.push("--minify-whitespace"),Q&&e.push("--minify-identifiers"),W&&e.push(`--charset=${W}`),Y!==void 0&&e.push(`--tree-shaking=${Y}`),R&&e.push("--ignore-annotations"),T)for(let m of T)e.push(`--drop:${J(m,"drop")}`);if(w&&e.push(`--mangle-props=${w.source}`),v&&e.push(`--reserve-props=${v.source}`),P!==void 0&&e.push(`--mangle-quoted=${P}`),g&&e.push(`--jsx=${g}`),c&&e.push(`--jsx-factory=${c}`),o&&e.push(`--jsx-fragment=${o}`),O&&e.push(`--jsx-import-source=${O}`),S&&e.push("--jsx-dev"),$&&e.push("--jsx-side-effects"),E)for(let m in E){if(m.indexOf("=")>=0)throw new Error(`Invalid define: ${m}`);e.push(`--define:${m}=${J(E[m],"define",m)}`)}if(a)for(let m in a){if(m.indexOf("=")>=0)throw new Error(`Invalid log override: ${m}`);e.push(`--log-override:${m}=${J(a[m],"log override",m)}`)}if(u)for(let m in u){if(m.indexOf("=")>=0)throw new Error(`Invalid supported: ${m}`);let x=u[m];if(typeof x!="boolean")throw new Error(`Expected value for supported ${V(m)} to be a boolean, got ${typeof x} instead`);e.push(`--supported:${m}=${x}`)}if(b)for(let m of b)e.push(`--pure:${J(m,"pure")}`);M&&e.push("--keep-names")}function Qe(e,t,n,l,f){var le;let i=[],d=[],s=Object.create(null),y=null,w=null;he(i,t,s,n,l),Be(i,t,s);let v=r(t,s,"sourcemap",De),P=r(t,s,"bundle",I),U=r(t,s,"splitting",I),B=r(t,s,"preserveSymlinks",I),j=r(t,s,"metafile",I),Q=r(t,s,"outfile",h),T=r(t,s,"outdir",h),W=r(t,s,"outbase",h),Y=r(t,s,"tsconfig",h),R=r(t,s,"resolveExtensions",z),g=r(t,s,"nodePaths",z),c=r(t,s,"mainFields",z),o=r(t,s,"conditions",z),O=r(t,s,"external",z),S=r(t,s,"packages",h),$=r(t,s,"alias",ee),E=r(t,s,"loader",ee),a=r(t,s,"outExtension",ee),u=r(t,s,"publicPath",h),b=r(t,s,"entryNames",h),M=r(t,s,"chunkNames",h),k=r(t,s,"assetNames",h),m=r(t,s,"inject",z),x=r(t,s,"banner",ee),F=r(t,s,"footer",ee),L=r(t,s,"entryPoints",Ke),C=r(t,s,"absWorkingDir",h),D=r(t,s,"stdin",ee),A=(le=r(t,s,"write",I))!=null?le:f,q=r(t,s,"allowOverwrite",I),_=r(t,s,"mangleCache",ee);if(s.plugins=!0,K(t,s,`in ${e}() call`),v&&i.push(`--sourcemap${v===!0?"":`=${v}`}`),P&&i.push("--bundle"),q&&i.push("--allow-overwrite"),U&&i.push("--splitting"),B&&i.push("--preserve-symlinks"),j&&i.push("--metafile"),Q&&i.push(`--outfile=${Q}`),T&&i.push(`--outdir=${T}`),W&&i.push(`--outbase=${W}`),Y&&i.push(`--tsconfig=${Y}`),S&&i.push(`--packages=${S}`),R){let p=[];for(let N of R){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);p.push(N)}i.push(`--resolve-extensions=${p.join(",")}`)}if(u&&i.push(`--public-path=${u}`),b&&i.push(`--entry-names=${b}`),M&&i.push(`--chunk-names=${M}`),k&&i.push(`--asset-names=${k}`),c){let p=[];for(let N of c){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);p.push(N)}i.push(`--main-fields=${p.join(",")}`)}if(o){let p=[];for(let N of o){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);p.push(N)}i.push(`--conditions=${p.join(",")}`)}if(O)for(let p of O)i.push(`--external:${J(p,"external")}`);if($)for(let p in $){if(p.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${p}`);i.push(`--alias:${p}=${J($[p],"alias",p)}`)}if(x)for(let p in x){if(p.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${p}`);i.push(`--banner:${p}=${J(x[p],"banner",p)}`)}if(F)for(let p in F){if(p.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${p}`);i.push(`--footer:${p}=${J(F[p],"footer",p)}`)}if(m)for(let p of m)i.push(`--inject:${J(p,"inject")}`);if(E)for(let p in E){if(p.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${p}`);i.push(`--loader:${p}=${J(E[p],"loader",p)}`)}if(a)for(let p in a){if(p.indexOf("=")>=0)throw new Error(`Invalid out extension: ${p}`);i.push(`--out-extension:${p}=${J(a[p],"out extension",p)}`)}if(L)if(Array.isArray(L))for(let p=0,N=L.length;p<N;p++){let G=L[p];if(typeof G=="object"&&G!==null){let X=Object.create(null),ne=r(G,X,"in",h),fe=r(G,X,"out",h);if(K(G,X,"in entry point at index "+p),ne===void 0)throw new Error('Missing property "in" for entry point at index '+p);if(fe===void 0)throw new Error('Missing property "out" for entry point at index '+p);d.push([fe,ne])}else d.push(["",J(G,"entry point at index "+p)])}else for(let p in L)d.push([p,J(L[p],"entry point",p)]);if(D){let p=Object.create(null),N=r(D,p,"contents",Pe),G=r(D,p,"resolveDir",h),X=r(D,p,"sourcefile",h),ne=r(D,p,"loader",h);K(D,p,'in "stdin" object'),X&&i.push(`--sourcefile=${X}`),ne&&i.push(`--loader=${ne}`),G&&(w=G),typeof N=="string"?y=Z(N):N instanceof Uint8Array&&(y=N)}let H=[];if(g)for(let p of g)p+="",H.push(p);return{entries:d,flags:i,write:A,stdinContents:y,stdinResolveDir:w,absWorkingDir:C,nodePaths:H,mangleCache:Te(_)}}function He(e,t,n,l){let f=[],i=Object.create(null);he(f,t,i,n,l),Be(f,t,i);let d=r(t,i,"sourcemap",De),s=r(t,i,"tsconfigRaw",Ve),y=r(t,i,"sourcefile",h),w=r(t,i,"loader",h),v=r(t,i,"banner",h),P=r(t,i,"footer",h),U=r(t,i,"mangleCache",ee);return K(t,i,`in ${e}() call`),d&&f.push(`--sourcemap=${d===!0?"external":d}`),s&&f.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),y&&f.push(`--sourcefile=${y}`),w&&f.push(`--loader=${w}`),v&&f.push(`--banner=${v}`),P&&f.push(`--footer=${P}`),{flags:f,mangleCache:Te(U)}}function Ue(e){let t={},n={didClose:!1,reason:""},l={},f=0,i=0,d=new Uint8Array(16*1024),s=0,y=R=>{let g=s+R.length;if(g>d.length){let o=new Uint8Array(g*2);o.set(d),d=o}d.set(R,s),s+=R.length;let c=0;for(;c+4<=s;){let o=Re(d,c);if(c+4+o>s)break;c+=4,j(d.subarray(c,c+o)),c+=o}c>0&&(d.copyWithin(0,c,s),s-=c)},w=R=>{n.didClose=!0,R&&(n.reason=": "+(R.message||R));let g="The service was stopped"+n.reason;for(let c in l)l[c](g,null);l={}},v=(R,g,c)=>{if(n.didClose)return c("The service is no longer running"+n.reason,null);let o=f++;l[o]=(O,S)=>{try{c(O,S)}finally{R&&R.unref()}},R&&R.ref(),e.writeToStdin(xe({id:o,isRequest:!0,value:g}))},P=(R,g)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);e.writeToStdin(xe({id:R,isRequest:!1,value:g}))},U=async(R,g)=>{try{if(g.command==="ping"){P(R,{});return}if(typeof g.key=="number"){let c=t[g.key];if(c){let o=c[g.command];if(o){await o(R,g);return}}}throw new Error("Invalid command: "+g.command)}catch(c){P(R,{errors:[ie(c,e,null,void 0,"")]})}},B=!0,j=R=>{if(B){B=!1;let c=String.fromCharCode(...R);if(c!=="0.17.14")throw new Error(`Cannot start service: Host version "0.17.14" does not match binary version ${V(c)}`);return}let g=Ee(R);if(g.isRequest)U(g.id,g.value);else{let c=l[g.id];delete l[g.id],g.value.error?c(g.value.error,{}):c(null,g.value)}};return{readFromStdout:y,afterClose:w,service:{buildOrContext:({callName:R,refs:g,options:c,isTTY:o,defaultWD:O,callback:S})=>{let $=0,E=i++,a={},u={ref(){++$===1&&g&&g.ref()},unref(){--$===0&&(delete t[E],g&&g.unref())}};t[E]=a,u.ref(),Ge(R,E,v,P,u,e,a,c,o,O,(b,M)=>{try{S(b,M)}finally{u.unref()}})},transform:({callName:R,refs:g,input:c,options:o,isTTY:O,fs:S,callback:$})=>{let E=je(),a=u=>{try{if(typeof c!="string"&&!(c instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:M}=He(R,o,O,ke),k={command:"transform",flags:b,inputFS:u!==null,input:u!==null?Z(u):typeof c=="string"?Z(c):c};M&&(k.mangleCache=M),v(g,k,(m,x)=>{if(m)return $(new Error(m),null);let F=oe(x.errors,E),L=oe(x.warnings,E),C=1,D=()=>{if(--C===0){let A={warnings:L,code:x.code,map:x.map,mangleCache:void 0,legalComments:void 0};"legalComments"in x&&(A.legalComments=x==null?void 0:x.legalComments),x.mangleCache&&(A.mangleCache=x==null?void 0:x.mangleCache),$(null,A)}};if(F.length>0)return $(ue("Transform failed",F,L),null);x.codeFS&&(C++,S.readFile(x.code,(A,q)=>{A!==null?$(A,null):(x.code=q,D())})),x.mapFS&&(C++,S.readFile(x.map,(A,q)=>{A!==null?$(A,null):(x.map=q,D())})),D()})}catch(b){let M=[];try{he(M,o,{},O,ke)}catch(m){}let k=ie(b,e,E,void 0,"");v(g,{command:"error",flags:M,error:k},()=>{k.detail=E.load(k.detail),$(ue("Transform failed",[k],[]),null)})}};if((typeof c=="string"||c instanceof Uint8Array)&&c.length>1024*1024){let u=a;a=()=>S.writeFile(c,u)}a(null)},formatMessages:({callName:R,refs:g,messages:c,options:o,callback:O})=>{let S=te(c,"messages",null,"");if(!o)throw new Error(`Missing second argument in ${R}() call`);let $={},E=r(o,$,"kind",h),a=r(o,$,"color",I),u=r(o,$,"terminalWidth",se);if(K(o,$,`in ${R}() call`),E===void 0)throw new Error(`Missing "kind" in ${R}() call`);if(E!=="error"&&E!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${R}() call`);let b={command:"format-msgs",messages:S,isWarning:E==="warning"};a!==void 0&&(b.color=a),u!==void 0&&(b.terminalWidth=u),v(g,b,(M,k)=>{if(M)return O(new Error(M),null);O(null,k.messages)})},analyzeMetafile:({callName:R,refs:g,metafile:c,options:o,callback:O})=>{o===void 0&&(o={});let S={},$=r(o,S,"color",I),E=r(o,S,"verbose",I);K(o,S,`in ${R}() call`);let a={command:"analyze-metafile",metafile:c};$!==void 0&&(a.color=$),E!==void 0&&(a.verbose=E),v(g,a,(u,b)=>{if(u)return O(new Error(u),null);O(null,b.result)})}}}}function Ge(e,t,n,l,f,i,d,s,y,w,v){let P=je(),U=e==="context",B=(T,W)=>{let Y=[];try{he(Y,s,{},y,Se)}catch(g){}let R=ie(T,i,P,void 0,W);n(f,{command:"error",flags:Y,error:R},()=>{R.detail=P.load(R.detail),v(ue(U?"Context failed":"Build failed",[R],[]),null)})},j;if(typeof s=="object"){let T=s.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(i.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");Xe(t,n,l,f,i,d,s,j,P).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let R=i.hasFS,{entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$,nodePaths:E,mangleCache:a}=Qe(e,s,y,Se,R);if(o&&!i.hasFS)throw new Error('The "write" option is unavailable in this environment');let u={command:"build",key:t,entries:g,flags:c,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:$||w,nodePaths:E,context:U};T&&(u.plugins=T),a&&(u.mangleCache=a);let b=(m,x)=>{let F={errors:oe(m.errors,P),warnings:oe(m.warnings,P),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=F.errors.slice(),C=F.warnings.slice();m.outputFiles&&(F.outputFiles=m.outputFiles.map(Ze)),m.metafile&&(F.metafile=JSON.parse(m.metafile)),m.mangleCache&&(F.mangleCache=m.mangleCache),m.writeToStdout!==void 0&&console.log(re(m.writeToStdout).replace(/\n$/,"")),W(F,(D,A)=>{if(L.length>0||D.length>0){let q=ue("Build failed",L.concat(D),C.concat(A));return x(q,null,D,A)}x(null,F,D,A)})},M,k;U&&(d["on-end"]=(m,x)=>new Promise(F=>{b(x,(L,C,D,A)=>{let q={errors:D,warnings:A};k&&k(L,C),M=void 0,k=void 0,l(m,q),F()})})),n(f,u,(m,x)=>{if(m)return v(new Error(m),null);if(!U)return b(x,(C,D)=>(Y(),v(C,D)));if(x.errors.length>0)return v(ue("Context failed",x.errors,x.warnings),null);let F=!1,L={rebuild:()=>(M||(M=new Promise((C,D)=>{let A;k=(_,H)=>{A||(A=()=>_?D(_):C(H))};let q=()=>{n(f,{command:"rebuild",key:t},(H,le)=>{H?D(new Error(H)):A?A():q()})};q()})),M),watch:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(C,{},"in watch() call"),n(f,{command:"watch",key:t},H=>{H?A(new Error(H)):D(void 0)})}),serve:(C={})=>new Promise((D,A)=>{if(!i.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(C,q,"port",se),H=r(C,q,"host",h),le=r(C,q,"servedir",h),p=r(C,q,"keyfile",h),N=r(C,q,"certfile",h),G=r(C,q,"onRequest",Ae);K(C,q,"in serve() call");let X={command:"serve",key:t,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),le!==void 0&&(X.servedir=le),p!==void 0&&(X.keyfile=p),N!==void 0&&(X.certfile=N),n(f,X,(ne,fe)=>{if(ne)return A(new Error(ne));G&&(d["serve-request"]=(Le,Ne)=>{G(Ne.args),l(Le,{})}),D(fe)})}),cancel:()=>new Promise(C=>{if(F)return C();n(f,{command:"cancel",key:t},()=>{C()})}),dispose:()=>new Promise(C=>{if(F)return C();F=!0,n(f,{command:"dispose",key:t},()=>{C(),Y(),f.unref()})})};f.ref(),v(null,L)})}}var Xe=async(e,t,n,l,f,i,d,s,y)=>{let w=[],v=[],P={},U={},B=[],j=0,Q=0,T=[],W=!1;s=[...s];for(let g of s){let c={};if(typeof g!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(g,c,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let O=r(g,c,"setup",Ae);if(typeof O!="function")throw new Error("Plugin is missing a setup function");K(g,c,`on plugin ${V(o)}`);let S={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let E=O({initialOptions:d,resolve:(a,u={})=>{if(!W)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),M=r(u,b,"pluginName",h),k=r(u,b,"importer",h),m=r(u,b,"namespace",h),x=r(u,b,"resolveDir",h),F=r(u,b,"kind",h),L=r(u,b,"pluginData",me);return K(u,b,"in resolve() call"),new Promise((C,D)=>{let A={command:"resolve",path:a,key:e,pluginName:o};if(M!=null&&(A.pluginName=M),k!=null&&(A.importer=k),m!=null&&(A.namespace=m),x!=null&&(A.resolveDir=x),F!=null)A.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(A.pluginData=y.store(L)),t(l,A,(q,_)=>{q!==null?D(new Error(q)):C({errors:oe(_.errors,y),warnings:oe(_.warnings,y),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:y.load(_.pluginData)})})})},onStart(a){let u='This error came from the "onStart" callback registered here:',b=pe(new Error(u),f,"onStart");w.push({name:o,callback:a,note:b}),S.onStart=!0},onEnd(a){let u='This error came from the "onEnd" callback registered here:',b=pe(new Error(u),f,"onEnd");v.push({name:o,callback:a,note:b}),S.onEnd=!0},onResolve(a,u){let b='This error came from the "onResolve" callback registered here:',M=pe(new Error(b),f,"onResolve"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onResolve() call for plugin ${V(o)}`),m==null)throw new Error("onResolve() call is missing a filter");let F=j++;P[F]={name:o,callback:u,note:M},S.onResolve.push({id:F,filter:m.source,namespace:x||""})},onLoad(a,u){let b='This error came from the "onLoad" callback registered here:',M=pe(new Error(b),f,"onLoad"),k={},m=r(a,k,"filter",ye),x=r(a,k,"namespace",h);if(K(a,k,`in onLoad() call for plugin ${V(o)}`),m==null)throw new Error("onLoad() call is missing a filter");let F=j++;U[F]={name:o,callback:u,note:M},S.onLoad.push({id:F,filter:m.source,namespace:x||""})},onDispose(a){B.push(a)},esbuild:f.esbuild});E&&await E,T.push(S)}catch(O){return{ok:!1,error:O,pluginName:o}}}i["on-start"]=async(g,c)=>{let o={errors:[],warnings:[]};await Promise.all(w.map(async({name:O,callback:S,note:$})=>{try{let E=await S();if(E!=null){if(typeof E!="object")throw new Error(`Expected onStart() callback in plugin ${V(O)} to return an object`);let a={},u=r(E,a,"errors",z),b=r(E,a,"warnings",z);K(E,a,`from onStart() callback in plugin ${V(O)}`),u!=null&&o.errors.push(...te(u,"errors",y,O)),b!=null&&o.warnings.push(...te(b,"warnings",y,O))}}catch(E){o.errors.push(ie(E,f,y,$&&$(),O))}})),n(g,o)},i["on-resolve"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=P[E]);let a=await S({path:c.path,importer:c.importer,namespace:c.namespace,resolveDir:c.resolveDir,kind:c.kind,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"path",h),k=r(a,u,"namespace",h),m=r(a,u,"suffix",h),x=r(a,u,"external",I),F=r(a,u,"sideEffects",I),L=r(a,u,"pluginData",me),C=r(a,u,"errors",z),D=r(a,u,"warnings",z),A=r(a,u,"watchFiles",z),q=r(a,u,"watchDirs",z);K(a,u,`from onResolve() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M!=null&&(o.path=M),k!=null&&(o.namespace=k),m!=null&&(o.suffix=m),x!=null&&(o.external=x),F!=null&&(o.sideEffects=F),L!=null&&(o.pluginData=y.store(L)),C!=null&&(o.errors=te(C,"errors",y,O)),D!=null&&(o.warnings=te(D,"warnings",y,O)),A!=null&&(o.watchFiles=ge(A,"watchFiles")),q!=null&&(o.watchDirs=ge(q,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)},i["on-load"]=async(g,c)=>{let o={},O="",S,$;for(let E of c.ids)try{({name:O,callback:S,note:$}=U[E]);let a=await S({path:c.path,namespace:c.namespace,suffix:c.suffix,pluginData:y.load(c.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(O)} to return an object`);let u={},b=r(a,u,"pluginName",h),M=r(a,u,"contents",Pe),k=r(a,u,"resolveDir",h),m=r(a,u,"pluginData",me),x=r(a,u,"loader",h),F=r(a,u,"errors",z),L=r(a,u,"warnings",z),C=r(a,u,"watchFiles",z),D=r(a,u,"watchDirs",z);K(a,u,`from onLoad() callback in plugin ${V(O)}`),o.id=E,b!=null&&(o.pluginName=b),M instanceof Uint8Array?o.contents=M:M!=null&&(o.contents=Z(M)),k!=null&&(o.resolveDir=k),m!=null&&(o.pluginData=y.store(m)),x!=null&&(o.loader=x),F!=null&&(o.errors=te(F,"errors",y,O)),L!=null&&(o.warnings=te(L,"warnings",y,O)),C!=null&&(o.watchFiles=ge(C,"watchFiles")),D!=null&&(o.watchDirs=ge(D,"watchDirs"));break}}catch(a){o={id:E,errors:[ie(a,f,y,$&&$(),O)]};break}n(g,o)};let Y=(g,c)=>c([],[]);v.length>0&&(Y=(g,c)=>{(async()=>{let o=[],O=[];for(let{name:S,callback:$,note:E}of v){let a,u;try{let b=await $(g);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let M={},k=r(b,M,"errors",z),m=r(b,M,"warnings",z);K(b,M,`from onEnd() callback in plugin ${V(S)}`),k!=null&&(a=te(k,"errors",y,S)),m!=null&&(u=te(m,"warnings",y,S))}}catch(b){a=[ie(b,f,y,E&&E(),S)]}if(a){o.push(...a);try{g.errors.push(...a)}catch(b){}}if(u){O.push(...u);try{g.warnings.push(...u)}catch(b){}}}c(o,O)})()});let R=()=>{for(let g of B)setTimeout(()=>g(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:R}};function je(){let e=new Map,t=0;return{load(n){return e.get(n)},store(n){if(n===void 0)return-1;let l=t++;return e.set(l,n),l}}}function pe(e,t,n){let l,f=!1;return()=>{if(f)return l;f=!0;try{let i=(e.stack+"").split(`
`);i.splice(1,1);let d=qe(t,i,n);if(d)return l={text:e.message,location:d},l}catch(i){}}}function ie(e,t,n,l,f){let i="Internal error",d=null;try{i=(e&&e.message||e)+""}catch(s){}try{d=qe(t,(e.stack+"").split(`

@@ -14,3 +14,3 @@ `),"")}catch(s){}return{id:"",pluginName:f,text:i,location:d,notes:l?[l]:[],detail:n?n.store(e):-1}}function qe(e,t,n){let l=" at ";if(e.readFileSync&&!t[0].startsWith(l)&&t[1].startsWith(l))for(let f=1;f<t.length;f++){let i=t[f];if(i.startsWith(l))for(i=i.slice(l.length);;){let d=/^(?:new |async )?\S+ \((.*)\)$/.exec(i);if(d){i=d[1];continue}if(d=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(i),d){i=d[1];continue}if(d=/^(\S+):(\d+):(\d+)$/.exec(i),d){let s;try{s=e.readFileSync(d[1],"utf8")}catch(P){break}let y=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+d[2]-1]||"",w=+d[3]-1,v=y.slice(w,w+n.length)===n?n.length:0;return{file:d[1],namespace:"file",line:+d[2],column:Z(y.slice(0,w)).length,length:Z(y.slice(w,w+v)).length,lineText:y+`

error: ${d.text}`;let{file:y,line:w,column:v}=d.location,P=d.pluginName?`[plugin: ${d.pluginName}] `:"";return`
${y}:${w}:${v}: ERROR: ${P}${d.text}`}).join(""),i=new Error(`${e}${f}`);return i.errors=t,i.warnings=n,i}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Ce(e,t){if(e==null)return null;let n={},l=r(e,n,"file",h),f=r(e,n,"namespace",h),i=r(e,n,"line",se),d=r(e,n,"column",se),s=r(e,n,"length",se),y=r(e,n,"lineText",h),w=r(e,n,"suggestion",h);return K(e,n,t),{file:l||"",namespace:f||"",line:i||0,column:d||0,length:s||0,lineText:y||"",suggestion:w||""}}function te(e,t,n,l){let f=[],i=0;for(let d of e){let s={},y=r(d,s,"id",h),w=r(d,s,"pluginName",h),v=r(d,s,"text",h),P=r(d,s,"location",Me),U=r(d,s,"notes",z),B=r(d,s,"detail",me),j=`in element ${i} of "${t}"`;K(d,s,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),R=r(T,W,"location",Me);K(T,W,j),Q.push({text:Y||"",location:Ce(R,j)})}f.push({id:y||"",pluginName:w||l,text:v||"",location:Ce(P,j),notes:Q,detail:n?n.store(B):-1}),i++}return f}function ge(e,t){let n=[];for(let l of e){if(typeof l!="string")throw new Error(`${V(t)} must be an array of strings`);n.push(l)}return n}function Ze({path:e,contents:t}){let n=null;return{path:e,contents:t,get text(){let l=this.contents;return(n===null||l!==t)&&(t=l,n=re(l)),n}}}var tt="0.17.13",nt=e=>ce().build(e),rt=e=>ce().context(e),it=(e,t)=>ce().transform(e,t),lt=(e,t)=>ce().formatMessages(e,t),st=(e,t)=>ce().analyzeMetafile(e,t),ot=()=>{throw new Error('The "buildSync" API only works in node')},at=()=>{throw new Error('The "transformSync" API only works in node')},ut=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ct=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,ce=()=>{if(Oe)return Oe;throw ae?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},ft=e=>{e=Fe(e||{});let t=e.wasmURL,n=e.wasmModule,l=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=dt(t||"",n,l),ae.catch(()=>{ae=void 0}),ae},dt=async(e,t,n)=>{let l;if(n){let w=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nlet onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=g.decode(s);const i=c.lastIndexOf(`\n`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,a,h,u){if(i!==0||a!==s.length||h!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,a){a(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const f=new TextEncoder("utf-8"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let l=this._ids.get(t);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=t,this._goRefCounts[l]=0,this._ids.set(t,l)),this._goRefCounts[l]++;let m=0;switch(typeof t){case"object":t!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(e+4,2146959360|m,!0),this.mem.setUint32(e,l,!0)},a=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(t+m*8);return l},u=e=>{const t=n(e+0),o=n(e+8);return g.decode(new DataView(this._inst.exports.mem.buffer,t,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),l=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(a(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),l=h(e+32),m=Reflect.apply(o,t,l);e=this._inst.exports.getsp()>>>0,i(e+56,m),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);a(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=a(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=a(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,a=[];this.argv.forEach(e=>{a.push(s(e))}),a.push(0),Object.keys(this.env).sort().forEach(e=>{a.push(s(`${e}=${this.env[e]}`))}),a.push(0);const u=n;a.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const d=4096+8192;if(n>=d)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let d=c.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),c=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},g.read=(h,u,d,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.17.13"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});l=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
${y}:${w}:${v}: ERROR: ${P}${d.text}`}).join(""),i=new Error(`${e}${f}`);return i.errors=t,i.warnings=n,i}function oe(e,t){for(let n of e)n.detail=t.load(n.detail);return e}function Ce(e,t){if(e==null)return null;let n={},l=r(e,n,"file",h),f=r(e,n,"namespace",h),i=r(e,n,"line",se),d=r(e,n,"column",se),s=r(e,n,"length",se),y=r(e,n,"lineText",h),w=r(e,n,"suggestion",h);return K(e,n,t),{file:l||"",namespace:f||"",line:i||0,column:d||0,length:s||0,lineText:y||"",suggestion:w||""}}function te(e,t,n,l){let f=[],i=0;for(let d of e){let s={},y=r(d,s,"id",h),w=r(d,s,"pluginName",h),v=r(d,s,"text",h),P=r(d,s,"location",Me),U=r(d,s,"notes",z),B=r(d,s,"detail",me),j=`in element ${i} of "${t}"`;K(d,s,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),R=r(T,W,"location",Me);K(T,W,j),Q.push({text:Y||"",location:Ce(R,j)})}f.push({id:y||"",pluginName:w||l,text:v||"",location:Ce(P,j),notes:Q,detail:n?n.store(B):-1}),i++}return f}function ge(e,t){let n=[];for(let l of e){if(typeof l!="string")throw new Error(`${V(t)} must be an array of strings`);n.push(l)}return n}function Ze({path:e,contents:t}){let n=null;return{path:e,contents:t,get text(){let l=this.contents;return(n===null||l!==t)&&(t=l,n=re(l)),n}}}var tt="0.17.14",nt=e=>ce().build(e),rt=e=>ce().context(e),it=(e,t)=>ce().transform(e,t),lt=(e,t)=>ce().formatMessages(e,t),st=(e,t)=>ce().analyzeMetafile(e,t),ot=()=>{throw new Error('The "buildSync" API only works in node')},at=()=>{throw new Error('The "transformSync" API only works in node')},ut=()=>{throw new Error('The "formatMessagesSync" API only works in node')},ct=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ae,Oe,ce=()=>{if(Oe)return Oe;throw ae?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},ft=e=>{e=Fe(e||{});let t=e.wasmURL,n=e.wasmModule,l=e.worker!==!1;if(!t&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ae)throw new Error('Cannot call "initialize" more than once');return ae=dt(t||"",n,l),ae.catch(()=>{ae=void 0}),ae},dt=async(e,t,n)=>{let l;if(n){let w=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nlet onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=g.decode(s);const i=c.lastIndexOf(`\n`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,a,h,u){if(i!==0||a!==s.length||h!==null){u(r());return}const d=this.writeSync(n,s);u(null,d)},chmod(n,s,i){i(r())},chown(n,s,i,a){a(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,a){a(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,a){a(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,a){a(r())},read(n,s,i,a,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,a){a(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const f=new TextEncoder("utf-8"),g=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let l=this._ids.get(t);l===void 0&&(l=this._idPool.pop(),l===void 0&&(l=this._values.length),this._values[l]=t,this._goRefCounts[l]=0,this._ids.set(t,l)),this._goRefCounts[l]++;let m=0;switch(typeof t){case"object":t!==null&&(m=1);break;case"string":m=2;break;case"symbol":m=3;break;case"function":m=4;break}this.mem.setUint32(e+4,2146959360|m,!0),this.mem.setUint32(e,l,!0)},a=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),l=new Array(o);for(let m=0;m<o;m++)l[m]=s(t+m*8);return l},u=e=>{const t=n(e+0),o=n(e+8);return g.decode(new DataView(this._inst.exports.mem.buffer,t,o))},d=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),l=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,l))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(d+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(a(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),l=h(e+32),m=Reflect.apply(o,t,l);e=this._inst.exports.getsp()>>>0,i(e+56,m),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),l=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,l),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);a(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=a(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=a(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const l=o.subarray(0,t.length);t.set(l),c(e+40,l.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}async run(c){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,a=[];this.argv.forEach(e=>{a.push(s(e))}),a.push(0),Object.keys(this.env).sort().forEach(e=>{a.push(s(`${e}=${this.env[e]}`))}),a.push(0);const u=n;a.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const d=4096+8192;if(n>=d)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,g=globalThis.fs,c="";g.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let d=c.split(`\n`);d.length>1&&console.log(d.slice(0,-1).join(`\n`)),c=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},g.read=(h,u,d,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.17.14"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});l=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
// Copyright 2018 The Go Authors. All rights reserved.

@@ -22,2 +22,2 @@ // Use of this source code is governed by a BSD-style

`);d.length>1&&console.log(d.slice(0,-1).join(`
`)),c=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},g.read=(h,u,d,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.17.13"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(v=>l.onmessage({data:v}));l={onmessage:null,postMessage:v=>setTimeout(()=>w({data:v})),terminate(){}}}let f,i,d=new Promise((w,v)=>{f=w,i=v});l.onmessage=({data:w})=>{l.onmessage=({data:v})=>s(v),w?i(w):f()},l.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:y}=Ue({writeToStdin(w){l.postMessage(w)},isSync:!1,hasFS:!1,esbuild:be});await d,Oe={build:w=>new Promise((v,P)=>y.buildOrContext({callName:"build",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),context:w=>new Promise((v,P)=>y.buildOrContext({callName:"context",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),transform:(w,v)=>new Promise((P,U)=>y.transform({callName:"transform",refs:null,input:w,options:v||{},isTTY:!1,fs:{readFile(B,j){j(new Error("Internal error"),null)},writeFile(B,j){j(null)}},callback:(B,j)=>B?U(B):P(j)})),formatMessages:(w,v)=>new Promise((P,U)=>y.formatMessages({callName:"formatMessages",refs:null,messages:w,options:v,callback:(B,j)=>B?U(B):P(j)})),analyzeMetafile:(w,v)=>new Promise((P,U)=>y.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof w=="string"?w:JSON.stringify(w),options:v,callback:(B,j)=>B?U(B):P(j)}))}},pt=be;export{st as analyzeMetafile,ct as analyzeMetafileSync,nt as build,ot as buildSync,rt as context,pt as default,lt as formatMessages,ut as formatMessagesSync,ft as initialize,it as transform,at as transformSync,tt as version};
`)),c=d[d.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},g.read=(h,u,d,e,t,o)=>{if(h!==0||d!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>g.read(h,u,d,e,t,o);return}let l=n[0],m=Math.max(0,Math.min(e,l.length-i));u.set(l.subarray(i,i+m),d),i+=m,i===l.length&&(n.shift(),i=0),o(null,m)};let a=new globalThis.Go;a.argv=["","--service=0.17.14"],tryToInstantiateModule(r,a).then(h=>{postMessage(null),a.run(h)},h=>{postMessage(h)})};async function tryToInstantiateModule(r,f){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const g=await fetch(r);if(!g.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(g.headers.get("Content-Type")||""))return(await WebAssembly.instantiateStreaming(g,f.importObject)).instance;const c=await g.arrayBuffer();return(await WebAssembly.instantiate(c,f.importObject)).instance}return r=>onmessage(r);})(v=>l.onmessage({data:v}));l={onmessage:null,postMessage:v=>setTimeout(()=>w({data:v})),terminate(){}}}let f,i,d=new Promise((w,v)=>{f=w,i=v});l.onmessage=({data:w})=>{l.onmessage=({data:v})=>s(v),w?i(w):f()},l.postMessage(t||new URL(e,location.href).toString());let{readFromStdout:s,service:y}=Ue({writeToStdin(w){l.postMessage(w)},isSync:!1,hasFS:!1,esbuild:be});await d,Oe={build:w=>new Promise((v,P)=>y.buildOrContext({callName:"build",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),context:w=>new Promise((v,P)=>y.buildOrContext({callName:"context",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),transform:(w,v)=>new Promise((P,U)=>y.transform({callName:"transform",refs:null,input:w,options:v||{},isTTY:!1,fs:{readFile(B,j){j(new Error("Internal error"),null)},writeFile(B,j){j(null)}},callback:(B,j)=>B?U(B):P(j)})),formatMessages:(w,v)=>new Promise((P,U)=>y.formatMessages({callName:"formatMessages",refs:null,messages:w,options:v,callback:(B,j)=>B?U(B):P(j)})),analyzeMetafile:(w,v)=>new Promise((P,U)=>y.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof w=="string"?w:JSON.stringify(w),options:v,callback:(B,j)=>B?U(B):P(j)}))}},pt=be;export{st as analyzeMetafile,ct as analyzeMetafileSync,nt as build,ot as buildSync,rt as context,pt as default,lt as formatMessages,ut as formatMessagesSync,ft as initialize,it as transform,at as transformSync,tt as version};

@@ -7,3 +7,3 @@ (module=>{

is not a problem with esbuild. You need to fix your environment instead.
`);function Ee(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function Re(t,e,n){t[n++]=e,t[n++]=e>>8,t[n++]=e>>16,t[n++]=e>>24}var V=JSON.stringify,$e="warning",Me="silent";function Ce(t){if(J(t,"target"),t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var ye=()=>null,I=t=>typeof t=="boolean"?null:"a boolean",h=t=>typeof t=="string"?null:"a string",he=t=>t instanceof RegExp?null:"a RegExp object",oe=t=>typeof t=="number"&&t===(t|0)?null:"an integer",Pe=t=>typeof t=="function"?null:"a function",z=t=>Array.isArray(t)?null:"an array",ee=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",He=t=>typeof t=="object"&&t!==null?null:"an array or an object",Ge=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",Ae=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Fe=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Xe=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",Ze=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",Te=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array",et=t=>typeof t=="string"||t instanceof URL?null:"a string or a URL";function r(t,e,n,i){let u=t[n];if(e[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${V(n)} must be ${l}`);return u}function K(t,e,n){for(let i in t)if(!(i in e))throw new Error(`Invalid option ${n}: ${V(i)}`)}function Be(t){let e=Object.create(null),n=r(t,e,"wasmURL",et),i=r(t,e,"wasmModule",Ge),u=r(t,e,"worker",I);return K(t,e,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function Ue(t){let e;if(t!==void 0){e=Object.create(null);for(let n in t){let i=t[n];if(typeof i=="string"||i===!1)e[n]=i;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return e}function be(t,e,n,i,u){let l=r(e,n,"color",I),f=r(e,n,"logLevel",h),s=r(e,n,"logLimit",oe);l!==void 0?t.push(`--color=${l}`):i&&t.push("--color=true"),t.push(`--log-level=${f||u}`),t.push(`--log-limit=${s||0}`)}function J(t,e,n){if(typeof t!="string")throw new Error(`Expected value for ${e}${n!==void 0?" "+V(n):""} to be a string, got ${typeof t} instead`);return t}function je(t,e,n){let i=r(e,n,"legalComments",h),u=r(e,n,"sourceRoot",h),l=r(e,n,"sourcesContent",I),f=r(e,n,"target",Ze),s=r(e,n,"format",h),p=r(e,n,"globalName",h),w=r(e,n,"mangleProps",he),v=r(e,n,"reserveProps",he),P=r(e,n,"mangleQuoted",I),U=r(e,n,"minify",I),B=r(e,n,"minifySyntax",I),j=r(e,n,"minifyWhitespace",I),Q=r(e,n,"minifyIdentifiers",I),T=r(e,n,"drop",z),W=r(e,n,"charset",h),Y=r(e,n,"treeShaking",I),R=r(e,n,"ignoreAnnotations",I),m=r(e,n,"jsx",h),d=r(e,n,"jsxFactory",h),o=r(e,n,"jsxFragment",h),O=r(e,n,"jsxImportSource",h),S=r(e,n,"jsxDev",I),M=r(e,n,"jsxSideEffects",I),k=r(e,n,"define",ee),a=r(e,n,"logOverride",ee),c=r(e,n,"supported",ee),b=r(e,n,"pure",z),E=r(e,n,"keepNames",I),$=r(e,n,"platform",h);if(i&&t.push(`--legal-comments=${i}`),u!==void 0&&t.push(`--source-root=${u}`),l!==void 0&&t.push(`--sources-content=${l}`),f&&(Array.isArray(f)?t.push(`--target=${Array.from(f).map(Ce).join(",")}`):t.push(`--target=${Ce(f)}`)),s&&t.push(`--format=${s}`),p&&t.push(`--global-name=${p}`),$&&t.push(`--platform=${$}`),U&&t.push("--minify"),B&&t.push("--minify-syntax"),j&&t.push("--minify-whitespace"),Q&&t.push("--minify-identifiers"),W&&t.push(`--charset=${W}`),Y!==void 0&&t.push(`--tree-shaking=${Y}`),R&&t.push("--ignore-annotations"),T)for(let y of T)t.push(`--drop:${J(y,"drop")}`);if(w&&t.push(`--mangle-props=${w.source}`),v&&t.push(`--reserve-props=${v.source}`),P!==void 0&&t.push(`--mangle-quoted=${P}`),m&&t.push(`--jsx=${m}`),d&&t.push(`--jsx-factory=${d}`),o&&t.push(`--jsx-fragment=${o}`),O&&t.push(`--jsx-import-source=${O}`),S&&t.push("--jsx-dev"),M&&t.push("--jsx-side-effects"),k)for(let y in k){if(y.indexOf("=")>=0)throw new Error(`Invalid define: ${y}`);t.push(`--define:${y}=${J(k[y],"define",y)}`)}if(a)for(let y in a){if(y.indexOf("=")>=0)throw new Error(`Invalid log override: ${y}`);t.push(`--log-override:${y}=${J(a[y],"log override",y)}`)}if(c)for(let y in c){if(y.indexOf("=")>=0)throw new Error(`Invalid supported: ${y}`);let x=c[y];if(typeof x!="boolean")throw new Error(`Expected value for supported ${V(y)} to be a boolean, got ${typeof x} instead`);t.push(`--supported:${y}=${x}`)}if(b)for(let y of b)t.push(`--pure:${J(y,"pure")}`);E&&t.push("--keep-names")}function tt(t,e,n,i,u){var se;let l=[],f=[],s=Object.create(null),p=null,w=null;be(l,e,s,n,i),je(l,e,s);let v=r(e,s,"sourcemap",Fe),P=r(e,s,"bundle",I),U=r(e,s,"splitting",I),B=r(e,s,"preserveSymlinks",I),j=r(e,s,"metafile",I),Q=r(e,s,"outfile",h),T=r(e,s,"outdir",h),W=r(e,s,"outbase",h),Y=r(e,s,"tsconfig",h),R=r(e,s,"resolveExtensions",z),m=r(e,s,"nodePaths",z),d=r(e,s,"mainFields",z),o=r(e,s,"conditions",z),O=r(e,s,"external",z),S=r(e,s,"packages",h),M=r(e,s,"alias",ee),k=r(e,s,"loader",ee),a=r(e,s,"outExtension",ee),c=r(e,s,"publicPath",h),b=r(e,s,"entryNames",h),E=r(e,s,"chunkNames",h),$=r(e,s,"assetNames",h),y=r(e,s,"inject",z),x=r(e,s,"banner",ee),F=r(e,s,"footer",ee),L=r(e,s,"entryPoints",He),C=r(e,s,"absWorkingDir",h),D=r(e,s,"stdin",ee),A=(se=r(e,s,"write",I))!=null?se:u,q=r(e,s,"allowOverwrite",I),_=r(e,s,"mangleCache",ee);if(s.plugins=!0,K(e,s,`in ${t}() call`),v&&l.push(`--sourcemap${v===!0?"":`=${v}`}`),P&&l.push("--bundle"),q&&l.push("--allow-overwrite"),U&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),j&&l.push("--metafile"),Q&&l.push(`--outfile=${Q}`),T&&l.push(`--outdir=${T}`),W&&l.push(`--outbase=${W}`),Y&&l.push(`--tsconfig=${Y}`),S&&l.push(`--packages=${S}`),R){let g=[];for(let N of R){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);g.push(N)}l.push(`--resolve-extensions=${g.join(",")}`)}if(c&&l.push(`--public-path=${c}`),b&&l.push(`--entry-names=${b}`),E&&l.push(`--chunk-names=${E}`),$&&l.push(`--asset-names=${$}`),d){let g=[];for(let N of d){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);g.push(N)}l.push(`--main-fields=${g.join(",")}`)}if(o){let g=[];for(let N of o){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);g.push(N)}l.push(`--conditions=${g.join(",")}`)}if(O)for(let g of O)l.push(`--external:${J(g,"external")}`);if(M)for(let g in M){if(g.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${g}`);l.push(`--alias:${g}=${J(M[g],"alias",g)}`)}if(x)for(let g in x){if(g.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${g}`);l.push(`--banner:${g}=${J(x[g],"banner",g)}`)}if(F)for(let g in F){if(g.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${g}`);l.push(`--footer:${g}=${J(F[g],"footer",g)}`)}if(y)for(let g of y)l.push(`--inject:${J(g,"inject")}`);if(k)for(let g in k){if(g.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${g}`);l.push(`--loader:${g}=${J(k[g],"loader",g)}`)}if(a)for(let g in a){if(g.indexOf("=")>=0)throw new Error(`Invalid out extension: ${g}`);l.push(`--out-extension:${g}=${J(a[g],"out extension",g)}`)}if(L)if(Array.isArray(L))for(let g=0,N=L.length;g<N;g++){let G=L[g];if(typeof G=="object"&&G!==null){let X=Object.create(null),re=r(G,X,"in",h),de=r(G,X,"out",h);if(K(G,X,"in entry point at index "+g),re===void 0)throw new Error('Missing property "in" for entry point at index '+g);if(de===void 0)throw new Error('Missing property "out" for entry point at index '+g);f.push([de,re])}else f.push(["",J(G,"entry point at index "+g)])}else for(let g in L)f.push([g,J(L[g],"entry point",g)]);if(D){let g=Object.create(null),N=r(D,g,"contents",Te),G=r(D,g,"resolveDir",h),X=r(D,g,"sourcefile",h),re=r(D,g,"loader",h);K(D,g,'in "stdin" object'),X&&l.push(`--sourcefile=${X}`),re&&l.push(`--loader=${re}`),G&&(w=G),typeof N=="string"?p=Z(N):N instanceof Uint8Array&&(p=N)}let H=[];if(m)for(let g of m)g+="",H.push(g);return{entries:f,flags:l,write:A,stdinContents:p,stdinResolveDir:w,absWorkingDir:C,nodePaths:H,mangleCache:Ue(_)}}function nt(t,e,n,i){let u=[],l=Object.create(null);be(u,e,l,n,i),je(u,e,l);let f=r(e,l,"sourcemap",Fe),s=r(e,l,"tsconfigRaw",Xe),p=r(e,l,"sourcefile",h),w=r(e,l,"loader",h),v=r(e,l,"banner",h),P=r(e,l,"footer",h),U=r(e,l,"mangleCache",ee);return K(e,l,`in ${t}() call`),f&&u.push(`--sourcemap=${f===!0?"external":f}`),s&&u.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),p&&u.push(`--sourcefile=${p}`),w&&u.push(`--loader=${w}`),v&&u.push(`--banner=${v}`),P&&u.push(`--footer=${P}`),{flags:u,mangleCache:Ue(U)}}function qe(t){let e={},n={didClose:!1,reason:""},i={},u=0,l=0,f=new Uint8Array(16*1024),s=0,p=R=>{let m=s+R.length;if(m>f.length){let o=new Uint8Array(m*2);o.set(f),f=o}f.set(R,s),s+=R.length;let d=0;for(;d+4<=s;){let o=Ee(f,d);if(d+4+o>s)break;d+=4,j(f.subarray(d,d+o)),d+=o}d>0&&(f.copyWithin(0,d,s),s-=d)},w=R=>{n.didClose=!0,R&&(n.reason=": "+(R.message||R));let m="The service was stopped"+n.reason;for(let d in i)i[d](m,null);i={}},v=(R,m,d)=>{if(n.didClose)return d("The service is no longer running"+n.reason,null);let o=u++;i[o]=(O,S)=>{try{d(O,S)}finally{R&&R.unref()}},R&&R.ref(),t.writeToStdin(Oe({id:o,isRequest:!0,value:m}))},P=(R,m)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);t.writeToStdin(Oe({id:R,isRequest:!1,value:m}))},U=(R,m)=>te(this,null,function*(){try{if(m.command==="ping"){P(R,{});return}if(typeof m.key=="number"){let d=e[m.key];if(d){let o=d[m.command];if(o){yield o(R,m);return}}}throw new Error("Invalid command: "+m.command)}catch(d){P(R,{errors:[le(d,t,null,void 0,"")]})}}),B=!0,j=R=>{if(B){B=!1;let d=String.fromCharCode(...R);if(d!=="0.17.13")throw new Error(`Cannot start service: Host version "0.17.13" does not match binary version ${V(d)}`);return}let m=ke(R);if(m.isRequest)U(m.id,m.value);else{let d=i[m.id];delete i[m.id],m.value.error?d(m.value.error,{}):d(null,m.value)}};return{readFromStdout:p,afterClose:w,service:{buildOrContext:({callName:R,refs:m,options:d,isTTY:o,defaultWD:O,callback:S})=>{let M=0,k=l++,a={},c={ref(){++M===1&&m&&m.ref()},unref(){--M===0&&(delete e[k],m&&m.unref())}};e[k]=a,c.ref(),rt(R,k,v,P,c,t,a,d,o,O,(b,E)=>{try{S(b,E)}finally{c.unref()}})},transform:({callName:R,refs:m,input:d,options:o,isTTY:O,fs:S,callback:M})=>{let k=Le(),a=c=>{try{if(typeof d!="string"&&!(d instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:E}=nt(R,o,O,Me),$={command:"transform",flags:b,inputFS:c!==null,input:c!==null?Z(c):typeof d=="string"?Z(d):d};E&&($.mangleCache=E),v(m,$,(y,x)=>{if(y)return M(new Error(y),null);let F=ae(x.errors,k),L=ae(x.warnings,k),C=1,D=()=>{if(--C===0){let A={warnings:L,code:x.code,map:x.map,mangleCache:void 0,legalComments:void 0};"legalComments"in x&&(A.legalComments=x==null?void 0:x.legalComments),x.mangleCache&&(A.mangleCache=x==null?void 0:x.mangleCache),M(null,A)}};if(F.length>0)return M(ce("Transform failed",F,L),null);x.codeFS&&(C++,S.readFile(x.code,(A,q)=>{A!==null?M(A,null):(x.code=q,D())})),x.mapFS&&(C++,S.readFile(x.map,(A,q)=>{A!==null?M(A,null):(x.map=q,D())})),D()})}catch(b){let E=[];try{be(E,o,{},O,Me)}catch(y){}let $=le(b,t,k,void 0,"");v(m,{command:"error",flags:E,error:$},()=>{$.detail=k.load($.detail),M(ce("Transform failed",[$],[]),null)})}};if((typeof d=="string"||d instanceof Uint8Array)&&d.length>1024*1024){let c=a;a=()=>S.writeFile(d,c)}a(null)},formatMessages:({callName:R,refs:m,messages:d,options:o,callback:O})=>{let S=ne(d,"messages",null,"");if(!o)throw new Error(`Missing second argument in ${R}() call`);let M={},k=r(o,M,"kind",h),a=r(o,M,"color",I),c=r(o,M,"terminalWidth",oe);if(K(o,M,`in ${R}() call`),k===void 0)throw new Error(`Missing "kind" in ${R}() call`);if(k!=="error"&&k!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${R}() call`);let b={command:"format-msgs",messages:S,isWarning:k==="warning"};a!==void 0&&(b.color=a),c!==void 0&&(b.terminalWidth=c),v(m,b,(E,$)=>{if(E)return O(new Error(E),null);O(null,$.messages)})},analyzeMetafile:({callName:R,refs:m,metafile:d,options:o,callback:O})=>{o===void 0&&(o={});let S={},M=r(o,S,"color",I),k=r(o,S,"verbose",I);K(o,S,`in ${R}() call`);let a={command:"analyze-metafile",metafile:d};M!==void 0&&(a.color=M),k!==void 0&&(a.verbose=k),v(m,a,(c,b)=>{if(c)return O(new Error(c),null);O(null,b.result)})}}}}function rt(t,e,n,i,u,l,f,s,p,w,v){let P=Le(),U=t==="context",B=(T,W)=>{let Y=[];try{be(Y,s,{},p,$e)}catch(m){}let R=le(T,l,P,void 0,W);n(u,{command:"error",flags:Y,error:R},()=>{R.detail=P.load(R.detail),v(ce(U?"Context failed":"Build failed",[R],[]),null)})},j;if(typeof s=="object"){let T=s.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");it(e,n,i,u,l,f,s,j,P).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let R=l.hasFS,{entries:m,flags:d,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:M,nodePaths:k,mangleCache:a}=tt(t,s,p,$e,R);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:e,entries:m,flags:d,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:M||w,nodePaths:k,context:U};T&&(c.plugins=T),a&&(c.mangleCache=a);let b=(y,x)=>{let F={errors:ae(y.errors,P),warnings:ae(y.warnings,P),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=F.errors.slice(),C=F.warnings.slice();y.outputFiles&&(F.outputFiles=y.outputFiles.map(lt)),y.metafile&&(F.metafile=JSON.parse(y.metafile)),y.mangleCache&&(F.mangleCache=y.mangleCache),y.writeToStdout!==void 0&&console.log(ie(y.writeToStdout).replace(/\n$/,"")),W(F,(D,A)=>{if(L.length>0||D.length>0){let q=ce("Build failed",L.concat(D),C.concat(A));return x(q,null,D,A)}x(null,F,D,A)})},E,$;U&&(f["on-end"]=(y,x)=>new Promise(F=>{b(x,(L,C,D,A)=>{let q={errors:D,warnings:A};$&&$(L,C),E=void 0,$=void 0,i(y,q),F()})})),n(u,c,(y,x)=>{if(y)return v(new Error(y),null);if(!U)return b(x,(C,D)=>(Y(),v(C,D)));if(x.errors.length>0)return v(ce("Context failed",x.errors,x.warnings),null);let F=!1,L={rebuild:()=>(E||(E=new Promise((C,D)=>{let A;$=(_,H)=>{A||(A=()=>_?D(_):C(H))};let q=()=>{n(u,{command:"rebuild",key:e},(H,se)=>{H?D(new Error(H)):A?A():q()})};q()})),E),watch:(C={})=>new Promise((D,A)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(C,{},"in watch() call"),n(u,{command:"watch",key:e},H=>{H?A(new Error(H)):D(void 0)})}),serve:(C={})=>new Promise((D,A)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(C,q,"port",oe),H=r(C,q,"host",h),se=r(C,q,"servedir",h),g=r(C,q,"keyfile",h),N=r(C,q,"certfile",h),G=r(C,q,"onRequest",Pe);K(C,q,"in serve() call");let X={command:"serve",key:e,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),se!==void 0&&(X.servedir=se),g!==void 0&&(X.keyfile=g),N!==void 0&&(X.certfile=N),n(u,X,(re,de)=>{if(re)return A(new Error(re));G&&(f["serve-request"]=(Ie,We)=>{G(We.args),i(Ie,{})}),D(de)})}),cancel:()=>new Promise(C=>{if(F)return C();n(u,{command:"cancel",key:e},()=>{C()})}),dispose:()=>new Promise(C=>{if(F)return C();F=!0,n(u,{command:"dispose",key:e},()=>{C(),Y(),u.unref()})})};u.ref(),v(null,L)})}}var it=(t,e,n,i,u,l,f,s,p)=>te(void 0,null,function*(){let w=[],v=[],P={},U={},B=[],j=0,Q=0,T=[],W=!1;s=[...s];for(let m of s){let d={};if(typeof m!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(m,d,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let O=r(m,d,"setup",Pe);if(typeof O!="function")throw new Error("Plugin is missing a setup function");K(m,d,`on plugin ${V(o)}`);let S={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let k=O({initialOptions:f,resolve:(a,c={})=>{if(!W)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),E=r(c,b,"pluginName",h),$=r(c,b,"importer",h),y=r(c,b,"namespace",h),x=r(c,b,"resolveDir",h),F=r(c,b,"kind",h),L=r(c,b,"pluginData",ye);return K(c,b,"in resolve() call"),new Promise((C,D)=>{let A={command:"resolve",path:a,key:t,pluginName:o};if(E!=null&&(A.pluginName=E),$!=null&&(A.importer=$),y!=null&&(A.namespace=y),x!=null&&(A.resolveDir=x),F!=null)A.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(A.pluginData=p.store(L)),e(i,A,(q,_)=>{q!==null?D(new Error(q)):C({errors:ae(_.errors,p),warnings:ae(_.warnings,p),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:p.load(_.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',b=ge(new Error(c),u,"onStart");w.push({name:o,callback:a,note:b}),S.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',b=ge(new Error(c),u,"onEnd");v.push({name:o,callback:a,note:b}),S.onEnd=!0},onResolve(a,c){let b='This error came from the "onResolve" callback registered here:',E=ge(new Error(b),u,"onResolve"),$={},y=r(a,$,"filter",he),x=r(a,$,"namespace",h);if(K(a,$,`in onResolve() call for plugin ${V(o)}`),y==null)throw new Error("onResolve() call is missing a filter");let F=j++;P[F]={name:o,callback:c,note:E},S.onResolve.push({id:F,filter:y.source,namespace:x||""})},onLoad(a,c){let b='This error came from the "onLoad" callback registered here:',E=ge(new Error(b),u,"onLoad"),$={},y=r(a,$,"filter",he),x=r(a,$,"namespace",h);if(K(a,$,`in onLoad() call for plugin ${V(o)}`),y==null)throw new Error("onLoad() call is missing a filter");let F=j++;U[F]={name:o,callback:c,note:E},S.onLoad.push({id:F,filter:y.source,namespace:x||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});k&&(yield k),T.push(S)}catch(O){return{ok:!1,error:O,pluginName:o}}}l["on-start"]=(m,d)=>te(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(w.map(k=>te(void 0,[k],function*({name:O,callback:S,note:M}){try{let a=yield S();if(a!=null){if(typeof a!="object")throw new Error(`Expected onStart() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"errors",z),E=r(a,c,"warnings",z);K(a,c,`from onStart() callback in plugin ${V(O)}`),b!=null&&o.errors.push(...ne(b,"errors",p,O)),E!=null&&o.warnings.push(...ne(E,"warnings",p,O))}}catch(a){o.errors.push(le(a,u,p,M&&M(),O))}}))),n(m,o)}),l["on-resolve"]=(m,d)=>te(void 0,null,function*(){let o={},O="",S,M;for(let k of d.ids)try{({name:O,callback:S,note:M}=P[k]);let a=yield S({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:p.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"pluginName",h),E=r(a,c,"path",h),$=r(a,c,"namespace",h),y=r(a,c,"suffix",h),x=r(a,c,"external",I),F=r(a,c,"sideEffects",I),L=r(a,c,"pluginData",ye),C=r(a,c,"errors",z),D=r(a,c,"warnings",z),A=r(a,c,"watchFiles",z),q=r(a,c,"watchDirs",z);K(a,c,`from onResolve() callback in plugin ${V(O)}`),o.id=k,b!=null&&(o.pluginName=b),E!=null&&(o.path=E),$!=null&&(o.namespace=$),y!=null&&(o.suffix=y),x!=null&&(o.external=x),F!=null&&(o.sideEffects=F),L!=null&&(o.pluginData=p.store(L)),C!=null&&(o.errors=ne(C,"errors",p,O)),D!=null&&(o.warnings=ne(D,"warnings",p,O)),A!=null&&(o.watchFiles=me(A,"watchFiles")),q!=null&&(o.watchDirs=me(q,"watchDirs"));break}}catch(a){o={id:k,errors:[le(a,u,p,M&&M(),O)]};break}n(m,o)}),l["on-load"]=(m,d)=>te(void 0,null,function*(){let o={},O="",S,M;for(let k of d.ids)try{({name:O,callback:S,note:M}=U[k]);let a=yield S({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:p.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"pluginName",h),E=r(a,c,"contents",Te),$=r(a,c,"resolveDir",h),y=r(a,c,"pluginData",ye),x=r(a,c,"loader",h),F=r(a,c,"errors",z),L=r(a,c,"warnings",z),C=r(a,c,"watchFiles",z),D=r(a,c,"watchDirs",z);K(a,c,`from onLoad() callback in plugin ${V(O)}`),o.id=k,b!=null&&(o.pluginName=b),E instanceof Uint8Array?o.contents=E:E!=null&&(o.contents=Z(E)),$!=null&&(o.resolveDir=$),y!=null&&(o.pluginData=p.store(y)),x!=null&&(o.loader=x),F!=null&&(o.errors=ne(F,"errors",p,O)),L!=null&&(o.warnings=ne(L,"warnings",p,O)),C!=null&&(o.watchFiles=me(C,"watchFiles")),D!=null&&(o.watchDirs=me(D,"watchDirs"));break}}catch(a){o={id:k,errors:[le(a,u,p,M&&M(),O)]};break}n(m,o)});let Y=(m,d)=>d([],[]);v.length>0&&(Y=(m,d)=>{te(void 0,null,function*(){let o=[],O=[];for(let{name:S,callback:M,note:k}of v){let a,c;try{let b=yield M(m);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let E={},$=r(b,E,"errors",z),y=r(b,E,"warnings",z);K(b,E,`from onEnd() callback in plugin ${V(S)}`),$!=null&&(a=ne($,"errors",p,S)),y!=null&&(c=ne(y,"warnings",p,S))}}catch(b){a=[le(b,u,p,k&&k(),S)]}if(a){o.push(...a);try{m.errors.push(...a)}catch(b){}}if(c){O.push(...c);try{m.warnings.push(...c)}catch(b){}}}d(o,O)})});let R=()=>{for(let m of B)setTimeout(()=>m(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:R}});function Le(){let t=new Map,e=0;return{load(n){return t.get(n)},store(n){if(n===void 0)return-1;let i=e++;return t.set(i,n),i}}}function ge(t,e,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(t.stack+"").split(`
`);function Ee(t,e){return t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24}function Re(t,e,n){t[n++]=e,t[n++]=e>>8,t[n++]=e>>16,t[n++]=e>>24}var V=JSON.stringify,$e="warning",Me="silent";function Ce(t){if(J(t,"target"),t.indexOf(",")>=0)throw new Error(`Invalid target: ${t}`);return t}var ye=()=>null,I=t=>typeof t=="boolean"?null:"a boolean",h=t=>typeof t=="string"?null:"a string",he=t=>t instanceof RegExp?null:"a RegExp object",oe=t=>typeof t=="number"&&t===(t|0)?null:"an integer",Pe=t=>typeof t=="function"?null:"a function",z=t=>Array.isArray(t)?null:"an array",ee=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"an object",He=t=>typeof t=="object"&&t!==null?null:"an array or an object",Ge=t=>t instanceof WebAssembly.Module?null:"a WebAssembly.Module",Ae=t=>typeof t=="object"&&!Array.isArray(t)?null:"an object or null",Fe=t=>typeof t=="string"||typeof t=="boolean"?null:"a string or a boolean",Xe=t=>typeof t=="string"||typeof t=="object"&&t!==null&&!Array.isArray(t)?null:"a string or an object",Ze=t=>typeof t=="string"||Array.isArray(t)?null:"a string or an array",Te=t=>typeof t=="string"||t instanceof Uint8Array?null:"a string or a Uint8Array",et=t=>typeof t=="string"||t instanceof URL?null:"a string or a URL";function r(t,e,n,i){let u=t[n];if(e[n+""]=!0,u===void 0)return;let l=i(u);if(l!==null)throw new Error(`${V(n)} must be ${l}`);return u}function K(t,e,n){for(let i in t)if(!(i in e))throw new Error(`Invalid option ${n}: ${V(i)}`)}function Be(t){let e=Object.create(null),n=r(t,e,"wasmURL",et),i=r(t,e,"wasmModule",Ge),u=r(t,e,"worker",I);return K(t,e,"in initialize() call"),{wasmURL:n,wasmModule:i,worker:u}}function Ue(t){let e;if(t!==void 0){e=Object.create(null);for(let n in t){let i=t[n];if(typeof i=="string"||i===!1)e[n]=i;else throw new Error(`Expected ${V(n)} in mangle cache to map to either a string or false`)}}return e}function be(t,e,n,i,u){let l=r(e,n,"color",I),f=r(e,n,"logLevel",h),s=r(e,n,"logLimit",oe);l!==void 0?t.push(`--color=${l}`):i&&t.push("--color=true"),t.push(`--log-level=${f||u}`),t.push(`--log-limit=${s||0}`)}function J(t,e,n){if(typeof t!="string")throw new Error(`Expected value for ${e}${n!==void 0?" "+V(n):""} to be a string, got ${typeof t} instead`);return t}function je(t,e,n){let i=r(e,n,"legalComments",h),u=r(e,n,"sourceRoot",h),l=r(e,n,"sourcesContent",I),f=r(e,n,"target",Ze),s=r(e,n,"format",h),p=r(e,n,"globalName",h),w=r(e,n,"mangleProps",he),v=r(e,n,"reserveProps",he),P=r(e,n,"mangleQuoted",I),U=r(e,n,"minify",I),B=r(e,n,"minifySyntax",I),j=r(e,n,"minifyWhitespace",I),Q=r(e,n,"minifyIdentifiers",I),T=r(e,n,"drop",z),W=r(e,n,"charset",h),Y=r(e,n,"treeShaking",I),R=r(e,n,"ignoreAnnotations",I),m=r(e,n,"jsx",h),d=r(e,n,"jsxFactory",h),o=r(e,n,"jsxFragment",h),O=r(e,n,"jsxImportSource",h),S=r(e,n,"jsxDev",I),M=r(e,n,"jsxSideEffects",I),k=r(e,n,"define",ee),a=r(e,n,"logOverride",ee),c=r(e,n,"supported",ee),b=r(e,n,"pure",z),E=r(e,n,"keepNames",I),$=r(e,n,"platform",h);if(i&&t.push(`--legal-comments=${i}`),u!==void 0&&t.push(`--source-root=${u}`),l!==void 0&&t.push(`--sources-content=${l}`),f&&(Array.isArray(f)?t.push(`--target=${Array.from(f).map(Ce).join(",")}`):t.push(`--target=${Ce(f)}`)),s&&t.push(`--format=${s}`),p&&t.push(`--global-name=${p}`),$&&t.push(`--platform=${$}`),U&&t.push("--minify"),B&&t.push("--minify-syntax"),j&&t.push("--minify-whitespace"),Q&&t.push("--minify-identifiers"),W&&t.push(`--charset=${W}`),Y!==void 0&&t.push(`--tree-shaking=${Y}`),R&&t.push("--ignore-annotations"),T)for(let y of T)t.push(`--drop:${J(y,"drop")}`);if(w&&t.push(`--mangle-props=${w.source}`),v&&t.push(`--reserve-props=${v.source}`),P!==void 0&&t.push(`--mangle-quoted=${P}`),m&&t.push(`--jsx=${m}`),d&&t.push(`--jsx-factory=${d}`),o&&t.push(`--jsx-fragment=${o}`),O&&t.push(`--jsx-import-source=${O}`),S&&t.push("--jsx-dev"),M&&t.push("--jsx-side-effects"),k)for(let y in k){if(y.indexOf("=")>=0)throw new Error(`Invalid define: ${y}`);t.push(`--define:${y}=${J(k[y],"define",y)}`)}if(a)for(let y in a){if(y.indexOf("=")>=0)throw new Error(`Invalid log override: ${y}`);t.push(`--log-override:${y}=${J(a[y],"log override",y)}`)}if(c)for(let y in c){if(y.indexOf("=")>=0)throw new Error(`Invalid supported: ${y}`);let x=c[y];if(typeof x!="boolean")throw new Error(`Expected value for supported ${V(y)} to be a boolean, got ${typeof x} instead`);t.push(`--supported:${y}=${x}`)}if(b)for(let y of b)t.push(`--pure:${J(y,"pure")}`);E&&t.push("--keep-names")}function tt(t,e,n,i,u){var se;let l=[],f=[],s=Object.create(null),p=null,w=null;be(l,e,s,n,i),je(l,e,s);let v=r(e,s,"sourcemap",Fe),P=r(e,s,"bundle",I),U=r(e,s,"splitting",I),B=r(e,s,"preserveSymlinks",I),j=r(e,s,"metafile",I),Q=r(e,s,"outfile",h),T=r(e,s,"outdir",h),W=r(e,s,"outbase",h),Y=r(e,s,"tsconfig",h),R=r(e,s,"resolveExtensions",z),m=r(e,s,"nodePaths",z),d=r(e,s,"mainFields",z),o=r(e,s,"conditions",z),O=r(e,s,"external",z),S=r(e,s,"packages",h),M=r(e,s,"alias",ee),k=r(e,s,"loader",ee),a=r(e,s,"outExtension",ee),c=r(e,s,"publicPath",h),b=r(e,s,"entryNames",h),E=r(e,s,"chunkNames",h),$=r(e,s,"assetNames",h),y=r(e,s,"inject",z),x=r(e,s,"banner",ee),F=r(e,s,"footer",ee),L=r(e,s,"entryPoints",He),C=r(e,s,"absWorkingDir",h),D=r(e,s,"stdin",ee),A=(se=r(e,s,"write",I))!=null?se:u,q=r(e,s,"allowOverwrite",I),_=r(e,s,"mangleCache",ee);if(s.plugins=!0,K(e,s,`in ${t}() call`),v&&l.push(`--sourcemap${v===!0?"":`=${v}`}`),P&&l.push("--bundle"),q&&l.push("--allow-overwrite"),U&&l.push("--splitting"),B&&l.push("--preserve-symlinks"),j&&l.push("--metafile"),Q&&l.push(`--outfile=${Q}`),T&&l.push(`--outdir=${T}`),W&&l.push(`--outbase=${W}`),Y&&l.push(`--tsconfig=${Y}`),S&&l.push(`--packages=${S}`),R){let g=[];for(let N of R){if(J(N,"resolve extension"),N.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${N}`);g.push(N)}l.push(`--resolve-extensions=${g.join(",")}`)}if(c&&l.push(`--public-path=${c}`),b&&l.push(`--entry-names=${b}`),E&&l.push(`--chunk-names=${E}`),$&&l.push(`--asset-names=${$}`),d){let g=[];for(let N of d){if(J(N,"main field"),N.indexOf(",")>=0)throw new Error(`Invalid main field: ${N}`);g.push(N)}l.push(`--main-fields=${g.join(",")}`)}if(o){let g=[];for(let N of o){if(J(N,"condition"),N.indexOf(",")>=0)throw new Error(`Invalid condition: ${N}`);g.push(N)}l.push(`--conditions=${g.join(",")}`)}if(O)for(let g of O)l.push(`--external:${J(g,"external")}`);if(M)for(let g in M){if(g.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${g}`);l.push(`--alias:${g}=${J(M[g],"alias",g)}`)}if(x)for(let g in x){if(g.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${g}`);l.push(`--banner:${g}=${J(x[g],"banner",g)}`)}if(F)for(let g in F){if(g.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${g}`);l.push(`--footer:${g}=${J(F[g],"footer",g)}`)}if(y)for(let g of y)l.push(`--inject:${J(g,"inject")}`);if(k)for(let g in k){if(g.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${g}`);l.push(`--loader:${g}=${J(k[g],"loader",g)}`)}if(a)for(let g in a){if(g.indexOf("=")>=0)throw new Error(`Invalid out extension: ${g}`);l.push(`--out-extension:${g}=${J(a[g],"out extension",g)}`)}if(L)if(Array.isArray(L))for(let g=0,N=L.length;g<N;g++){let G=L[g];if(typeof G=="object"&&G!==null){let X=Object.create(null),re=r(G,X,"in",h),de=r(G,X,"out",h);if(K(G,X,"in entry point at index "+g),re===void 0)throw new Error('Missing property "in" for entry point at index '+g);if(de===void 0)throw new Error('Missing property "out" for entry point at index '+g);f.push([de,re])}else f.push(["",J(G,"entry point at index "+g)])}else for(let g in L)f.push([g,J(L[g],"entry point",g)]);if(D){let g=Object.create(null),N=r(D,g,"contents",Te),G=r(D,g,"resolveDir",h),X=r(D,g,"sourcefile",h),re=r(D,g,"loader",h);K(D,g,'in "stdin" object'),X&&l.push(`--sourcefile=${X}`),re&&l.push(`--loader=${re}`),G&&(w=G),typeof N=="string"?p=Z(N):N instanceof Uint8Array&&(p=N)}let H=[];if(m)for(let g of m)g+="",H.push(g);return{entries:f,flags:l,write:A,stdinContents:p,stdinResolveDir:w,absWorkingDir:C,nodePaths:H,mangleCache:Ue(_)}}function nt(t,e,n,i){let u=[],l=Object.create(null);be(u,e,l,n,i),je(u,e,l);let f=r(e,l,"sourcemap",Fe),s=r(e,l,"tsconfigRaw",Xe),p=r(e,l,"sourcefile",h),w=r(e,l,"loader",h),v=r(e,l,"banner",h),P=r(e,l,"footer",h),U=r(e,l,"mangleCache",ee);return K(e,l,`in ${t}() call`),f&&u.push(`--sourcemap=${f===!0?"external":f}`),s&&u.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),p&&u.push(`--sourcefile=${p}`),w&&u.push(`--loader=${w}`),v&&u.push(`--banner=${v}`),P&&u.push(`--footer=${P}`),{flags:u,mangleCache:Ue(U)}}function qe(t){let e={},n={didClose:!1,reason:""},i={},u=0,l=0,f=new Uint8Array(16*1024),s=0,p=R=>{let m=s+R.length;if(m>f.length){let o=new Uint8Array(m*2);o.set(f),f=o}f.set(R,s),s+=R.length;let d=0;for(;d+4<=s;){let o=Ee(f,d);if(d+4+o>s)break;d+=4,j(f.subarray(d,d+o)),d+=o}d>0&&(f.copyWithin(0,d,s),s-=d)},w=R=>{n.didClose=!0,R&&(n.reason=": "+(R.message||R));let m="The service was stopped"+n.reason;for(let d in i)i[d](m,null);i={}},v=(R,m,d)=>{if(n.didClose)return d("The service is no longer running"+n.reason,null);let o=u++;i[o]=(O,S)=>{try{d(O,S)}finally{R&&R.unref()}},R&&R.ref(),t.writeToStdin(Oe({id:o,isRequest:!0,value:m}))},P=(R,m)=>{if(n.didClose)throw new Error("The service is no longer running"+n.reason);t.writeToStdin(Oe({id:R,isRequest:!1,value:m}))},U=(R,m)=>te(this,null,function*(){try{if(m.command==="ping"){P(R,{});return}if(typeof m.key=="number"){let d=e[m.key];if(d){let o=d[m.command];if(o){yield o(R,m);return}}}throw new Error("Invalid command: "+m.command)}catch(d){P(R,{errors:[le(d,t,null,void 0,"")]})}}),B=!0,j=R=>{if(B){B=!1;let d=String.fromCharCode(...R);if(d!=="0.17.14")throw new Error(`Cannot start service: Host version "0.17.14" does not match binary version ${V(d)}`);return}let m=ke(R);if(m.isRequest)U(m.id,m.value);else{let d=i[m.id];delete i[m.id],m.value.error?d(m.value.error,{}):d(null,m.value)}};return{readFromStdout:p,afterClose:w,service:{buildOrContext:({callName:R,refs:m,options:d,isTTY:o,defaultWD:O,callback:S})=>{let M=0,k=l++,a={},c={ref(){++M===1&&m&&m.ref()},unref(){--M===0&&(delete e[k],m&&m.unref())}};e[k]=a,c.ref(),rt(R,k,v,P,c,t,a,d,o,O,(b,E)=>{try{S(b,E)}finally{c.unref()}})},transform:({callName:R,refs:m,input:d,options:o,isTTY:O,fs:S,callback:M})=>{let k=Le(),a=c=>{try{if(typeof d!="string"&&!(d instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:b,mangleCache:E}=nt(R,o,O,Me),$={command:"transform",flags:b,inputFS:c!==null,input:c!==null?Z(c):typeof d=="string"?Z(d):d};E&&($.mangleCache=E),v(m,$,(y,x)=>{if(y)return M(new Error(y),null);let F=ae(x.errors,k),L=ae(x.warnings,k),C=1,D=()=>{if(--C===0){let A={warnings:L,code:x.code,map:x.map,mangleCache:void 0,legalComments:void 0};"legalComments"in x&&(A.legalComments=x==null?void 0:x.legalComments),x.mangleCache&&(A.mangleCache=x==null?void 0:x.mangleCache),M(null,A)}};if(F.length>0)return M(ce("Transform failed",F,L),null);x.codeFS&&(C++,S.readFile(x.code,(A,q)=>{A!==null?M(A,null):(x.code=q,D())})),x.mapFS&&(C++,S.readFile(x.map,(A,q)=>{A!==null?M(A,null):(x.map=q,D())})),D()})}catch(b){let E=[];try{be(E,o,{},O,Me)}catch(y){}let $=le(b,t,k,void 0,"");v(m,{command:"error",flags:E,error:$},()=>{$.detail=k.load($.detail),M(ce("Transform failed",[$],[]),null)})}};if((typeof d=="string"||d instanceof Uint8Array)&&d.length>1024*1024){let c=a;a=()=>S.writeFile(d,c)}a(null)},formatMessages:({callName:R,refs:m,messages:d,options:o,callback:O})=>{let S=ne(d,"messages",null,"");if(!o)throw new Error(`Missing second argument in ${R}() call`);let M={},k=r(o,M,"kind",h),a=r(o,M,"color",I),c=r(o,M,"terminalWidth",oe);if(K(o,M,`in ${R}() call`),k===void 0)throw new Error(`Missing "kind" in ${R}() call`);if(k!=="error"&&k!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${R}() call`);let b={command:"format-msgs",messages:S,isWarning:k==="warning"};a!==void 0&&(b.color=a),c!==void 0&&(b.terminalWidth=c),v(m,b,(E,$)=>{if(E)return O(new Error(E),null);O(null,$.messages)})},analyzeMetafile:({callName:R,refs:m,metafile:d,options:o,callback:O})=>{o===void 0&&(o={});let S={},M=r(o,S,"color",I),k=r(o,S,"verbose",I);K(o,S,`in ${R}() call`);let a={command:"analyze-metafile",metafile:d};M!==void 0&&(a.color=M),k!==void 0&&(a.verbose=k),v(m,a,(c,b)=>{if(c)return O(new Error(c),null);O(null,b.result)})}}}}function rt(t,e,n,i,u,l,f,s,p,w,v){let P=Le(),U=t==="context",B=(T,W)=>{let Y=[];try{be(Y,s,{},p,$e)}catch(m){}let R=le(T,l,P,void 0,W);n(u,{command:"error",flags:Y,error:R},()=>{R.detail=P.load(R.detail),v(ce(U?"Context failed":"Build failed",[R],[]),null)})},j;if(typeof s=="object"){let T=s.plugins;if(T!==void 0){if(!Array.isArray(T))return B(new Error('"plugins" must be an array'),"");j=T}}if(j&&j.length>0){if(l.isSync)return B(new Error("Cannot use plugins in synchronous API calls"),"");it(e,n,i,u,l,f,s,j,P).then(T=>{if(!T.ok)return B(T.error,T.pluginName);try{Q(T.requestPlugins,T.runOnEndCallbacks,T.scheduleOnDisposeCallbacks)}catch(W){B(W,"")}},T=>B(T,""));return}try{Q(null,(T,W)=>W([],[]),()=>{})}catch(T){B(T,"")}function Q(T,W,Y){let R=l.hasFS,{entries:m,flags:d,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:M,nodePaths:k,mangleCache:a}=tt(t,s,p,$e,R);if(o&&!l.hasFS)throw new Error('The "write" option is unavailable in this environment');let c={command:"build",key:e,entries:m,flags:d,write:o,stdinContents:O,stdinResolveDir:S,absWorkingDir:M||w,nodePaths:k,context:U};T&&(c.plugins=T),a&&(c.mangleCache=a);let b=(y,x)=>{let F={errors:ae(y.errors,P),warnings:ae(y.warnings,P),outputFiles:void 0,metafile:void 0,mangleCache:void 0},L=F.errors.slice(),C=F.warnings.slice();y.outputFiles&&(F.outputFiles=y.outputFiles.map(lt)),y.metafile&&(F.metafile=JSON.parse(y.metafile)),y.mangleCache&&(F.mangleCache=y.mangleCache),y.writeToStdout!==void 0&&console.log(ie(y.writeToStdout).replace(/\n$/,"")),W(F,(D,A)=>{if(L.length>0||D.length>0){let q=ce("Build failed",L.concat(D),C.concat(A));return x(q,null,D,A)}x(null,F,D,A)})},E,$;U&&(f["on-end"]=(y,x)=>new Promise(F=>{b(x,(L,C,D,A)=>{let q={errors:D,warnings:A};$&&$(L,C),E=void 0,$=void 0,i(y,q),F()})})),n(u,c,(y,x)=>{if(y)return v(new Error(y),null);if(!U)return b(x,(C,D)=>(Y(),v(C,D)));if(x.errors.length>0)return v(ce("Context failed",x.errors,x.warnings),null);let F=!1,L={rebuild:()=>(E||(E=new Promise((C,D)=>{let A;$=(_,H)=>{A||(A=()=>_?D(_):C(H))};let q=()=>{n(u,{command:"rebuild",key:e},(H,se)=>{H?D(new Error(H)):A?A():q()})};q()})),E),watch:(C={})=>new Promise((D,A)=>{if(!l.hasFS)throw new Error('Cannot use the "watch" API in this environment');K(C,{},"in watch() call"),n(u,{command:"watch",key:e},H=>{H?A(new Error(H)):D(void 0)})}),serve:(C={})=>new Promise((D,A)=>{if(!l.hasFS)throw new Error('Cannot use the "serve" API in this environment');let q={},_=r(C,q,"port",oe),H=r(C,q,"host",h),se=r(C,q,"servedir",h),g=r(C,q,"keyfile",h),N=r(C,q,"certfile",h),G=r(C,q,"onRequest",Pe);K(C,q,"in serve() call");let X={command:"serve",key:e,onRequest:!!G};_!==void 0&&(X.port=_),H!==void 0&&(X.host=H),se!==void 0&&(X.servedir=se),g!==void 0&&(X.keyfile=g),N!==void 0&&(X.certfile=N),n(u,X,(re,de)=>{if(re)return A(new Error(re));G&&(f["serve-request"]=(Ie,We)=>{G(We.args),i(Ie,{})}),D(de)})}),cancel:()=>new Promise(C=>{if(F)return C();n(u,{command:"cancel",key:e},()=>{C()})}),dispose:()=>new Promise(C=>{if(F)return C();F=!0,n(u,{command:"dispose",key:e},()=>{C(),Y(),u.unref()})})};u.ref(),v(null,L)})}}var it=(t,e,n,i,u,l,f,s,p)=>te(void 0,null,function*(){let w=[],v=[],P={},U={},B=[],j=0,Q=0,T=[],W=!1;s=[...s];for(let m of s){let d={};if(typeof m!="object")throw new Error(`Plugin at index ${Q} must be an object`);let o=r(m,d,"name",h);if(typeof o!="string"||o==="")throw new Error(`Plugin at index ${Q} is missing a name`);try{let O=r(m,d,"setup",Pe);if(typeof O!="function")throw new Error("Plugin is missing a setup function");K(m,d,`on plugin ${V(o)}`);let S={name:o,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};Q++;let k=O({initialOptions:f,resolve:(a,c={})=>{if(!W)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof a!="string")throw new Error("The path to resolve must be a string");let b=Object.create(null),E=r(c,b,"pluginName",h),$=r(c,b,"importer",h),y=r(c,b,"namespace",h),x=r(c,b,"resolveDir",h),F=r(c,b,"kind",h),L=r(c,b,"pluginData",ye);return K(c,b,"in resolve() call"),new Promise((C,D)=>{let A={command:"resolve",path:a,key:t,pluginName:o};if(E!=null&&(A.pluginName=E),$!=null&&(A.importer=$),y!=null&&(A.namespace=y),x!=null&&(A.resolveDir=x),F!=null)A.kind=F;else throw new Error('Must specify "kind" when calling "resolve"');L!=null&&(A.pluginData=p.store(L)),e(i,A,(q,_)=>{q!==null?D(new Error(q)):C({errors:ae(_.errors,p),warnings:ae(_.warnings,p),path:_.path,external:_.external,sideEffects:_.sideEffects,namespace:_.namespace,suffix:_.suffix,pluginData:p.load(_.pluginData)})})})},onStart(a){let c='This error came from the "onStart" callback registered here:',b=ge(new Error(c),u,"onStart");w.push({name:o,callback:a,note:b}),S.onStart=!0},onEnd(a){let c='This error came from the "onEnd" callback registered here:',b=ge(new Error(c),u,"onEnd");v.push({name:o,callback:a,note:b}),S.onEnd=!0},onResolve(a,c){let b='This error came from the "onResolve" callback registered here:',E=ge(new Error(b),u,"onResolve"),$={},y=r(a,$,"filter",he),x=r(a,$,"namespace",h);if(K(a,$,`in onResolve() call for plugin ${V(o)}`),y==null)throw new Error("onResolve() call is missing a filter");let F=j++;P[F]={name:o,callback:c,note:E},S.onResolve.push({id:F,filter:y.source,namespace:x||""})},onLoad(a,c){let b='This error came from the "onLoad" callback registered here:',E=ge(new Error(b),u,"onLoad"),$={},y=r(a,$,"filter",he),x=r(a,$,"namespace",h);if(K(a,$,`in onLoad() call for plugin ${V(o)}`),y==null)throw new Error("onLoad() call is missing a filter");let F=j++;U[F]={name:o,callback:c,note:E},S.onLoad.push({id:F,filter:y.source,namespace:x||""})},onDispose(a){B.push(a)},esbuild:u.esbuild});k&&(yield k),T.push(S)}catch(O){return{ok:!1,error:O,pluginName:o}}}l["on-start"]=(m,d)=>te(void 0,null,function*(){let o={errors:[],warnings:[]};yield Promise.all(w.map(k=>te(void 0,[k],function*({name:O,callback:S,note:M}){try{let a=yield S();if(a!=null){if(typeof a!="object")throw new Error(`Expected onStart() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"errors",z),E=r(a,c,"warnings",z);K(a,c,`from onStart() callback in plugin ${V(O)}`),b!=null&&o.errors.push(...ne(b,"errors",p,O)),E!=null&&o.warnings.push(...ne(E,"warnings",p,O))}}catch(a){o.errors.push(le(a,u,p,M&&M(),O))}}))),n(m,o)}),l["on-resolve"]=(m,d)=>te(void 0,null,function*(){let o={},O="",S,M;for(let k of d.ids)try{({name:O,callback:S,note:M}=P[k]);let a=yield S({path:d.path,importer:d.importer,namespace:d.namespace,resolveDir:d.resolveDir,kind:d.kind,pluginData:p.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onResolve() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"pluginName",h),E=r(a,c,"path",h),$=r(a,c,"namespace",h),y=r(a,c,"suffix",h),x=r(a,c,"external",I),F=r(a,c,"sideEffects",I),L=r(a,c,"pluginData",ye),C=r(a,c,"errors",z),D=r(a,c,"warnings",z),A=r(a,c,"watchFiles",z),q=r(a,c,"watchDirs",z);K(a,c,`from onResolve() callback in plugin ${V(O)}`),o.id=k,b!=null&&(o.pluginName=b),E!=null&&(o.path=E),$!=null&&(o.namespace=$),y!=null&&(o.suffix=y),x!=null&&(o.external=x),F!=null&&(o.sideEffects=F),L!=null&&(o.pluginData=p.store(L)),C!=null&&(o.errors=ne(C,"errors",p,O)),D!=null&&(o.warnings=ne(D,"warnings",p,O)),A!=null&&(o.watchFiles=me(A,"watchFiles")),q!=null&&(o.watchDirs=me(q,"watchDirs"));break}}catch(a){o={id:k,errors:[le(a,u,p,M&&M(),O)]};break}n(m,o)}),l["on-load"]=(m,d)=>te(void 0,null,function*(){let o={},O="",S,M;for(let k of d.ids)try{({name:O,callback:S,note:M}=U[k]);let a=yield S({path:d.path,namespace:d.namespace,suffix:d.suffix,pluginData:p.load(d.pluginData)});if(a!=null){if(typeof a!="object")throw new Error(`Expected onLoad() callback in plugin ${V(O)} to return an object`);let c={},b=r(a,c,"pluginName",h),E=r(a,c,"contents",Te),$=r(a,c,"resolveDir",h),y=r(a,c,"pluginData",ye),x=r(a,c,"loader",h),F=r(a,c,"errors",z),L=r(a,c,"warnings",z),C=r(a,c,"watchFiles",z),D=r(a,c,"watchDirs",z);K(a,c,`from onLoad() callback in plugin ${V(O)}`),o.id=k,b!=null&&(o.pluginName=b),E instanceof Uint8Array?o.contents=E:E!=null&&(o.contents=Z(E)),$!=null&&(o.resolveDir=$),y!=null&&(o.pluginData=p.store(y)),x!=null&&(o.loader=x),F!=null&&(o.errors=ne(F,"errors",p,O)),L!=null&&(o.warnings=ne(L,"warnings",p,O)),C!=null&&(o.watchFiles=me(C,"watchFiles")),D!=null&&(o.watchDirs=me(D,"watchDirs"));break}}catch(a){o={id:k,errors:[le(a,u,p,M&&M(),O)]};break}n(m,o)});let Y=(m,d)=>d([],[]);v.length>0&&(Y=(m,d)=>{te(void 0,null,function*(){let o=[],O=[];for(let{name:S,callback:M,note:k}of v){let a,c;try{let b=yield M(m);if(b!=null){if(typeof b!="object")throw new Error(`Expected onEnd() callback in plugin ${V(S)} to return an object`);let E={},$=r(b,E,"errors",z),y=r(b,E,"warnings",z);K(b,E,`from onEnd() callback in plugin ${V(S)}`),$!=null&&(a=ne($,"errors",p,S)),y!=null&&(c=ne(y,"warnings",p,S))}}catch(b){a=[le(b,u,p,k&&k(),S)]}if(a){o.push(...a);try{m.errors.push(...a)}catch(b){}}if(c){O.push(...c);try{m.warnings.push(...c)}catch(b){}}}d(o,O)})});let R=()=>{for(let m of B)setTimeout(()=>m(),0)};return W=!0,{ok:!0,requestPlugins:T,runOnEndCallbacks:Y,scheduleOnDisposeCallbacks:R}});function Le(){let t=new Map,e=0;return{load(n){return t.get(n)},store(n){if(n===void 0)return-1;let i=e++;return t.set(i,n),i}}}function ge(t,e,n){let i,u=!1;return()=>{if(u)return i;u=!0;try{let l=(t.stack+"").split(`
`);l.splice(1,1);let f=Ne(e,l,n);if(f)return i={text:t.message,location:f},i}catch(l){}}}function le(t,e,n,i,u){let l="Internal error",f=null;try{l=(t&&t.message||t)+""}catch(s){}try{f=Ne(e,(t.stack+"").split(`

@@ -15,3 +15,3 @@ `),"")}catch(s){}return{id:"",pluginName:u,text:l,location:f,notes:i?[i]:[],detail:n?n.store(t):-1}}function Ne(t,e,n){let i=" at ";if(t.readFileSync&&!e[0].startsWith(i)&&e[1].startsWith(i))for(let u=1;u<e.length;u++){let l=e[u];if(l.startsWith(i))for(l=l.slice(i.length);;){let f=/^(?:new |async )?\S+ \((.*)\)$/.exec(l);if(f){l=f[1];continue}if(f=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(l),f){l=f[1];continue}if(f=/^(\S+):(\d+):(\d+)$/.exec(l),f){let s;try{s=t.readFileSync(f[1],"utf8")}catch(P){break}let p=s.split(/\r\n|\r|\n|\u2028|\u2029/)[+f[2]-1]||"",w=+f[3]-1,v=p.slice(w,w+n.length)===n?n.length:0;return{file:f[1],namespace:"file",line:+f[2],column:Z(p.slice(0,w)).length,length:Z(p.slice(w,w+v)).length,lineText:p+`

error: ${f.text}`;let{file:p,line:w,column:v}=f.location,P=f.pluginName?`[plugin: ${f.pluginName}] `:"";return`
${p}:${w}:${v}: ERROR: ${P}${f.text}`}).join(""),l=new Error(`${t}${u}`);return l.errors=e,l.warnings=n,l}function ae(t,e){for(let n of t)n.detail=e.load(n.detail);return t}function De(t,e){if(t==null)return null;let n={},i=r(t,n,"file",h),u=r(t,n,"namespace",h),l=r(t,n,"line",oe),f=r(t,n,"column",oe),s=r(t,n,"length",oe),p=r(t,n,"lineText",h),w=r(t,n,"suggestion",h);return K(t,n,e),{file:i||"",namespace:u||"",line:l||0,column:f||0,length:s||0,lineText:p||"",suggestion:w||""}}function ne(t,e,n,i){let u=[],l=0;for(let f of t){let s={},p=r(f,s,"id",h),w=r(f,s,"pluginName",h),v=r(f,s,"text",h),P=r(f,s,"location",Ae),U=r(f,s,"notes",z),B=r(f,s,"detail",ye),j=`in element ${l} of "${e}"`;K(f,s,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),R=r(T,W,"location",Ae);K(T,W,j),Q.push({text:Y||"",location:De(R,j)})}u.push({id:p||"",pluginName:w||i,text:v||"",location:De(P,j),notes:Q,detail:n?n.store(B):-1}),l++}return u}function me(t,e){let n=[];for(let i of t){if(typeof i!="string")throw new Error(`${V(e)} must be an array of strings`);n.push(i)}return n}function lt({path:t,contents:e}){let n=null;return{path:t,contents:e,get text(){let i=this.contents;return(n===null||i!==e)&&(e=i,n=ie(i)),n}}}var ot="0.17.13",at=t=>fe().build(t),ut=t=>fe().context(t),ct=(t,e)=>fe().transform(t,e),ft=(t,e)=>fe().formatMessages(t,e),dt=(t,e)=>fe().analyzeMetafile(t,e),pt=()=>{throw new Error('The "buildSync" API only works in node')},gt=()=>{throw new Error('The "transformSync" API only works in node')},mt=()=>{throw new Error('The "formatMessagesSync" API only works in node')},yt=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ue,Se,fe=()=>{if(Se)return Se;throw ue?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},ht=t=>{t=Be(t||{});let e=t.wasmURL,n=t.wasmModule,i=t.worker!==!1;if(!e&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ue)throw new Error('Cannot call "initialize" more than once');return ue=bt(e||"",n,i),ue.catch(()=>{ue=void 0}),ue},bt=(t,e,n)=>te(void 0,null,function*(){let i;if(n){let w=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nvar y=(r,f,m)=>new Promise((c,n)=>{var s=h=>{try{l(m.next(h))}catch(u){n(u)}},i=h=>{try{l(m.throw(h))}catch(u){n(u)}},l=h=>h.done?c(h.value):Promise.resolve(h.value).then(s,i);l((m=m.apply(r,f)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=m.decode(s);const i=c.lastIndexOf(`\n`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,l,h,u){if(i!==0||l!==s.length||h!==null){u(r());return}const g=this.writeSync(n,s);u(null,g)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const f=new TextEncoder("utf-8"),m=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let d=0;switch(typeof t){case"object":t!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(e+4,2146959360|d,!0),this.mem.setUint32(e,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(t+d*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return m.decode(new DataView(this._inst.exports.mem.buffer,t,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(g+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),a=h(e+32),d=Reflect.apply(o,t,a);e=this._inst.exports.getsp()>>>0,i(e+56,d),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),a=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),a=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);l(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=l(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),c(e+40,a.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=l(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),c(e+40,a.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,l=[];this.argv.forEach(e=>{l.push(s(e))}),l.push(0),Object.keys(this.env).sort().forEach(e=>{l.push(s(`${e}=${this.env[e]}`))}),l.push(0);const u=n;l.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const g=4096+8192;if(n>=g)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let g=c.split(`\n`);g.length>1&&console.log(g.slice(0,-1).join(`\n`)),c=g[g.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},m.read=(h,u,g,e,t,o)=>{if(h!==0||g!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,e,t,o);return}let a=n[0],d=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;l.argv=["","--service=0.17.13"],tryToInstantiateModule(r,l).then(h=>{postMessage(null),l.run(h)},h=>{postMessage(h)})};function tryToInstantiateModule(r,f){return y(this,null,function*(){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const m=yield fetch(r);if(!m.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(m.headers.get("Content-Type")||""))return(yield WebAssembly.instantiateStreaming(m,f.importObject)).instance;const c=yield m.arrayBuffer();return(yield WebAssembly.instantiate(c,f.importObject)).instance})}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
${p}:${w}:${v}: ERROR: ${P}${f.text}`}).join(""),l=new Error(`${t}${u}`);return l.errors=e,l.warnings=n,l}function ae(t,e){for(let n of t)n.detail=e.load(n.detail);return t}function De(t,e){if(t==null)return null;let n={},i=r(t,n,"file",h),u=r(t,n,"namespace",h),l=r(t,n,"line",oe),f=r(t,n,"column",oe),s=r(t,n,"length",oe),p=r(t,n,"lineText",h),w=r(t,n,"suggestion",h);return K(t,n,e),{file:i||"",namespace:u||"",line:l||0,column:f||0,length:s||0,lineText:p||"",suggestion:w||""}}function ne(t,e,n,i){let u=[],l=0;for(let f of t){let s={},p=r(f,s,"id",h),w=r(f,s,"pluginName",h),v=r(f,s,"text",h),P=r(f,s,"location",Ae),U=r(f,s,"notes",z),B=r(f,s,"detail",ye),j=`in element ${l} of "${e}"`;K(f,s,j);let Q=[];if(U)for(let T of U){let W={},Y=r(T,W,"text",h),R=r(T,W,"location",Ae);K(T,W,j),Q.push({text:Y||"",location:De(R,j)})}u.push({id:p||"",pluginName:w||i,text:v||"",location:De(P,j),notes:Q,detail:n?n.store(B):-1}),l++}return u}function me(t,e){let n=[];for(let i of t){if(typeof i!="string")throw new Error(`${V(e)} must be an array of strings`);n.push(i)}return n}function lt({path:t,contents:e}){let n=null;return{path:t,contents:e,get text(){let i=this.contents;return(n===null||i!==e)&&(e=i,n=ie(i)),n}}}var ot="0.17.14",at=t=>fe().build(t),ut=t=>fe().context(t),ct=(t,e)=>fe().transform(t,e),ft=(t,e)=>fe().formatMessages(t,e),dt=(t,e)=>fe().analyzeMetafile(t,e),pt=()=>{throw new Error('The "buildSync" API only works in node')},gt=()=>{throw new Error('The "transformSync" API only works in node')},mt=()=>{throw new Error('The "formatMessagesSync" API only works in node')},yt=()=>{throw new Error('The "analyzeMetafileSync" API only works in node')},ue,Se,fe=()=>{if(Se)return Se;throw ue?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},ht=t=>{t=Be(t||{});let e=t.wasmURL,n=t.wasmModule,i=t.worker!==!1;if(!e&&!n)throw new Error('Must provide either the "wasmURL" option or the "wasmModule" option');if(ue)throw new Error('Cannot call "initialize" more than once');return ue=bt(e||"",n,i),ue.catch(()=>{ue=void 0}),ue},bt=(t,e,n)=>te(void 0,null,function*(){let i;if(n){let w=new Blob(['onmessage=(postMessage=>{\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nvar y=(r,f,m)=>new Promise((c,n)=>{var s=h=>{try{l(m.next(h))}catch(u){n(u)}},i=h=>{try{l(m.throw(h))}catch(u){n(u)}},l=h=>h.done?c(h.value):Promise.resolve(h.value).then(s,i);l((m=m.apply(r,f)).next())});let onmessage,globalThis={};for(let r=self;r;r=Object.getPrototypeOf(r))for(let f of Object.getOwnPropertyNames(r))f in globalThis||Object.defineProperty(globalThis,f,{get:()=>self[f]});(()=>{const r=()=>{const c=new Error("not implemented");return c.code="ENOSYS",c};if(!globalThis.fs){let c="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(n,s){c+=m.decode(s);const i=c.lastIndexOf(`\n`);return i!=-1&&(console.log(c.substring(0,i)),c=c.substring(i+1)),s.length},write(n,s,i,l,h,u){if(i!==0||l!==s.length||h!==null){u(r());return}const g=this.writeSync(n,s);u(null,g)},chmod(n,s,i){i(r())},chown(n,s,i,l){l(r())},close(n,s){s(r())},fchmod(n,s,i){i(r())},fchown(n,s,i,l){l(r())},fstat(n,s){s(r())},fsync(n,s){s(null)},ftruncate(n,s,i){i(r())},lchown(n,s,i,l){l(r())},link(n,s,i){i(r())},lstat(n,s){s(r())},mkdir(n,s,i){i(r())},open(n,s,i,l){l(r())},read(n,s,i,l,h,u){u(r())},readdir(n,s){s(r())},readlink(n,s){s(r())},rename(n,s,i){i(r())},rmdir(n,s){s(r())},stat(n,s){s(r())},symlink(n,s,i){i(r())},truncate(n,s,i){i(r())},unlink(n,s){s(r())},utimes(n,s,i,l){l(r())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw r()},pid:-1,ppid:-1,umask(){throw r()},cwd(){throw r()},chdir(){throw r()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const f=new TextEncoder("utf-8"),m=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{e!==0&&console.warn("exit code:",e)},this._exitPromise=new Promise(e=>{this._resolveExitPromise=e}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const c=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},n=e=>{const t=this.mem.getUint32(e+0,!0),o=this.mem.getInt32(e+4,!0);return t+o*4294967296},s=e=>{const t=this.mem.getFloat64(e,!0);if(t===0)return;if(!isNaN(t))return t;const o=this.mem.getUint32(e,!0);return this._values[o]},i=(e,t)=>{if(typeof t=="number"&&t!==0){if(isNaN(t)){this.mem.setUint32(e+4,2146959360,!0),this.mem.setUint32(e,0,!0);return}this.mem.setFloat64(e,t,!0);return}if(t===void 0){this.mem.setFloat64(e,0,!0);return}let a=this._ids.get(t);a===void 0&&(a=this._idPool.pop(),a===void 0&&(a=this._values.length),this._values[a]=t,this._goRefCounts[a]=0,this._ids.set(t,a)),this._goRefCounts[a]++;let d=0;switch(typeof t){case"object":t!==null&&(d=1);break;case"string":d=2;break;case"symbol":d=3;break;case"function":d=4;break}this.mem.setUint32(e+4,2146959360|d,!0),this.mem.setUint32(e,a,!0)},l=e=>{const t=n(e+0),o=n(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,o)},h=e=>{const t=n(e+0),o=n(e+8),a=new Array(o);for(let d=0;d<o;d++)a[d]=s(t+d*8);return a},u=e=>{const t=n(e+0),o=n(e+8);return m.decode(new DataView(this._inst.exports.mem.buffer,t,o))},g=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{e>>>=0;const t=n(e+8),o=n(e+16),a=this.mem.getInt32(e+24,!0);globalThis.fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,o,a))},"runtime.resetMemoryDataView":e=>{e>>>=0,this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":e=>{e>>>=0,c(e+8,(g+performance.now())*1e6)},"runtime.walltime":e=>{e>>>=0;const t=new Date().getTime();c(e+8,t/1e3),this.mem.setInt32(e+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},n(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(l(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,this._goRefCounts[t]===0){const o=this._values[t];this._values[t]=null,this._ids.delete(o),this._idPool.push(t)}},"syscall/js.stringVal":e=>{e>>>=0,i(e+24,u(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const t=Reflect.get(s(e+8),u(e+16));e=this._inst.exports.getsp()>>>0,i(e+32,t)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(s(e+8),u(e+16),s(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(s(e+8),u(e+16))},"syscall/js.valueIndex":e=>{e>>>=0,i(e+24,Reflect.get(s(e+8),n(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(s(e+8),n(e+16),s(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const t=s(e+8),o=Reflect.get(t,u(e+16)),a=h(e+32),d=Reflect.apply(o,t,a);e=this._inst.exports.getsp()>>>0,i(e+56,d),this.mem.setUint8(e+64,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),a=Reflect.apply(t,void 0,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const t=s(e+8),o=h(e+16),a=Reflect.construct(t,o);e=this._inst.exports.getsp()>>>0,i(e+40,a),this.mem.setUint8(e+48,1)}catch(t){e=this._inst.exports.getsp()>>>0,i(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":e=>{e>>>=0,c(e+16,parseInt(s(e+8).length))},"syscall/js.valuePrepareString":e=>{e>>>=0;const t=f.encode(String(s(e+8)));i(e+16,t),c(e+24,t.length)},"syscall/js.valueLoadString":e=>{e>>>=0;const t=s(e+8);l(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":e=>{e>>>=0;const t=l(e+8),o=s(e+32);if(!(o instanceof Uint8Array||o instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),c(e+40,a.length),this.mem.setUint8(e+48,1)},"syscall/js.copyBytesToJS":e=>{e>>>=0;const t=s(e+8),o=l(e+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray)){this.mem.setUint8(e+48,0);return}const a=o.subarray(0,t.length);t.set(a),c(e+40,a.length),this.mem.setUint8(e+48,1)},debug:e=>{console.log(e)}}}}run(c){return y(this,null,function*(){if(!(c instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=c,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const s=e=>{const t=n,o=f.encode(e+"\\0");return new Uint8Array(this.mem.buffer,n,o.length).set(o),n+=o.length,n%8!==0&&(n+=8-n%8),t},i=this.argv.length,l=[];this.argv.forEach(e=>{l.push(s(e))}),l.push(0),Object.keys(this.env).sort().forEach(e=>{l.push(s(`${e}=${this.env[e]}`))}),l.push(0);const u=n;l.forEach(e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8});const g=4096+8192;if(n>=g)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,u),this.exited&&this._resolveExitPromise(),yield this._exitPromise})}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(c){const n=this;return function(){const s={id:c,this:this,args:arguments};return n._pendingEvent=s,n._resume(),s.result}}}})(),onmessage=({data:r})=>{let f=new TextDecoder,m=globalThis.fs,c="";m.writeSync=(h,u)=>{if(h===1)postMessage(u);else if(h===2){c+=f.decode(u);let g=c.split(`\n`);g.length>1&&console.log(g.slice(0,-1).join(`\n`)),c=g[g.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},m.read=(h,u,g,e,t,o)=>{if(h!==0||g!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,e,t,o);return}let a=n[0],d=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;l.argv=["","--service=0.17.14"],tryToInstantiateModule(r,l).then(h=>{postMessage(null),l.run(h)},h=>{postMessage(h)})};function tryToInstantiateModule(r,f){return y(this,null,function*(){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const m=yield fetch(r);if(!m.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\\/wasm($|;)/i.test(m.headers.get("Content-Type")||""))return(yield WebAssembly.instantiateStreaming(m,f.importObject)).instance;const c=yield m.arrayBuffer();return(yield WebAssembly.instantiate(c,f.importObject)).instance})}return r=>onmessage(r);})(postMessage)'],{type:"text/javascript"});i=new Worker(URL.createObjectURL(w))}else{let w=(postMessage=>{
// Copyright 2018 The Go Authors. All rights reserved.

@@ -23,3 +23,3 @@ // Use of this source code is governed by a BSD-style

`);g.length>1&&console.log(g.slice(0,-1).join(`
`)),c=g[g.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},m.read=(h,u,g,e,t,o)=>{if(h!==0||g!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,e,t,o);return}let a=n[0],d=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;l.argv=["","--service=0.17.13"],tryToInstantiateModule(r,l).then(h=>{postMessage(null),l.run(h)},h=>{postMessage(h)})};function tryToInstantiateModule(r,f){return y(this,null,function*(){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const m=yield fetch(r);if(!m.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(m.headers.get("Content-Type")||""))return(yield WebAssembly.instantiateStreaming(m,f.importObject)).instance;const c=yield m.arrayBuffer();return(yield WebAssembly.instantiate(c,f.importObject)).instance})}return r=>onmessage(r);})(v=>i.onmessage({data:v}));i={onmessage:null,postMessage:v=>setTimeout(()=>w({data:v})),terminate(){}}}let u,l,f=new Promise((w,v)=>{u=w,l=v});i.onmessage=({data:w})=>{i.onmessage=({data:v})=>s(v),w?l(w):u()},i.postMessage(e||new URL(t,location.href).toString());let{readFromStdout:s,service:p}=qe({writeToStdin(w){i.postMessage(w)},isSync:!1,hasFS:!1,esbuild:we});yield f,Se={build:w=>new Promise((v,P)=>p.buildOrContext({callName:"build",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),context:w=>new Promise((v,P)=>p.buildOrContext({callName:"context",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),transform:(w,v)=>new Promise((P,U)=>p.transform({callName:"transform",refs:null,input:w,options:v||{},isTTY:!1,fs:{readFile(B,j){j(new Error("Internal error"),null)},writeFile(B,j){j(null)}},callback:(B,j)=>B?U(B):P(j)})),formatMessages:(w,v)=>new Promise((P,U)=>p.formatMessages({callName:"formatMessages",refs:null,messages:w,options:v,callback:(B,j)=>B?U(B):P(j)})),analyzeMetafile:(w,v)=>new Promise((P,U)=>p.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof w=="string"?w:JSON.stringify(w),options:v,callback:(B,j)=>B?U(B):P(j)}))}}),wt=we;
`)),c=g[g.length-1]}else throw new Error("Bad write");return u.length};let n=[],s,i=0;onmessage=({data:h})=>{h.length>0&&(n.push(h),s&&s())},m.read=(h,u,g,e,t,o)=>{if(h!==0||g!==0||e!==u.length||t!==null)throw new Error("Bad read");if(n.length===0){s=()=>m.read(h,u,g,e,t,o);return}let a=n[0],d=Math.max(0,Math.min(e,a.length-i));u.set(a.subarray(i,i+d),g),i+=d,i===a.length&&(n.shift(),i=0),o(null,d)};let l=new globalThis.Go;l.argv=["","--service=0.17.14"],tryToInstantiateModule(r,l).then(h=>{postMessage(null),l.run(h)},h=>{postMessage(h)})};function tryToInstantiateModule(r,f){return y(this,null,function*(){if(r instanceof WebAssembly.Module)return WebAssembly.instantiate(r,f.importObject);const m=yield fetch(r);if(!m.ok)throw new Error(`Failed to download ${JSON.stringify(r)}`);if("instantiateStreaming"in WebAssembly&&/^application\/wasm($|;)/i.test(m.headers.get("Content-Type")||""))return(yield WebAssembly.instantiateStreaming(m,f.importObject)).instance;const c=yield m.arrayBuffer();return(yield WebAssembly.instantiate(c,f.importObject)).instance})}return r=>onmessage(r);})(v=>i.onmessage({data:v}));i={onmessage:null,postMessage:v=>setTimeout(()=>w({data:v})),terminate(){}}}let u,l,f=new Promise((w,v)=>{u=w,l=v});i.onmessage=({data:w})=>{i.onmessage=({data:v})=>s(v),w?l(w):u()},i.postMessage(e||new URL(t,location.href).toString());let{readFromStdout:s,service:p}=qe({writeToStdin(w){i.postMessage(w)},isSync:!1,hasFS:!1,esbuild:we});yield f,Se={build:w=>new Promise((v,P)=>p.buildOrContext({callName:"build",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),context:w=>new Promise((v,P)=>p.buildOrContext({callName:"context",refs:null,options:w,isTTY:!1,defaultWD:"/",callback:(U,B)=>U?P(U):v(B)})),transform:(w,v)=>new Promise((P,U)=>p.transform({callName:"transform",refs:null,input:w,options:v||{},isTTY:!1,fs:{readFile(B,j){j(new Error("Internal error"),null)},writeFile(B,j){j(null)}},callback:(B,j)=>B?U(B):P(j)})),formatMessages:(w,v)=>new Promise((P,U)=>p.formatMessages({callName:"formatMessages",refs:null,messages:w,options:v,callback:(B,j)=>B?U(B):P(j)})),analyzeMetafile:(w,v)=>new Promise((P,U)=>p.analyzeMetafile({callName:"analyzeMetafile",refs:null,metafile:typeof w=="string"?w:JSON.stringify(w),options:v,callback:(B,j)=>B?U(B):P(j)}))}}),wt=we;
})(typeof module==="object"?module:{set exports(x){(typeof self!=="undefined"?self:this).esbuild=x}});
{
"name": "esbuild-wasm",
"version": "0.17.13",
"version": "0.17.14",
"description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/evanw/esbuild",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc