varA=a=>typeofa==='number';(()=>{if(typeofglobal!=='undefined'){}elseif(typeofwindow!=='undefined')window.global=window;elseif(typeofself!=='undefined')self.global=self;elsethrowError('cannot export Go (neither global, window nor self is defined)');(!global.require&&typeofrequire!=='undefined')&&(global.require=require);(!global.fs&&global.require)&&(global.fs=require('node:fs'));varB=()=>{const_a=Error('not implemented');_a.code='ENOSYS';return_a},F=[];if(!global.fs){letD='';global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(_A,_b){D+=d.decode(_b);var_C=D.lastIndexOf('\n');_C!=-1&&(console.log(D.substr(0,_C)),D=D.substr(_C+1));return_b.length},write(E,_B,aA,_d,_e,_f){if(aA!==0||_d!==_B.length||_e!==null){_f(B());return}_f(null,this.writeSync(E,_B))},chmod(aB,aC,aD){aD(B())},chown(aE,aF,aG,_D){_D(B())},close(aH,aI){aI(B())},fchmod(aJ,aK,aL){aL(B())},fchown(aM,aN,aO,aP){aP(B())},fstat(aQ,aR){aR(B())},fsync(aS,aT){aT(null)},ftruncate(aU,aV,aW){aW(B())},lchown(aX,aY,aZ,bA){bA(B())},link(bB,bC,bD){bD(B())},lstat(bE,bF){bF(B())},mkdir(bG,bH,bI){bI(B())},open(bJ,bK,bL,bM){bM(B())},read(bN,bO,bP,bQ,_E,_F){_F(B())},readdir(bR,bS){bS(B())},readlink(bT,bU){bU(B())},rename(bV,bW,bX){bX(B())},rmdir(bY,bZ){bZ(B())},stat(cA,cB){cB(B())},symlink(cC,cD,cE){cE(B())},truncate(cF,cG,cH){cH(B())},unlink(cI,cJ){cJ(B())},utimes(cK,cL,cM,cN){cN(B())}}}!global.process&&(global.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throwB()},pid:-1,ppid:-1,umask(){throwB()},cwd(){throwB()},chdir(){throwB()}});if(!global.crypto){varC=require('node:crypto');global.crypto={getRandomValues(b){C.randomFillSync(b)}}}!global.performance&&(global.performance={now(){const[cO,cP]=process.hrtime();returncO*1000+cP/1000000}});!global.TextEncoder&&(global.TextEncoder=require('node:util').TextEncoder);!global.TextDecoder&&(global.TextDecoder=require('node:util').TextDecoder);var_c=newTextEncoder('utf-8');vard=newTextDecoder('utf-8');lete=newDataView(newArrayBuffer(8));global.Go=class{constructor(){this._callbackTimeouts=newMap();this._nextCallbackTimeoutID=1;varcQ=()=>newDataView(this._inst.exports.memory.buffer),cR=cW=>{e.setBigInt64(0,cW,!0);constf=e.getFloat64(0,!0);if(f===0)return;if(!isNaN(f))returnf;constcX=cW&0xffffffffn;returnthis._values[cX]},cS=cY=>{returncR(cQ().getBigUint64(cY,!0))},cT=v=>{constcZ=0x7FF80000n;if(A(v)){if(isNaN(v))returncZ<<32n;if(v===0)return(cZ<<32n)|1n;e.setFloat64(0,v,!0);returne.getBigInt64(0,!0)}switch(v){casevoid0:return0n;casenull:return(cZ<<32n)|2n;case!0:return(cZ<<32n)|3n;case!1:return(cZ<<32n)|4n}letdA=this._ids.get(v);if(dA===void0){dA=this._idPool.pop();dA===void0&&(dA=BigInt(this._values.length));this._values[dA]=v;this._goRefCounts[dA]=0;this._ids.set(v,dA)}this._goRefCounts[dA]++;letdB=1n;switch(typeofv){case'string':dB=2n;break;case'symbol':dB=3n;break;case'function':dB=4n;break}returndA|((cZ|dB)<<32n)},cU=(dC,v)=>{cQ().setBigUint64(dC,cT(v),!0)},cV=(dD,dE,dF)=>newUint8Array(this._inst.exports.memory.buffer,dD,dE),G=(dG,dH,dI)=>{consta=Array(dH);for(leti=0;i<dH;i++)a[i]=cS(dG+i*8);returna},h=(dJ,dK)=>d.decode(newDataView(this._inst.exports.memory.buffer,dJ,dK)),I=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(dL,dM,dN,dO){letdP=0;if(dL==1)for(letdQ=0;dQ<dN;dQ++){letdR=dM+dQ*8;letdS=cQ().getUint32(dR+0,!0);letdT=cQ().getUint32(dR+4,!0);dP+=dT;for(leti=0;i<dT;i++){letc=cQ().getUint8(dS+i);if(c==13){}elseif(c==10){F=[];console.log(d.decode(newUint8Array(F)))}elseF.push(c)}}elseconsole.error('invalid file descriptor:',dL);cQ().setUint32(dO,dP,!0);return0},fd_close:()=>0,fd_fdstat_get:()=>0,fd_seek:()=>0,'proc_exit':dU=>{if(global.process)process.exit(dU);elsethrow`trying to exit with code ${dU}`},random_get:(dV,dW)=>(crypto.getRandomValues(cV(dV,dW)),0)},gojs:{'runtime.ticks':()=>I+performance.now(),'runtime.sleepTicks':dX=>setTimeout(this._inst.exports.go_scheduler,dX),'syscall/js.finalizeRef':dY=