@keeratita/heic-converter 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ 'use strict';var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;var fa=(()=>{var me=(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('heic-decoder-7BA7NJOA.js', document.baseURI).href));return(async function(_e={}){var f=_e,ye,br;f.ready=new Promise((r,e)=>{ye=r,br=e;});var we=Object.assign({},f),zr="./this.program",be=typeof window=="object",ar=typeof importScripts=="function",kr=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",z="";function ft(r){return f.locateFile?f.locateFile(r,z):z+r}var fr,Nr,$r;if(kr){let{createRequire:r}=await import('module');var Pr=r((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('heic-decoder-7BA7NJOA.js', document.baseURI).href))),Br=Pr("fs"),Vr=Pr("path");ar?z=Vr.dirname(z)+"/":z=Pr("url").fileURLToPath(new URL("./",(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('heic-decoder-7BA7NJOA.js', document.baseURI).href)))),fr=(e,t)=>(e=Ae(e)?new URL(e):Vr.normalize(e),Br.readFileSync(e,t?void 0:"utf8")),$r=e=>{var t=fr(e,true);return t.buffer||(t=new Uint8Array(t)),t},Nr=(e,t,n,i=true)=>{e=Ae(e)?new URL(e):Vr.normalize(e),Br.readFile(e,i?void 0:"utf8",(o,s)=>{o?n(o):t(i?s.buffer:s);});},!f.thisProgram&&process.argv.length>1&&(zr=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);}else (be||ar)&&(ar?z=self.location.href:typeof document<"u"&&document.currentScript&&(z=document.currentScript.src),me&&(z=me),z.startsWith("blob:")?z="":z=z.substr(0,z.replace(/[?#].*/,"").lastIndexOf("/")+1),fr=r=>{var e=new XMLHttpRequest;return e.open("GET",r,false),e.send(null),e.responseText},ar&&($r=r=>{var e=new XMLHttpRequest;return e.open("GET",r,false),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),Nr=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,true),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){e(n.response);return}t();},n.onerror=t,n.send(null);});var Yr=f.print||console.log.bind(console),J=f.printErr||console.error.bind(console);Object.assign(f,we),we=null,f.arguments&&(f.arguments),f.thisProgram&&(zr=f.thisProgram),f.quit&&(f.quit);var cr;f.wasmBinary&&(cr=f.wasmBinary);var Cr,ke=false,W,H,or,dr,g,b,$e,Pe;function Ce(){var r=Cr.buffer;f.HEAP8=W=new Int8Array(r),f.HEAP16=or=new Int16Array(r),f.HEAPU8=H=new Uint8Array(r),f.HEAPU16=dr=new Uint16Array(r),f.HEAP32=g=new Int32Array(r),f.HEAPU32=b=new Uint32Array(r),f.HEAPF32=$e=new Float32Array(r),f.HEAPF64=Pe=new Float64Array(r);}var Te=[],Fe=[],Se=[];function vt(){if(f.preRun)for(typeof f.preRun=="function"&&(f.preRun=[f.preRun]);f.preRun.length;)mt(f.preRun.shift());Gr(Te);}function ht(){!f.noFSInit&&!a.init.initialized&&a.init(),a.ignorePermissions=false,Gr(Fe);}function pt(){if(f.postRun)for(typeof f.postRun=="function"&&(f.postRun=[f.postRun]);f.postRun.length;)yt(f.postRun.shift());Gr(Se);}function mt(r){Te.unshift(r);}function _t(r){Fe.unshift(r);}function yt(r){Se.unshift(r);}var Z=0,vr=null;function Xr(r){Z++,f.monitorRunDependencies?.(Z);}function Tr(r){if(Z--,f.monitorRunDependencies?.(Z),Z==0&&(vr)){var e=vr;vr=null,e();}}function rr(r){f.onAbort?.(r),r="Aborted("+r+")",J(r),ke=true,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw br(e),e}var wt="data:application/octet-stream;base64,",De=r=>r.startsWith(wt),Ae=r=>r.startsWith("file://"),er;f.locateFile?(er="heic-decoder.wasm",De(er)||(er=ft(er))):er=new URL("heic-decoder.wasm",(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('heic-decoder-7BA7NJOA.js', document.baseURI).href))).href;function Re(r){if(r==er&&cr)return new Uint8Array(cr);if($r)return $r(r);throw "both async and sync fetching of the wasm failed"}function gt(r){return !cr&&(be||ar)&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw `failed to load wasm binary file at '${r}'`;return e.arrayBuffer()}).catch(()=>Re(r)):Promise.resolve().then(()=>Re(r))}function Me(r,e,t){return gt(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{J(`failed to asynchronously prepare wasm: ${n}`),rr(n);})}function Et(r,e,t,n){return !r&&typeof WebAssembly.instantiateStreaming=="function"&&!De(e)&&!kr&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(i=>{var o=WebAssembly.instantiateStreaming(i,t);return o.then(n,function(s){return J(`wasm streaming compile failed: ${s}`),J("falling back to ArrayBuffer instantiation"),Me(e,t,n)})}):Me(e,t,n)}function bt(){var r={a:Ti};function e(n,i){return T=n.exports,Cr=T.wa,Ce(),Ye=T.za,_t(T.xa),Tr(),T}Xr();function t(n){e(n.instance);}if(f.instantiateWasm)try{return f.instantiateWasm(r,e)}catch(n){J(`Module.instantiateWasm callback failed with error: ${n}`),br(n);}return Et(cr,er,r,t).catch(br),{}}var E,x,Gr=r=>{for(;r.length>0;)r.shift()(f);};f.noExitRuntime||true;var je=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,sr=(r,e,t)=>{for(var n=e+t,i=e;r[i]&&!(i>=n);)++i;if(i-e>16&&r.buffer&&je)return je.decode(r.subarray(e,i));for(var o="";e<i;){var s=r[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var l=r[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|l);continue}var u=r[e++]&63;if((s&240)==224?s=(s&15)<<12|l<<6|u:s=(s&7)<<18|l<<12|u<<6|r[e++]&63,s<65536)o+=String.fromCharCode(s);else {var c=s-65536;o+=String.fromCharCode(55296|c>>10,56320|c&1023);}}return o},tr=(r,e)=>r?sr(H,r,e):"",kt=(r,e,t,n)=>{rr(`Assertion failed: ${tr(r)}, at: `+[e?tr(e):"unknown filename",t,n?tr(n):"unknown function"]);},Fr=[],Sr=0,$t=r=>{var e=new Kr(r);return e.get_caught()||(e.set_caught(true),Sr--),e.set_rethrown(false),Fr.push(e),tt(e.excPtr),e.get_exception_ptr()},q=0,Pt=()=>{F(0,0);var r=Fr.pop();et(r.excPtr),q=0;};class Kr{constructor(e){this.excPtr=e,this.ptr=e-24;}set_type(e){b[this.ptr+4>>2]=e;}get_type(){return b[this.ptr+4>>2]}set_destructor(e){b[this.ptr+8>>2]=e;}get_destructor(){return b[this.ptr+8>>2]}set_caught(e){e=e?1:0,W[this.ptr+12]=e;}get_caught(){return W[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,W[this.ptr+13]=e;}get_rethrown(){return W[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t);}set_adjusted_ptr(e){b[this.ptr+16>>2]=e;}get_adjusted_ptr(){return b[this.ptr+16>>2]}get_exception_ptr(){var e=it(this.get_type());if(e)return b[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}var Ct=r=>{throw q||(q=r),q},Oe=r=>{var e=q;if(!e)return Er(0),0;var t=new Kr(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return Er(0),e;for(var i in r){var o=r[i];if(o===0||o===n)break;var s=t.ptr+16;if(nt(o,n,s))return Er(o),e}return Er(n),e},Tt=()=>Oe([]),Ft=r=>Oe([r]),St=()=>{var r=Fr.pop();r||rr("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(Fr.push(r),r.set_rethrown(true),r.set_caught(false),Sr++),q=e,q},Dt=(r,e,t)=>{var n=new Kr(r);throw n.init(e,t),q=r,Sr++,q},At=()=>Sr,D={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var i=r[n];i==="."?r.splice(n,1):i===".."?(r.splice(n,1),t++):t&&(r.splice(n,1),t--);}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=D.isAbs(r),t=r.substr(-1)==="/";return r=D.normalizeArray(r.split("/").filter(n=>!!n),!e).join("/"),!r&&!e&&(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=D.splitPath(r),t=e[0],n=e[1];return !t&&!n?".":(n&&(n=n.substr(0,n.length-1)),t+n)},basename:r=>{if(r==="/")return "/";r=D.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return e===-1?r:r.substr(e+1)},join:(...r)=>D.normalize(r.join("/")),join2:(r,e)=>D.normalize(r+"/"+e)},Rt=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(kr)try{var r=Pr("crypto"),e=r.randomFillSync;if(e)return n=>r.randomFillSync(n);var t=r.randomBytes;return n=>(n.set(t(n.byteLength)),n)}catch{}rr("initRandomDevice");},xe=r=>(xe=Rt())(r),X={resolve:(...r)=>{for(var e="",t=false,n=r.length-1;n>=-1&&!t;n--){var i=n>=0?r[n]:a.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return "";e=i+"/"+e,t=D.isAbs(i);}return e=D.normalizeArray(e.split("/").filter(o=>!!o),!t).join("/"),(t?"/":"")+e||"."},relative:(r,e)=>{r=X.resolve(r).substr(1),e=X.resolve(e).substr(1);function t(c){for(var v=0;v<c.length&&c[v]==="";v++);for(var _=c.length-1;_>=0&&c[_]==="";_--);return v>_?[]:c.slice(v,_-v+1)}for(var n=t(r.split("/")),i=t(e.split("/")),o=Math.min(n.length,i.length),s=o,l=0;l<o;l++)if(n[l]!==i[l]){s=l;break}for(var u=[],l=s;l<n.length;l++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")}},Jr=[],Qr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3;}return e},Zr=(r,e,t,n)=>{if(!(n>0))return 0;for(var i=t,o=t+n-1,s=0;s<r.length;++s){var l=r.charCodeAt(s);if(l>=55296&&l<=57343){var u=r.charCodeAt(++s);l=65536+((l&1023)<<10)|u&1023;}if(l<=127){if(t>=o)break;e[t++]=l;}else if(l<=2047){if(t+1>=o)break;e[t++]=192|l>>6,e[t++]=128|l&63;}else if(l<=65535){if(t+2>=o)break;e[t++]=224|l>>12,e[t++]=128|l>>6&63,e[t++]=128|l&63;}else {if(t+3>=o)break;e[t++]=240|l>>18,e[t++]=128|l>>12&63,e[t++]=128|l>>6&63,e[t++]=128|l&63;}}return e[t]=0,t-i};function Dr(r,e,t){var n=Qr(r)+1,i=new Array(n),o=Zr(r,i,0,i.length);return e&&(i.length=o),i}var Mt=()=>{if(!Jr.length){var r=null;if(kr){var e=256,t=Buffer.alloc(e),n=0,i=process.stdin.fd;try{n=Br.readSync(i,t);}catch(o){if(o.toString().includes("EOF"))n=0;else throw o}n>0?r=t.slice(0,n).toString("utf-8"):r=null;}else typeof window<"u"&&typeof window.prompt=="function"?(r=window.prompt("Input: "),r!==null&&(r+=`
2
+ `)):typeof readline=="function"&&(r=readline(),r!==null&&(r+=`
3
+ `));if(!r)return null;Jr=Dr(r,true);}return Jr.shift()},Q={ttys:[],init(){},shutdown(){},register(r,e){Q.ttys[r]={input:[],output:[],ops:e},a.registerDevice(r,Q.stream_ops);},stream_ops:{open(r){var e=Q.ttys[r.node.rdev];if(!e)throw new a.ErrnoError(43);r.tty=e,r.seekable=false;},close(r){r.tty.ops.fsync(r.tty);},fsync(r){r.tty.ops.fsync(r.tty);},read(r,e,t,n,i){if(!r.tty||!r.tty.ops.get_char)throw new a.ErrnoError(60);for(var o=0,s=0;s<n;s++){var l;try{l=r.tty.ops.get_char(r.tty);}catch{throw new a.ErrnoError(29)}if(l===void 0&&o===0)throw new a.ErrnoError(6);if(l==null)break;o++,e[t+s]=l;}return o&&(r.node.timestamp=Date.now()),o},write(r,e,t,n,i){if(!r.tty||!r.tty.ops.put_char)throw new a.ErrnoError(60);try{for(var o=0;o<n;o++)r.tty.ops.put_char(r.tty,e[t+o]);}catch{throw new a.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),o}},default_tty_ops:{get_char(r){return Mt()},put_char(r,e){e===null||e===10?(Yr(sr(r.output,0)),r.output=[]):e!=0&&r.output.push(e);},fsync(r){r.output&&r.output.length>0&&(Yr(sr(r.output,0)),r.output=[]);},ioctl_tcgets(r){return {c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[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]}},ioctl_tcsets(r,e,t){return 0},ioctl_tiocgwinsz(r){return [24,80]}},default_tty1_ops:{put_char(r,e){e===null||e===10?(J(sr(r.output,0)),r.output=[]):e!=0&&r.output.push(e);},fsync(r){r.output&&r.output.length>0&&(J(sr(r.output,0)),r.output=[]);}}},We=r=>{rr();},w={ops_table:null,mount(r){return w.createNode(null,"/",16895,0)},createNode(r,e,t,n){if(a.isBlkdev(t)||a.isFIFO(t))throw new a.ErrnoError(63);w.ops_table||={dir:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,lookup:w.node_ops.lookup,mknod:w.node_ops.mknod,rename:w.node_ops.rename,unlink:w.node_ops.unlink,rmdir:w.node_ops.rmdir,readdir:w.node_ops.readdir,symlink:w.node_ops.symlink},stream:{llseek:w.stream_ops.llseek}},file:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:{llseek:w.stream_ops.llseek,read:w.stream_ops.read,write:w.stream_ops.write,allocate:w.stream_ops.allocate,mmap:w.stream_ops.mmap,msync:w.stream_ops.msync}},link:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,readlink:w.node_ops.readlink},stream:{}},chrdev:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:a.chrdev_stream_ops}};var i=a.createNode(r,e,t,n);return a.isDir(i.mode)?(i.node_ops=w.ops_table.dir.node,i.stream_ops=w.ops_table.dir.stream,i.contents={}):a.isFile(i.mode)?(i.node_ops=w.ops_table.file.node,i.stream_ops=w.ops_table.file.stream,i.usedBytes=0,i.contents=null):a.isLink(i.mode)?(i.node_ops=w.ops_table.link.node,i.stream_ops=w.ops_table.link.stream):a.isChrdev(i.mode)&&(i.node_ops=w.ops_table.chrdev.node,i.stream_ops=w.ops_table.chrdev.stream),i.timestamp=Date.now(),r&&(r.contents[e]=i,r.timestamp=i.timestamp),i},getFileDataAsTypedArray(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1024*1024;e=Math.max(e,t*(t<n?2:1.125)>>>0),t!=0&&(e=Math.max(e,256));var i=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(i.subarray(0,r.usedBytes),0);}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(e==0)r.contents=null,r.usedBytes=0;else {var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e;}},node_ops:{getattr(r){var e={};return e.dev=a.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,a.isDir(r.mode)?e.size=4096:a.isFile(r.mode)?e.size=r.usedBytes:a.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){e.mode!==void 0&&(r.mode=e.mode),e.timestamp!==void 0&&(r.timestamp=e.timestamp),e.size!==void 0&&w.resizeFileStorage(r,e.size);},lookup(r,e){throw a.genericErrors[44]},mknod(r,e,t,n){return w.createNode(r,e,t,n)},rename(r,e,t){if(a.isDir(r.mode)){var n;try{n=a.lookupNode(e,t);}catch{}if(n)for(var i in n.contents)throw new a.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e;},unlink(r,e){delete r.contents[e],r.timestamp=Date.now();},rmdir(r,e){var t=a.lookupNode(r,e);for(var n in t.contents)throw new a.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now();},readdir(r){var e=[".",".."];for(var t of Object.keys(r.contents))e.push(t);return e},symlink(r,e,t){var n=w.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!a.isLink(r.mode))throw new a.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,i){var o=r.node.contents;if(i>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-i,n);if(s>8&&o.subarray)e.set(o.subarray(i,i+s),t);else for(var l=0;l<s;l++)e[t+l]=o[i+l];return s},write(r,e,t,n,i,o){if(e.buffer===W.buffer&&(o=false),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(o)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(s.usedBytes===0&&i===0)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(i+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),i),n}if(w.expandFileStorage(s,i+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),i);else for(var l=0;l<n;l++)s.contents[i+l]=e[t+l];return s.usedBytes=Math.max(s.usedBytes,i+n),n},llseek(r,e,t){var n=e;if(t===1?n+=r.position:t===2&&a.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new a.ErrnoError(28);return n},allocate(r,e,t){w.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t);},mmap(r,e,t,n,i){if(!a.isFile(r.node.mode))throw new a.ErrnoError(43);var o,s,l=r.node.contents;if(!(i&2)&&l.buffer===W.buffer)s=false,o=l.byteOffset;else {if((t>0||t+e<l.length)&&(l.subarray?l=l.subarray(t,t+e):l=Array.prototype.slice.call(l,t,t+e)),s=true,o=We(),!o)throw new a.ErrnoError(48);W.set(l,o);}return {ptr:o,allocated:s}},msync(r,e,t,n,i){return w.stream_ops.write(r,e,0,n,t,false),0}}},jt=(r,e,t,n)=>{var i=`al ${r}`;Nr(r,o=>{e(new Uint8Array(o)),i&&Tr();},o=>{if(t)t();else throw `Loading data file "${r}" failed.`}),i&&Xr();},Ot=(r,e,t,n,i,o)=>{a.createDataFile(r,e,t,n,i,o);},xt=f.preloadPlugins||[],Wt=(r,e,t,n)=>{typeof Browser<"u"&&Browser.init();var i=false;return xt.forEach(o=>{i||o.canHandle(e)&&(o.handle(r,e,t,n),i=true);}),i},Ut=(r,e,t,n,i,o,s,l,u,c)=>{var v=e?X.resolve(D.join2(r,e)):r;function p(h){function y(C){c?.(),l||Ot(r,e,C,n,i,u),o?.(),Tr();}Wt(h,v,y,()=>{s?.(),Tr();})||y(h);}Xr(),typeof t=="string"?jt(t,p,s):p(t);},Ht=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=e[r];if(typeof t>"u")throw new Error(`Unknown file open mode: ${r}`);return t},re=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},a={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:class{constructor(r){this.name="ErrnoError",this.errno=r;}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={};}get object(){return this.node}set object(r){this.node=r;}get isRead(){return (this.flags&2097155)!==1}get isWrite(){return (this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r;}get position(){return this.shared.position}set position(r){this.shared.position=r;}},FSNode:class{constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=a.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146;}get read(){return (this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode;}get write(){return (this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode;}get isFolder(){return a.isDir(this.mode)}get isDevice(){return a.isChrdev(this.mode)}},lookupPath(r,e={}){if(r=X.resolve(r),!r)return {path:"",node:null};var t={follow_mount:true,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new a.ErrnoError(32);for(var n=r.split("/").filter(_=>!!_),i=a.root,o="/",s=0;s<n.length;s++){var l=s===n.length-1;if(l&&e.parent)break;if(i=a.lookupNode(i,n[s]),o=D.join2(o,n[s]),a.isMountpoint(i)&&(!l||l&&e.follow_mount)&&(i=i.mounted.root),!l||e.follow)for(var u=0;a.isLink(i.mode);){var c=a.readlink(o);o=X.resolve(D.dirname(o),c);var v=a.lookupPath(o,{recurse_count:e.recurse_count+1});if(i=v.node,u++>40)throw new a.ErrnoError(32)}}return {path:o,node:i}},getPath(r){for(var e;;){if(a.isRoot(r)){var t=r.mount.mountpoint;return e?t[t.length-1]!=="/"?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent;}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return (r+t>>>0)%a.nameTable.length},hashAddNode(r){var e=a.hashName(r.parent.id,r.name);r.name_next=a.nameTable[e],a.nameTable[e]=r;},hashRemoveNode(r){var e=a.hashName(r.parent.id,r.name);if(a.nameTable[e]===r)a.nameTable[e]=r.name_next;else for(var t=a.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next;}},lookupNode(r,e){var t=a.mayLookup(r);if(t)throw new a.ErrnoError(t);for(var n=a.hashName(r.id,e),i=a.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===r.id&&o===e)return i}return a.lookup(r,e)},createNode(r,e,t,n){var i=new a.FSNode(r,e,t,n);return a.hashAddNode(i),i},destroyNode(r){a.hashRemoveNode(r);},isRoot(r){return r===r.parent},isMountpoint(r){return !!r.mounted},isFile(r){return (r&61440)===32768},isDir(r){return (r&61440)===16384},isLink(r){return (r&61440)===40960},isChrdev(r){return (r&61440)===8192},isBlkdev(r){return (r&61440)===24576},isFIFO(r){return (r&61440)===4096},isSocket(r){return (r&49152)===49152},flagsToPermissionString(r){var e=["r","w","rw"][r&3];return r&512&&(e+="w"),e},nodePermissions(r,e){return a.ignorePermissions?0:e.includes("r")&&!(r.mode&292)||e.includes("w")&&!(r.mode&146)||e.includes("x")&&!(r.mode&73)?2:0},mayLookup(r){if(!a.isDir(r.mode))return 54;var e=a.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{var t=a.lookupNode(r,e);return 20}catch{}return a.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=a.lookupNode(r,e);}catch(o){return o.errno}var i=a.nodePermissions(r,"wx");if(i)return i;if(t){if(!a.isDir(n.mode))return 54;if(a.isRoot(n)||a.getPath(n)===a.cwd())return 10}else if(a.isDir(n.mode))return 31;return 0},mayOpen(r,e){return r?a.isLink(r.mode)?32:a.isDir(r.mode)&&(a.flagsToPermissionString(e)!=="r"||e&512)?31:a.nodePermissions(r,a.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=a.MAX_OPEN_FDS;r++)if(!a.streams[r])return r;throw new a.ErrnoError(33)},getStreamChecked(r){var e=a.getStream(r);if(!e)throw new a.ErrnoError(8);return e},getStream:r=>a.streams[r],createStream(r,e=-1){return r=Object.assign(new a.FSStream,r),e==-1&&(e=a.nextfd()),r.fd=e,a.streams[e]=r,r},closeStream(r){a.streams[r]=null;},dupStream(r,e=-1){var t=a.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=a.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r);},llseek(){throw new a.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,e)=>r<<8|e,registerDevice(r,e){a.devices[r]={stream_ops:e};},getDevice:r=>a.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts);}return e},syncfs(r,e){typeof r=="function"&&(e=r,r=false),a.syncFSRequests++,a.syncFSRequests>1&&J(`warning: ${a.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=a.getMounts(a.root.mount),n=0;function i(s){return a.syncFSRequests--,e(s)}function o(s){if(s)return o.errored?void 0:(o.errored=true,i(s));++n>=t.length&&i(null);}t.forEach(s=>{if(!s.type.syncfs)return o(null);s.type.syncfs(s,r,o);});},mount(r,e,t){var n=t==="/",i=!t,o;if(n&&a.root)throw new a.ErrnoError(10);if(!n&&!i){var s=a.lookupPath(t,{follow_mount:false});if(t=s.path,o=s.node,a.isMountpoint(o))throw new a.ErrnoError(10);if(!a.isDir(o.mode))throw new a.ErrnoError(54)}var l={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(l);return u.mount=l,l.root=u,n?a.root=u:o&&(o.mounted=l,o.mount&&o.mount.mounts.push(l)),u},unmount(r){var e=a.lookupPath(r,{follow_mount:false});if(!a.isMountpoint(e.node))throw new a.ErrnoError(28);var t=e.node,n=t.mounted,i=a.getMounts(n);Object.keys(a.nameTable).forEach(s=>{for(var l=a.nameTable[s];l;){var u=l.name_next;i.includes(l.mount)&&a.destroyNode(l),l=u;}}),t.mounted=null;var o=t.mount.mounts.indexOf(n);t.mount.mounts.splice(o,1);},lookup(r,e){return r.node_ops.lookup(r,e)},mknod(r,e,t){var n=a.lookupPath(r,{parent:true}),i=n.node,o=D.basename(r);if(!o||o==="."||o==="..")throw new a.ErrnoError(28);var s=a.mayCreate(i,o);if(s)throw new a.ErrnoError(s);if(!i.node_ops.mknod)throw new a.ErrnoError(63);return i.node_ops.mknod(i,o,e,t)},create(r,e){return e=e!==void 0?e:438,e&=4095,e|=32768,a.mknod(r,e,0)},mkdir(r,e){return e=e!==void 0?e:511,e&=1023,e|=16384,a.mknod(r,e,0)},mkdirTree(r,e){for(var t=r.split("/"),n="",i=0;i<t.length;++i)if(t[i]){n+="/"+t[i];try{a.mkdir(n,e);}catch(o){if(o.errno!=20)throw o}}},mkdev(r,e,t){return typeof t>"u"&&(t=e,e=438),e|=8192,a.mknod(r,e,t)},symlink(r,e){if(!X.resolve(r))throw new a.ErrnoError(44);var t=a.lookupPath(e,{parent:true}),n=t.node;if(!n)throw new a.ErrnoError(44);var i=D.basename(e),o=a.mayCreate(n,i);if(o)throw new a.ErrnoError(o);if(!n.node_ops.symlink)throw new a.ErrnoError(63);return n.node_ops.symlink(n,i,r)},rename(r,e){var t=D.dirname(r),n=D.dirname(e),i=D.basename(r),o=D.basename(e),s,l,u;if(s=a.lookupPath(r,{parent:true}),l=s.node,s=a.lookupPath(e,{parent:true}),u=s.node,!l||!u)throw new a.ErrnoError(44);if(l.mount!==u.mount)throw new a.ErrnoError(75);var c=a.lookupNode(l,i),v=X.relative(r,n);if(v.charAt(0)!==".")throw new a.ErrnoError(28);if(v=X.relative(e,t),v.charAt(0)!==".")throw new a.ErrnoError(55);var _;try{_=a.lookupNode(u,o);}catch{}if(c!==_){var p=a.isDir(c.mode),h=a.mayDelete(l,i,p);if(h)throw new a.ErrnoError(h);if(h=_?a.mayDelete(u,o,p):a.mayCreate(u,o),h)throw new a.ErrnoError(h);if(!l.node_ops.rename)throw new a.ErrnoError(63);if(a.isMountpoint(c)||_&&a.isMountpoint(_))throw new a.ErrnoError(10);if(u!==l&&(h=a.nodePermissions(l,"w"),h))throw new a.ErrnoError(h);a.hashRemoveNode(c);try{l.node_ops.rename(c,u,o);}catch(y){throw y}finally{a.hashAddNode(c);}}},rmdir(r){var e=a.lookupPath(r,{parent:true}),t=e.node,n=D.basename(r),i=a.lookupNode(t,n),o=a.mayDelete(t,n,true);if(o)throw new a.ErrnoError(o);if(!t.node_ops.rmdir)throw new a.ErrnoError(63);if(a.isMountpoint(i))throw new a.ErrnoError(10);t.node_ops.rmdir(t,n),a.destroyNode(i);},readdir(r){var e=a.lookupPath(r,{follow:true}),t=e.node;if(!t.node_ops.readdir)throw new a.ErrnoError(54);return t.node_ops.readdir(t)},unlink(r){var e=a.lookupPath(r,{parent:true}),t=e.node;if(!t)throw new a.ErrnoError(44);var n=D.basename(r),i=a.lookupNode(t,n),o=a.mayDelete(t,n,false);if(o)throw new a.ErrnoError(o);if(!t.node_ops.unlink)throw new a.ErrnoError(63);if(a.isMountpoint(i))throw new a.ErrnoError(10);t.node_ops.unlink(t,n),a.destroyNode(i);},readlink(r){var e=a.lookupPath(r),t=e.node;if(!t)throw new a.ErrnoError(44);if(!t.node_ops.readlink)throw new a.ErrnoError(28);return X.resolve(a.getPath(t.parent),t.node_ops.readlink(t))},stat(r,e){var t=a.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new a.ErrnoError(44);if(!n.node_ops.getattr)throw new a.ErrnoError(63);return n.node_ops.getattr(n)},lstat(r){return a.stat(r,true)},chmod(r,e,t){var n;if(typeof r=="string"){var i=a.lookupPath(r,{follow:!t});n=i.node;}else n=r;if(!n.node_ops.setattr)throw new a.ErrnoError(63);n.node_ops.setattr(n,{mode:e&4095|n.mode&-4096,timestamp:Date.now()});},lchmod(r,e){a.chmod(r,e,true);},fchmod(r,e){var t=a.getStreamChecked(r);a.chmod(t.node,e);},chown(r,e,t,n){var i;if(typeof r=="string"){var o=a.lookupPath(r,{follow:!n});i=o.node;}else i=r;if(!i.node_ops.setattr)throw new a.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()});},lchown(r,e,t){a.chown(r,e,t,true);},fchown(r,e,t){var n=a.getStreamChecked(r);a.chown(n.node,e,t);},truncate(r,e){if(e<0)throw new a.ErrnoError(28);var t;if(typeof r=="string"){var n=a.lookupPath(r,{follow:true});t=n.node;}else t=r;if(!t.node_ops.setattr)throw new a.ErrnoError(63);if(a.isDir(t.mode))throw new a.ErrnoError(31);if(!a.isFile(t.mode))throw new a.ErrnoError(28);var i=a.nodePermissions(t,"w");if(i)throw new a.ErrnoError(i);t.node_ops.setattr(t,{size:e,timestamp:Date.now()});},ftruncate(r,e){var t=a.getStreamChecked(r);if((t.flags&2097155)===0)throw new a.ErrnoError(28);a.truncate(t.node,e);},utime(r,e,t){var n=a.lookupPath(r,{follow:true}),i=n.node;i.node_ops.setattr(i,{timestamp:Math.max(e,t)});},open(r,e,t){if(r==="")throw new a.ErrnoError(44);e=typeof e=="string"?Ht(e):e,t=typeof t>"u"?438:t,e&64?t=t&4095|32768:t=0;var n;if(typeof r=="object")n=r;else {r=D.normalize(r);try{var i=a.lookupPath(r,{follow:!(e&131072)});n=i.node;}catch{}}var o=false;if(e&64)if(n){if(e&128)throw new a.ErrnoError(20)}else n=a.mknod(r,t,0),o=true;if(!n)throw new a.ErrnoError(44);if(a.isChrdev(n.mode)&&(e&=-513),e&65536&&!a.isDir(n.mode))throw new a.ErrnoError(54);if(!o){var s=a.mayOpen(n,e);if(s)throw new a.ErrnoError(s)}e&512&&!o&&a.truncate(n,0),e&=-131713;var l=a.createStream({node:n,path:a.getPath(n),flags:e,seekable:true,position:0,stream_ops:n.stream_ops,ungotten:[],error:false});return l.stream_ops.open&&l.stream_ops.open(l),f.logReadFiles&&!(e&1)&&(a.readFiles||(a.readFiles={}),r in a.readFiles||(a.readFiles[r]=1)),l},close(r){if(a.isClosed(r))throw new a.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r);}catch(e){throw e}finally{a.closeStream(r.fd);}r.fd=null;},isClosed(r){return r.fd===null},llseek(r,e,t){if(a.isClosed(r))throw new a.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new a.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new a.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,i){if(n<0||i<0)throw new a.ErrnoError(28);if(a.isClosed(r))throw new a.ErrnoError(8);if((r.flags&2097155)===1)throw new a.ErrnoError(8);if(a.isDir(r.node.mode))throw new a.ErrnoError(31);if(!r.stream_ops.read)throw new a.ErrnoError(28);var o=typeof i<"u";if(!o)i=r.position;else if(!r.seekable)throw new a.ErrnoError(70);var s=r.stream_ops.read(r,e,t,n,i);return o||(r.position+=s),s},write(r,e,t,n,i,o){if(n<0||i<0)throw new a.ErrnoError(28);if(a.isClosed(r))throw new a.ErrnoError(8);if((r.flags&2097155)===0)throw new a.ErrnoError(8);if(a.isDir(r.node.mode))throw new a.ErrnoError(31);if(!r.stream_ops.write)throw new a.ErrnoError(28);r.seekable&&r.flags&1024&&a.llseek(r,0,2);var s=typeof i<"u";if(!s)i=r.position;else if(!r.seekable)throw new a.ErrnoError(70);var l=r.stream_ops.write(r,e,t,n,i,o);return s||(r.position+=l),l},allocate(r,e,t){if(a.isClosed(r))throw new a.ErrnoError(8);if(e<0||t<=0)throw new a.ErrnoError(28);if((r.flags&2097155)===0)throw new a.ErrnoError(8);if(!a.isFile(r.node.mode)&&!a.isDir(r.node.mode))throw new a.ErrnoError(43);if(!r.stream_ops.allocate)throw new a.ErrnoError(138);r.stream_ops.allocate(r,e,t);},mmap(r,e,t,n,i){if((n&2)!==0&&(i&2)===0&&(r.flags&2097155)!==2)throw new a.ErrnoError(2);if((r.flags&2097155)===1)throw new a.ErrnoError(2);if(!r.stream_ops.mmap)throw new a.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,i)},msync(r,e,t,n,i){return r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,i):0},ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new a.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary",e.encoding!=="utf8"&&e.encoding!=="binary")throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=a.open(r,e.flags),i=a.stat(r),o=i.size,s=new Uint8Array(o);return a.read(n,s,0,o,0),e.encoding==="utf8"?t=sr(s,0):e.encoding==="binary"&&(t=s),a.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=a.open(r,t.flags,t.mode);if(typeof e=="string"){var i=new Uint8Array(Qr(e)+1),o=Zr(e,i,0,i.length);a.write(n,i,0,o,void 0,t.canOwn);}else if(ArrayBuffer.isView(e))a.write(n,e,0,e.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");a.close(n);},cwd:()=>a.currentPath,chdir(r){var e=a.lookupPath(r,{follow:true});if(e.node===null)throw new a.ErrnoError(44);if(!a.isDir(e.node.mode))throw new a.ErrnoError(54);var t=a.nodePermissions(e.node,"x");if(t)throw new a.ErrnoError(t);a.currentPath=e.path;},createDefaultDirectories(){a.mkdir("/tmp"),a.mkdir("/home"),a.mkdir("/home/web_user");},createDefaultDevices(){a.mkdir("/dev"),a.registerDevice(a.makedev(1,3),{read:()=>0,write:(n,i,o,s,l)=>s}),a.mkdev("/dev/null",a.makedev(1,3)),Q.register(a.makedev(5,0),Q.default_tty_ops),Q.register(a.makedev(6,0),Q.default_tty1_ops),a.mkdev("/dev/tty",a.makedev(5,0)),a.mkdev("/dev/tty1",a.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(e===0&&(e=xe(r).byteLength),r[--e]);a.createDevice("/dev","random",t),a.createDevice("/dev","urandom",t),a.mkdir("/dev/shm"),a.mkdir("/dev/shm/tmp");},createSpecialDirectories(){a.mkdir("/proc");var r=a.mkdir("/proc/self");a.mkdir("/proc/self/fd"),a.mount({mount(){var e=a.createNode(r,"fd",16895,73);return e.node_ops={lookup(t,n){var i=+n,o=a.getStreamChecked(i),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>o.path}};return s.parent=s,s}},e}},{},"/proc/self/fd");},createStandardStreams(){f.stdin?a.createDevice("/dev","stdin",f.stdin):a.symlink("/dev/tty","/dev/stdin"),f.stdout?a.createDevice("/dev","stdout",null,f.stdout):a.symlink("/dev/tty","/dev/stdout"),f.stderr?a.createDevice("/dev","stderr",null,f.stderr):a.symlink("/dev/tty1","/dev/stderr");a.open("/dev/stdin",0);a.open("/dev/stdout",1);a.open("/dev/stderr",1);},staticInit(){[44].forEach(r=>{a.genericErrors[r]=new a.ErrnoError(r),a.genericErrors[r].stack="<generic error, no stack>";}),a.nameTable=new Array(4096),a.mount(w,{},"/"),a.createDefaultDirectories(),a.createDefaultDevices(),a.createSpecialDirectories(),a.filesystems={MEMFS:w};},init(r,e,t){a.init.initialized=true,f.stdin=r||f.stdin,f.stdout=e||f.stdout,f.stderr=t||f.stderr,a.createStandardStreams();},quit(){a.init.initialized=false;for(var r=0;r<a.streams.length;r++){var e=a.streams[r];e&&a.close(e);}},findObject(r,e){var t=a.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{var t=a.lookupPath(r,{follow:!e});r=t.path;}catch{}var n={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var t=a.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=D.basename(r),t=a.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot=t.path==="/";}catch(i){n.error=i.errno;}return n},createPath(r,e,t,n){r=typeof r=="string"?r:a.getPath(r);for(var i=e.split("/").reverse();i.length;){var o=i.pop();if(o){var s=D.join2(r,o);try{a.mkdir(s);}catch{}r=s;}}return s},createFile(r,e,t,n,i){var o=D.join2(typeof r=="string"?r:a.getPath(r),e),s=re(n,i);return a.create(o,s)},createDataFile(r,e,t,n,i,o){var s=e;r&&(r=typeof r=="string"?r:a.getPath(r),s=e?D.join2(r,e):r);var l=re(n,i),u=a.create(s,l);if(t){if(typeof t=="string"){for(var c=new Array(t.length),v=0,_=t.length;v<_;++v)c[v]=t.charCodeAt(v);t=c;}a.chmod(u,l|146);var p=a.open(u,577);a.write(p,t,0,t.length,0,o),a.close(p),a.chmod(u,l);}},createDevice(r,e,t,n){var i=D.join2(typeof r=="string"?r:a.getPath(r),e),o=re(!!t,!!n);a.createDevice.major||(a.createDevice.major=64);var s=a.makedev(a.createDevice.major++,0);return a.registerDevice(s,{open(l){l.seekable=false;},close(l){n?.buffer?.length&&n(10);},read(l,u,c,v,_){for(var p=0,h=0;h<v;h++){var y;try{y=t();}catch{throw new a.ErrnoError(29)}if(y===void 0&&p===0)throw new a.ErrnoError(6);if(y==null)break;p++,u[c+h]=y;}return p&&(l.node.timestamp=Date.now()),p},write(l,u,c,v,_){for(var p=0;p<v;p++)try{n(u[c+p]);}catch{throw new a.ErrnoError(29)}return v&&(l.node.timestamp=Date.now()),p}}),a.mkdev(i,o,s)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return true;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(fr)try{r.contents=Dr(fr(r.url),!0),r.usedBytes=r.contents.length;}catch{throw new a.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile(r,e,t,n,i){class o{constructor(){this.lengthKnown=false,this.chunks=[];}get(h){if(!(h>this.length-1||h<0)){var y=h%this.chunkSize,C=h/this.chunkSize|0;return this.getter(C)[y]}}setDataGetter(h){this.getter=h;}cacheLength(){var h=new XMLHttpRequest;if(h.open("HEAD",t,false),h.send(null),!(h.status>=200&&h.status<300||h.status===304))throw new Error("Couldn't load "+t+". Status: "+h.status);var y=Number(h.getResponseHeader("Content-length")),C,S=(C=h.getResponseHeader("Accept-Ranges"))&&C==="bytes",k=(C=h.getResponseHeader("Content-Encoding"))&&C==="gzip",d=1024*1024;S||(d=y);var m=($,L)=>{if($>L)throw new Error("invalid range ("+$+", "+L+") or no bytes requested!");if(L>y-1)throw new Error("only "+y+" bytes available! programmer error!");var j=new XMLHttpRequest;if(j.open("GET",t,false),y!==d&&j.setRequestHeader("Range","bytes="+$+"-"+L),j.responseType="arraybuffer",j.overrideMimeType&&j.overrideMimeType("text/plain; charset=x-user-defined"),j.send(null),!(j.status>=200&&j.status<300||j.status===304))throw new Error("Couldn't load "+t+". Status: "+j.status);return j.response!==void 0?new Uint8Array(j.response||[]):Dr(j.responseText||"",true)},O=this;O.setDataGetter($=>{var L=$*d,j=($+1)*d-1;if(j=Math.min(j,y-1),typeof O.chunks[$]>"u"&&(O.chunks[$]=m(L,j)),typeof O.chunks[$]>"u")throw new Error("doXHR failed!");return O.chunks[$]}),(k||!y)&&(d=y=1,y=this.getter(0).length,d=y,Yr("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=y,this._chunkSize=d,this.lengthKnown=true;}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!ar)throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new o,l={isDevice:false,contents:s};}else var l={isDevice:false,url:t};var u=a.createFile(r,e,l,n,i);l.contents?u.contents=l.contents:l.url&&(u.contents=null,u.url=l.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},v=Object.keys(u.stream_ops);v.forEach(p=>{var h=u.stream_ops[p];c[p]=(...y)=>(a.forceLoadFile(u),h(...y));});function _(p,h,y,C,S){var k=p.node.contents;if(S>=k.length)return 0;var d=Math.min(k.length-S,C);if(k.slice)for(var m=0;m<d;m++)h[y+m]=k[S+m];else for(var m=0;m<d;m++)h[y+m]=k.get(S+m);return d}return c.read=(p,h,y,C,S)=>(a.forceLoadFile(u),_(p,h,y,C,S)),c.mmap=(p,h,y,C,S)=>{a.forceLoadFile(u);var k=We();if(!k)throw new a.ErrnoError(48);return _(p,W,k,h,y),{ptr:k,allocated:true}},u.stream_ops=c,u}},B={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(D.isAbs(e))return e;var n;if(r===-100)n=a.cwd();else {var i=B.getStreamFromFD(r);n=i.path;}if(e.length==0){if(!t)throw new a.ErrnoError(44);return n}return D.join2(n,e)},doStat(r,e,t){var n=r(e);g[t>>2]=n.dev,g[t+4>>2]=n.mode,b[t+8>>2]=n.nlink,g[t+12>>2]=n.uid,g[t+16>>2]=n.gid,g[t+20>>2]=n.rdev,x=[n.size>>>0,(E=n.size,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+24>>2]=x[0],g[t+28>>2]=x[1],g[t+32>>2]=4096,g[t+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),s=n.ctime.getTime();return x=[Math.floor(i/1e3)>>>0,(E=Math.floor(i/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+40>>2]=x[0],g[t+44>>2]=x[1],b[t+48>>2]=i%1e3*1e3,x=[Math.floor(o/1e3)>>>0,(E=Math.floor(o/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+56>>2]=x[0],g[t+60>>2]=x[1],b[t+64>>2]=o%1e3*1e3,x=[Math.floor(s/1e3)>>>0,(E=Math.floor(s/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+72>>2]=x[0],g[t+76>>2]=x[1],b[t+80>>2]=s%1e3*1e3,x=[n.ino>>>0,(E=n.ino,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+88>>2]=x[0],g[t+92>>2]=x[1],0},doMsync(r,e,t,n,i){if(!a.isFile(e.node.mode))throw new a.ErrnoError(43);if(n&2)return 0;var o=H.slice(r,r+t);a.msync(e,o,i,t,n);},varargs:void 0,get(){var r=g[+B.varargs>>2];return B.varargs+=4,r},getp(){return B.get()},getStr(r){var e=tr(r);return e},getStreamFromFD(r){var e=a.getStreamChecked(r);return e}};function It(r,e,t){try{return e=B.getStr(e),e=B.calculateAt(r,e),t===0?a.unlink(e):t===512?a.rmdir(e):rr("Invalid flags passed to unlinkat"),0}catch(n){if(typeof a>"u"||n.name!=="ErrnoError")throw n;return -n.errno}}var Ar={},ee=r=>{for(;r.length;){var e=r.pop(),t=r.pop();t(e);}};function hr(r){return this.fromWireType(b[r>>2])}var lr={},nr={},Rr={},Ue,Mr=r=>{throw new Ue(r)},ir=(r,e,t)=>{r.forEach(function(l){Rr[l]=e;});function n(l){var u=t(l);u.length!==r.length&&Mr("Mismatched type converter count");for(var c=0;c<r.length;++c)V(r[c],u[c]);}var i=new Array(e.length),o=[],s=0;e.forEach((l,u)=>{nr.hasOwnProperty(l)?i[u]=nr[l]:(o.push(l),lr.hasOwnProperty(l)||(lr[l]=[]),lr[l].push(()=>{i[u]=nr[l],++s,s===o.length&&n(i);}));}),o.length===0&&n(i);},Lt=r=>{var e=Ar[r];delete Ar[r];var t=e.rawConstructor,n=e.rawDestructor,i=e.fields,o=i.map(s=>s.getterReturnType).concat(i.map(s=>s.setterArgumentType));ir([r],o,s=>{var l={};return i.forEach((u,c)=>{var v=u.fieldName,_=s[c],p=u.getter,h=u.getterContext,y=s[c+i.length],C=u.setter,S=u.setterContext;l[v]={read:k=>_.fromWireType(p(h,k)),write:(k,d)=>{var m=[];C(S,k,y.toWireType(m,d)),ee(m);}};}),[{name:e.name,fromWireType:u=>{var c={};for(var v in l)c[v]=l[v].read(u);return n(u),c},toWireType:(u,c)=>{for(var v in l)if(!(v in c))throw new TypeError(`Missing field: "${v}"`);var _=t();for(v in l)l[v].write(_,c[v]);return u!==null&&u.push(n,_),_},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction:n}]});},zt=(r,e,t,n,i)=>{},Nt=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);He=r;},He,U=r=>{for(var e="",t=r;H[t];)e+=He[H[t++]];return e},ur,P=r=>{throw new ur(r)};function Bt(r,e,t={}){var n=e.name;if(r||P(`type "${n}" must have a positive integer typeid pointer`),nr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`);}if(nr[r]=e,delete Rr[r],lr.hasOwnProperty(r)){var i=lr[r];delete lr[r],i.forEach(o=>o());}}function V(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Bt(r,e,t)}var Y=8,Vt=(r,e,t,n)=>{e=U(e),V(r,{name:e,fromWireType:function(i){return !!i},toWireType:function(i,o){return o?t:n},argPackAdvance:Y,readValueFromPointer:function(i){return this.fromWireType(H[i])},destructorFunction:null});},Yt=r=>({count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}),te=r=>{function e(t){return t.$$.ptrType.registeredClass.name}P(e(r)+" instance already deleted");},ne=false,Ie=r=>{},qt=r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr);},Le=r=>{r.count.value-=1;var e=r.count.value===0;e&&qt(r);},ze=(r,e,t)=>{if(e===t)return r;if(t.baseClass===void 0)return null;var n=ze(r,e,t.baseClass);return n===null?null:t.downcast(n)},Ne={},Xt=()=>Object.keys(_r).length,Gt=()=>{var r=[];for(var e in _r)_r.hasOwnProperty(e)&&r.push(_r[e]);return r},pr=[],ie=()=>{for(;pr.length;){var r=pr.pop();r.$$.deleteScheduled=false,r.delete();}},mr,Kt=r=>{mr=r,pr.length&&mr&&mr(ie);},Jt=()=>{f.getInheritedInstanceCount=Xt,f.getLiveInheritedInstances=Gt,f.flushPendingDeletes=ie,f.setDelayFunction=Kt;},_r={},Qt=(r,e)=>{for(e===void 0&&P("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e},Zt=(r,e)=>(e=Qt(r,e),_r[e]),jr=(r,e)=>{(!e.ptrType||!e.ptr)&&Mr("makeClassHandle requires ptr and ptrType");var t=!!e.smartPtrType,n=!!e.smartPtr;return t!==n&&Mr("Both smartPtrType and smartPtr must be specified"),e.count={value:1},yr(Object.create(r,{$$:{value:e,writable:true}}))};function rn(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=Zt(this.registeredClass,e);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function i(){return this.isSmartPointer?jr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):jr(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var o=this.registeredClass.getActualType(e),s=Ne[o];if(!s)return i.call(this);var l;this.isConst?l=s.constPointerType:l=s.pointerType;var u=ze(e,this.registeredClass,l.registeredClass);return u===null?i.call(this):this.isSmartPointer?jr(l.registeredClass.instancePrototype,{ptrType:l,ptr:u,smartPtrType:this,smartPtr:r}):jr(l.registeredClass.instancePrototype,{ptrType:l,ptr:u})}var yr=r=>typeof FinalizationRegistry>"u"?(yr=e=>e,r):(ne=new FinalizationRegistry(e=>{Le(e.$$);}),yr=e=>{var t=e.$$,n=!!t.smartPtr;if(n){var i={$$:t};ne.register(e,i,e);}return e},Ie=e=>ne.unregister(e),yr(r)),en=()=>{Object.assign(Or.prototype,{isAliasOf(r){if(!(this instanceof Or)||!(r instanceof Or))return false;var e=this.$$.ptrType.registeredClass,t=this.$$.ptr;r.$$=r.$$;for(var n=r.$$.ptrType.registeredClass,i=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&t===i},clone(){if(this.$$.ptr||te(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=yr(Object.create(Object.getPrototypeOf(this),{$$:{value:Yt(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=false,r},delete(){this.$$.ptr||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Ie(this),Le(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0);},isDeleted(){return !this.$$.ptr},deleteLater(){return this.$$.ptr||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),pr.push(this),pr.length===1&&mr&&mr(ie),this.$$.deleteScheduled=true,this}});};function Or(){}var wr=(r,e)=>Object.defineProperty(e,"name",{value:r}),Be=(r,e,t)=>{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(...i){return r[e].overloadTable.hasOwnProperty(i.length)||P(`Function '${t}' called with an invalid number of arguments (${i.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[i.length].apply(this,i)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n;}},ae=(r,e,t)=>{f.hasOwnProperty(r)?((t===void 0||f[r].overloadTable!==void 0&&f[r].overloadTable[t]!==void 0)&&P(`Cannot register public name '${r}' twice`),Be(f,r,r),f.hasOwnProperty(t)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),f[r].overloadTable[t]=e):(f[r]=e,t!==void 0&&(f[r].numArguments=t));},tn=48,nn=57,an=r=>{if(r===void 0)return "_unknown";r=r.replace(/[^a-zA-Z0-9_]/g,"$");var e=r.charCodeAt(0);return e>=tn&&e<=nn?`_${r}`:r};function on(r,e,t,n,i,o,s,l){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=s,this.downcast=l,this.pureVirtualFunctions=[];}var oe=(r,e,t)=>{for(;e!==t;)e.upcast||P(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function sn(r,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=oe(e.$$.ptr,t,this.registeredClass);return n}function ln(r,e){var t;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),r!==null&&r.push(this.rawDestructor,t),t):0;(!e||!e.$$)&&P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=oe(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else {var i=e.clone();t=this.rawShare(t,I.toHandle(()=>i.delete())),r!==null&&r.push(this.rawDestructor,t);}break;default:P("Unsupporting sharing policy");}return t}function un(r,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=oe(e.$$.ptr,t,this.registeredClass);return n}var fn=()=>{Object.assign(xr.prototype,{getPointee(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r},destructor(r){this.rawDestructor?.(r);},argPackAdvance:Y,readValueFromPointer:hr,fromWireType:rn});};function xr(r,e,t,n,i,o,s,l,u,c,v){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=l,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=v,!i&&e.baseClass===void 0?n?(this.toWireType=sn,this.destructorFunction=null):(this.toWireType=un,this.destructorFunction=null):this.toWireType=ln;}var Ve=(r,e,t)=>{f.hasOwnProperty(r)||Mr("Replacing nonexistent public symbol"),f[r].overloadTable!==void 0&&t!==void 0?f[r].overloadTable[t]=e:(f[r]=e,f[r].argCount=t);},cn=(r,e,t)=>{var n=f["dynCall_"+r];return n(e,...t)},Wr=[],Ye,M=r=>{var e=Wr[r];return e||(r>=Wr.length&&(Wr.length=r+1),Wr[r]=e=Ye.get(r)),e},dn=(r,e,t=[])=>{if(r.includes("j"))return cn(r,e,t);var n=M(e)(...t);return n},vn=(r,e)=>(...t)=>dn(r,e,t),N=(r,e)=>{r=U(r);function t(){return r.includes("j")?vn(r,e):M(e)}var n=t();return typeof n!="function"&&P(`unknown function pointer with signature ${r}: ${e}`),n},hn=(r,e)=>{var t=wr(e,function(n){this.name=e,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+`
4
+ `+i.replace(/^Error(:[^\n]*)?\n/,""));});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},qe,Xe=r=>{var e=rt(r),t=U(e);return K(e),t},Ur=(r,e)=>{var t=[],n={};function i(o){if(!n[o]&&!nr[o]){if(Rr[o]){Rr[o].forEach(i);return}t.push(o),n[o]=true;}}throw e.forEach(i),new qe(`${r}: `+t.map(Xe).join([", "]))},pn=(r,e,t,n,i,o,s,l,u,c,v,_,p)=>{v=U(v),o=N(i,o),l&&=N(s,l),c&&=N(u,c),p=N(_,p);var h=an(v);ae(h,function(){Ur(`Cannot construct ${v} due to unbound types`,[n]);}),ir([r,e,t],n?[n]:[],y=>{y=y[0];var C,S;n?(C=y.registeredClass,S=C.instancePrototype):S=Or.prototype;var k=wr(v,function(...j){if(Object.getPrototypeOf(this)!==d)throw new ur("Use 'new' to construct "+v);if(m.constructor_body===void 0)throw new ur(v+" has no accessible constructor");var ut=m.constructor_body[j.length];if(ut===void 0)throw new ur(`Tried to invoke ctor of ${v} with invalid number of parameters (${j.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return ut.apply(this,j)}),d=Object.create(S,{constructor:{value:k}});k.prototype=d;var m=new on(v,k,d,p,C,o,l,c);m.baseClass&&(m.baseClass.__derivedClasses??=[],m.baseClass.__derivedClasses.push(m));var O=new xr(v,m,true,false,false),$=new xr(v+"*",m,false,false,false),L=new xr(v+" const*",m,false,true,false);return Ne[r]={pointerType:$,constPointerType:L},Ve(h,k),[O,$,L]});},se=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(b[e+n*4>>2]);return t};function mn(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return true;return false}function le(r,e,t,n,i,o){var s=e.length;s<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=e[1]!==null&&t!==null,u=mn(e),c=e[0].name!=="void",v=s-2,_=new Array(v),p=[],h=[],y=function(...C){C.length!==v&&P(`function ${r} called with ${C.length} arguments, expected ${v}`),h.length=0;var S;p.length=l?2:1,p[0]=i,l&&(S=e[1].toWireType(h,this),p[1]=S);for(var k=0;k<v;++k)_[k]=e[k+2].toWireType(h,C[k]),p.push(_[k]);var d=n(...p);function m(O){if(u)ee(h);else for(var $=l?1:2;$<e.length;$++){var L=$===1?S:_[$-2];e[$].destructorFunction!==null&&e[$].destructorFunction(L);}if(c)return e[0].fromWireType(O)}return m(d)};return wr(r,y)}var _n=(r,e,t,n,i,o)=>{var s=se(e,t);i=N(n,i),ir([],[r],l=>{l=l[0];var u=`constructor ${l.name}`;if(l.registeredClass.constructor_body===void 0&&(l.registeredClass.constructor_body=[]),l.registeredClass.constructor_body[e-1]!==void 0)throw new ur(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return l.registeredClass.constructor_body[e-1]=()=>{Ur(`Cannot construct ${l.name} due to unbound types`,s);},ir([],s,c=>(c.splice(1,0,null),l.registeredClass.constructor_body[e-1]=le(u,c,null,i,o),[])),[]});},Ge=r=>{r=r.trim();let e=r.indexOf("(");return e!==-1?r.substr(0,e):r},yn=(r,e,t,n,i,o,s,l,u)=>{var c=se(t,n);e=U(e),e=Ge(e),o=N(i,o),ir([],[r],v=>{v=v[0];var _=`${v.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),l&&v.registeredClass.pureVirtualFunctions.push(e);function p(){Ur(`Cannot call ${_} due to unbound types`,c);}var h=v.registeredClass.instancePrototype,y=h[e];return y===void 0||y.overloadTable===void 0&&y.className!==v.name&&y.argCount===t-2?(p.argCount=t-2,p.className=v.name,h[e]=p):(Be(h,e,_),h[e].overloadTable[t-2]=p),ir([],c,C=>{var S=le(_,C,v,o,s);return h[e].overloadTable===void 0?(S.argCount=t-2,h[e]=S):h[e].overloadTable[t-2]=S,[]}),[]});},ue=[],G=[],fe=r=>{r>9&&--G[r+1]===0&&(G[r]=void 0,ue.push(r));},wn=()=>G.length/2-5-ue.length,gn=()=>{G.push(0,1,void 0,1,null,1,true,1,false,1),f.count_emval_handles=wn;},I={toValue:r=>(r||P("Cannot use deleted val. handle = "+r),G[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case true:return 6;case false:return 8;default:{let e=ue.pop()||G.length;return G[e]=r,G[e+1]=1,e}}}},En={name:"emscripten::val",fromWireType:r=>{var e=I.toValue(r);return fe(r),e},toWireType:(r,e)=>I.toHandle(e),argPackAdvance:Y,readValueFromPointer:hr,destructorFunction:null},bn=r=>V(r,En),kn=(r,e,t)=>{switch(e){case 1:return t?function(n){return this.fromWireType(W[n])}:function(n){return this.fromWireType(H[n])};case 2:return t?function(n){return this.fromWireType(or[n>>1])}:function(n){return this.fromWireType(dr[n>>1])};case 4:return t?function(n){return this.fromWireType(g[n>>2])}:function(n){return this.fromWireType(b[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},$n=(r,e,t,n)=>{e=U(e);function i(){}i.values={},V(r,{name:e,constructor:i,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:Y,readValueFromPointer:kn(e,t,n),destructorFunction:null}),ae(e,i);},ce=(r,e)=>{var t=nr[r];return t===void 0&&P(`${e} has unknown type ${Xe(r)}`),t},Pn=(r,e,t)=>{var n=ce(r,"enum");e=U(e);var i=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:wr(`${n.name}_${e}`,function(){})}});i.values[t]=o,i[e]=o;},de=r=>{if(r===null)return "null";var e=typeof r;return e==="object"||e==="array"||e==="function"?r.toString():""+r},Cn=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType($e[t>>2])};case 8:return function(t){return this.fromWireType(Pe[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Tn=(r,e,t)=>{e=U(e),V(r,{name:e,fromWireType:n=>n,toWireType:(n,i)=>i,argPackAdvance:Y,readValueFromPointer:Cn(e,t),destructorFunction:null});},Fn=(r,e,t,n,i,o,s)=>{var l=se(e,t);r=U(r),r=Ge(r),i=N(n,i),ae(r,function(){Ur(`Cannot call ${r} due to unbound types`,l);},e-1),ir([],l,u=>{var c=[u[0],null].concat(u.slice(1));return Ve(r,le(r,c,null,i,o),e-1),[]});},Sn=(r,e,t)=>{switch(e){case 1:return t?n=>W[n]:n=>H[n];case 2:return t?n=>or[n>>1]:n=>dr[n>>1];case 4:return t?n=>g[n>>2]:n=>b[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Dn=(r,e,t,n,i)=>{e=U(e);var o=v=>v;if(n===0){var s=32-8*t;o=v=>v<<s>>>s;}var l=e.includes("unsigned"),u=(v,_)=>{},c;l?c=function(v,_){return u(_,this.name),_>>>0}:c=function(v,_){return u(_,this.name),_},V(r,{name:e,fromWireType:o,toWireType:c,argPackAdvance:Y,readValueFromPointer:Sn(e,t,n!==0),destructorFunction:null});},An=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[e];function o(s){var l=b[s>>2],u=b[s+4>>2];return new i(W.buffer,u,l)}t=U(t),V(r,{name:t,fromWireType:o,argPackAdvance:Y,readValueFromPointer:o},{ignoreDuplicateRegistrations:true});},Rn=(r,e,t)=>Zr(r,H,e,t),Mn=(r,e)=>{e=U(e);var t=e==="std::string";V(r,{name:e,fromWireType(n){var i=b[n>>2],o=n+4,s;if(t)for(var l=o,u=0;u<=i;++u){var c=o+u;if(u==i||H[c]==0){var v=c-l,_=tr(l,v);s===void 0?s=_:(s+="\0",s+=_),l=c+1;}}else {for(var p=new Array(i),u=0;u<i;++u)p[u]=String.fromCharCode(H[o+u]);s=p.join("");}return K(n),s},toWireType(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var o,s=typeof i=="string";s||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array||P("Cannot pass non-string to std::string"),t&&s?o=Qr(i):o=i.length;var l=pe(4+o+1),u=l+4;if(b[l>>2]=o,t&&s)Rn(i,u,o+1);else if(s)for(var c=0;c<o;++c){var v=i.charCodeAt(c);v>255&&(K(u),P("String has UTF-16 code units that do not fit in 8 bits")),H[u+c]=v;}else for(var c=0;c<o;++c)H[u+c]=i[c];return n!==null&&n.push(K,l),l},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction(n){K(n);}});},Ke=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,jn=(r,e)=>{for(var t=r,n=t>>1,i=n+e/2;!(n>=i)&&dr[n];)++n;if(t=n<<1,t-r>32&&Ke)return Ke.decode(H.subarray(r,t));for(var o="",s=0;!(s>=e/2);++s){var l=or[r+s*2>>1];if(l==0)break;o+=String.fromCharCode(l);}return o},On=(r,e,t)=>{if(t??=2147483647,t<2)return 0;t-=2;for(var n=e,i=t<r.length*2?t/2:r.length,o=0;o<i;++o){var s=r.charCodeAt(o);or[e>>1]=s,e+=2;}return or[e>>1]=0,e-n},xn=r=>r.length*2,Wn=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var i=g[r+t*4>>2];if(i==0)break;if(++t,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023);}else n+=String.fromCharCode(i);}return n},Un=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,i=n+t-4,o=0;o<r.length;++o){var s=r.charCodeAt(o);if(s>=55296&&s<=57343){var l=r.charCodeAt(++o);s=65536+((s&1023)<<10)|l&1023;}if(g[e>>2]=s,e+=4,e+4>i)break}return g[e>>2]=0,e-n},Hn=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4;}return e},In=(r,e,t)=>{t=U(t);var n,i,o,s;e===2?(n=jn,i=On,s=xn,o=l=>dr[l>>1]):e===4&&(n=Wn,i=Un,s=Hn,o=l=>b[l>>2]),V(r,{name:t,fromWireType:l=>{for(var u=b[l>>2],c,v=l+4,_=0;_<=u;++_){var p=l+4+_*e;if(_==u||o(p)==0){var h=p-v,y=n(v,h);c===void 0?c=y:(c+="\0",c+=y),v=p+e;}}return K(l),c},toWireType:(l,u)=>{typeof u!="string"&&P(`Cannot pass non-string to C++ string type ${t}`);var c=s(u),v=pe(4+c+e);return b[v>>2]=c/e,i(u,v+4,c+e),l!==null&&l.push(K,v),v},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction(l){K(l);}});},Ln=(r,e,t,n,i,o)=>{Ar[r]={name:U(e),rawConstructor:N(t,n),rawDestructor:N(i,o),fields:[]};},zn=(r,e,t,n,i,o,s,l,u,c)=>{Ar[r].fields.push({fieldName:U(e),getterReturnType:t,getter:N(n,i),getterContext:o,setterArgumentType:s,setter:N(l,u),setterContext:c});},Nn=(r,e)=>{e=U(e),V(r,{isVoid:true,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}});},Hr=[],Bn=(r,e,t,n)=>(r=Hr[r],e=I.toValue(e),r(null,e,t,n)),Vn={},ve=r=>{var e=Vn[r];return e===void 0?U(r):e},Yn=(r,e,t,n,i)=>(r=Hr[r],e=I.toValue(e),t=ve(t),r(e,e[t],n,i)),Je=()=>{if(typeof globalThis=="object")return globalThis;function r(e){e.$$$embind_global$$$=e;var t=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&r(global)?$$$embind_global$$$=global:typeof self=="object"&&r(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},qn=r=>r===0?I.toHandle(Je()):(r=ve(r),I.toHandle(Je()[r])),Xn=r=>{var e=Hr.length;return Hr.push(r),e},Gn=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=ce(b[e+n*4>>2],"parameter "+n);return t},Kn=Reflect.construct,Jn=(r,e,t)=>{var n=[],i=r.toWireType(n,t);return n.length&&(b[e>>2]=I.toHandle(n)),i},Qn=(r,e,t)=>{var n=Gn(r,e),i=n.shift();r--;var o=new Array(r),s=(u,c,v,_)=>{for(var p=0,h=0;h<r;++h)o[h]=n[h].readValueFromPointer(_+p),p+=n[h].argPackAdvance;var y=t===1?Kn(c,o):c.apply(u,o);return Jn(i,v,y)},l=`methodCaller<(${n.map(u=>u.name).join(", ")}) => ${i.name}>`;return Xn(wr(l,s))},Zn=r=>{r>9&&(G[r+1]+=1);},ri=()=>I.toHandle([]),ei=r=>I.toHandle(ve(r)),ti=()=>I.toHandle({}),ni=r=>{var e=I.toValue(r);ee(e),fe(r);},ii=(r,e,t)=>{r=I.toValue(r),e=I.toValue(e),t=I.toValue(t),r[e]=t;},ai=(r,e)=>{r=ce(r,"_emval_take_value");var t=r.readValueFromPointer(e);return I.toHandle(t)},oi=()=>{rr("");},si=(r,e,t)=>H.copyWithin(r,e,e+t),li=()=>2147483648,ui=r=>{var e=Cr.buffer,t=(r-e.byteLength+65535)/65536;try{return Cr.grow(t),Ce(),1}catch{}},fi=r=>{var e=H.length;r>>>=0;var t=li();if(r>t)return false;for(var n=(u,c)=>u+(c-u%c)%c,i=1;i<=4;i*=2){var o=e*(1+.2/i);o=Math.min(o,r+100663296);var s=Math.min(t,n(Math.max(r,o),65536)),l=ui(s);if(l)return true}return false},he={},ci=()=>zr||"./this.program",gr=()=>{if(!gr.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ci()};for(var t in he)he[t]===void 0?delete e[t]:e[t]=he[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);gr.strings=n;}return gr.strings},di=(r,e)=>{for(var t=0;t<r.length;++t)W[e++]=r.charCodeAt(t);W[e]=0;},vi=(r,e)=>{var t=0;return gr().forEach((n,i)=>{var o=e+t;b[r+i*4>>2]=o,di(n,o),t+=n.length+1;}),0},hi=(r,e)=>{var t=gr();b[r>>2]=t.length;var n=0;return t.forEach(i=>n+=i.length+1),b[e>>2]=n,0};function pi(r){try{var e=B.getStreamFromFD(r);return a.close(e),0}catch(t){if(typeof a>"u"||t.name!=="ErrnoError")throw t;return t.errno}}var mi=(r,e,t,n)=>{for(var i=0,o=0;o<t;o++){var s=b[e>>2],l=b[e+4>>2];e+=8;var u=a.read(r,W,s,l,n);if(u<0)return -1;if(i+=u,u<l)break;}return i};function _i(r,e,t,n){try{var i=B.getStreamFromFD(r),o=mi(i,e,t);return b[n>>2]=o,0}catch(s){if(typeof a>"u"||s.name!=="ErrnoError")throw s;return s.errno}}var yi=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+e*4294967296:NaN;function wi(r,e,t,n,i){var o=yi(e,t);try{if(isNaN(o))return 61;var s=B.getStreamFromFD(r);return a.llseek(s,o,n),x=[s.position>>>0,(E=s.position,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[i>>2]=x[0],g[i+4>>2]=x[1],s.getdents&&o===0&&n===0&&(s.getdents=null),0}catch(l){if(typeof a>"u"||l.name!=="ErrnoError")throw l;return l.errno}}var gi=(r,e,t,n)=>{for(var i=0,o=0;o<t;o++){var s=b[e>>2],l=b[e+4>>2];e+=8;var u=a.write(r,W,s,l,n);if(u<0)return -1;i+=u;}return i};function Ei(r,e,t,n){try{var i=B.getStreamFromFD(r),o=gi(i,e,t);return b[n>>2]=o,0}catch(s){if(typeof a>"u"||s.name!=="ErrnoError")throw s;return s.errno}}var Ir=r=>r%4===0&&(r%100!==0||r%400===0),bi=(r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],ki=(r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=Ir(t.getFullYear()),i=t.getMonth(),o=(n?Qe:Ze)[i];if(e>o-t.getDate())e-=o-t.getDate()+1,t.setDate(1),i<11?t.setMonth(i+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+e),t}return t},$i=(r,e)=>{W.set(r,e);},Pi=(r,e,t,n)=>{var i=b[n+40>>2],o={tm_sec:g[n>>2],tm_min:g[n+4>>2],tm_hour:g[n+8>>2],tm_mday:g[n+12>>2],tm_mon:g[n+16>>2],tm_year:g[n+20>>2],tm_wday:g[n+24>>2],tm_yday:g[n+28>>2],tm_isdst:g[n+32>>2],tm_gmtoff:g[n+36>>2],tm_zone:i?tr(i):""},s=tr(t),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in l)s=s.replace(new RegExp(u,"g"),l[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function _(d,m,O){for(var $=typeof d=="number"?d.toString():d||"";$.length<m;)$=O[0]+$;return $}function p(d,m){return _(d,m,"0")}function h(d,m){function O(L){return L<0?-1:L>0?1:0}var $;return ($=O(d.getFullYear()-m.getFullYear()))===0&&($=O(d.getMonth()-m.getMonth()))===0&&($=O(d.getDate()-m.getDate())),$}function y(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function C(d){var m=ki(new Date(d.tm_year+1900,0,1),d.tm_yday),O=new Date(m.getFullYear(),0,4),$=new Date(m.getFullYear()+1,0,4),L=y(O),j=y($);return h(L,m)<=0?h(j,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var S={"%a":d=>c[d.tm_wday].substring(0,3),"%A":d=>c[d.tm_wday],"%b":d=>v[d.tm_mon].substring(0,3),"%B":d=>v[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return p(m/100|0,2)},"%d":d=>p(d.tm_mday,2),"%e":d=>_(d.tm_mday,2," "),"%g":d=>C(d).toString().substring(2),"%G":C,"%H":d=>p(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),p(m,2)},"%j":d=>p(d.tm_mday+bi(Ir(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>p(d.tm_mon+1,2),"%M":d=>p(d.tm_min,2),"%n":()=>`
5
+ `,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>p(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return p(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var $=(d.tm_wday+371-d.tm_yday)%7;$!=4&&($!=3||!Ir(d.tm_year))&&(m=1);}}else {m=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Ir(d.tm_year%400-1))&&m++;}return p(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return p(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,O=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(O?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var u in S)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),S[u](o)));s=s.replace(/\0\0/g,"%");var k=Dr(s,false);return k.length>e?0:($i(k,r),k.length-1)},Ci=(r,e,t,n,i)=>Pi(r,e,t,n);a.createPreloadedFile=Ut,a.staticInit(),Ue=f.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError";}},Nt(),ur=f.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError";}},en(),Jt(),fn(),qe=f.UnboundTypeError=hn(Error,"UnboundTypeError"),gn();var Ti={a:kt,s:$t,v:Pt,b:Tt,h:Ft,W:St,w:Dt,ha:At,f:Ct,ja:It,sa:Lt,ea:zt,qa:Vt,G:pn,aa:_n,J:yn,pa:bn,z:$n,d:Pn,Z:Tn,m:Fn,y:Dn,r:An,Y:Mn,M:In,ta:Ln,O:zn,ra:Nn,R:Bn,P:Yn,l:fe,ua:qn,D:Qn,Q:Zn,N:ri,t:ei,E:ti,_:ni,u:ii,o:ai,K:oi,oa:si,ia:fi,ma:vi,na:hi,ka:pi,la:_i,da:wi,X:Ei,S:ta,$:Bi,T:ea,q:zi,c:Xi,g:Li,p:Ni,k:qi,V:Zi,B:Ji,A:Qi,U:ra,I:ia,ca:la,ba:ua,j:Vi,i:Ui,e:Ki,n:Gi,F:Ii,L:Hi,va:Yi,x:na,C:aa,H:oa,fa:sa,ga:Ci},T=bt(),pe=f._malloc=r=>(pe=f._malloc=T.ya)(r),K=f._free=r=>(K=f._free=T.Aa)(r),rt=r=>(rt=T.Ba)(r),F=(r,e)=>(F=T.Ca)(r,e),Er=r=>(Er=T.Da)(r),A=()=>(A=T.Ea)(),R=r=>(R=T.Fa)(r),et=r=>(et=T.Ga)(r),tt=r=>(tt=T.Ha)(r),nt=(r,e,t)=>(nt=T.Ia)(r,e,t),it=r=>(it=T.Ja)(r),at=f.dynCall_vij=(r,e,t,n)=>(at=f.dynCall_vij=T.Ka)(r,e,t,n);f.dynCall_ji=(r,e)=>(f.dynCall_ji=T.La)(r,e);f.dynCall_iij=(r,e,t,n)=>(f.dynCall_iij=T.Ma)(r,e,t,n);f.dynCall_jijj=(r,e,t,n,i,o)=>(f.dynCall_jijj=T.Na)(r,e,t,n,i,o);f.dynCall_vijj=(r,e,t,n,i,o)=>(f.dynCall_vijj=T.Oa)(r,e,t,n,i,o);f.dynCall_jiji=(r,e,t,n,i)=>(f.dynCall_jiji=T.Pa)(r,e,t,n,i);var ot=f.dynCall_iiiiij=(r,e,t,n,i,o,s)=>(ot=f.dynCall_iiiiij=T.Qa)(r,e,t,n,i,o,s);f.dynCall_viijii=(r,e,t,n,i,o,s)=>(f.dynCall_viijii=T.Ra)(r,e,t,n,i,o,s);var st=f.dynCall_jiiii=(r,e,t,n,i)=>(st=f.dynCall_jiiii=T.Sa)(r,e,t,n,i);f.dynCall_iiiiijj=(r,e,t,n,i,o,s,l,u)=>(f.dynCall_iiiiijj=T.Ta)(r,e,t,n,i,o,s,l,u);f.dynCall_iiiiiijj=(r,e,t,n,i,o,s,l,u,c)=>(f.dynCall_iiiiiijj=T.Ua)(r,e,t,n,i,o,s,l,u,c);function Ui(r,e){var t=A();try{M(r)(e);}catch(n){if(R(t),n!==n+0)throw n;F(1,0);}}function Hi(r,e,t,n,i,o){var s=A();try{M(r)(e,t,n,i,o);}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function Ii(r,e,t,n,i){var o=A();try{M(r)(e,t,n,i);}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Li(r,e,t){var n=A();try{return M(r)(e,t)}catch(i){if(R(n),i!==i+0)throw i;F(1,0);}}function zi(r){var e=A();try{return M(r)()}catch(t){if(R(e),t!==t+0)throw t;F(1,0);}}function Ni(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function Bi(r,e,t,n,i){var o=A();try{return M(r)(e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Vi(r){var e=A();try{M(r)();}catch(t){if(R(e),t!==t+0)throw t;F(1,0);}}function Yi(r,e,t,n,i,o,s){var l=A();try{M(r)(e,t,n,i,o,s);}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function qi(r,e,t,n,i){var o=A();try{return M(r)(e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Xi(r,e){var t=A();try{return M(r)(e)}catch(n){if(R(t),n!==n+0)throw n;F(1,0);}}function Gi(r,e,t,n){var i=A();try{M(r)(e,t,n);}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function Ki(r,e,t){var n=A();try{M(r)(e,t);}catch(i){if(R(n),i!==i+0)throw i;F(1,0);}}function Ji(r,e,t,n,i,o){var s=A();try{return M(r)(e,t,n,i,o)}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function Qi(r,e,t,n,i,o,s){var l=A();try{return M(r)(e,t,n,i,o,s)}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function Zi(r,e,t,n,i,o){var s=A();try{return M(r)(e,t,n,i,o)}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function ra(r,e,t,n,i,o,s,l){var u=A();try{return M(r)(e,t,n,i,o,s,l)}catch(c){if(R(u),c!==c+0)throw c;F(1,0);}}function ea(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function ta(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function na(r,e,t,n,i,o,s,l){var u=A();try{M(r)(e,t,n,i,o,s,l);}catch(c){if(R(u),c!==c+0)throw c;F(1,0);}}function ia(r,e,t,n,i,o,s,l,u,c,v,_){var p=A();try{return M(r)(e,t,n,i,o,s,l,u,c,v,_)}catch(h){if(R(p),h!==h+0)throw h;F(1,0);}}function aa(r,e,t,n,i,o,s,l,u,c,v){var _=A();try{M(r)(e,t,n,i,o,s,l,u,c,v);}catch(p){if(R(_),p!==p+0)throw p;F(1,0);}}function oa(r,e,t,n,i,o,s,l,u,c,v,_,p,h,y,C){var S=A();try{M(r)(e,t,n,i,o,s,l,u,c,v,_,p,h,y,C);}catch(k){if(R(S),k!==k+0)throw k;F(1,0);}}function sa(r,e,t,n){var i=A();try{at(r,e,t,n);}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function la(r,e,t,n,i,o,s){var l=A();try{return ot(r,e,t,n,i,o,s)}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function ua(r,e,t,n,i){var o=A();try{return st(r,e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}var Lr;vr=function r(){Lr||lt(),Lr||(vr=r);};function lt(){if(Z>0||(vt(),Z>0))return;function r(){Lr||(Lr=true,f.calledRun=true,!ke&&(ht(),ye(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),pt()));}f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("");},1),r();},1)):r();}if(f.preInit)for(typeof f.preInit=="function"&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.pop()();return lt(),_e.ready})})(),pa=fa;module.exports=pa;
@@ -0,0 +1,5 @@
1
+ var fa=(()=>{var me=import.meta.url;return(async function(_e={}){var f=_e,ye,br;f.ready=new Promise((r,e)=>{ye=r,br=e;});var we=Object.assign({},f),zr="./this.program",be=typeof window=="object",ar=typeof importScripts=="function",kr=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",z="";function ft(r){return f.locateFile?f.locateFile(r,z):z+r}var fr,Nr,$r;if(kr){let{createRequire:r}=await import('module');var Pr=r(import.meta.url),Br=Pr("fs"),Vr=Pr("path");ar?z=Vr.dirname(z)+"/":z=Pr("url").fileURLToPath(new URL("./",import.meta.url)),fr=(e,t)=>(e=Ae(e)?new URL(e):Vr.normalize(e),Br.readFileSync(e,t?void 0:"utf8")),$r=e=>{var t=fr(e,true);return t.buffer||(t=new Uint8Array(t)),t},Nr=(e,t,n,i=true)=>{e=Ae(e)?new URL(e):Vr.normalize(e),Br.readFile(e,i?void 0:"utf8",(o,s)=>{o?n(o):t(i?s.buffer:s);});},!f.thisProgram&&process.argv.length>1&&(zr=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);}else (be||ar)&&(ar?z=self.location.href:typeof document<"u"&&document.currentScript&&(z=document.currentScript.src),me&&(z=me),z.startsWith("blob:")?z="":z=z.substr(0,z.replace(/[?#].*/,"").lastIndexOf("/")+1),fr=r=>{var e=new XMLHttpRequest;return e.open("GET",r,false),e.send(null),e.responseText},ar&&($r=r=>{var e=new XMLHttpRequest;return e.open("GET",r,false),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),Nr=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,true),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){e(n.response);return}t();},n.onerror=t,n.send(null);});var Yr=f.print||console.log.bind(console),J=f.printErr||console.error.bind(console);Object.assign(f,we),we=null,f.arguments&&(f.arguments),f.thisProgram&&(zr=f.thisProgram),f.quit&&(f.quit);var cr;f.wasmBinary&&(cr=f.wasmBinary);var Cr,ke=false,W,H,or,dr,g,b,$e,Pe;function Ce(){var r=Cr.buffer;f.HEAP8=W=new Int8Array(r),f.HEAP16=or=new Int16Array(r),f.HEAPU8=H=new Uint8Array(r),f.HEAPU16=dr=new Uint16Array(r),f.HEAP32=g=new Int32Array(r),f.HEAPU32=b=new Uint32Array(r),f.HEAPF32=$e=new Float32Array(r),f.HEAPF64=Pe=new Float64Array(r);}var Te=[],Fe=[],Se=[];function vt(){if(f.preRun)for(typeof f.preRun=="function"&&(f.preRun=[f.preRun]);f.preRun.length;)mt(f.preRun.shift());Gr(Te);}function ht(){!f.noFSInit&&!a.init.initialized&&a.init(),a.ignorePermissions=false,Gr(Fe);}function pt(){if(f.postRun)for(typeof f.postRun=="function"&&(f.postRun=[f.postRun]);f.postRun.length;)yt(f.postRun.shift());Gr(Se);}function mt(r){Te.unshift(r);}function _t(r){Fe.unshift(r);}function yt(r){Se.unshift(r);}var Z=0,vr=null;function Xr(r){Z++,f.monitorRunDependencies?.(Z);}function Tr(r){if(Z--,f.monitorRunDependencies?.(Z),Z==0&&(vr)){var e=vr;vr=null,e();}}function rr(r){f.onAbort?.(r),r="Aborted("+r+")",J(r),ke=true,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw br(e),e}var wt="data:application/octet-stream;base64,",De=r=>r.startsWith(wt),Ae=r=>r.startsWith("file://"),er;f.locateFile?(er="heic-decoder.wasm",De(er)||(er=ft(er))):er=new URL("heic-decoder.wasm",import.meta.url).href;function Re(r){if(r==er&&cr)return new Uint8Array(cr);if($r)return $r(r);throw "both async and sync fetching of the wasm failed"}function gt(r){return !cr&&(be||ar)&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw `failed to load wasm binary file at '${r}'`;return e.arrayBuffer()}).catch(()=>Re(r)):Promise.resolve().then(()=>Re(r))}function Me(r,e,t){return gt(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{J(`failed to asynchronously prepare wasm: ${n}`),rr(n);})}function Et(r,e,t,n){return !r&&typeof WebAssembly.instantiateStreaming=="function"&&!De(e)&&!kr&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(i=>{var o=WebAssembly.instantiateStreaming(i,t);return o.then(n,function(s){return J(`wasm streaming compile failed: ${s}`),J("falling back to ArrayBuffer instantiation"),Me(e,t,n)})}):Me(e,t,n)}function bt(){var r={a:Ti};function e(n,i){return T=n.exports,Cr=T.wa,Ce(),Ye=T.za,_t(T.xa),Tr(),T}Xr();function t(n){e(n.instance);}if(f.instantiateWasm)try{return f.instantiateWasm(r,e)}catch(n){J(`Module.instantiateWasm callback failed with error: ${n}`),br(n);}return Et(cr,er,r,t).catch(br),{}}var E,x,Gr=r=>{for(;r.length>0;)r.shift()(f);};f.noExitRuntime||true;var je=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,sr=(r,e,t)=>{for(var n=e+t,i=e;r[i]&&!(i>=n);)++i;if(i-e>16&&r.buffer&&je)return je.decode(r.subarray(e,i));for(var o="";e<i;){var s=r[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var l=r[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|l);continue}var u=r[e++]&63;if((s&240)==224?s=(s&15)<<12|l<<6|u:s=(s&7)<<18|l<<12|u<<6|r[e++]&63,s<65536)o+=String.fromCharCode(s);else {var c=s-65536;o+=String.fromCharCode(55296|c>>10,56320|c&1023);}}return o},tr=(r,e)=>r?sr(H,r,e):"",kt=(r,e,t,n)=>{rr(`Assertion failed: ${tr(r)}, at: `+[e?tr(e):"unknown filename",t,n?tr(n):"unknown function"]);},Fr=[],Sr=0,$t=r=>{var e=new Kr(r);return e.get_caught()||(e.set_caught(true),Sr--),e.set_rethrown(false),Fr.push(e),tt(e.excPtr),e.get_exception_ptr()},q=0,Pt=()=>{F(0,0);var r=Fr.pop();et(r.excPtr),q=0;};class Kr{constructor(e){this.excPtr=e,this.ptr=e-24;}set_type(e){b[this.ptr+4>>2]=e;}get_type(){return b[this.ptr+4>>2]}set_destructor(e){b[this.ptr+8>>2]=e;}get_destructor(){return b[this.ptr+8>>2]}set_caught(e){e=e?1:0,W[this.ptr+12]=e;}get_caught(){return W[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,W[this.ptr+13]=e;}get_rethrown(){return W[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t);}set_adjusted_ptr(e){b[this.ptr+16>>2]=e;}get_adjusted_ptr(){return b[this.ptr+16>>2]}get_exception_ptr(){var e=it(this.get_type());if(e)return b[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}var Ct=r=>{throw q||(q=r),q},Oe=r=>{var e=q;if(!e)return Er(0),0;var t=new Kr(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return Er(0),e;for(var i in r){var o=r[i];if(o===0||o===n)break;var s=t.ptr+16;if(nt(o,n,s))return Er(o),e}return Er(n),e},Tt=()=>Oe([]),Ft=r=>Oe([r]),St=()=>{var r=Fr.pop();r||rr("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(Fr.push(r),r.set_rethrown(true),r.set_caught(false),Sr++),q=e,q},Dt=(r,e,t)=>{var n=new Kr(r);throw n.init(e,t),q=r,Sr++,q},At=()=>Sr,D={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var i=r[n];i==="."?r.splice(n,1):i===".."?(r.splice(n,1),t++):t&&(r.splice(n,1),t--);}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=D.isAbs(r),t=r.substr(-1)==="/";return r=D.normalizeArray(r.split("/").filter(n=>!!n),!e).join("/"),!r&&!e&&(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=D.splitPath(r),t=e[0],n=e[1];return !t&&!n?".":(n&&(n=n.substr(0,n.length-1)),t+n)},basename:r=>{if(r==="/")return "/";r=D.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return e===-1?r:r.substr(e+1)},join:(...r)=>D.normalize(r.join("/")),join2:(r,e)=>D.normalize(r+"/"+e)},Rt=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(kr)try{var r=Pr("crypto"),e=r.randomFillSync;if(e)return n=>r.randomFillSync(n);var t=r.randomBytes;return n=>(n.set(t(n.byteLength)),n)}catch{}rr("initRandomDevice");},xe=r=>(xe=Rt())(r),X={resolve:(...r)=>{for(var e="",t=false,n=r.length-1;n>=-1&&!t;n--){var i=n>=0?r[n]:a.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return "";e=i+"/"+e,t=D.isAbs(i);}return e=D.normalizeArray(e.split("/").filter(o=>!!o),!t).join("/"),(t?"/":"")+e||"."},relative:(r,e)=>{r=X.resolve(r).substr(1),e=X.resolve(e).substr(1);function t(c){for(var v=0;v<c.length&&c[v]==="";v++);for(var _=c.length-1;_>=0&&c[_]==="";_--);return v>_?[]:c.slice(v,_-v+1)}for(var n=t(r.split("/")),i=t(e.split("/")),o=Math.min(n.length,i.length),s=o,l=0;l<o;l++)if(n[l]!==i[l]){s=l;break}for(var u=[],l=s;l<n.length;l++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")}},Jr=[],Qr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3;}return e},Zr=(r,e,t,n)=>{if(!(n>0))return 0;for(var i=t,o=t+n-1,s=0;s<r.length;++s){var l=r.charCodeAt(s);if(l>=55296&&l<=57343){var u=r.charCodeAt(++s);l=65536+((l&1023)<<10)|u&1023;}if(l<=127){if(t>=o)break;e[t++]=l;}else if(l<=2047){if(t+1>=o)break;e[t++]=192|l>>6,e[t++]=128|l&63;}else if(l<=65535){if(t+2>=o)break;e[t++]=224|l>>12,e[t++]=128|l>>6&63,e[t++]=128|l&63;}else {if(t+3>=o)break;e[t++]=240|l>>18,e[t++]=128|l>>12&63,e[t++]=128|l>>6&63,e[t++]=128|l&63;}}return e[t]=0,t-i};function Dr(r,e,t){var n=Qr(r)+1,i=new Array(n),o=Zr(r,i,0,i.length);return e&&(i.length=o),i}var Mt=()=>{if(!Jr.length){var r=null;if(kr){var e=256,t=Buffer.alloc(e),n=0,i=process.stdin.fd;try{n=Br.readSync(i,t);}catch(o){if(o.toString().includes("EOF"))n=0;else throw o}n>0?r=t.slice(0,n).toString("utf-8"):r=null;}else typeof window<"u"&&typeof window.prompt=="function"?(r=window.prompt("Input: "),r!==null&&(r+=`
2
+ `)):typeof readline=="function"&&(r=readline(),r!==null&&(r+=`
3
+ `));if(!r)return null;Jr=Dr(r,true);}return Jr.shift()},Q={ttys:[],init(){},shutdown(){},register(r,e){Q.ttys[r]={input:[],output:[],ops:e},a.registerDevice(r,Q.stream_ops);},stream_ops:{open(r){var e=Q.ttys[r.node.rdev];if(!e)throw new a.ErrnoError(43);r.tty=e,r.seekable=false;},close(r){r.tty.ops.fsync(r.tty);},fsync(r){r.tty.ops.fsync(r.tty);},read(r,e,t,n,i){if(!r.tty||!r.tty.ops.get_char)throw new a.ErrnoError(60);for(var o=0,s=0;s<n;s++){var l;try{l=r.tty.ops.get_char(r.tty);}catch{throw new a.ErrnoError(29)}if(l===void 0&&o===0)throw new a.ErrnoError(6);if(l==null)break;o++,e[t+s]=l;}return o&&(r.node.timestamp=Date.now()),o},write(r,e,t,n,i){if(!r.tty||!r.tty.ops.put_char)throw new a.ErrnoError(60);try{for(var o=0;o<n;o++)r.tty.ops.put_char(r.tty,e[t+o]);}catch{throw new a.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),o}},default_tty_ops:{get_char(r){return Mt()},put_char(r,e){e===null||e===10?(Yr(sr(r.output,0)),r.output=[]):e!=0&&r.output.push(e);},fsync(r){r.output&&r.output.length>0&&(Yr(sr(r.output,0)),r.output=[]);},ioctl_tcgets(r){return {c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[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]}},ioctl_tcsets(r,e,t){return 0},ioctl_tiocgwinsz(r){return [24,80]}},default_tty1_ops:{put_char(r,e){e===null||e===10?(J(sr(r.output,0)),r.output=[]):e!=0&&r.output.push(e);},fsync(r){r.output&&r.output.length>0&&(J(sr(r.output,0)),r.output=[]);}}},We=r=>{rr();},w={ops_table:null,mount(r){return w.createNode(null,"/",16895,0)},createNode(r,e,t,n){if(a.isBlkdev(t)||a.isFIFO(t))throw new a.ErrnoError(63);w.ops_table||={dir:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,lookup:w.node_ops.lookup,mknod:w.node_ops.mknod,rename:w.node_ops.rename,unlink:w.node_ops.unlink,rmdir:w.node_ops.rmdir,readdir:w.node_ops.readdir,symlink:w.node_ops.symlink},stream:{llseek:w.stream_ops.llseek}},file:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:{llseek:w.stream_ops.llseek,read:w.stream_ops.read,write:w.stream_ops.write,allocate:w.stream_ops.allocate,mmap:w.stream_ops.mmap,msync:w.stream_ops.msync}},link:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,readlink:w.node_ops.readlink},stream:{}},chrdev:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:a.chrdev_stream_ops}};var i=a.createNode(r,e,t,n);return a.isDir(i.mode)?(i.node_ops=w.ops_table.dir.node,i.stream_ops=w.ops_table.dir.stream,i.contents={}):a.isFile(i.mode)?(i.node_ops=w.ops_table.file.node,i.stream_ops=w.ops_table.file.stream,i.usedBytes=0,i.contents=null):a.isLink(i.mode)?(i.node_ops=w.ops_table.link.node,i.stream_ops=w.ops_table.link.stream):a.isChrdev(i.mode)&&(i.node_ops=w.ops_table.chrdev.node,i.stream_ops=w.ops_table.chrdev.stream),i.timestamp=Date.now(),r&&(r.contents[e]=i,r.timestamp=i.timestamp),i},getFileDataAsTypedArray(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1024*1024;e=Math.max(e,t*(t<n?2:1.125)>>>0),t!=0&&(e=Math.max(e,256));var i=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(i.subarray(0,r.usedBytes),0);}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(e==0)r.contents=null,r.usedBytes=0;else {var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e;}},node_ops:{getattr(r){var e={};return e.dev=a.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,a.isDir(r.mode)?e.size=4096:a.isFile(r.mode)?e.size=r.usedBytes:a.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){e.mode!==void 0&&(r.mode=e.mode),e.timestamp!==void 0&&(r.timestamp=e.timestamp),e.size!==void 0&&w.resizeFileStorage(r,e.size);},lookup(r,e){throw a.genericErrors[44]},mknod(r,e,t,n){return w.createNode(r,e,t,n)},rename(r,e,t){if(a.isDir(r.mode)){var n;try{n=a.lookupNode(e,t);}catch{}if(n)for(var i in n.contents)throw new a.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e;},unlink(r,e){delete r.contents[e],r.timestamp=Date.now();},rmdir(r,e){var t=a.lookupNode(r,e);for(var n in t.contents)throw new a.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now();},readdir(r){var e=[".",".."];for(var t of Object.keys(r.contents))e.push(t);return e},symlink(r,e,t){var n=w.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!a.isLink(r.mode))throw new a.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,i){var o=r.node.contents;if(i>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-i,n);if(s>8&&o.subarray)e.set(o.subarray(i,i+s),t);else for(var l=0;l<s;l++)e[t+l]=o[i+l];return s},write(r,e,t,n,i,o){if(e.buffer===W.buffer&&(o=false),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(o)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(s.usedBytes===0&&i===0)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(i+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),i),n}if(w.expandFileStorage(s,i+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),i);else for(var l=0;l<n;l++)s.contents[i+l]=e[t+l];return s.usedBytes=Math.max(s.usedBytes,i+n),n},llseek(r,e,t){var n=e;if(t===1?n+=r.position:t===2&&a.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new a.ErrnoError(28);return n},allocate(r,e,t){w.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t);},mmap(r,e,t,n,i){if(!a.isFile(r.node.mode))throw new a.ErrnoError(43);var o,s,l=r.node.contents;if(!(i&2)&&l.buffer===W.buffer)s=false,o=l.byteOffset;else {if((t>0||t+e<l.length)&&(l.subarray?l=l.subarray(t,t+e):l=Array.prototype.slice.call(l,t,t+e)),s=true,o=We(),!o)throw new a.ErrnoError(48);W.set(l,o);}return {ptr:o,allocated:s}},msync(r,e,t,n,i){return w.stream_ops.write(r,e,0,n,t,false),0}}},jt=(r,e,t,n)=>{var i=`al ${r}`;Nr(r,o=>{e(new Uint8Array(o)),i&&Tr();},o=>{if(t)t();else throw `Loading data file "${r}" failed.`}),i&&Xr();},Ot=(r,e,t,n,i,o)=>{a.createDataFile(r,e,t,n,i,o);},xt=f.preloadPlugins||[],Wt=(r,e,t,n)=>{typeof Browser<"u"&&Browser.init();var i=false;return xt.forEach(o=>{i||o.canHandle(e)&&(o.handle(r,e,t,n),i=true);}),i},Ut=(r,e,t,n,i,o,s,l,u,c)=>{var v=e?X.resolve(D.join2(r,e)):r;function p(h){function y(C){c?.(),l||Ot(r,e,C,n,i,u),o?.(),Tr();}Wt(h,v,y,()=>{s?.(),Tr();})||y(h);}Xr(),typeof t=="string"?jt(t,p,s):p(t);},Ht=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=e[r];if(typeof t>"u")throw new Error(`Unknown file open mode: ${r}`);return t},re=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},a={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:class{constructor(r){this.name="ErrnoError",this.errno=r;}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={};}get object(){return this.node}set object(r){this.node=r;}get isRead(){return (this.flags&2097155)!==1}get isWrite(){return (this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r;}get position(){return this.shared.position}set position(r){this.shared.position=r;}},FSNode:class{constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=a.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146;}get read(){return (this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode;}get write(){return (this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode;}get isFolder(){return a.isDir(this.mode)}get isDevice(){return a.isChrdev(this.mode)}},lookupPath(r,e={}){if(r=X.resolve(r),!r)return {path:"",node:null};var t={follow_mount:true,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new a.ErrnoError(32);for(var n=r.split("/").filter(_=>!!_),i=a.root,o="/",s=0;s<n.length;s++){var l=s===n.length-1;if(l&&e.parent)break;if(i=a.lookupNode(i,n[s]),o=D.join2(o,n[s]),a.isMountpoint(i)&&(!l||l&&e.follow_mount)&&(i=i.mounted.root),!l||e.follow)for(var u=0;a.isLink(i.mode);){var c=a.readlink(o);o=X.resolve(D.dirname(o),c);var v=a.lookupPath(o,{recurse_count:e.recurse_count+1});if(i=v.node,u++>40)throw new a.ErrnoError(32)}}return {path:o,node:i}},getPath(r){for(var e;;){if(a.isRoot(r)){var t=r.mount.mountpoint;return e?t[t.length-1]!=="/"?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent;}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return (r+t>>>0)%a.nameTable.length},hashAddNode(r){var e=a.hashName(r.parent.id,r.name);r.name_next=a.nameTable[e],a.nameTable[e]=r;},hashRemoveNode(r){var e=a.hashName(r.parent.id,r.name);if(a.nameTable[e]===r)a.nameTable[e]=r.name_next;else for(var t=a.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next;}},lookupNode(r,e){var t=a.mayLookup(r);if(t)throw new a.ErrnoError(t);for(var n=a.hashName(r.id,e),i=a.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===r.id&&o===e)return i}return a.lookup(r,e)},createNode(r,e,t,n){var i=new a.FSNode(r,e,t,n);return a.hashAddNode(i),i},destroyNode(r){a.hashRemoveNode(r);},isRoot(r){return r===r.parent},isMountpoint(r){return !!r.mounted},isFile(r){return (r&61440)===32768},isDir(r){return (r&61440)===16384},isLink(r){return (r&61440)===40960},isChrdev(r){return (r&61440)===8192},isBlkdev(r){return (r&61440)===24576},isFIFO(r){return (r&61440)===4096},isSocket(r){return (r&49152)===49152},flagsToPermissionString(r){var e=["r","w","rw"][r&3];return r&512&&(e+="w"),e},nodePermissions(r,e){return a.ignorePermissions?0:e.includes("r")&&!(r.mode&292)||e.includes("w")&&!(r.mode&146)||e.includes("x")&&!(r.mode&73)?2:0},mayLookup(r){if(!a.isDir(r.mode))return 54;var e=a.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{var t=a.lookupNode(r,e);return 20}catch{}return a.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=a.lookupNode(r,e);}catch(o){return o.errno}var i=a.nodePermissions(r,"wx");if(i)return i;if(t){if(!a.isDir(n.mode))return 54;if(a.isRoot(n)||a.getPath(n)===a.cwd())return 10}else if(a.isDir(n.mode))return 31;return 0},mayOpen(r,e){return r?a.isLink(r.mode)?32:a.isDir(r.mode)&&(a.flagsToPermissionString(e)!=="r"||e&512)?31:a.nodePermissions(r,a.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=a.MAX_OPEN_FDS;r++)if(!a.streams[r])return r;throw new a.ErrnoError(33)},getStreamChecked(r){var e=a.getStream(r);if(!e)throw new a.ErrnoError(8);return e},getStream:r=>a.streams[r],createStream(r,e=-1){return r=Object.assign(new a.FSStream,r),e==-1&&(e=a.nextfd()),r.fd=e,a.streams[e]=r,r},closeStream(r){a.streams[r]=null;},dupStream(r,e=-1){var t=a.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=a.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r);},llseek(){throw new a.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,e)=>r<<8|e,registerDevice(r,e){a.devices[r]={stream_ops:e};},getDevice:r=>a.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts);}return e},syncfs(r,e){typeof r=="function"&&(e=r,r=false),a.syncFSRequests++,a.syncFSRequests>1&&J(`warning: ${a.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=a.getMounts(a.root.mount),n=0;function i(s){return a.syncFSRequests--,e(s)}function o(s){if(s)return o.errored?void 0:(o.errored=true,i(s));++n>=t.length&&i(null);}t.forEach(s=>{if(!s.type.syncfs)return o(null);s.type.syncfs(s,r,o);});},mount(r,e,t){var n=t==="/",i=!t,o;if(n&&a.root)throw new a.ErrnoError(10);if(!n&&!i){var s=a.lookupPath(t,{follow_mount:false});if(t=s.path,o=s.node,a.isMountpoint(o))throw new a.ErrnoError(10);if(!a.isDir(o.mode))throw new a.ErrnoError(54)}var l={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(l);return u.mount=l,l.root=u,n?a.root=u:o&&(o.mounted=l,o.mount&&o.mount.mounts.push(l)),u},unmount(r){var e=a.lookupPath(r,{follow_mount:false});if(!a.isMountpoint(e.node))throw new a.ErrnoError(28);var t=e.node,n=t.mounted,i=a.getMounts(n);Object.keys(a.nameTable).forEach(s=>{for(var l=a.nameTable[s];l;){var u=l.name_next;i.includes(l.mount)&&a.destroyNode(l),l=u;}}),t.mounted=null;var o=t.mount.mounts.indexOf(n);t.mount.mounts.splice(o,1);},lookup(r,e){return r.node_ops.lookup(r,e)},mknod(r,e,t){var n=a.lookupPath(r,{parent:true}),i=n.node,o=D.basename(r);if(!o||o==="."||o==="..")throw new a.ErrnoError(28);var s=a.mayCreate(i,o);if(s)throw new a.ErrnoError(s);if(!i.node_ops.mknod)throw new a.ErrnoError(63);return i.node_ops.mknod(i,o,e,t)},create(r,e){return e=e!==void 0?e:438,e&=4095,e|=32768,a.mknod(r,e,0)},mkdir(r,e){return e=e!==void 0?e:511,e&=1023,e|=16384,a.mknod(r,e,0)},mkdirTree(r,e){for(var t=r.split("/"),n="",i=0;i<t.length;++i)if(t[i]){n+="/"+t[i];try{a.mkdir(n,e);}catch(o){if(o.errno!=20)throw o}}},mkdev(r,e,t){return typeof t>"u"&&(t=e,e=438),e|=8192,a.mknod(r,e,t)},symlink(r,e){if(!X.resolve(r))throw new a.ErrnoError(44);var t=a.lookupPath(e,{parent:true}),n=t.node;if(!n)throw new a.ErrnoError(44);var i=D.basename(e),o=a.mayCreate(n,i);if(o)throw new a.ErrnoError(o);if(!n.node_ops.symlink)throw new a.ErrnoError(63);return n.node_ops.symlink(n,i,r)},rename(r,e){var t=D.dirname(r),n=D.dirname(e),i=D.basename(r),o=D.basename(e),s,l,u;if(s=a.lookupPath(r,{parent:true}),l=s.node,s=a.lookupPath(e,{parent:true}),u=s.node,!l||!u)throw new a.ErrnoError(44);if(l.mount!==u.mount)throw new a.ErrnoError(75);var c=a.lookupNode(l,i),v=X.relative(r,n);if(v.charAt(0)!==".")throw new a.ErrnoError(28);if(v=X.relative(e,t),v.charAt(0)!==".")throw new a.ErrnoError(55);var _;try{_=a.lookupNode(u,o);}catch{}if(c!==_){var p=a.isDir(c.mode),h=a.mayDelete(l,i,p);if(h)throw new a.ErrnoError(h);if(h=_?a.mayDelete(u,o,p):a.mayCreate(u,o),h)throw new a.ErrnoError(h);if(!l.node_ops.rename)throw new a.ErrnoError(63);if(a.isMountpoint(c)||_&&a.isMountpoint(_))throw new a.ErrnoError(10);if(u!==l&&(h=a.nodePermissions(l,"w"),h))throw new a.ErrnoError(h);a.hashRemoveNode(c);try{l.node_ops.rename(c,u,o);}catch(y){throw y}finally{a.hashAddNode(c);}}},rmdir(r){var e=a.lookupPath(r,{parent:true}),t=e.node,n=D.basename(r),i=a.lookupNode(t,n),o=a.mayDelete(t,n,true);if(o)throw new a.ErrnoError(o);if(!t.node_ops.rmdir)throw new a.ErrnoError(63);if(a.isMountpoint(i))throw new a.ErrnoError(10);t.node_ops.rmdir(t,n),a.destroyNode(i);},readdir(r){var e=a.lookupPath(r,{follow:true}),t=e.node;if(!t.node_ops.readdir)throw new a.ErrnoError(54);return t.node_ops.readdir(t)},unlink(r){var e=a.lookupPath(r,{parent:true}),t=e.node;if(!t)throw new a.ErrnoError(44);var n=D.basename(r),i=a.lookupNode(t,n),o=a.mayDelete(t,n,false);if(o)throw new a.ErrnoError(o);if(!t.node_ops.unlink)throw new a.ErrnoError(63);if(a.isMountpoint(i))throw new a.ErrnoError(10);t.node_ops.unlink(t,n),a.destroyNode(i);},readlink(r){var e=a.lookupPath(r),t=e.node;if(!t)throw new a.ErrnoError(44);if(!t.node_ops.readlink)throw new a.ErrnoError(28);return X.resolve(a.getPath(t.parent),t.node_ops.readlink(t))},stat(r,e){var t=a.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new a.ErrnoError(44);if(!n.node_ops.getattr)throw new a.ErrnoError(63);return n.node_ops.getattr(n)},lstat(r){return a.stat(r,true)},chmod(r,e,t){var n;if(typeof r=="string"){var i=a.lookupPath(r,{follow:!t});n=i.node;}else n=r;if(!n.node_ops.setattr)throw new a.ErrnoError(63);n.node_ops.setattr(n,{mode:e&4095|n.mode&-4096,timestamp:Date.now()});},lchmod(r,e){a.chmod(r,e,true);},fchmod(r,e){var t=a.getStreamChecked(r);a.chmod(t.node,e);},chown(r,e,t,n){var i;if(typeof r=="string"){var o=a.lookupPath(r,{follow:!n});i=o.node;}else i=r;if(!i.node_ops.setattr)throw new a.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()});},lchown(r,e,t){a.chown(r,e,t,true);},fchown(r,e,t){var n=a.getStreamChecked(r);a.chown(n.node,e,t);},truncate(r,e){if(e<0)throw new a.ErrnoError(28);var t;if(typeof r=="string"){var n=a.lookupPath(r,{follow:true});t=n.node;}else t=r;if(!t.node_ops.setattr)throw new a.ErrnoError(63);if(a.isDir(t.mode))throw new a.ErrnoError(31);if(!a.isFile(t.mode))throw new a.ErrnoError(28);var i=a.nodePermissions(t,"w");if(i)throw new a.ErrnoError(i);t.node_ops.setattr(t,{size:e,timestamp:Date.now()});},ftruncate(r,e){var t=a.getStreamChecked(r);if((t.flags&2097155)===0)throw new a.ErrnoError(28);a.truncate(t.node,e);},utime(r,e,t){var n=a.lookupPath(r,{follow:true}),i=n.node;i.node_ops.setattr(i,{timestamp:Math.max(e,t)});},open(r,e,t){if(r==="")throw new a.ErrnoError(44);e=typeof e=="string"?Ht(e):e,t=typeof t>"u"?438:t,e&64?t=t&4095|32768:t=0;var n;if(typeof r=="object")n=r;else {r=D.normalize(r);try{var i=a.lookupPath(r,{follow:!(e&131072)});n=i.node;}catch{}}var o=false;if(e&64)if(n){if(e&128)throw new a.ErrnoError(20)}else n=a.mknod(r,t,0),o=true;if(!n)throw new a.ErrnoError(44);if(a.isChrdev(n.mode)&&(e&=-513),e&65536&&!a.isDir(n.mode))throw new a.ErrnoError(54);if(!o){var s=a.mayOpen(n,e);if(s)throw new a.ErrnoError(s)}e&512&&!o&&a.truncate(n,0),e&=-131713;var l=a.createStream({node:n,path:a.getPath(n),flags:e,seekable:true,position:0,stream_ops:n.stream_ops,ungotten:[],error:false});return l.stream_ops.open&&l.stream_ops.open(l),f.logReadFiles&&!(e&1)&&(a.readFiles||(a.readFiles={}),r in a.readFiles||(a.readFiles[r]=1)),l},close(r){if(a.isClosed(r))throw new a.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r);}catch(e){throw e}finally{a.closeStream(r.fd);}r.fd=null;},isClosed(r){return r.fd===null},llseek(r,e,t){if(a.isClosed(r))throw new a.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new a.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new a.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,i){if(n<0||i<0)throw new a.ErrnoError(28);if(a.isClosed(r))throw new a.ErrnoError(8);if((r.flags&2097155)===1)throw new a.ErrnoError(8);if(a.isDir(r.node.mode))throw new a.ErrnoError(31);if(!r.stream_ops.read)throw new a.ErrnoError(28);var o=typeof i<"u";if(!o)i=r.position;else if(!r.seekable)throw new a.ErrnoError(70);var s=r.stream_ops.read(r,e,t,n,i);return o||(r.position+=s),s},write(r,e,t,n,i,o){if(n<0||i<0)throw new a.ErrnoError(28);if(a.isClosed(r))throw new a.ErrnoError(8);if((r.flags&2097155)===0)throw new a.ErrnoError(8);if(a.isDir(r.node.mode))throw new a.ErrnoError(31);if(!r.stream_ops.write)throw new a.ErrnoError(28);r.seekable&&r.flags&1024&&a.llseek(r,0,2);var s=typeof i<"u";if(!s)i=r.position;else if(!r.seekable)throw new a.ErrnoError(70);var l=r.stream_ops.write(r,e,t,n,i,o);return s||(r.position+=l),l},allocate(r,e,t){if(a.isClosed(r))throw new a.ErrnoError(8);if(e<0||t<=0)throw new a.ErrnoError(28);if((r.flags&2097155)===0)throw new a.ErrnoError(8);if(!a.isFile(r.node.mode)&&!a.isDir(r.node.mode))throw new a.ErrnoError(43);if(!r.stream_ops.allocate)throw new a.ErrnoError(138);r.stream_ops.allocate(r,e,t);},mmap(r,e,t,n,i){if((n&2)!==0&&(i&2)===0&&(r.flags&2097155)!==2)throw new a.ErrnoError(2);if((r.flags&2097155)===1)throw new a.ErrnoError(2);if(!r.stream_ops.mmap)throw new a.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,i)},msync(r,e,t,n,i){return r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,i):0},ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new a.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary",e.encoding!=="utf8"&&e.encoding!=="binary")throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=a.open(r,e.flags),i=a.stat(r),o=i.size,s=new Uint8Array(o);return a.read(n,s,0,o,0),e.encoding==="utf8"?t=sr(s,0):e.encoding==="binary"&&(t=s),a.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=a.open(r,t.flags,t.mode);if(typeof e=="string"){var i=new Uint8Array(Qr(e)+1),o=Zr(e,i,0,i.length);a.write(n,i,0,o,void 0,t.canOwn);}else if(ArrayBuffer.isView(e))a.write(n,e,0,e.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");a.close(n);},cwd:()=>a.currentPath,chdir(r){var e=a.lookupPath(r,{follow:true});if(e.node===null)throw new a.ErrnoError(44);if(!a.isDir(e.node.mode))throw new a.ErrnoError(54);var t=a.nodePermissions(e.node,"x");if(t)throw new a.ErrnoError(t);a.currentPath=e.path;},createDefaultDirectories(){a.mkdir("/tmp"),a.mkdir("/home"),a.mkdir("/home/web_user");},createDefaultDevices(){a.mkdir("/dev"),a.registerDevice(a.makedev(1,3),{read:()=>0,write:(n,i,o,s,l)=>s}),a.mkdev("/dev/null",a.makedev(1,3)),Q.register(a.makedev(5,0),Q.default_tty_ops),Q.register(a.makedev(6,0),Q.default_tty1_ops),a.mkdev("/dev/tty",a.makedev(5,0)),a.mkdev("/dev/tty1",a.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(e===0&&(e=xe(r).byteLength),r[--e]);a.createDevice("/dev","random",t),a.createDevice("/dev","urandom",t),a.mkdir("/dev/shm"),a.mkdir("/dev/shm/tmp");},createSpecialDirectories(){a.mkdir("/proc");var r=a.mkdir("/proc/self");a.mkdir("/proc/self/fd"),a.mount({mount(){var e=a.createNode(r,"fd",16895,73);return e.node_ops={lookup(t,n){var i=+n,o=a.getStreamChecked(i),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>o.path}};return s.parent=s,s}},e}},{},"/proc/self/fd");},createStandardStreams(){f.stdin?a.createDevice("/dev","stdin",f.stdin):a.symlink("/dev/tty","/dev/stdin"),f.stdout?a.createDevice("/dev","stdout",null,f.stdout):a.symlink("/dev/tty","/dev/stdout"),f.stderr?a.createDevice("/dev","stderr",null,f.stderr):a.symlink("/dev/tty1","/dev/stderr");a.open("/dev/stdin",0);a.open("/dev/stdout",1);a.open("/dev/stderr",1);},staticInit(){[44].forEach(r=>{a.genericErrors[r]=new a.ErrnoError(r),a.genericErrors[r].stack="<generic error, no stack>";}),a.nameTable=new Array(4096),a.mount(w,{},"/"),a.createDefaultDirectories(),a.createDefaultDevices(),a.createSpecialDirectories(),a.filesystems={MEMFS:w};},init(r,e,t){a.init.initialized=true,f.stdin=r||f.stdin,f.stdout=e||f.stdout,f.stderr=t||f.stderr,a.createStandardStreams();},quit(){a.init.initialized=false;for(var r=0;r<a.streams.length;r++){var e=a.streams[r];e&&a.close(e);}},findObject(r,e){var t=a.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{var t=a.lookupPath(r,{follow:!e});r=t.path;}catch{}var n={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var t=a.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=D.basename(r),t=a.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot=t.path==="/";}catch(i){n.error=i.errno;}return n},createPath(r,e,t,n){r=typeof r=="string"?r:a.getPath(r);for(var i=e.split("/").reverse();i.length;){var o=i.pop();if(o){var s=D.join2(r,o);try{a.mkdir(s);}catch{}r=s;}}return s},createFile(r,e,t,n,i){var o=D.join2(typeof r=="string"?r:a.getPath(r),e),s=re(n,i);return a.create(o,s)},createDataFile(r,e,t,n,i,o){var s=e;r&&(r=typeof r=="string"?r:a.getPath(r),s=e?D.join2(r,e):r);var l=re(n,i),u=a.create(s,l);if(t){if(typeof t=="string"){for(var c=new Array(t.length),v=0,_=t.length;v<_;++v)c[v]=t.charCodeAt(v);t=c;}a.chmod(u,l|146);var p=a.open(u,577);a.write(p,t,0,t.length,0,o),a.close(p),a.chmod(u,l);}},createDevice(r,e,t,n){var i=D.join2(typeof r=="string"?r:a.getPath(r),e),o=re(!!t,!!n);a.createDevice.major||(a.createDevice.major=64);var s=a.makedev(a.createDevice.major++,0);return a.registerDevice(s,{open(l){l.seekable=false;},close(l){n?.buffer?.length&&n(10);},read(l,u,c,v,_){for(var p=0,h=0;h<v;h++){var y;try{y=t();}catch{throw new a.ErrnoError(29)}if(y===void 0&&p===0)throw new a.ErrnoError(6);if(y==null)break;p++,u[c+h]=y;}return p&&(l.node.timestamp=Date.now()),p},write(l,u,c,v,_){for(var p=0;p<v;p++)try{n(u[c+p]);}catch{throw new a.ErrnoError(29)}return v&&(l.node.timestamp=Date.now()),p}}),a.mkdev(i,o,s)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return true;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(fr)try{r.contents=Dr(fr(r.url),!0),r.usedBytes=r.contents.length;}catch{throw new a.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile(r,e,t,n,i){class o{constructor(){this.lengthKnown=false,this.chunks=[];}get(h){if(!(h>this.length-1||h<0)){var y=h%this.chunkSize,C=h/this.chunkSize|0;return this.getter(C)[y]}}setDataGetter(h){this.getter=h;}cacheLength(){var h=new XMLHttpRequest;if(h.open("HEAD",t,false),h.send(null),!(h.status>=200&&h.status<300||h.status===304))throw new Error("Couldn't load "+t+". Status: "+h.status);var y=Number(h.getResponseHeader("Content-length")),C,S=(C=h.getResponseHeader("Accept-Ranges"))&&C==="bytes",k=(C=h.getResponseHeader("Content-Encoding"))&&C==="gzip",d=1024*1024;S||(d=y);var m=($,L)=>{if($>L)throw new Error("invalid range ("+$+", "+L+") or no bytes requested!");if(L>y-1)throw new Error("only "+y+" bytes available! programmer error!");var j=new XMLHttpRequest;if(j.open("GET",t,false),y!==d&&j.setRequestHeader("Range","bytes="+$+"-"+L),j.responseType="arraybuffer",j.overrideMimeType&&j.overrideMimeType("text/plain; charset=x-user-defined"),j.send(null),!(j.status>=200&&j.status<300||j.status===304))throw new Error("Couldn't load "+t+". Status: "+j.status);return j.response!==void 0?new Uint8Array(j.response||[]):Dr(j.responseText||"",true)},O=this;O.setDataGetter($=>{var L=$*d,j=($+1)*d-1;if(j=Math.min(j,y-1),typeof O.chunks[$]>"u"&&(O.chunks[$]=m(L,j)),typeof O.chunks[$]>"u")throw new Error("doXHR failed!");return O.chunks[$]}),(k||!y)&&(d=y=1,y=this.getter(0).length,d=y,Yr("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=y,this._chunkSize=d,this.lengthKnown=true;}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!ar)throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new o,l={isDevice:false,contents:s};}else var l={isDevice:false,url:t};var u=a.createFile(r,e,l,n,i);l.contents?u.contents=l.contents:l.url&&(u.contents=null,u.url=l.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},v=Object.keys(u.stream_ops);v.forEach(p=>{var h=u.stream_ops[p];c[p]=(...y)=>(a.forceLoadFile(u),h(...y));});function _(p,h,y,C,S){var k=p.node.contents;if(S>=k.length)return 0;var d=Math.min(k.length-S,C);if(k.slice)for(var m=0;m<d;m++)h[y+m]=k[S+m];else for(var m=0;m<d;m++)h[y+m]=k.get(S+m);return d}return c.read=(p,h,y,C,S)=>(a.forceLoadFile(u),_(p,h,y,C,S)),c.mmap=(p,h,y,C,S)=>{a.forceLoadFile(u);var k=We();if(!k)throw new a.ErrnoError(48);return _(p,W,k,h,y),{ptr:k,allocated:true}},u.stream_ops=c,u}},B={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(D.isAbs(e))return e;var n;if(r===-100)n=a.cwd();else {var i=B.getStreamFromFD(r);n=i.path;}if(e.length==0){if(!t)throw new a.ErrnoError(44);return n}return D.join2(n,e)},doStat(r,e,t){var n=r(e);g[t>>2]=n.dev,g[t+4>>2]=n.mode,b[t+8>>2]=n.nlink,g[t+12>>2]=n.uid,g[t+16>>2]=n.gid,g[t+20>>2]=n.rdev,x=[n.size>>>0,(E=n.size,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+24>>2]=x[0],g[t+28>>2]=x[1],g[t+32>>2]=4096,g[t+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),s=n.ctime.getTime();return x=[Math.floor(i/1e3)>>>0,(E=Math.floor(i/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+40>>2]=x[0],g[t+44>>2]=x[1],b[t+48>>2]=i%1e3*1e3,x=[Math.floor(o/1e3)>>>0,(E=Math.floor(o/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+56>>2]=x[0],g[t+60>>2]=x[1],b[t+64>>2]=o%1e3*1e3,x=[Math.floor(s/1e3)>>>0,(E=Math.floor(s/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+72>>2]=x[0],g[t+76>>2]=x[1],b[t+80>>2]=s%1e3*1e3,x=[n.ino>>>0,(E=n.ino,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[t+88>>2]=x[0],g[t+92>>2]=x[1],0},doMsync(r,e,t,n,i){if(!a.isFile(e.node.mode))throw new a.ErrnoError(43);if(n&2)return 0;var o=H.slice(r,r+t);a.msync(e,o,i,t,n);},varargs:void 0,get(){var r=g[+B.varargs>>2];return B.varargs+=4,r},getp(){return B.get()},getStr(r){var e=tr(r);return e},getStreamFromFD(r){var e=a.getStreamChecked(r);return e}};function It(r,e,t){try{return e=B.getStr(e),e=B.calculateAt(r,e),t===0?a.unlink(e):t===512?a.rmdir(e):rr("Invalid flags passed to unlinkat"),0}catch(n){if(typeof a>"u"||n.name!=="ErrnoError")throw n;return -n.errno}}var Ar={},ee=r=>{for(;r.length;){var e=r.pop(),t=r.pop();t(e);}};function hr(r){return this.fromWireType(b[r>>2])}var lr={},nr={},Rr={},Ue,Mr=r=>{throw new Ue(r)},ir=(r,e,t)=>{r.forEach(function(l){Rr[l]=e;});function n(l){var u=t(l);u.length!==r.length&&Mr("Mismatched type converter count");for(var c=0;c<r.length;++c)V(r[c],u[c]);}var i=new Array(e.length),o=[],s=0;e.forEach((l,u)=>{nr.hasOwnProperty(l)?i[u]=nr[l]:(o.push(l),lr.hasOwnProperty(l)||(lr[l]=[]),lr[l].push(()=>{i[u]=nr[l],++s,s===o.length&&n(i);}));}),o.length===0&&n(i);},Lt=r=>{var e=Ar[r];delete Ar[r];var t=e.rawConstructor,n=e.rawDestructor,i=e.fields,o=i.map(s=>s.getterReturnType).concat(i.map(s=>s.setterArgumentType));ir([r],o,s=>{var l={};return i.forEach((u,c)=>{var v=u.fieldName,_=s[c],p=u.getter,h=u.getterContext,y=s[c+i.length],C=u.setter,S=u.setterContext;l[v]={read:k=>_.fromWireType(p(h,k)),write:(k,d)=>{var m=[];C(S,k,y.toWireType(m,d)),ee(m);}};}),[{name:e.name,fromWireType:u=>{var c={};for(var v in l)c[v]=l[v].read(u);return n(u),c},toWireType:(u,c)=>{for(var v in l)if(!(v in c))throw new TypeError(`Missing field: "${v}"`);var _=t();for(v in l)l[v].write(_,c[v]);return u!==null&&u.push(n,_),_},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction:n}]});},zt=(r,e,t,n,i)=>{},Nt=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);He=r;},He,U=r=>{for(var e="",t=r;H[t];)e+=He[H[t++]];return e},ur,P=r=>{throw new ur(r)};function Bt(r,e,t={}){var n=e.name;if(r||P(`type "${n}" must have a positive integer typeid pointer`),nr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`);}if(nr[r]=e,delete Rr[r],lr.hasOwnProperty(r)){var i=lr[r];delete lr[r],i.forEach(o=>o());}}function V(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Bt(r,e,t)}var Y=8,Vt=(r,e,t,n)=>{e=U(e),V(r,{name:e,fromWireType:function(i){return !!i},toWireType:function(i,o){return o?t:n},argPackAdvance:Y,readValueFromPointer:function(i){return this.fromWireType(H[i])},destructorFunction:null});},Yt=r=>({count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}),te=r=>{function e(t){return t.$$.ptrType.registeredClass.name}P(e(r)+" instance already deleted");},ne=false,Ie=r=>{},qt=r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr);},Le=r=>{r.count.value-=1;var e=r.count.value===0;e&&qt(r);},ze=(r,e,t)=>{if(e===t)return r;if(t.baseClass===void 0)return null;var n=ze(r,e,t.baseClass);return n===null?null:t.downcast(n)},Ne={},Xt=()=>Object.keys(_r).length,Gt=()=>{var r=[];for(var e in _r)_r.hasOwnProperty(e)&&r.push(_r[e]);return r},pr=[],ie=()=>{for(;pr.length;){var r=pr.pop();r.$$.deleteScheduled=false,r.delete();}},mr,Kt=r=>{mr=r,pr.length&&mr&&mr(ie);},Jt=()=>{f.getInheritedInstanceCount=Xt,f.getLiveInheritedInstances=Gt,f.flushPendingDeletes=ie,f.setDelayFunction=Kt;},_r={},Qt=(r,e)=>{for(e===void 0&&P("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e},Zt=(r,e)=>(e=Qt(r,e),_r[e]),jr=(r,e)=>{(!e.ptrType||!e.ptr)&&Mr("makeClassHandle requires ptr and ptrType");var t=!!e.smartPtrType,n=!!e.smartPtr;return t!==n&&Mr("Both smartPtrType and smartPtr must be specified"),e.count={value:1},yr(Object.create(r,{$$:{value:e,writable:true}}))};function rn(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=Zt(this.registeredClass,e);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function i(){return this.isSmartPointer?jr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):jr(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var o=this.registeredClass.getActualType(e),s=Ne[o];if(!s)return i.call(this);var l;this.isConst?l=s.constPointerType:l=s.pointerType;var u=ze(e,this.registeredClass,l.registeredClass);return u===null?i.call(this):this.isSmartPointer?jr(l.registeredClass.instancePrototype,{ptrType:l,ptr:u,smartPtrType:this,smartPtr:r}):jr(l.registeredClass.instancePrototype,{ptrType:l,ptr:u})}var yr=r=>typeof FinalizationRegistry>"u"?(yr=e=>e,r):(ne=new FinalizationRegistry(e=>{Le(e.$$);}),yr=e=>{var t=e.$$,n=!!t.smartPtr;if(n){var i={$$:t};ne.register(e,i,e);}return e},Ie=e=>ne.unregister(e),yr(r)),en=()=>{Object.assign(Or.prototype,{isAliasOf(r){if(!(this instanceof Or)||!(r instanceof Or))return false;var e=this.$$.ptrType.registeredClass,t=this.$$.ptr;r.$$=r.$$;for(var n=r.$$.ptrType.registeredClass,i=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&t===i},clone(){if(this.$$.ptr||te(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=yr(Object.create(Object.getPrototypeOf(this),{$$:{value:Yt(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=false,r},delete(){this.$$.ptr||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Ie(this),Le(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0);},isDeleted(){return !this.$$.ptr},deleteLater(){return this.$$.ptr||te(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),pr.push(this),pr.length===1&&mr&&mr(ie),this.$$.deleteScheduled=true,this}});};function Or(){}var wr=(r,e)=>Object.defineProperty(e,"name",{value:r}),Be=(r,e,t)=>{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(...i){return r[e].overloadTable.hasOwnProperty(i.length)||P(`Function '${t}' called with an invalid number of arguments (${i.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[i.length].apply(this,i)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n;}},ae=(r,e,t)=>{f.hasOwnProperty(r)?((t===void 0||f[r].overloadTable!==void 0&&f[r].overloadTable[t]!==void 0)&&P(`Cannot register public name '${r}' twice`),Be(f,r,r),f.hasOwnProperty(t)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),f[r].overloadTable[t]=e):(f[r]=e,t!==void 0&&(f[r].numArguments=t));},tn=48,nn=57,an=r=>{if(r===void 0)return "_unknown";r=r.replace(/[^a-zA-Z0-9_]/g,"$");var e=r.charCodeAt(0);return e>=tn&&e<=nn?`_${r}`:r};function on(r,e,t,n,i,o,s,l){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=s,this.downcast=l,this.pureVirtualFunctions=[];}var oe=(r,e,t)=>{for(;e!==t;)e.upcast||P(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function sn(r,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=oe(e.$$.ptr,t,this.registeredClass);return n}function ln(r,e){var t;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),r!==null&&r.push(this.rawDestructor,t),t):0;(!e||!e.$$)&&P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=oe(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else {var i=e.clone();t=this.rawShare(t,I.toHandle(()=>i.delete())),r!==null&&r.push(this.rawDestructor,t);}break;default:P("Unsupporting sharing policy");}return t}function un(r,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${de(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=oe(e.$$.ptr,t,this.registeredClass);return n}var fn=()=>{Object.assign(xr.prototype,{getPointee(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r},destructor(r){this.rawDestructor?.(r);},argPackAdvance:Y,readValueFromPointer:hr,fromWireType:rn});};function xr(r,e,t,n,i,o,s,l,u,c,v){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=l,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=v,!i&&e.baseClass===void 0?n?(this.toWireType=sn,this.destructorFunction=null):(this.toWireType=un,this.destructorFunction=null):this.toWireType=ln;}var Ve=(r,e,t)=>{f.hasOwnProperty(r)||Mr("Replacing nonexistent public symbol"),f[r].overloadTable!==void 0&&t!==void 0?f[r].overloadTable[t]=e:(f[r]=e,f[r].argCount=t);},cn=(r,e,t)=>{var n=f["dynCall_"+r];return n(e,...t)},Wr=[],Ye,M=r=>{var e=Wr[r];return e||(r>=Wr.length&&(Wr.length=r+1),Wr[r]=e=Ye.get(r)),e},dn=(r,e,t=[])=>{if(r.includes("j"))return cn(r,e,t);var n=M(e)(...t);return n},vn=(r,e)=>(...t)=>dn(r,e,t),N=(r,e)=>{r=U(r);function t(){return r.includes("j")?vn(r,e):M(e)}var n=t();return typeof n!="function"&&P(`unknown function pointer with signature ${r}: ${e}`),n},hn=(r,e)=>{var t=wr(e,function(n){this.name=e,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+`
4
+ `+i.replace(/^Error(:[^\n]*)?\n/,""));});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},qe,Xe=r=>{var e=rt(r),t=U(e);return K(e),t},Ur=(r,e)=>{var t=[],n={};function i(o){if(!n[o]&&!nr[o]){if(Rr[o]){Rr[o].forEach(i);return}t.push(o),n[o]=true;}}throw e.forEach(i),new qe(`${r}: `+t.map(Xe).join([", "]))},pn=(r,e,t,n,i,o,s,l,u,c,v,_,p)=>{v=U(v),o=N(i,o),l&&=N(s,l),c&&=N(u,c),p=N(_,p);var h=an(v);ae(h,function(){Ur(`Cannot construct ${v} due to unbound types`,[n]);}),ir([r,e,t],n?[n]:[],y=>{y=y[0];var C,S;n?(C=y.registeredClass,S=C.instancePrototype):S=Or.prototype;var k=wr(v,function(...j){if(Object.getPrototypeOf(this)!==d)throw new ur("Use 'new' to construct "+v);if(m.constructor_body===void 0)throw new ur(v+" has no accessible constructor");var ut=m.constructor_body[j.length];if(ut===void 0)throw new ur(`Tried to invoke ctor of ${v} with invalid number of parameters (${j.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return ut.apply(this,j)}),d=Object.create(S,{constructor:{value:k}});k.prototype=d;var m=new on(v,k,d,p,C,o,l,c);m.baseClass&&(m.baseClass.__derivedClasses??=[],m.baseClass.__derivedClasses.push(m));var O=new xr(v,m,true,false,false),$=new xr(v+"*",m,false,false,false),L=new xr(v+" const*",m,false,true,false);return Ne[r]={pointerType:$,constPointerType:L},Ve(h,k),[O,$,L]});},se=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(b[e+n*4>>2]);return t};function mn(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return true;return false}function le(r,e,t,n,i,o){var s=e.length;s<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=e[1]!==null&&t!==null,u=mn(e),c=e[0].name!=="void",v=s-2,_=new Array(v),p=[],h=[],y=function(...C){C.length!==v&&P(`function ${r} called with ${C.length} arguments, expected ${v}`),h.length=0;var S;p.length=l?2:1,p[0]=i,l&&(S=e[1].toWireType(h,this),p[1]=S);for(var k=0;k<v;++k)_[k]=e[k+2].toWireType(h,C[k]),p.push(_[k]);var d=n(...p);function m(O){if(u)ee(h);else for(var $=l?1:2;$<e.length;$++){var L=$===1?S:_[$-2];e[$].destructorFunction!==null&&e[$].destructorFunction(L);}if(c)return e[0].fromWireType(O)}return m(d)};return wr(r,y)}var _n=(r,e,t,n,i,o)=>{var s=se(e,t);i=N(n,i),ir([],[r],l=>{l=l[0];var u=`constructor ${l.name}`;if(l.registeredClass.constructor_body===void 0&&(l.registeredClass.constructor_body=[]),l.registeredClass.constructor_body[e-1]!==void 0)throw new ur(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return l.registeredClass.constructor_body[e-1]=()=>{Ur(`Cannot construct ${l.name} due to unbound types`,s);},ir([],s,c=>(c.splice(1,0,null),l.registeredClass.constructor_body[e-1]=le(u,c,null,i,o),[])),[]});},Ge=r=>{r=r.trim();let e=r.indexOf("(");return e!==-1?r.substr(0,e):r},yn=(r,e,t,n,i,o,s,l,u)=>{var c=se(t,n);e=U(e),e=Ge(e),o=N(i,o),ir([],[r],v=>{v=v[0];var _=`${v.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),l&&v.registeredClass.pureVirtualFunctions.push(e);function p(){Ur(`Cannot call ${_} due to unbound types`,c);}var h=v.registeredClass.instancePrototype,y=h[e];return y===void 0||y.overloadTable===void 0&&y.className!==v.name&&y.argCount===t-2?(p.argCount=t-2,p.className=v.name,h[e]=p):(Be(h,e,_),h[e].overloadTable[t-2]=p),ir([],c,C=>{var S=le(_,C,v,o,s);return h[e].overloadTable===void 0?(S.argCount=t-2,h[e]=S):h[e].overloadTable[t-2]=S,[]}),[]});},ue=[],G=[],fe=r=>{r>9&&--G[r+1]===0&&(G[r]=void 0,ue.push(r));},wn=()=>G.length/2-5-ue.length,gn=()=>{G.push(0,1,void 0,1,null,1,true,1,false,1),f.count_emval_handles=wn;},I={toValue:r=>(r||P("Cannot use deleted val. handle = "+r),G[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case true:return 6;case false:return 8;default:{let e=ue.pop()||G.length;return G[e]=r,G[e+1]=1,e}}}},En={name:"emscripten::val",fromWireType:r=>{var e=I.toValue(r);return fe(r),e},toWireType:(r,e)=>I.toHandle(e),argPackAdvance:Y,readValueFromPointer:hr,destructorFunction:null},bn=r=>V(r,En),kn=(r,e,t)=>{switch(e){case 1:return t?function(n){return this.fromWireType(W[n])}:function(n){return this.fromWireType(H[n])};case 2:return t?function(n){return this.fromWireType(or[n>>1])}:function(n){return this.fromWireType(dr[n>>1])};case 4:return t?function(n){return this.fromWireType(g[n>>2])}:function(n){return this.fromWireType(b[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},$n=(r,e,t,n)=>{e=U(e);function i(){}i.values={},V(r,{name:e,constructor:i,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:Y,readValueFromPointer:kn(e,t,n),destructorFunction:null}),ae(e,i);},ce=(r,e)=>{var t=nr[r];return t===void 0&&P(`${e} has unknown type ${Xe(r)}`),t},Pn=(r,e,t)=>{var n=ce(r,"enum");e=U(e);var i=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:wr(`${n.name}_${e}`,function(){})}});i.values[t]=o,i[e]=o;},de=r=>{if(r===null)return "null";var e=typeof r;return e==="object"||e==="array"||e==="function"?r.toString():""+r},Cn=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType($e[t>>2])};case 8:return function(t){return this.fromWireType(Pe[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Tn=(r,e,t)=>{e=U(e),V(r,{name:e,fromWireType:n=>n,toWireType:(n,i)=>i,argPackAdvance:Y,readValueFromPointer:Cn(e,t),destructorFunction:null});},Fn=(r,e,t,n,i,o,s)=>{var l=se(e,t);r=U(r),r=Ge(r),i=N(n,i),ae(r,function(){Ur(`Cannot call ${r} due to unbound types`,l);},e-1),ir([],l,u=>{var c=[u[0],null].concat(u.slice(1));return Ve(r,le(r,c,null,i,o),e-1),[]});},Sn=(r,e,t)=>{switch(e){case 1:return t?n=>W[n]:n=>H[n];case 2:return t?n=>or[n>>1]:n=>dr[n>>1];case 4:return t?n=>g[n>>2]:n=>b[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Dn=(r,e,t,n,i)=>{e=U(e);var o=v=>v;if(n===0){var s=32-8*t;o=v=>v<<s>>>s;}var l=e.includes("unsigned"),u=(v,_)=>{},c;l?c=function(v,_){return u(_,this.name),_>>>0}:c=function(v,_){return u(_,this.name),_},V(r,{name:e,fromWireType:o,toWireType:c,argPackAdvance:Y,readValueFromPointer:Sn(e,t,n!==0),destructorFunction:null});},An=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[e];function o(s){var l=b[s>>2],u=b[s+4>>2];return new i(W.buffer,u,l)}t=U(t),V(r,{name:t,fromWireType:o,argPackAdvance:Y,readValueFromPointer:o},{ignoreDuplicateRegistrations:true});},Rn=(r,e,t)=>Zr(r,H,e,t),Mn=(r,e)=>{e=U(e);var t=e==="std::string";V(r,{name:e,fromWireType(n){var i=b[n>>2],o=n+4,s;if(t)for(var l=o,u=0;u<=i;++u){var c=o+u;if(u==i||H[c]==0){var v=c-l,_=tr(l,v);s===void 0?s=_:(s+="\0",s+=_),l=c+1;}}else {for(var p=new Array(i),u=0;u<i;++u)p[u]=String.fromCharCode(H[o+u]);s=p.join("");}return K(n),s},toWireType(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var o,s=typeof i=="string";s||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array||P("Cannot pass non-string to std::string"),t&&s?o=Qr(i):o=i.length;var l=pe(4+o+1),u=l+4;if(b[l>>2]=o,t&&s)Rn(i,u,o+1);else if(s)for(var c=0;c<o;++c){var v=i.charCodeAt(c);v>255&&(K(u),P("String has UTF-16 code units that do not fit in 8 bits")),H[u+c]=v;}else for(var c=0;c<o;++c)H[u+c]=i[c];return n!==null&&n.push(K,l),l},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction(n){K(n);}});},Ke=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,jn=(r,e)=>{for(var t=r,n=t>>1,i=n+e/2;!(n>=i)&&dr[n];)++n;if(t=n<<1,t-r>32&&Ke)return Ke.decode(H.subarray(r,t));for(var o="",s=0;!(s>=e/2);++s){var l=or[r+s*2>>1];if(l==0)break;o+=String.fromCharCode(l);}return o},On=(r,e,t)=>{if(t??=2147483647,t<2)return 0;t-=2;for(var n=e,i=t<r.length*2?t/2:r.length,o=0;o<i;++o){var s=r.charCodeAt(o);or[e>>1]=s,e+=2;}return or[e>>1]=0,e-n},xn=r=>r.length*2,Wn=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var i=g[r+t*4>>2];if(i==0)break;if(++t,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023);}else n+=String.fromCharCode(i);}return n},Un=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,i=n+t-4,o=0;o<r.length;++o){var s=r.charCodeAt(o);if(s>=55296&&s<=57343){var l=r.charCodeAt(++o);s=65536+((s&1023)<<10)|l&1023;}if(g[e>>2]=s,e+=4,e+4>i)break}return g[e>>2]=0,e-n},Hn=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4;}return e},In=(r,e,t)=>{t=U(t);var n,i,o,s;e===2?(n=jn,i=On,s=xn,o=l=>dr[l>>1]):e===4&&(n=Wn,i=Un,s=Hn,o=l=>b[l>>2]),V(r,{name:t,fromWireType:l=>{for(var u=b[l>>2],c,v=l+4,_=0;_<=u;++_){var p=l+4+_*e;if(_==u||o(p)==0){var h=p-v,y=n(v,h);c===void 0?c=y:(c+="\0",c+=y),v=p+e;}}return K(l),c},toWireType:(l,u)=>{typeof u!="string"&&P(`Cannot pass non-string to C++ string type ${t}`);var c=s(u),v=pe(4+c+e);return b[v>>2]=c/e,i(u,v+4,c+e),l!==null&&l.push(K,v),v},argPackAdvance:Y,readValueFromPointer:hr,destructorFunction(l){K(l);}});},Ln=(r,e,t,n,i,o)=>{Ar[r]={name:U(e),rawConstructor:N(t,n),rawDestructor:N(i,o),fields:[]};},zn=(r,e,t,n,i,o,s,l,u,c)=>{Ar[r].fields.push({fieldName:U(e),getterReturnType:t,getter:N(n,i),getterContext:o,setterArgumentType:s,setter:N(l,u),setterContext:c});},Nn=(r,e)=>{e=U(e),V(r,{isVoid:true,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}});},Hr=[],Bn=(r,e,t,n)=>(r=Hr[r],e=I.toValue(e),r(null,e,t,n)),Vn={},ve=r=>{var e=Vn[r];return e===void 0?U(r):e},Yn=(r,e,t,n,i)=>(r=Hr[r],e=I.toValue(e),t=ve(t),r(e,e[t],n,i)),Je=()=>{if(typeof globalThis=="object")return globalThis;function r(e){e.$$$embind_global$$$=e;var t=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&r(global)?$$$embind_global$$$=global:typeof self=="object"&&r(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},qn=r=>r===0?I.toHandle(Je()):(r=ve(r),I.toHandle(Je()[r])),Xn=r=>{var e=Hr.length;return Hr.push(r),e},Gn=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=ce(b[e+n*4>>2],"parameter "+n);return t},Kn=Reflect.construct,Jn=(r,e,t)=>{var n=[],i=r.toWireType(n,t);return n.length&&(b[e>>2]=I.toHandle(n)),i},Qn=(r,e,t)=>{var n=Gn(r,e),i=n.shift();r--;var o=new Array(r),s=(u,c,v,_)=>{for(var p=0,h=0;h<r;++h)o[h]=n[h].readValueFromPointer(_+p),p+=n[h].argPackAdvance;var y=t===1?Kn(c,o):c.apply(u,o);return Jn(i,v,y)},l=`methodCaller<(${n.map(u=>u.name).join(", ")}) => ${i.name}>`;return Xn(wr(l,s))},Zn=r=>{r>9&&(G[r+1]+=1);},ri=()=>I.toHandle([]),ei=r=>I.toHandle(ve(r)),ti=()=>I.toHandle({}),ni=r=>{var e=I.toValue(r);ee(e),fe(r);},ii=(r,e,t)=>{r=I.toValue(r),e=I.toValue(e),t=I.toValue(t),r[e]=t;},ai=(r,e)=>{r=ce(r,"_emval_take_value");var t=r.readValueFromPointer(e);return I.toHandle(t)},oi=()=>{rr("");},si=(r,e,t)=>H.copyWithin(r,e,e+t),li=()=>2147483648,ui=r=>{var e=Cr.buffer,t=(r-e.byteLength+65535)/65536;try{return Cr.grow(t),Ce(),1}catch{}},fi=r=>{var e=H.length;r>>>=0;var t=li();if(r>t)return false;for(var n=(u,c)=>u+(c-u%c)%c,i=1;i<=4;i*=2){var o=e*(1+.2/i);o=Math.min(o,r+100663296);var s=Math.min(t,n(Math.max(r,o),65536)),l=ui(s);if(l)return true}return false},he={},ci=()=>zr||"./this.program",gr=()=>{if(!gr.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ci()};for(var t in he)he[t]===void 0?delete e[t]:e[t]=he[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);gr.strings=n;}return gr.strings},di=(r,e)=>{for(var t=0;t<r.length;++t)W[e++]=r.charCodeAt(t);W[e]=0;},vi=(r,e)=>{var t=0;return gr().forEach((n,i)=>{var o=e+t;b[r+i*4>>2]=o,di(n,o),t+=n.length+1;}),0},hi=(r,e)=>{var t=gr();b[r>>2]=t.length;var n=0;return t.forEach(i=>n+=i.length+1),b[e>>2]=n,0};function pi(r){try{var e=B.getStreamFromFD(r);return a.close(e),0}catch(t){if(typeof a>"u"||t.name!=="ErrnoError")throw t;return t.errno}}var mi=(r,e,t,n)=>{for(var i=0,o=0;o<t;o++){var s=b[e>>2],l=b[e+4>>2];e+=8;var u=a.read(r,W,s,l,n);if(u<0)return -1;if(i+=u,u<l)break;}return i};function _i(r,e,t,n){try{var i=B.getStreamFromFD(r),o=mi(i,e,t);return b[n>>2]=o,0}catch(s){if(typeof a>"u"||s.name!=="ErrnoError")throw s;return s.errno}}var yi=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+e*4294967296:NaN;function wi(r,e,t,n,i){var o=yi(e,t);try{if(isNaN(o))return 61;var s=B.getStreamFromFD(r);return a.llseek(s,o,n),x=[s.position>>>0,(E=s.position,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],g[i>>2]=x[0],g[i+4>>2]=x[1],s.getdents&&o===0&&n===0&&(s.getdents=null),0}catch(l){if(typeof a>"u"||l.name!=="ErrnoError")throw l;return l.errno}}var gi=(r,e,t,n)=>{for(var i=0,o=0;o<t;o++){var s=b[e>>2],l=b[e+4>>2];e+=8;var u=a.write(r,W,s,l,n);if(u<0)return -1;i+=u;}return i};function Ei(r,e,t,n){try{var i=B.getStreamFromFD(r),o=gi(i,e,t);return b[n>>2]=o,0}catch(s){if(typeof a>"u"||s.name!=="ErrnoError")throw s;return s.errno}}var Ir=r=>r%4===0&&(r%100!==0||r%400===0),bi=(r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],ki=(r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=Ir(t.getFullYear()),i=t.getMonth(),o=(n?Qe:Ze)[i];if(e>o-t.getDate())e-=o-t.getDate()+1,t.setDate(1),i<11?t.setMonth(i+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+e),t}return t},$i=(r,e)=>{W.set(r,e);},Pi=(r,e,t,n)=>{var i=b[n+40>>2],o={tm_sec:g[n>>2],tm_min:g[n+4>>2],tm_hour:g[n+8>>2],tm_mday:g[n+12>>2],tm_mon:g[n+16>>2],tm_year:g[n+20>>2],tm_wday:g[n+24>>2],tm_yday:g[n+28>>2],tm_isdst:g[n+32>>2],tm_gmtoff:g[n+36>>2],tm_zone:i?tr(i):""},s=tr(t),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in l)s=s.replace(new RegExp(u,"g"),l[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function _(d,m,O){for(var $=typeof d=="number"?d.toString():d||"";$.length<m;)$=O[0]+$;return $}function p(d,m){return _(d,m,"0")}function h(d,m){function O(L){return L<0?-1:L>0?1:0}var $;return ($=O(d.getFullYear()-m.getFullYear()))===0&&($=O(d.getMonth()-m.getMonth()))===0&&($=O(d.getDate()-m.getDate())),$}function y(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function C(d){var m=ki(new Date(d.tm_year+1900,0,1),d.tm_yday),O=new Date(m.getFullYear(),0,4),$=new Date(m.getFullYear()+1,0,4),L=y(O),j=y($);return h(L,m)<=0?h(j,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var S={"%a":d=>c[d.tm_wday].substring(0,3),"%A":d=>c[d.tm_wday],"%b":d=>v[d.tm_mon].substring(0,3),"%B":d=>v[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return p(m/100|0,2)},"%d":d=>p(d.tm_mday,2),"%e":d=>_(d.tm_mday,2," "),"%g":d=>C(d).toString().substring(2),"%G":C,"%H":d=>p(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),p(m,2)},"%j":d=>p(d.tm_mday+bi(Ir(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>p(d.tm_mon+1,2),"%M":d=>p(d.tm_min,2),"%n":()=>`
5
+ `,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>p(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return p(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var $=(d.tm_wday+371-d.tm_yday)%7;$!=4&&($!=3||!Ir(d.tm_year))&&(m=1);}}else {m=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Ir(d.tm_year%400-1))&&m++;}return p(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return p(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,O=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(O?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var u in S)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),S[u](o)));s=s.replace(/\0\0/g,"%");var k=Dr(s,false);return k.length>e?0:($i(k,r),k.length-1)},Ci=(r,e,t,n,i)=>Pi(r,e,t,n);a.createPreloadedFile=Ut,a.staticInit(),Ue=f.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError";}},Nt(),ur=f.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError";}},en(),Jt(),fn(),qe=f.UnboundTypeError=hn(Error,"UnboundTypeError"),gn();var Ti={a:kt,s:$t,v:Pt,b:Tt,h:Ft,W:St,w:Dt,ha:At,f:Ct,ja:It,sa:Lt,ea:zt,qa:Vt,G:pn,aa:_n,J:yn,pa:bn,z:$n,d:Pn,Z:Tn,m:Fn,y:Dn,r:An,Y:Mn,M:In,ta:Ln,O:zn,ra:Nn,R:Bn,P:Yn,l:fe,ua:qn,D:Qn,Q:Zn,N:ri,t:ei,E:ti,_:ni,u:ii,o:ai,K:oi,oa:si,ia:fi,ma:vi,na:hi,ka:pi,la:_i,da:wi,X:Ei,S:ta,$:Bi,T:ea,q:zi,c:Xi,g:Li,p:Ni,k:qi,V:Zi,B:Ji,A:Qi,U:ra,I:ia,ca:la,ba:ua,j:Vi,i:Ui,e:Ki,n:Gi,F:Ii,L:Hi,va:Yi,x:na,C:aa,H:oa,fa:sa,ga:Ci},T=bt(),pe=f._malloc=r=>(pe=f._malloc=T.ya)(r),K=f._free=r=>(K=f._free=T.Aa)(r),rt=r=>(rt=T.Ba)(r),F=(r,e)=>(F=T.Ca)(r,e),Er=r=>(Er=T.Da)(r),A=()=>(A=T.Ea)(),R=r=>(R=T.Fa)(r),et=r=>(et=T.Ga)(r),tt=r=>(tt=T.Ha)(r),nt=(r,e,t)=>(nt=T.Ia)(r,e,t),it=r=>(it=T.Ja)(r),at=f.dynCall_vij=(r,e,t,n)=>(at=f.dynCall_vij=T.Ka)(r,e,t,n);f.dynCall_ji=(r,e)=>(f.dynCall_ji=T.La)(r,e);f.dynCall_iij=(r,e,t,n)=>(f.dynCall_iij=T.Ma)(r,e,t,n);f.dynCall_jijj=(r,e,t,n,i,o)=>(f.dynCall_jijj=T.Na)(r,e,t,n,i,o);f.dynCall_vijj=(r,e,t,n,i,o)=>(f.dynCall_vijj=T.Oa)(r,e,t,n,i,o);f.dynCall_jiji=(r,e,t,n,i)=>(f.dynCall_jiji=T.Pa)(r,e,t,n,i);var ot=f.dynCall_iiiiij=(r,e,t,n,i,o,s)=>(ot=f.dynCall_iiiiij=T.Qa)(r,e,t,n,i,o,s);f.dynCall_viijii=(r,e,t,n,i,o,s)=>(f.dynCall_viijii=T.Ra)(r,e,t,n,i,o,s);var st=f.dynCall_jiiii=(r,e,t,n,i)=>(st=f.dynCall_jiiii=T.Sa)(r,e,t,n,i);f.dynCall_iiiiijj=(r,e,t,n,i,o,s,l,u)=>(f.dynCall_iiiiijj=T.Ta)(r,e,t,n,i,o,s,l,u);f.dynCall_iiiiiijj=(r,e,t,n,i,o,s,l,u,c)=>(f.dynCall_iiiiiijj=T.Ua)(r,e,t,n,i,o,s,l,u,c);function Ui(r,e){var t=A();try{M(r)(e);}catch(n){if(R(t),n!==n+0)throw n;F(1,0);}}function Hi(r,e,t,n,i,o){var s=A();try{M(r)(e,t,n,i,o);}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function Ii(r,e,t,n,i){var o=A();try{M(r)(e,t,n,i);}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Li(r,e,t){var n=A();try{return M(r)(e,t)}catch(i){if(R(n),i!==i+0)throw i;F(1,0);}}function zi(r){var e=A();try{return M(r)()}catch(t){if(R(e),t!==t+0)throw t;F(1,0);}}function Ni(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function Bi(r,e,t,n,i){var o=A();try{return M(r)(e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Vi(r){var e=A();try{M(r)();}catch(t){if(R(e),t!==t+0)throw t;F(1,0);}}function Yi(r,e,t,n,i,o,s){var l=A();try{M(r)(e,t,n,i,o,s);}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function qi(r,e,t,n,i){var o=A();try{return M(r)(e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}function Xi(r,e){var t=A();try{return M(r)(e)}catch(n){if(R(t),n!==n+0)throw n;F(1,0);}}function Gi(r,e,t,n){var i=A();try{M(r)(e,t,n);}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function Ki(r,e,t){var n=A();try{M(r)(e,t);}catch(i){if(R(n),i!==i+0)throw i;F(1,0);}}function Ji(r,e,t,n,i,o){var s=A();try{return M(r)(e,t,n,i,o)}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function Qi(r,e,t,n,i,o,s){var l=A();try{return M(r)(e,t,n,i,o,s)}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function Zi(r,e,t,n,i,o){var s=A();try{return M(r)(e,t,n,i,o)}catch(l){if(R(s),l!==l+0)throw l;F(1,0);}}function ra(r,e,t,n,i,o,s,l){var u=A();try{return M(r)(e,t,n,i,o,s,l)}catch(c){if(R(u),c!==c+0)throw c;F(1,0);}}function ea(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function ta(r,e,t,n){var i=A();try{return M(r)(e,t,n)}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function na(r,e,t,n,i,o,s,l){var u=A();try{M(r)(e,t,n,i,o,s,l);}catch(c){if(R(u),c!==c+0)throw c;F(1,0);}}function ia(r,e,t,n,i,o,s,l,u,c,v,_){var p=A();try{return M(r)(e,t,n,i,o,s,l,u,c,v,_)}catch(h){if(R(p),h!==h+0)throw h;F(1,0);}}function aa(r,e,t,n,i,o,s,l,u,c,v){var _=A();try{M(r)(e,t,n,i,o,s,l,u,c,v);}catch(p){if(R(_),p!==p+0)throw p;F(1,0);}}function oa(r,e,t,n,i,o,s,l,u,c,v,_,p,h,y,C){var S=A();try{M(r)(e,t,n,i,o,s,l,u,c,v,_,p,h,y,C);}catch(k){if(R(S),k!==k+0)throw k;F(1,0);}}function sa(r,e,t,n){var i=A();try{at(r,e,t,n);}catch(o){if(R(i),o!==o+0)throw o;F(1,0);}}function la(r,e,t,n,i,o,s){var l=A();try{return ot(r,e,t,n,i,o,s)}catch(u){if(R(l),u!==u+0)throw u;F(1,0);}}function ua(r,e,t,n,i){var o=A();try{return st(r,e,t,n,i)}catch(s){if(R(o),s!==s+0)throw s;F(1,0);}}var Lr;vr=function r(){Lr||lt(),Lr||(vr=r);};function lt(){if(Z>0||(vt(),Z>0))return;function r(){Lr||(Lr=true,f.calledRun=true,!ke&&(ht(),ye(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),pt()));}f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("");},1),r();},1)):r();}if(f.preInit)for(typeof f.preInit=="function"&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.pop()();return lt(),_e.ready})})(),pa=fa;export{pa as default};
Binary file
Binary file
Binary file