var Module=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;(function(){function a(d){d=d.split("-")[0];for(d=d.split(".").slice(0,3);3>d.length;)d.push("00");d=d.map(e=>e.padStart(2,"0"));return d.join("")}var b="undefined"!==typeof process&&process.versions?.node?a(process.versions.node):2147483647;if(16E4>b)throw Error(`This emscripten-generated code requires node v${"16.0.0"} (detected v${[b/1E4|0,(b/100|0)%100,b%100].join(".")})`);if(b="undefined"!==typeof navigator&&navigator.userAgent){var c=b.includes("Safari/")&&!b.includes("Chrome/")&&b.match(/Version\/(\d+\.?\d*\.?\d*)/)?
a(b.match(/Version\/(\d+\.?\d*\.?\d*)/)[1]):2147483647;if(15E4>c)throw Error(`This emscripten-generated code requires Safari v${"15.0.0"} (detected v${c})`);c=b.match(/Firefox\/(\d+(?:\.\d+)?)/)?parseFloat(b.match(/Firefox\/(\d+(?:\.\d+)?)/)[1]):2147483647;if(79>c)throw Error(`This emscripten-generated code requires Firefox v79 (detected v${c})`);b=b.match(/Chrome\/(\d+(?:\.\d+)?)/)?parseFloat(b.match(/Chrome\/(\d+(?:\.\d+)?)/)[1]):2147483647;if(85>b)throw Error(`This emscripten-generated code requires Chrome v85 (detected v${b})`);
}})();var l=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,ca=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type,da=!aa&&!ca&&!ba,ea="./this.program";"undefined"!=typeof __filename?_scriptName=__filename:ba&&(_scriptName=self.location.href);var fa="",ha,ia;
if(ca){if(!globalThis.process?.versions?.node||"renderer"==globalThis.process?.type)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var fs=require("fs");fa=__dirname+"/";ia=a=>{a=ja(a)?new URL(a):a;a=fs.readFileSync(a);m(Buffer.isBuffer(a));return a};ha=async a=>{a=ja(a)?new URL(a):a;a=fs.readFileSync(a,void 0);m(Buffer.isBuffer(a));return a};1<process.argv.length&&
(ea=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2)}else if(!da)if(aa||ba){try{fa=(new URL(".",_scriptName)).href}catch{}if(!globalThis.window&&!globalThis.WorkerGlobalScope)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");ba&&(ia=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});
ha=async a=>{if(ja(a))return new Promise((c,d)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d(e.status)};e.onerror=d;e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url);}}else throw Error("environment detection error");var ka=console.log.bind(console),q=console.error.bind(console);m(!da,"shell environment detected but not enabled at build time.  Add `shell` to `-sENVIRONMENT` to enable.");
globalThis.WebAssembly||q("no native wasm support detected");var la=!1;function m(a,b){a||r("Assertion failed"+(b?": "+b:""))}var ja=a=>a.startsWith("file://");
function ma(){if(!la){var a=na();0==a&&(a+=4);var b=w[a>>2],c=w[a+4>>2];34821223==b&&2310721022==c||r(`Stack overflow! Stack cookie has been overwritten at ${oa(a)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${oa(c)} ${oa(b)}`);1668509029!=w[0]&&r("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var pa=new Int16Array(1),qa=new Int8Array(pa.buffer);pa[0]=25459;115===qa[0]&&99===qa[1]||r("Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)");
function y(a){return()=>m(!1,`call to '${a}' via reference taken before Wasm module initialization`)}function z(a){Object.getOwnPropertyDescriptor(l,a)&&r(`\`Module.${a}\` was supplied but \`${a}\` not included in INCOMING_MODULE_JS_API`)}
function ra(a){Object.getOwnPropertyDescriptor(l,a)||Object.defineProperty(l,a,{configurable:!0,get(){var b=`'${a}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;"FS_createPath"!==a&&"FS_createDataFile"!==a&&"FS_createPreloadedFile"!==a&&"FS_preloadFile"!==a&&"FS_unlink"!==a&&"addRunDependency"!==a&&"FS_createLazyFile"!==a&&"FS_createDevice"!==a&&"removeRunDependency"!==a||(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
r(b)}})}var sa,ta,C,E,G,ua,H,w,va,wa,xa,za,Aa=!1;function Ba(){var a=Ca.buffer;C=new Int8Array(a);G=new Int16Array(a);E=new Uint8Array(a);ua=new Uint16Array(a);H=new Int32Array(a);w=new Uint32Array(a);va=new Float32Array(a);wa=new Float64Array(a);xa=new BigInt64Array(a);za=new BigUint64Array(a)}m(globalThis.Int32Array&&globalThis.Float64Array&&Int32Array.prototype.subarray&&Int32Array.prototype.set,"JS engine does not provide full typed array support");
function r(a){a="Aborted("+a+")";q(a);la=!0;a=new WebAssembly.RuntimeError(a);ta?.(a);throw a;}function Da(a,b){return(...c)=>{m(Aa,`native function \`${a}\` called before runtime initialization`);var d=Ea[a];m(d,`exported native function \`${a}\` not found`);m(c.length<=b,`native function \`${a}\` called with ${c.length} args but expects ${b}`);return d(...c)}}var Fa;
async function Ga(a){try{var b=await ha(a);return new Uint8Array(b)}catch{}if(ia)a=ia(a);else throw"both async and sync fetching of the wasm failed";return a}
async function Ha(a,b){try{var c=await Ga(a);return await WebAssembly.instantiate(c,b)}catch(d){q(`failed to asynchronously prepare wasm: ${d}`),ja(a)&&q(`warning: Loading from a file URI (${a}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),r(d)}}
async function Ia(a){var b=Fa;if(!ja(b)&&!ca)try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){q(`wasm streaming compile failed: ${d}`),q("falling back to ArrayBuffer instantiation")}return Ha(b,a)}
var oa=a=>{m("number"===typeof a,`ptrToString expects a number, got ${typeof a}`);return"0x"+(a>>>0).toString(16).padStart(8,"0")},Ja=a=>{Ja.ka||(Ja.ka={});Ja.ka[a]||(Ja.ka[a]=1,ca&&(a="warning: "+a),q(a))},Ka=globalThis.TextDecoder&&new TextDecoder,La=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;return b},Ma=(a,b=0,c,d)=>{c=La(a,b,c,d);if(16<c-b&&a.buffer&&Ka)return Ka.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&
31)<<6|f);else{var g=a[b++]&63;224==(e&240)?e=(e&15)<<12|f<<6|g:(240!=(e&248)&&Ja("Invalid UTF-8 leading byte "+oa(e)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),e=(e&7)<<18|f<<12|g<<6|a[b++]&63);65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},I=(a,b,c)=>{m("number"==typeof a,`UTF8ToString expects a number (got ${typeof a})`);return a?Ma(E,a,b,c):""};
class Na{constructor(a){this.l=a-24}}
var Oa=0,J=()=>{m(void 0!=Pa);var a=H[+Pa>>2];Pa+=4;return a},Qa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ra=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=Qa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Sa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";
b&&=b.slice(0,-1);return a+b},Ta=a=>a&&a.match(/([^\/]+|\/)\/*$/)[1],Ua=()=>{if(ca){var a=require("crypto");return b=>a.randomFillSync(b)}return b=>crypto.getRandomValues(b)},Va=a=>{(Va=Ua())(a)},Wa=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Qa(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."},Xa=(a,b)=>{function c(g){for(var h=
0;h<g.length&&""===g[h];h++);for(var k=g.length-1;0<=k&&""===g[k];k--);return h>k?[]:g.slice(h,k-h+1)}a=Wa(a).slice(1);b=Wa(b).slice(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,f=0;f<d;f++)if(a[f]!==b[f]){e=f;break}d=[];for(f=e;f<a.length;f++)d.push("..");d=d.concat(b.slice(e));return d.join("/")},Ya=[],Za=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},$a=(a,b,c,d)=>{m("string"===typeof a,
`stringToUTF8Array expects a string (got ${typeof a})`);if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;1114111<g&&Ja("Invalid Unicode code point "+oa(g)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");
b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},ab=[];function bb(a,b){ab[a]={input:[],output:[],M:b};cb(a,db)}
var db={open(a){var b=ab[a.node.rdev];if(!b)throw new K(43);a.tty=b;a.seekable=!1},close(a){a.tty.M.fsync(a.tty)},fsync(a){a.tty.M.fsync(a.tty)},read(a,b,c,d){if(!a.tty||!a.tty.M.na)throw new K(60);for(var e=0,f=0;f<d;f++){try{var g=a.tty.M.na(a.tty)}catch(h){throw new K(29);}if(void 0===g&&0===e)throw new K(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.atime=Date.now());return e},write(a,b,c,d){if(!a.tty||!a.tty.M.ja)throw new K(60);try{for(var e=0;e<d;e++)a.tty.M.ja(a.tty,b[c+e])}catch(f){throw new K(29);
}d&&(a.node.mtime=a.node.ctime=Date.now());return e}},eb={na(){a:{if(!Ya.length){var a=null;if(ca){var b=Buffer.alloc(256),c=0,d=process.stdin.fd;try{c=fs.readSync(d,b,0,256)}catch(e){if(e.toString().includes("EOF"))c=0;else throw e;}0<c&&(a=b.slice(0,c).toString("utf-8"))}else globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}b=Array(Za(a)+1);a=$a(a,b,0,b.length);b.length=a;Ya=b}a=Ya.shift()}return a},ja(a,b){null===b||10===b?(ka(Ma(a.output)),a.output=
[]):0!=b&&a.output.push(b)},fsync(a){0<a.output?.length&&(ka(Ma(a.output)),a.output=[])},ya(){return{Na:25856,Pa:5,Ma:191,Oa:35387,La:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},za(){return 0},Aa(){return[24,80]}},fb={ja(a,b){null===b||10===b?(q(Ma(a.output)),a.output=[]):0!=b&&a.output.push(b)},fsync(a){0<a.output?.length&&(q(Ma(a.output)),a.output=[])}},gb=a=>{m(65536,"alignment argument is required");return 65536*Math.ceil(a/65536)},L={J:null,H(){return L.createNode(null,
"/",16895,0)},createNode(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new K(63);L.J||(L.J={dir:{node:{N:L.h.N,L:L.h.L,lookup:L.h.lookup,aa:L.h.aa,rename:L.h.rename,unlink:L.h.unlink,rmdir:L.h.rmdir,readdir:L.h.readdir,symlink:L.h.symlink},stream:{I:L.i.I}},file:{node:{N:L.h.N,L:L.h.L},stream:{I:L.i.I,read:L.i.read,write:L.i.write,ba:L.i.ba,da:L.i.da}},link:{node:{N:L.h.N,L:L.h.L,readlink:L.h.readlink},stream:{}},la:{node:{N:L.h.N,L:L.h.L},stream:hb}});c=ib(a,b,c,d);M(c.mode)?(c.h=L.J.dir.node,
c.i=L.J.dir.stream,c.j={}):32768===(c.mode&61440)?(c.h=L.J.file.node,c.i=L.J.file.stream,c.v=0,c.j=null):40960===(c.mode&61440)?(c.h=L.J.link.node,c.i=L.J.link.stream):8192===(c.mode&61440)&&(c.h=L.J.la.node,c.i=L.J.la.stream);c.atime=c.mtime=c.ctime=Date.now();a&&(a.j[b]=c,a.atime=a.mtime=a.ctime=c.atime);return c},Sa(a){return a.j?a.j.subarray?a.j.subarray(0,a.v):new Uint8Array(a.j):new Uint8Array(0)},h:{N(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;
b.gid=0;b.rdev=a.rdev;M(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.v:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.atime);b.mtime=new Date(a.mtime);b.ctime=new Date(a.ctime);b.blksize=4096;b.blocks=Math.ceil(b.size/b.blksize);return b},L(a,b){for(var c of["mode","atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==b.size&&(b=b.size,a.v!=b&&(0==b?(a.j=null,a.v=0):(c=a.j,a.j=new Uint8Array(b),c&&a.j.set(c.subarray(0,Math.min(b,a.v))),a.v=b)))},lookup(){throw new K(44);
},aa(a,b,c,d){return L.createNode(a,b,c,d)},rename(a,b,c){try{var d=N(b,c)}catch(f){}if(d){if(M(a.mode))for(var e in d.j)throw new K(55);jb(d)}delete a.parent.j[a.name];b.j[c]=a;a.name=c;b.ctime=b.mtime=a.parent.ctime=a.parent.mtime=Date.now()},unlink(a,b){delete a.j[b];a.ctime=a.mtime=Date.now()},rmdir(a,b){var c=N(a,b),d;for(d in c.j)throw new K(55);delete a.j[b];a.ctime=a.mtime=Date.now()},readdir(a){return[".","..",...Object.keys(a.j)]},symlink(a,b,c){a=L.createNode(a,b,41471,0);a.link=c;return a},
readlink(a){if(40960!==(a.mode&61440))throw new K(28);return a.link}},i:{read(a,b,c,d,e){var f=a.node.j;if(e>=a.node.v)return 0;a=Math.min(a.node.v-e,d);m(0<=a);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write(a,b,c,d,e,f){m(!(b instanceof ArrayBuffer));b.buffer===C.buffer&&(f=!1);if(!d)return 0;a=a.node;a.mtime=a.ctime=Date.now();if(b.subarray&&(!a.j||a.j.subarray)){if(f)return m(0===e,"canOwn must imply no weird position inside the file"),a.j=b.subarray(c,
c+d),a.v=d;if(0===a.v&&0===e)return a.j=b.slice(c,c+d),a.v=d;if(e+d<=a.v)return a.j.set(b.subarray(c,c+d),e),d}f=e+d;var g=a.j?a.j.length:0;g>=f||(f=Math.max(f,g*(1048576>g?2:1.125)>>>0),0!=g&&(f=Math.max(f,256)),g=a.j,a.j=new Uint8Array(f),0<a.v&&a.j.set(g.subarray(0,a.v),0));if(a.j.subarray&&b.subarray)a.j.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.j[e+f]=b[c+f];a.v=Math.max(a.v,e+d);return d},I(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.v);if(0>b)throw new K(28);
return b},ba(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new K(43);a=a.node.j;if(e&2||!a||a.buffer!==C.buffer){e=!0;d=gb(b);var f=kb(65536,d);f&&E.fill(0,f,f+d);d=f;if(!d)throw new K(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);C.set(a,d)}}else e=!1,d=a.byteOffset;return{l:d,ra:e}},da(a,b,c,d){L.i.write(a,b,0,d,c,!1);return 0}}},lb=a=>{var b=0;a&&(b|=365);return b},mb={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,
EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,
ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,
EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},nb=null,ob={},pb=[],qb=1,O=null,rb=!1,sb=!0,K=class extends Error{name="ErrnoError";constructor(a){super(Aa?I(tb(a)):"");this.A=a;for(var b in mb)if(mb[b]===a){this.code=b;break}}},ub=
class{S={};node=null;get flags(){return this.S.flags}set flags(a){this.S.flags=a}get position(){return this.S.position}set position(a){this.S.position=a}},wb=class{h={};i={};O=null;constructor(a,b,c,d){a||=this;this.parent=a;this.H=a.H;this.id=qb++;this.name=b;this.mode=c;this.rdev=d;this.atime=this.mtime=this.ctime=Date.now()}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}};
function P(a,b={}){if(!a)throw new K(44);b.fa??(b.fa=!0);"/"===a.charAt(0)||(a="//"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(h=>!!h);for(var d=nb,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;if("."!==a[f])if(".."===a[f])if(e=Sa(e),d===d.parent){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=Ra(e+"/"+a[f]);try{d=N(d,a[f])}catch(h){if(44===h?.A&&g&&b.Ea)return{path:e};throw h;}!d.O||g&&!b.fa||(d=d.O.root);if(40960===(d.mode&61440)&&(!g||b.ea)){if(!d.h.readlink)throw new K(52);
d=d.h.readlink(d);"/"===d.charAt(0)||(d=Sa(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new K(32);}function xb(a){for(var b;;){if(a===a.parent)return a=a.H.pa,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function yb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%O.length}function zb(a){var b=yb(a.parent.id,a.name);a.U=O[b];O[b]=a}
function jb(a){var b=yb(a.parent.id,a.name);if(O[b]===a)O[b]=a.U;else for(b=O[b];b;){if(b.U===a){b.U=a.U;break}b=b.U}}function N(a,b){var c=M(a.mode)?(c=Ab(a,"x"))?c:a.h.lookup?0:2:54;if(c)throw new K(c);for(c=O[yb(a.id,b)];c;c=c.U){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.h.lookup(a,b)}function ib(a,b,c,d){m("object"==typeof a);a=new wb(a,b,c,d);zb(a);return a}function M(a){return 16384===(a&61440)}function Bb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}
function Ab(a,b){if(sb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function Cb(a,b){if(!M(a.mode))return 54;try{return N(a,b),20}catch(c){}return Ab(a,"wx")}function Db(a,b,c){try{var d=N(a,b)}catch(e){return e.A}if(a=Ab(a,"wx"))return a;if(c){if(!M(d.mode))return 54;if(d===d.parent||"/"===xb(d))return 10}else if(M(d.mode))return 31;return 0}function Q(a){a=pb[a];if(!a)throw new K(8);return a}
function Eb(a,b=-1){m(-1<=b);a=Object.assign(new ub,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!pb[b])break a;throw new K(33);}a.fd=b;return pb[b]=a}function Fb(a,b=-1){a=Eb(a,b);a.i?.Ra?.(a);return a}function Gb(a,b){var c=null?.i.L,d=c?null:a;c??=a.h.L;if(!c)throw new K(63);c(d,b)}var hb={open(a){a.i=ob[a.node.rdev].i;a.i.open?.(a)},I(){throw new K(70);}};function cb(a,b){ob[a]={i:b}}
function Hb(a,b){if("string"==typeof a)throw a;var c="/"===b,d=!b;if(c&&nb)throw new K(10);if(!c&&!d){var e=P(b,{fa:!1});b=e.path;e=e.node;if(e.O)throw new K(10);if(!M(e.mode))throw new K(54);}b={type:a,Ta:{},pa:b,Da:[]};a=a.H(b);a.H=b;b.root=a;c?nb=a:e&&(e.O=b,e.H&&e.H.Da.push(b))}function Ib(a,b,c){var d=P(a,{parent:!0}).node;a=Ta(a);if(!a)throw new K(28);if("."===a||".."===a)throw new K(20);var e=Cb(d,a);if(e)throw new K(e);if(!d.h.aa)throw new K(63);return d.h.aa(d,a,b,c)}
function R(a){return Ib(a,16895,0)}function Jb(a,b,c){"undefined"==typeof c&&(c=b,b=438);Ib(a,b|8192,c)}function Kb(a,b){if(!Wa(a))throw new K(44);var c=P(b,{parent:!0}).node;if(!c)throw new K(44);b=Ta(b);var d=Cb(c,b);if(d)throw new K(d);if(!c.h.symlink)throw new K(63);c.h.symlink(c,b,a)}function Lb(a){var b=P(a,{parent:!0}).node;a=Ta(a);var c=N(b,a),d=Db(b,a,!0);if(d)throw new K(d);if(!b.h.rmdir)throw new K(63);if(c.O)throw new K(10);b.h.rmdir(b,a);jb(c)}
function Mb(a,b,c=438){if(""===a)throw new K(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?c&4095|32768:0;if("object"==typeof a)d=a;else{var e=a.endsWith("/");var f=P(a,{ea:!(b&131072),Ea:!0});d=f.node;a=f.path}f=!1;if(b&64)if(d){if(b&128)throw new K(20);}else{if(e)throw new K(31);d=Ib(a,c|511,0);f=!0}if(!d)throw new K(44);8192===(d.mode&61440)&&(b&=-513);if(b&65536&&!M(d.mode))throw new K(54);
if(!f&&(e=d?40960===(d.mode&61440)?32:M(d.mode)&&("r"!==Bb(b)||b&576)?31:Ab(d,Bb(b)):44))throw new K(e);if(b&512&&!f){e=d;e="string"==typeof e?P(e,{ea:!0}).node:e;if(M(e.mode))throw new K(31);if(32768!==(e.mode&61440))throw new K(28);if(a=Ab(e,"w"))throw new K(a);Gb(e,{size:0,timestamp:Date.now()})}b=Eb({node:d,path:xb(d),flags:b&-131713,seekable:!0,position:0,i:d.i,Ka:[],error:!1});b.i.open&&b.i.open(b);f&&(c&=511,d="string"==typeof d?P(d,{ea:!0}).node:d,Gb(d,{mode:c&4095|d.mode&-4096,ctime:Date.now(),
Qa:void 0}));return b}function Nb(a,b,c){if(null===a.fd)throw new K(8);if(!a.seekable||!a.i.I)throw new K(70);if(0!=c&&1!=c&&2!=c)throw new K(28);a.position=a.i.I(a,b,c);a.Ka=[]}
function Ob(a,b){a=Ra("/dev/"+a);var c=lb(!!b);Ob.oa??(Ob.oa=64);var d=Ob.oa++<<8|0;cb(d,{open(e){e.seekable=!1},close(){(void 0)?.buffer?.length&&(void 0)(10)},read(e,f,g,h){for(var k=0,n=0;n<h;n++){try{var p=b()}catch(A){throw new K(29);}if(void 0===p&&0===k)throw new K(6);if(null===p||void 0===p)break;k++;f[g+n]=p}k&&(e.node.atime=Date.now());return k},write(e,f,g,h){for(var k=0;k<h;k++)try{(void 0)(f[g+k])}catch(n){throw new K(29);}h&&(e.node.mtime=e.node.ctime=Date.now());return k}});Jb(a,c,
d)}var S={};function Pb(a,b){if("/"===b.charAt(0))return b;a=-100===a?"/":Q(a).path;if(0==b.length)throw new K(44);return a+"/"+b}var Pa=void 0,T=(a,b,c)=>{m("number"==typeof c,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return $a(a,E,b,c)},U=a=>{for(var b="";;){var c=E[a++];if(!c)return b;b+=String.fromCharCode(c)}},Qb={},V={},Rb={},W=class extends Error{constructor(a){super(a);this.name="BindingError"}};
function Sb(a,b,c={}){var d=b.name;if(!a)throw new W(`type "${d}" must have a positive integer typeid pointer`);if(V.hasOwnProperty(a)){if(c.wa)return;throw new W(`Cannot register type '${d}' twice`);}V[a]=b;delete Rb[a];Qb.hasOwnProperty(a)&&(b=Qb[a],delete Qb[a],b.forEach(e=>e()))}function X(a,b,c={}){return Sb(a,b,c)}
var Tb=(a,b,c)=>{switch(b){case 1:return c?d=>C[d]:d=>E[d];case 2:return c?d=>G[d>>1]:d=>ua[d>>1];case 4:return c?d=>H[d>>2]:d=>w[d>>2];case 8:return c?d=>xa[d>>3]:d=>za[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Ub=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a},Vb=(a,b,c,d)=>{if(b<c||b>d)throw new TypeError(`Passing a number "${Ub(b)}" from JS side to C/C++ side to an argument of type "${a}", which is outside the valid range [${c}, ${d}]!`);
},Wb=a=>{throw new W(a.g.s.m.name+" instance already deleted");},Xb=!1,Yb=()=>{},Zb=(a,b,c)=>{if(b===c)return a;if(void 0===c.C)return null;a=Zb(a,b,c.C);return null===a?null:c.ta(a)},$b={},ac={},bc=(a,b)=>{if(void 0===b)throw new W("ptr should not be undefined");for(;a.C;)b=a.X(b),a=a.C;return ac[b]},cc=class extends Error{constructor(a){super(a);this.name="InternalError"}},ec=(a,b)=>{if(!b.s||!b.l)throw new cc("makeClassHandle requires ptr and ptrType");if(!!b.F!==!!b.B)throw new cc("Both smartPtrType and smartPtr must be specified");
b.count={value:1};return dc(Object.create(a,{g:{value:b,writable:!0}}))};
function fc(a){function b(){return this.$?ec(this.m.T,{s:this.Fa,l:c,F:this,B:a}):ec(this.m.T,{s:this,l:a})}var c=this.va(a);if(!c)return this.ma(a),null;var d=bc(this.m,c);if(void 0!==d){if(0===d.g.count.value)return d.g.l=c,d.g.B=a,d.clone();d=d.clone();this.ma(a);return d}d=this.m.ua(c);d=$b[d];if(!d)return b.call(this);d=this.Z?d.sa:d.pointerType;var e=Zb(c,this.m,d.m);return null===e?b.call(this):this.$?ec(d.m.T,{s:d,l:e,F:this,B:a}):ec(d.m.T,{s:d,l:e})}
var dc=a=>{if(!globalThis.FinalizationRegistry)return dc=b=>b,a;Xb=new FinalizationRegistry(b=>{console.warn(b.Ca);b=b.g;--b.count.value;0===b.count.value&&(b.B?b.F.P(b.B):b.s.m.P(b.l))});dc=b=>{var c=b.g;if(c.B){var d={g:c};c=Error(`Embind found a leaked C++ instance ${c.s.m.name} <${oa(c.l)}>.\n`+"We'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated");
"captureStackTrace"in Error&&Error.captureStackTrace(c,fc);d.Ca=c.stack.replace(/^Error: /,"");Xb.register(b,d,b)}return b};Yb=b=>{Xb.unregister(b)};return dc(a)},gc=[];function hc(){}
var ic=(a,b)=>Object.defineProperty(b,"name",{value:a}),jc=(a,b,c)=>{if(void 0===a[b].u){var d=a[b];a[b]=function(...e){if(!a[b].u.hasOwnProperty(e.length))throw new W(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].u})!`);return a[b].u[e.length].apply(this,e)};a[b].u=[];a[b].u[d.R]=d}},kc=(a,b,c)=>{if(l.hasOwnProperty(a)){if(void 0===c||void 0!==l[a].u&&void 0!==l[a].u[c])throw new W(`Cannot register public name '${a}' twice`);jc(l,a,a);if(l[a].u.hasOwnProperty(c))throw new W(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
l[a].u[c]=b}else l[a]=b,l[a].R=c},lc=a=>{m("string"===typeof a);a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function mc(a,b,c,d,e,f,g,h){this.name=a;this.constructor=b;this.T=c;this.P=d;this.C=e;this.ua=f;this.X=g;this.ta=h;this.Ga=[]}var nc=(a,b,c)=>{for(;b!==c;){if(!b.X)throw new W(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.X(a);b=b.C}return a};
function oc(a,b){if(null===b){if(this.ia)throw new W(`null is not a valid ${this.name}`);return 0}if(!b.g)throw new W(`Cannot pass "${Ub(b)}" as a ${this.name}`);if(!b.g.l)throw new W(`Cannot pass deleted object as a pointer of type ${this.name}`);return nc(b.g.l,b.g.s.m,this.m)}
function pc(a,b){if(null===b){if(this.ia)throw new W(`null is not a valid ${this.name}`);if(this.$){var c=this.Ha();null!==a&&a.push(this.P,c);return c}return 0}if(!b||!b.g)throw new W(`Cannot pass "${Ub(b)}" as a ${this.name}`);if(!b.g.l)throw new W(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Z&&b.g.s.Z)throw new W(`Cannot convert argument of type ${b.g.F?b.g.F.name:b.g.s.name} to parameter type ${this.name}`);c=nc(b.g.l,b.g.s.m,this.m);if(this.$){if(void 0===b.g.B)throw new W("Passing raw pointer to smart pointer is illegal");
switch(this.Ja){case 0:if(b.g.F===this)c=b.g.B;else throw new W(`Cannot convert argument of type ${b.g.F?b.g.F.name:b.g.s.name} to parameter type ${this.name}`);break;case 1:c=b.g.B;break;case 2:if(b.g.F===this)c=b.g.B;else{var d=b.clone();c=this.Ia(c,qc(()=>d["delete"]()));null!==a&&a.push(this.P,c)}break;default:throw new W("Unsupporting sharing policy");}}return c}
function rc(a,b){if(null===b){if(this.ia)throw new W(`null is not a valid ${this.name}`);return 0}if(!b.g)throw new W(`Cannot pass "${Ub(b)}" as a ${this.name}`);if(!b.g.l)throw new W(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.g.s.Z)throw new W(`Cannot convert argument of type ${b.g.s.name} to parameter type ${this.name}`);return nc(b.g.l,b.g.s.m,this.m)}function sc(a){return this.o(w[a>>2])}
function tc(a,b,c,d,e,f,g,h,k,n,p){this.name=a;this.m=b;this.ia=c;this.Z=d;this.$=e;this.Fa=f;this.Ja=g;this.qa=h;this.Ha=k;this.Ia=n;this.P=p;e||void 0!==b.C?this.D=pc:(this.D=d?oc:rc,this.G=null)}
var uc=(a,b,c)=>{if(!l.hasOwnProperty(a))throw new cc("Replacing nonexistent public symbol");void 0!==l[a].u&&void 0!==c?l[a].u[c]=b:(l[a]=b,l[a].R=c)},vc=[],yc=(a,b,c=!1)=>{m(!c,"Async bindings are only supported with JSPI.");a=U(a);(c=vc[b])||(vc[b]=c=xc.get(b));m(xc.get(b)==c,"JavaScript-side Wasm function table mirror is out of date!");if("function"!=typeof c)throw new W(`unknown function pointer with signature ${a}: ${b}`);return c};class zc extends Error{}
var Bc=a=>{a=Ac(a);var b=U(a);Y(a);return b},Cc=(a,b)=>{function c(f){e[f]||V[f]||(Rb[f]?Rb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new zc(`${a}: `+d.map(Bc).join([", "]));},Dc=(a,b,c)=>{function d(h){h=c(h);if(h.length!==a.length)throw new cc("Mismatched type converter count");for(var k=0;k<a.length;++k)X(a[k],h[k])}a.forEach(h=>Rb[h]=b);var e=Array(b.length),f=[],g=0;for(let [h,k]of b.entries())V.hasOwnProperty(k)?e[h]=V[k]:(f.push(k),Qb.hasOwnProperty(k)||(Qb[k]=[]),
Qb[k].push(()=>{e[h]=V[k];++g;g===f.length&&d(e)}));0===f.length&&d(e)};function Ec(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].G)return!0;return!1}function Fc(a){for(var b=a.length-2,c=a.length-1;2<=c&&a[c].optional;--c)b--;return b}
function Gc(a,b,c,d,e,f){var g=b.length;if(2>g)throw new W("argTypes array size mismatch! Must at least get return value and 'this' types!");m(!f,"Async bindings are only supported with JSPI.");var h=null!==b[1]&&null!==c,k=Ec(b),n=!b[0].Ba,p=g-2,A=Fc(b),x=Array(p),t=[],v=[];return ic(a,function(...B){var u=B.length;if(u<A||u>p)throw new W(`function ${a} called with ${u} arguments, expected ${A==p?A:`${A} to ${p}`}`);v.length=0;t.length=h?2:1;t[0]=e;if(h){var F=b[1].D(v,this);t[1]=F}for(u=0;u<p;++u)x[u]=
b[u+2].D(v,B[u]),t.push(x[u]);B=d(...t);if(k)for(;v.length;)F=v.pop(),v.pop()(F);else for(u=h?1:2;u<b.length;u++){var D=1===u?F:x[u-2];null!==b[u].G&&b[u].G(D)}F=n?b[0].o(B):void 0;return F})}
var Hc=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(w[b+4*d>>2]);return c},Ic=a=>{a=a.trim();const b=a.indexOf("(");if(-1===b)return a;m(a.endsWith(")"),"Parentheses for argument names should match.");return a.slice(0,b)},Jc=[],Z=[0,1,,1,null,1,!0,1,!1,1],Kc=a=>{9<a&&0===--Z[a+1]&&(m(void 0!==Z[a],"Decref for unallocated handle."),Z[a]=void 0,Jc.push(a))},Lc=a=>{if(!a)throw new W(`Cannot use deleted val. handle = ${a}`);m(2===a||void 0!==Z[a]&&0===a%2,`invalid handle: ${a}`);return Z[a]},qc=a=>{switch(a){case void 0:return 2;
case null:return 4;case !0:return 6;case !1:return 8;default:const b=Jc.pop()||Z.length;Z[b]=a;Z[b+1]=1;return b}},Mc={name:"emscripten::val",o:a=>{var b=Lc(a);Kc(a);return b},D:(a,b)=>qc(b),K:sc,G:null},Nc=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.o(C[d])}:function(d){return this.o(E[d])};case 2:return c?function(d){return this.o(G[d>>1])}:function(d){return this.o(ua[d>>1])};case 4:return c?function(d){return this.o(H[d>>2])}:function(d){return this.o(w[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);
}},Oc=(a,b)=>{var c=V[a];if(void 0===c)throw a=`${b} has unknown type ${Bc(a)}`,new W(a);return c},Pc=(a,b)=>{switch(b){case 4:return function(c){return this.o(va[c>>2])};case 8:return function(c){return this.o(wa[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Qc=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Rc=(a,b,c)=>{m(0==a%2,"Pointer passed to UTF16ToString must be aligned to two bytes!");a>>=1;b=La(ua,a,b/2,c);if(16<b-a&&Qc)return Qc.decode(ua.subarray(a,
b));for(c="";a<b;++a)c+=String.fromCharCode(ua[a]);return c},Sc=(a,b,c)=>{m(0==b%2,"Pointer passed to stringToUTF16 must be aligned to two bytes!");m("number"==typeof c,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)G[b>>1]=a.charCodeAt(e),b+=2;G[b>>1]=0;return b-d},Tc=a=>2*a.length,Uc=(a,b,c)=>{m(0==a%4,"Pointer passed to UTF32ToString must be aligned to four bytes!");
var d="";a>>=2;for(var e=0;!(e>=b/4);e++){var f=w[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},Vc=(a,b,c)=>{m(0==b%4,"Pointer passed to stringToUTF32 must be aligned to four bytes!");m("number"==typeof c,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);65535<f&&e++;H[b>>2]=f;b+=4;if(b+4>c)break}H[b>>2]=0;return b-
d},Wc=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},Xc=[],Yc=a=>{var b=Xc.length;Xc.push(a);return b},Zc=(a,b)=>{for(var c=Array(a),d=0;d<a;++d)c[d]=Oc(w[b+4*d>>2],`parameter ${d}`);return c},$c={},ad=a=>{var b=$c[a];return void 0===b?U(a):b},bd=[],cd={},ed=()=>{if(!dd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in cd)void 0===cd[b]?
delete a[b]:a[b]=cd[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);dd=c}return dd},dd;O=Array(4096);Hb(L,"/");R("/tmp");R("/home");R("/home/web_user");(function(){R("/dev");cb(259,{read:()=>0,write:(d,e,f,g)=>g,I:()=>0});Jb("/dev/null",259);bb(1280,eb);bb(1536,fb);Jb("/dev/tty",1280);Jb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Va(a),b=a.byteLength);return a[--b]};Ob("random",c);Ob("urandom",c);R("/dev/shm");R("/dev/shm/tmp")})();
(function(){R("/proc");var a=R("/proc/self");R("/proc/self/fd");Hb({H(){var b=ib(a,"fd",16895,73);b.i={I:L.i.I};b.h={lookup(c,d){c=+d;var e=Q(c);c={parent:null,H:{pa:"fake"},h:{readlink:()=>e.path},id:c+1};return c.parent=c},readdir(){return Array.from(pb.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},"/proc/self/fd")})();
(()=>{let a=hc.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof hc&&c instanceof hc))return!1;var d=this.g.s.m,e=this.g.l;c.g=c.g;var f=c.g.s.m;for(c=c.g.l;d.C;)e=d.X(e),d=d.C;for(;f.C;)c=f.X(c),f=f.C;return d===f&&e===c},clone:function(){this.g.l||Wb(this);if(this.g.W)return this.g.count.value+=1,this;var c=dc,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.g;c=c(e.call(d,f,{g:{value:{count:g.count,V:g.V,W:g.W,l:g.l,s:g.s,B:g.B,F:g.F}}}));c.g.count.value+=1;c.g.V=!1;
return c},["delete"](){this.g.l||Wb(this);if(this.g.V&&!this.g.W)throw new W("Object already scheduled for deletion");Yb(this);var c=this.g;--c.count.value;0===c.count.value&&(c.B?c.F.P(c.B):c.s.m.P(c.l));this.g.W||(this.g.B=void 0,this.g.l=void 0)},isDeleted:function(){return!this.g.l},deleteLater:function(){this.g.l||Wb(this);if(this.g.V&&!this.g.W)throw new W("Object already scheduled for deletion");gc.push(this);this.g.V=!0;return this}});const b=Symbol.dispose;b&&(a[b]=a["delete"])})();
Object.assign(tc.prototype,{va(a){this.qa&&(a=this.qa(a));return a},ma(a){this.P?.(a)},K:sc,o:fc});m(10===Z.length);z("ENVIRONMENT");z("GL_MAX_TEXTURE_IMAGE_UNITS");z("SDL_canPlayWithWebAudio");z("SDL_numSimultaneouslyQueuedBuffers");z("INITIAL_MEMORY");z("wasmMemory");z("arguments");z("buffer");z("canvas");z("doNotCaptureKeyboard");z("dynamicLibraries");z("elementPointerLock");z("extraStackTrace");z("forcedAspectRatio");z("instantiateWasm");z("keyboardListeningElement");z("freePreloadedMediaOnUse");
z("loadSplitModule");z("locateFile");z("logReadFiles");z("mainScriptUrlOrBlob");z("mem");z("monitorRunDependencies");z("noExitRuntime");z("noInitialRun");z("onAbort");z("onExit");z("onFree");z("onFullScreen");z("onMalloc");z("onRealloc");z("onRuntimeInitialized");z("postMainLoop");z("postRun");z("preInit");z("preMainLoop");z("preRun");z("preinitializedWebGLContext");z("preloadPlugins");z("print");z("printErr");z("setStatus");z("statusMessage");z("stderr");z("stdin");z("stdout");z("thisProgram");z("wasm");
z("wasmBinary");z("websocket");z("fetchSettings");m("undefined"==typeof l.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");m("undefined"==typeof l.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");m("undefined"==typeof l.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");m("undefined"==typeof l.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
m("undefined"==typeof l.read,"Module.read option was removed");m("undefined"==typeof l.readAsync,"Module.readAsync option was removed (modify readAsync in JS)");m("undefined"==typeof l.readBinary,"Module.readBinary option was removed (modify readBinary in JS)");m("undefined"==typeof l.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");m("undefined"==typeof l.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");
m("undefined"==typeof l.ENVIRONMENT,"Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");m("undefined"==typeof l.STACK_SIZE,"STACK_SIZE can no longer be set at runtime.  Use -sSTACK_SIZE at link time");m("undefined"==typeof l.wasmMemory,"Use of `wasmMemory` detected.  Use -sIMPORTED_MEMORY to define wasmMemory externally");m("undefined"==typeof l.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting.  Use -sIMPORTED_MEMORY to define wasmMemory dynamically");
"writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertI32PairToI53Checked convertU32PairToI53 stackAlloc getTempRet0 setTempRet0 exitJS withStackSave inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr runMainThreadEmAsm jstoi_q autoResumeAudioContext getDynCaller dynCall handleException keepRuntimeAlive runtimeKeepalivePush runtimeKeepalivePop callUserCallback maybeExit asmjsMangle HandleAllocator addOnPreRun addOnInit addOnPostCtor addOnPreMain addOnExit addOnPostRun STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS ccall cwrap convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction intArrayToString stringToAscii stringToNewUTF8 stringToUTF8OnStack writeArrayToMemory registerKeyEventCallback maybeCStringToJsString findEventTarget getBoundingClientRect fillMouseEventData registerMouseEventCallback registerWheelEventCallback registerUiEventCallback registerFocusEventCallback fillDeviceOrientationEventData registerDeviceOrientationEventCallback fillDeviceMotionEventData registerDeviceMotionEventCallback screenOrientation fillOrientationChangeEventData registerOrientationChangeEventCallback fillFullscreenChangeEventData registerFullscreenChangeEventCallback JSEvents_requestFullscreen JSEvents_resizeCanvasForFullscreen registerRestoreOldStyle hideEverythingExceptGivenElement restoreHiddenElements setLetterbox softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData registerBatteryEventCallback setCanvasElementSize getCanvasElementSize jsStackTrace getCallstack convertPCtoSourceLocation wasiRightsToMuslOFlags wasiOFlagsToMuslOFlags safeSetTimeout setImmediateWrapped safeRequestAnimationFrame clearImmediateWrapped registerPostMainLoop registerPreMainLoop getPromise makePromise idsToPromises makePromiseCallback findMatchingCatch Browser_asyncPrepareDataCounter isLeapYear ydayFromDate arraySum addDays getSocketFromFD getSocketAddress FS_mkdirTree _setNetworkCallback getFunctionArgsName createJsInvokerSignature createJsInvoker PureVirtualError registerInheritedInstance unregisterInheritedInstance getInheritedInstanceCount getLiveInheritedInstances setDelayFunction validateThis count_emval_handles".split(" ").forEach(function(a){ra(a)});
"run out err callMain abort wasmExports HEAPF32 HEAPF64 HEAP8 HEAPU8 HEAP16 HEAPU16 HEAP32 HEAPU32 HEAP64 HEAPU64 writeStackCookie checkStackCookie INT53_MAX INT53_MIN bigintToI53Checked stackSave stackRestore createNamedFunction ptrToString zeroMemory getHeapMax growMemory ENV ERRNO_CODES strError DNS Protocols Sockets timers warnOnce readEmAsmArgsArray readEmAsmArgs runEmAsmFunction getExecutableName asyncLoad alignMemory mmapAlloc wasmTable wasmMemory getUniqueRunDependency noExitRuntime addRunDependency removeRunDependency freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS UTF8Decoder UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 intArrayFromString AsciiToString UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 JSEvents specialHTMLTargets findCanvasEventTarget currentFullscreenStrategy restoreOldWindowedStyle UNWIND_CACHE ExitStatus getEnvStrings checkWasiClock doReadv doWritev initRandomFill randomFill emSetImmediate emClearImmediate_deps emClearImmediate promiseMap uncaughtExceptionCount exceptionLast exceptionCaught ExceptionInfo Browser requestFullscreen requestFullScreen setCanvasSize getUserMedia createContext getPreloadedImageData__data wget MONTH_DAYS_REGULAR MONTH_DAYS_LEAP MONTH_DAYS_REGULAR_CUMULATIVE MONTH_DAYS_LEAP_CUMULATIVE SYSCALLS preloadPlugins FS_createPreloadedFile FS_preloadFile FS_modeStringToFlags FS_getMode FS_stdin_getChar_buffer FS_stdin_getChar FS_unlink FS_createPath FS_createDevice FS_readFile FS FS_root FS_mounts FS_devices FS_streams FS_nextInode FS_nameTable FS_currentPath FS_initialized FS_ignorePermissions FS_filesystems FS_syncFSRequests FS_lookupPath FS_getPath FS_hashName FS_hashAddNode FS_hashRemoveNode FS_lookupNode FS_createNode FS_destroyNode FS_isRoot FS_isMountpoint FS_isFile FS_isDir FS_isLink FS_isChrdev FS_isBlkdev FS_isFIFO FS_isSocket FS_flagsToPermissionString FS_nodePermissions FS_mayLookup FS_mayCreate FS_mayDelete FS_mayOpen FS_checkOpExists FS_nextfd FS_getStreamChecked FS_getStream FS_createStream FS_closeStream FS_dupStream FS_doSetAttr FS_chrdev_stream_ops FS_major FS_minor FS_makedev FS_registerDevice FS_getDevice FS_getMounts FS_syncfs FS_mount FS_unmount FS_lookup FS_mknod FS_statfs FS_statfsStream FS_statfsNode FS_create FS_mkdir FS_mkdev FS_symlink FS_rename FS_rmdir FS_readdir FS_readlink FS_stat FS_fstat FS_lstat FS_doChmod FS_chmod FS_lchmod FS_fchmod FS_doChown FS_chown FS_lchown FS_fchown FS_doTruncate FS_truncate FS_ftruncate FS_utime FS_open FS_close FS_isClosed FS_llseek FS_read FS_write FS_mmap FS_msync FS_ioctl FS_writeFile FS_cwd FS_chdir FS_createDefaultDirectories FS_createDefaultDevices FS_createSpecialDirectories FS_createStandardStreams FS_staticInit FS_init FS_quit FS_findObject FS_analyzePath FS_createFile FS_createDataFile FS_forceLoadFile FS_createLazyFile FS_absolutePath FS_createFolder FS_createLink FS_joinPath FS_mmapAlloc FS_standardizePath MEMFS TTY PIPEFS SOCKFS InternalError BindingError throwInternalError throwBindingError registeredTypes awaitingDependencies typeDependencies tupleRegistrations structRegistrations sharedRegisterType whenDependentTypesAreResolved getTypeName getFunctionName heap32VectorToArray requireRegisteredType usesDestructorStack checkArgCount getRequiredArgCount UnboundTypeError EmValType EmValOptionalType throwUnboundTypeError ensureOverloadTable exposePublicSymbol replacePublicSymbol embindRepr registeredInstances getBasestPointer getInheritedInstance registeredPointers registerType integerReadValueFromPointer enumReadValueFromPointer floatReadValueFromPointer assertIntegerRange readPointer runDestructors craftInvokerFunction embind__requireFunction genericPointerToWireType constNoSmartPtrRawPointerToWireType nonConstNoSmartPtrRawPointerToWireType init_RegisteredPointer RegisteredPointer RegisteredPointer_fromWireType runDestructor releaseClassHandle finalizationRegistry detachFinalizer_deps detachFinalizer attachFinalizer makeClassHandle init_ClassHandle ClassHandle throwInstanceAlreadyDeleted deletionQueue flushPendingDeletes delayFunction RegisteredClass shallowCopyInternalPointer downcastPointer upcastPointer char_0 char_9 makeLegalFunctionName emval_freelist emval_handles emval_symbols getStringOrSymbol Emval emval_returnValue emval_lookupTypes emval_methodCallers emval_addMethodCaller".split(" ").forEach(ra);
var fd={2219988:()=>{if(void 0===l.ga)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();l.ga=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();l.ga=a}catch(e){throw"No secure random number generator found";}}},2220710:()=>l.ga()},Ac=y("___getTypeName"),gd=y("_malloc"),Y=y("_free"),tb=y("_strerror"),
kb=y("_emscripten_builtin_memalign");l._setThrew=y("_setThrew");
var hd=y("_emscripten_stack_init"),na=y("_emscripten_stack_get_end"),Ca=y("wasmMemory"),xc=y("wasmTable"),jd={__assert_fail:(a,b,c,d)=>r(`Assertion failed: ${I(a)}, at: `+[b?I(b):"unknown filename",c,d?I(d):"unknown function"]),__cxa_throw:(a,b,c)=>{a=new Na(a);w[a.l+16>>2]=0;w[a.l+4>>2]=b;w[a.l+8>>2]=c;Oa++;m(!1,"Exception thrown, but exception catching is not enabled. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch.")},__syscall_fcntl64:function(a,b,c){Pa=
c;try{var d=Q(a);switch(b){case 0:var e=J();if(0>e)break;for(;pb[e];)e++;return Fb(d,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=J(),d.flags|=e,0;case 12:return e=J(),G[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof S||"ErrnoError"!==f.name)throw f;return-f.A}},__syscall_getcwd:function(a,b){try{if(0===b)return-28;var c=Za("/")+1;if(b<c)return-68;T("/",a,b);return c}catch(d){if("undefined"==typeof S||"ErrnoError"!==d.name)throw d;return-d.A}},
__syscall_ioctl:function(a,b,c){Pa=c;try{var d=Q(a);switch(b){case 21509:return d.tty?0:-59;case 21505:if(!d.tty)return-59;if(d.tty.M.ya){b=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=J();H[e>>2]=25856;H[e+4>>2]=5;H[e+8>>2]=191;H[e+12>>2]=35387;for(var f=0;32>f;f++)C[e+f+17]=b[f]||0}return 0;case 21510:case 21511:case 21512:return d.tty?0:-59;case 21506:case 21507:case 21508:if(!d.tty)return-59;if(d.tty.M.za)for(e=J(),b=[],f=0;32>f;f++)b.push(C[e+f+17]);return 0;
case 21519:if(!d.tty)return-59;e=J();return H[e>>2]=0;case 21520:return d.tty?-28:-59;case 21537:case 21531:e=J();if(!d.i.xa)throw new K(59);return d.i.xa(d,b,e);case 21523:if(!d.tty)return-59;d.tty.M.Aa&&(f=[24,80],e=J(),G[e>>1]=f[0],G[e+2>>1]=f[1]);return 0;case 21524:return d.tty?0:-59;case 21515:return d.tty?0:-59;default:return-28}}catch(g){if("undefined"==typeof S||"ErrnoError"!==g.name)throw g;return-g.A}},__syscall_openat:function(a,b,c,d){Pa=d;try{b=I(b);b=Pb(a,b);var e=d?J():0;return Mb(b,
c,e).fd}catch(f){if("undefined"==typeof S||"ErrnoError"!==f.name)throw f;return-f.A}},__syscall_renameat:function(a,b,c,d){try{b=I(b);d=I(d);b=Pb(a,b);d=Pb(c,d);a=b;var e=Sa(a),f=Sa(d),g=Ta(a),h=Ta(d);var k=P(a,{parent:!0});var n=k.node;k=P(d,{parent:!0});var p=k.node;if(!n||!p)throw new K(44);if(n.H!==p.H)throw new K(75);var A=N(n,g),x=Xa(a,f);if("."!==x.charAt(0))throw new K(28);x=Xa(d,e);if("."!==x.charAt(0))throw new K(55);try{var t=N(p,h)}catch(u){}if(A!==t){var v=M(A.mode),B=Db(n,g,v);if(B)throw new K(B);
if(B=t?Db(p,h,v):Cb(p,h))throw new K(B);if(!n.h.rename)throw new K(63);if(A.O||t&&t.O)throw new K(10);if(p!==n&&(B=Ab(n,"w")))throw new K(B);jb(A);try{n.h.rename(A,p,h),A.parent=p}catch(u){throw u;}finally{zb(A)}}return 0}catch(u){if("undefined"==typeof S||"ErrnoError"!==u.name)throw u;return-u.A}},__syscall_rmdir:function(a){try{return a=I(a),Lb(a),0}catch(b){if("undefined"==typeof S||"ErrnoError"!==b.name)throw b;return-b.A}},__syscall_unlinkat:function(a,b,c){try{b=I(b);b=Pb(a,b);if(c)if(512===
c)Lb(b);else return-28;else{a=b;var d=P(a,{parent:!0}).node;if(!d)throw new K(44);var e=Ta(a),f=N(d,e),g=Db(d,e,!1);if(g)throw new K(g);if(!d.h.unlink)throw new K(63);if(f.O)throw new K(10);d.h.unlink(d,e);jb(f)}return 0}catch(h){if("undefined"==typeof S||"ErrnoError"!==h.name)throw h;return-h.A}},_abort_js:()=>r("native code called abort()"),_embind_register_bigint:(a,b,c,d,e)=>{b=U(b);const f=0n===d;let g=h=>h;if(f){const h=8*c;g=k=>BigInt.asUintN(h,k);e=g(e)}X(a,{name:b,o:g,D:(h,k)=>{if("number"==
typeof k)k=BigInt(k);else if("bigint"!=typeof k)throw new TypeError(`Cannot convert "${Ub(k)}" to ${this.name}`);Vb(b,k,d,e);return k},K:Tb(b,c,!f),G:null})},_embind_register_bool:(a,b,c,d)=>{b=U(b);X(a,{name:b,o:function(e){return!!e},D:function(e,f){return f?c:d},K:function(e){return this.o(E[e])},G:null})},_embind_register_class:(a,b,c,d,e,f,g,h,k,n,p,A,x)=>{p=U(p);f=yc(e,f);h&&=yc(g,h);n&&=yc(k,n);x=yc(A,x);var t=lc(p);kc(t,function(){Cc(`Cannot construct ${p} due to unbound types`,[d])});Dc([a,
b,c],d?[d]:[],v=>{v=v[0];if(d){var B=v.m;var u=B.T}else u=hc.prototype;v=ic(p,function(...vb){if(Object.getPrototypeOf(this)!==F)throw new W(`Use 'new' to construct ${p}`);if(void 0===D.S)throw new W(`${p} has no accessible constructor`);var wc=D.S[vb.length];if(void 0===wc)throw new W(`Tried to invoke ctor of ${p} with invalid number of parameters (${vb.length}) - expected (${Object.keys(D.S).toString()}) parameters instead!`);return wc.apply(this,vb)});var F=Object.create(u,{constructor:{value:v}});
v.prototype=F;var D=new mc(p,v,F,x,B,f,h,n);if(D.C){var ya;(ya=D.C).Y??(ya.Y=[]);D.C.Y.push(D)}B=new tc(p,D,!0,!1,!1);ya=new tc(p+"*",D,!1,!1,!1);u=new tc(p+" const*",D,!1,!0,!1);$b[a]={pointerType:ya,sa:u};uc(t,v);return[B,ya,u]})},_embind_register_class_class_function:(a,b,c,d,e,f,g,h)=>{var k=Hc(c,d);b=U(b);b=Ic(b);f=yc(e,f,h);Dc([],[a],n=>{function p(){Cc(`Cannot call ${A} due to unbound types`,k)}n=n[0];var A=`${n.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var x=n.m.constructor;
void 0===x[b]?(p.R=c-1,x[b]=p):(jc(x,b,A),x[b].u[c-1]=p);Dc([],k,t=>{t=[t[0],null].concat(t.slice(1));t=Gc(A,t,null,f,g,h);void 0===x[b].u?(t.R=c-1,x[b]=t):x[b].u[c-1]=t;if(n.m.Y)for(const v of n.m.Y)v.constructor.hasOwnProperty(b)||(v.constructor[b]=t);return[]});return[]})},_embind_register_class_function:(a,b,c,d,e,f,g,h,k)=>{var n=Hc(c,d);b=U(b);b=Ic(b);f=yc(e,f,k);Dc([],[a],p=>{function A(){Cc(`Cannot call ${x} due to unbound types`,n)}p=p[0];var x=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);
h&&p.m.Ga.push(b);var t=p.m.T,v=t[b];void 0===v||void 0===v.u&&v.className!==p.name&&v.R===c-2?(A.R=c-2,A.className=p.name,t[b]=A):(jc(t,b,x),t[b].u[c-2]=A);Dc([],n,B=>{B=Gc(x,B,p,f,g,k);void 0===t[b].u?(B.R=c-2,t[b]=B):t[b].u[c-2]=B;return[]});return[]})},_embind_register_emval:a=>X(a,Mc),_embind_register_enum:(a,b,c,d)=>{function e(){}b=U(b);e.values={};X(a,{name:b,constructor:e,o:function(f){return this.constructor.values[f]},D:(f,g)=>g.value,K:Nc(b,c,d),G:null});kc(b,e)},_embind_register_enum_value:(a,
b,c)=>{var d=Oc(a,"enum");b=U(b);a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:ic(`${d.name}_${b}`,function(){})}});a.values[c]=d;a[b]=d},_embind_register_float:(a,b,c)=>{b=U(b);X(a,{name:b,o:d=>d,D:(d,e)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert ${Ub(e)} to ${this.name}`);return e},K:Pc(b,c),G:null})},_embind_register_function:(a,b,c,d,e,f,g)=>{var h=Hc(b,c);a=U(a);a=Ic(a);e=yc(d,e,g);kc(a,function(){Cc(`Cannot call ${a} due to unbound types`,
h)},b-1);Dc([],h,k=>{k=[k[0],null].concat(k.slice(1));uc(a,Gc(a,k,null,e,f,g),b-1);return[]})},_embind_register_integer:(a,b,c,d,e)=>{b=U(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}X(a,{name:b,o:f,D:(h,k)=>{if("number"!=typeof k&&"boolean"!=typeof k)throw new TypeError(`Cannot convert "${Ub(k)}" to ${b}`);Vb(b,k,d,e);return k},K:Tb(b,c,0!==d),G:null})},_embind_register_memory_view:(a,b,c)=>{function d(f){return new e(C.buffer,w[f+4>>2],w[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,
Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=U(c);X(a,{name:c,o:d,K:d},{wa:!0})},_embind_register_std_string:(a,b)=>{b=U(b);X(a,{name:b,o(c){var d=I(c+4,w[c>>2],!0);Y(c);return d},D(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new W("Cannot pass non-string to std::string");var f=e?Za(d):d.length;var g=gd(4+f+1),h=g+4;w[g>>2]=f;e?T(d,h,f+1):E.set(d,h);null!==
c&&c.push(Y,g);return g},K:sc,G(c){Y(c)}})},_embind_register_std_wstring:(a,b,c)=>{c=U(c);if(2===b){var d=Rc;var e=Sc;var f=Tc}else m(4===b,"only 2-byte and 4-byte strings are currently supported"),d=Uc,e=Vc,f=Wc;X(a,{name:c,o:g=>{var h=d(g+4,w[g>>2]*b,!0);Y(g);return h},D:(g,h)=>{if("string"!=typeof h)throw new W(`Cannot pass non-string to C++ string type ${c}`);var k=f(h),n=gd(4+k+b);w[n>>2]=k/b;e(h,n+4,k+b);null!==g&&g.push(Y,n);return n},K:sc,G(g){Y(g)}})},_embind_register_void:(a,b)=>{b=U(b);
X(a,{Ba:!0,name:b,o:()=>{},D:()=>{}})},_emval_create_invoker:(a,b,c)=>{var [d,...e]=Zc(a,b),f=d.D.bind(d),g=e.map(k=>k.K.bind(k));a--;var h=Array(a);b=`methodCaller<(${e.map(k=>k.name)}) => ${d.name}>`;return Yc(ic(b,(k,n,p,A)=>{for(var x=0,t=0;t<a;++t)h[t]=g[t](A+x),x+=8;switch(c){case 0:var v=Lc(k).apply(null,h);break;case 2:v=Reflect.construct(Lc(k),h);break;case 3:v=h[0];break;case 1:v=Lc(k)[ad(n)](...h)}k=[];v=f(k,v);k.length&&(w[p>>2]=qc(k));return v}))},_emval_decref:Kc,_emval_get_global:a=>
{if(!a)return qc(globalThis);a=ad(a);return qc(globalThis[a])},_emval_incref:a=>{9<a&&(Z[a+1]+=1)},_emval_invoke:(a,b,c,d,e)=>Xc[a](b,c,d,e),_emval_run_destructors:a=>{for(var b=Lc(a);b.length;){var c=b.pop();b.pop()(c)}Kc(a)},_gmtime_js:function(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);H[b>>2]=a.getUTCSeconds();H[b+4>>2]=a.getUTCMinutes();H[b+8>>2]=a.getUTCHours();H[b+12>>2]=a.getUTCDate();H[b+16>>2]=a.getUTCMonth();H[b+20>>2]=a.getUTCFullYear()-1900;H[b+24>>
2]=a.getUTCDay();H[b+28>>2]=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0},_mmap_js:function(a,b,c,d,e,f,g){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{m(!isNaN(e));var h=Q(d);d=e;if(0!==(b&2)&&0===(c&2)&&2!==(h.flags&2097155))throw new K(2);if(1===(h.flags&2097155))throw new K(2);if(!h.i.ba)throw new K(43);if(!a)throw new K(28);var k=h.i.ba(h,a,d,b,c);var n=k.l;H[f>>2]=k.ra;w[g>>2]=n;return 0}catch(p){if("undefined"==typeof S||"ErrnoError"!==p.name)throw p;return-p.A}},
_munmap_js:function(a,b,c,d,e,f){f=-9007199254740992>f||9007199254740992<f?NaN:Number(f);try{var g=Q(e);if(c&2){c=f;if(32768!==(g.node.mode&61440))throw new K(43);if(!(d&2)){var h=E.slice(a,a+b);m(0<=c);g.i.da&&g.i.da(g,h,c,b,d)}}}catch(k){if("undefined"==typeof S||"ErrnoError"!==k.name)throw k;return-k.A}},_tzset_js:(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();w[a>>2]=60*Math.max(f,e);H[b>>2]=Number(f!=e);b=g=>{var h=Math.abs(g);
return`UTC${0<=g?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(f);b=b(e);m(a);m(b);m(16>=Za(a),`timezone name truncated to fit in TZNAME_MAX (${a})`);m(16>=Za(b),`timezone name truncated to fit in TZNAME_MAX (${b})`);e<f?(T(a,c,17),T(b,d,17)):(T(a,d,17),T(b,c,17))},clock_time_get:function(a,b,c){if(!(0<=a&&3>=a))return 28;xa[c>>3]=BigInt(Math.round(1E6*(0===a?Date.now():performance.now())));return 0},emscripten_asm_const_int:(a,b,c)=>{m(Array.isArray(bd));
m(0==c%16);bd.length=0;for(var d;d=E[b++];){var e=String.fromCharCode(d),f=["d","f","i","p"];f.push("j");m(f.includes(e),`Invalid character ${d}("${e}") in readEmAsmArgs! Use only [${f}], and do not specify "v" for void return argument.`);e=105!=d;e&=112!=d;c+=e&&c%8?4:0;bd.push(112==d?w[c>>2]:106==d?xa[c>>3]:105==d?H[c>>2]:wa[c>>3]);c+=e?8:4}m(fd.hasOwnProperty(a),`No EM_ASM constant found at address ${a}.  The loaded WebAssembly file is likely out of sync with the generated JavaScript.`);return fd[a](...bd)},
emscripten_date_now:()=>Date.now(),emscripten_resize_heap:a=>{var b=E.length;a>>>=0;m(a>b);if(2147483648<a)return q(`Cannot enlarge memory, requested ${a} bytes, but the limit is ${2147483648} bytes!`),!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.min(2147483648,gb(Math.max(a,d)));a:{var e=d,f=Ca.buffer.byteLength;try{Ca.grow((e-f+65535)/65536|0);Ba();var g=1;break a}catch(h){q(`growMemory: Attempted to grow heap from ${f} bytes to ${e} bytes, but got error: ${h}`)}g=
void 0}if(g)return!0}q(`Failed to grow the heap from ${b} bytes to ${d} bytes, not enough memory!`);return!1},environ_get:(a,b)=>{var c=0,d=0,e;for(e of ed()){var f=b+c;w[a+d>>2]=f;c+=T(e,f,Infinity)+1;d+=4}return 0},environ_sizes_get:(a,b)=>{var c=ed();w[a>>2]=c.length;a=0;for(var d of c)a+=Za(d)+1;w[b>>2]=a;return 0},fd_close:function(a){try{var b=Q(a);if(null===b.fd)throw new K(8);b.ha&&(b.ha=null);try{b.i.close&&b.i.close(b)}catch(c){throw c;}finally{pb[b.fd]=null}b.fd=null;return 0}catch(c){if("undefined"==
typeof S||"ErrnoError"!==c.name)throw c;return c.A}},fd_read:function(a,b,c,d){try{a:{var e=Q(a);a=b;for(var f,g=b=0;g<c;g++){var h=w[a>>2],k=w[a+4>>2];a+=8;var n=e,p=h,A=k,x=f,t=C;m(0<=p);if(0>A||0>x)throw new K(28);if(null===n.fd)throw new K(8);if(1===(n.flags&2097155))throw new K(8);if(M(n.node.mode))throw new K(31);if(!n.i.read)throw new K(28);var v="undefined"!=typeof x;if(!v)x=n.position;else if(!n.seekable)throw new K(70);var B=n.i.read(n,t,p,A,x);v||(n.position+=B);var u=B;if(0>u){var F=-1;
break a}b+=u;if(u<k)break;"undefined"!=typeof f&&(f+=u)}F=b}w[d>>2]=F;return 0}catch(D){if("undefined"==typeof S||"ErrnoError"!==D.name)throw D;return D.A}},fd_seek:function(a,b,c,d){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=Q(a);Nb(e,b,c);xa[d>>3]=BigInt(e.position);e.ha&&0===b&&0===c&&(e.ha=null);return 0}catch(f){if("undefined"==typeof S||"ErrnoError"!==f.name)throw f;return f.A}},fd_write:function(a,b,c,d){try{a:{var e=Q(a);a=b;for(var f,g=b=0;g<c;g++){var h=
w[a>>2],k=w[a+4>>2];a+=8;var n=e,p=h,A=k,x=f,t=C;m(0<=p);if(0>A||0>x)throw new K(28);if(null===n.fd)throw new K(8);if(0===(n.flags&2097155))throw new K(8);if(M(n.node.mode))throw new K(31);if(!n.i.write)throw new K(28);n.seekable&&n.flags&1024&&Nb(n,0,2);var v="undefined"!=typeof x;if(!v)x=n.position;else if(!n.seekable)throw new K(70);var B=n.i.write(n,t,p,A,x,void 0);v||(n.position+=B);var u=B;if(0>u){var F=-1;break a}b+=u;if(u<k)break;"undefined"!=typeof f&&(f+=u)}F=b}w[d>>2]=F;return 0}catch(D){if("undefined"==
typeof S||"ErrnoError"!==D.name)throw D;return D.A}},random_get:function(a,b){try{return Va(E.subarray(a,a+b)),0}catch(c){if("undefined"==typeof S||"ErrnoError"!==c.name)throw c;return c.A}}},kd,Ea;
Ea=await (async function(){var a={env:jd,wasi_snapshot_preview1:jd};Fa??=fa+"wallet-core.wasm";a=await Ia(a);m(l===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");a=Ea=a.instance.exports;m("undefined"!=typeof a.__getTypeName,"missing Wasm export: __getTypeName");m("undefined"!=typeof a.malloc,"missing Wasm export: malloc");m("undefined"!=typeof a.free,"missing Wasm export: free");m("undefined"!=typeof a.strerror,"missing Wasm export: strerror");
m("undefined"!=typeof a.fflush,"missing Wasm export: fflush");m("undefined"!=typeof a.htonl,"missing Wasm export: htonl");m("undefined"!=typeof a.htons,"missing Wasm export: htons");m("undefined"!=typeof a.emscripten_builtin_memalign,"missing Wasm export: emscripten_builtin_memalign");m("undefined"!=typeof a.ntohs,"missing Wasm export: ntohs");m("undefined"!=typeof a.setThrew,"missing Wasm export: setThrew");m("undefined"!=typeof a.emscripten_stack_init,"missing Wasm export: emscripten_stack_init");
m("undefined"!=typeof a.emscripten_stack_get_free,"missing Wasm export: emscripten_stack_get_free");m("undefined"!=typeof a.emscripten_stack_get_base,"missing Wasm export: emscripten_stack_get_base");m("undefined"!=typeof a.emscripten_stack_get_end,"missing Wasm export: emscripten_stack_get_end");m("undefined"!=typeof a._emscripten_stack_restore,"missing Wasm export: _emscripten_stack_restore");m("undefined"!=typeof a._emscripten_stack_alloc,"missing Wasm export: _emscripten_stack_alloc");m("undefined"!=
typeof a.emscripten_stack_get_current,"missing Wasm export: emscripten_stack_get_current");m("undefined"!=typeof a.memory,"missing Wasm export: memory");m("undefined"!=typeof a.__indirect_function_table,"missing Wasm export: __indirect_function_table");Ac=Da("__getTypeName",1);gd=Da("malloc",1);Y=Da("free",1);tb=Da("strerror",1);kb=Da("emscripten_builtin_memalign",2);l._setThrew=Da("setThrew",2);hd=a.emscripten_stack_init;na=a.emscripten_stack_get_end;Ca=a.memory;xc=a.__indirect_function_table;Ba();
return Ea}());hd();var ld=na();m(0==(ld&3));0==ld&&(ld+=4);w[ld>>2]=34821223;w[ld+4>>2]=2310721022;w[0]=1668509029;m(!kd);kd=!0;l.calledRun=!0;
if(!la){m(!Aa);Aa=!0;ma();if(!l.noFSInit&&!rb){m(!rb,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");rb=!0;Kb("/dev/tty","/dev/stdin");Kb("/dev/tty","/dev/stdout");Kb("/dev/tty1","/dev/stderr");var md=Mb("/dev/stdin",0),nd=Mb("/dev/stdout",1),od=Mb("/dev/stderr",1);m(0===md.fd,`invalid handle for stdin (${md.fd})`);m(1===nd.fd,`invalid handle for stdout (${nd.fd})`);m(2===
od.fd,`invalid handle for stderr (${od.fd})`)}Ea.__wasm_call_ctors();sb=!1;sa?.(l);m(!l._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');ma()}ma();Aa?moduleRtn=l:moduleRtn=new Promise((a,b)=>{sa=a;ta=b});for(const a of Object.keys(l))a in moduleArg||Object.defineProperty(moduleArg,a,{configurable:!0,get(){r(`Access to module property ('${a}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});
;return moduleRtn}})();if(typeof exports==="object"&&typeof module==="object"){module.exports=Module;module.exports.default=Module}else if(typeof define==="function"&&define["amd"])define([],()=>Module);
