File: //var/packages/UniversalViewer/target/dist/worker-bundle.CG5UXGHl.js
!function(){"use strict";const e={32768:"FILE",16384:"DIR",40960:"SYMBOLIC_LINK",49152:"SOCKET",8192:"CHARACTER_DEVICE",24576:"BLOCK_DEVICE",4096:"NAMED_PIPE"};class r{constructor(e){this._wasmModule=e,this._runCode=e.runCode,this._file=null,this._passphrase=null}open(e){null!==this._file&&(console.warn("Closing previous file"),this.close());const{promise:r,resolve:t,reject:n}=this._promiseHandles();this._file=e;const o=new FileReader;return o.onload=()=>this._loadFile(o.result,t,n),o.readAsArrayBuffer(e),r}close(){this._runCode.closeArchive(this._archive),this._wasmModule._free(this._filePtr),this._file=null,this._filePtr=null,this._archive=null}hasEncryptedData(){this._archive=this._runCode.openArchive(this._filePtr,this._fileLength,this._passphrase),this._runCode.getNextEntry(this._archive);const e=this._runCode.hasEncryptedEntries(this._archive);return 0!==e&&(e>0||null)}setPassphrase(e){this._passphrase=e}*entries(r=!1,t=null){let n,o;this._archive=this._runCode.openArchive(this._filePtr,this._fileLength,this._passphrase);const a=this._file.name.toLowerCase();for([".gz",".xz",".bz2"].some((function(e){if(a.endsWith(e)&&!a.endsWith(".tar"+e))return o=a.substring(0,a.length-e.length),!0}));n=this._runCode.getNextEntry(this._archive),0!==n;){const a={size:this._runCode.getFileSize(n,this._filePtr,this._fileLength,this._passphrase),path:this._runCode.getEntryName(n),type:e[this._runCode.getEntryType(n)],ref:n};o&&"data"===a.path&&(a.path=o);const i=this._runCode.getFileRawFileNameSize(n);if(0<i){const e=this._runCode.getFileRawFileName(n,i);e>=0&&(a.rawPath=this._wasmModule.HEAPU8.slice(e,e+i),this._wasmModule._free(e))}if("FILE"===a.type){let e=a.path.split("/");a.fileName=e[e.length-1]}if(r&&t!==a.path)this._runCode.skipEntry(this._archive);else{const e=this._runCode.getFileData(this._archive,a.size);if(e<0)throw new Error(this._runCode.getError(this._archive));a.fileData=this._wasmModule.HEAP8.slice(e,e+a.size),this._wasmModule._free(e)}yield a}}_loadFile(e,r,t){try{const t=new Uint8Array(e);this._fileLength=t.length,this._filePtr=this._runCode.malloc(this._fileLength),this._wasmModule.HEAP8.set(t,this._filePtr),r()}catch(e){t(e)}}_promiseHandles(){let e=null,r=null;return{promise:new Promise(((t,n)=>{e=t,r=n})),resolve:e,reject:r}}collectFileNames(e){this._archive=this._runCode.openArchive(this._filePtr,this._fileLength,this._passphrase);const r=this._runCode.collectFileNames(this._archive,e);if(r<0)return;const t=this._wasmModule.HEAPU8.slice(r,r+e);return this._wasmModule._free(r),t}}var t,n=(t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var r,n,o=e;o.ready=new Promise(((e,t)=>{r=e,n=t})),["_get_version","_archive_open","_get_next_entry","_get_filedata","_get_filesize","_get_file_raw_filename_size","_get_file_raw_filename","_collect_filenames","_archive_close","_archive_entry_filetype","_archive_entry_pathname","_archive_entry_pathname_utf8","_archive_entry_size","_archive_read_data_skip","_archive_error_string","_archive_entry_is_encrypted","_archive_read_has_encrypted_entries","_archive_read_add_passphrase","_free","_malloc","_memory","___indirect_function_table","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(o.ready,e)||Object.defineProperty(o.ready,e,{get:()=>G("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>G("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));var a=Object.assign({},o),i="./this.program",s=(e,r)=>{throw r},l="object"==typeof window,d="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,u=!l&&!c&&!d;if(o.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var f,h,m,p="";if(u){if("object"==typeof process&&"function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(f=read),m=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let r=read(e,"binary");return A("object"==typeof r),r},h=(e,r,t)=>{setTimeout((()=>r(m(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():G()),"undefined"!=typeof scriptArgs&&scriptArgs,"function"==typeof quit&&(s=(e,r)=>{throw setTimeout((()=>{if(!(r instanceof ne)){let e=r;r&&"object"==typeof r&&r.stack&&(e=[r,r.stack]),v(`exiting due to exception: ${e}`)}quit(e)})),r}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!l&&!d)throw new Error("environment detection error");if(d?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),t&&(p=t),p=0!==p.indexOf("blob:")?p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");f=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},d&&(m=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),h=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)}}var _,E,g,y=o.print||console.log.bind(console),v=o.printErr||console.error.bind(console);Object.assign(o,a),a=null,_="fetchSettings",Object.getOwnPropertyDescriptor(o,_)&&G(`\`Module.${_}\` was supplied but \`${_}\` not included in INCOMING_MODULE_JS_API`),o.arguments&&o.arguments,Q("arguments","arguments_"),o.thisProgram&&(i=o.thisProgram),Q("thisProgram","thisProgram"),o.quit&&(s=o.quit),Q("quit","quit_"),A(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),A(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),A(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),A(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),A(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),A(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),A(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),A(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),A(void 0===o.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Q("asm","wasmExports"),Q("read","read_"),Q("readAsync","readAsync"),Q("readBinary","readBinary"),Q("setWindowTitle","setWindowTitle"),A(!c,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),A(!u,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),o.wasmBinary&&(E=o.wasmBinary),Q("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&G("no native wasm support detected");var w,b,S,k,T,F=!1;function A(e,r){e||G("Assertion failed"+(r?": "+r:""))}function M(){var e=g.buffer;o.HEAP8=w=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=b=new Uint8Array(e),o.HEAPU16=new Uint16Array(e),o.HEAP32=k=new Int32Array(e),o.HEAPU32=T=new Uint32Array(e),o.HEAPF32=new Float32Array(e),o.HEAPF64=new Float64Array(e)}function C(){if(!F){var e=rr();0==e&&(e+=4);var r=T[e>>2],t=T[e+4>>2];34821223==r&&2310721022==t||G(`Stack overflow! Stack cookie has been overwritten at ${ie(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ie(t)} ${ie(r)}`),1668509029!=T[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}A(!o.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),A("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),A(!o.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),A(!o.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),r=new Int8Array(e.buffer);if(e[0]=25459,115!==r[0]||99!==r[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var N=[],D=[],O=[],P=[],L=!1,R=!1;A(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var I=0,U=null,x=null,B={};function j(e){for(var r=e;;){if(!B[e])return e;e=r+Math.random()}}function z(e){I++,o.monitorRunDependencies?.(I),e?(A(!B[e]),B[e]=1,null===U&&"undefined"!=typeof setInterval&&(U=setInterval((()=>{if(F)return clearInterval(U),void(U=null);var e=!1;for(var r in B)e||(e=!0,v("still waiting on run dependencies:")),v(`dependency: ${r}`);e&&v("(end of list)")}),1e4))):v("warning: run dependency added without ID")}function H(e){if(I--,o.monitorRunDependencies?.(I),e?(A(B[e]),delete B[e]):v("warning: run dependency removed without ID"),0==I&&(null!==U&&(clearInterval(U),U=null),x)){var r=x;x=null,r()}}function G(e){o.onAbort?.(e),v(e="Aborted("+e+")"),F=!0;var r=new WebAssembly.RuntimeError(e);throw n(r),r}var $,Y,W,K,V=e=>e.startsWith("data:application/octet-stream;base64,"),q=e=>e.startsWith("file://");function X(e){return function(){A(L,`native function \`${e}\` called before runtime initialization`),A(!R,`native function \`${e}\` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)`);var r=Ke[e];return A(r,`exported native function \`${e}\` not found`),r.apply(null,arguments)}}function Z(e){if(e==$&&E)return new Uint8Array(E);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function J(e,r,t){return function(e){return E||!l&&!d||"function"!=typeof fetch?Promise.resolve().then((()=>Z(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>Z(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{v(`failed to asynchronously prepare wasm: ${e}`),q($)&&v(`warning: Loading from a file URI (${$}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}))}function Q(e,r,t=!0){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get(){G(`\`Module.${e}\` has been replaced by \`${r}\``+(t?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ee(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function re(e,r){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){se(`\`${e}\` is not longer defined by emscripten. ${r}`)}})}function te(e){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get(){var r=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;ee(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(r)}})}function ne(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}V($="libarchive.wasm")||(Y=$,$=o.locateFile?o.locateFile(Y,p):p+Y),re("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),re("asm","Please use wasmExports instead");var oe=e=>{for(;e.length>0;)e.shift()(o)},ae=o.noExitRuntime||!1,ie=e=>(A("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),se=e=>{se.shown||={},se.shown[e]||(se.shown[e]=1,v(e))},le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=le.isAbs(e),t="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=le.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,r)=>le.normalize(e+"/"+r)},de=e=>(de=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);G("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),ce={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=le.isAbs(n)}return(r?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ce.resolve(e).substr(1),r=ce.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},ue="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,fe=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&ue)return ue.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if(224==(240&i)?i=(15&i)<<12|s<<6|l:(240!=(248&i)&&se("Invalid UTF-8 leading byte "+ie(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(7&i)<<18|s<<12|l<<6|63&e[r++]),i<65536)a+=String.fromCharCode(i);else{var d=i-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},he=[],me=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},pe=(e,r,t,n)=>{if(A("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;s>1114111&&se("Invalid Unicode code point "+ie(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function _e(e,r,t){var n=t>0?t:me(e)+1,o=new Array(n),a=pe(e,o,0,o.length);return r&&(o.length=a),o}var Ee,ge={ttys:[],init(){},shutdown(){},register(e,r){ge.ttys[e]={input:[],output:[],ops:r},Fe.registerDevice(e,ge.stream_ops)},stream_ops:{open(e){var r=ge.ttys[e.node.rdev];if(!r)throw new Fe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Fe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Fe.ErrnoError(29)}if(void 0===s&&0===a)throw new Fe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Fe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new Fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!he.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;he=_e(e,!0)}return he.shift()})(),put_char(e,r){null===r||10===r?(y(fe(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(y(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({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:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(v(fe(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(v(fe(e.output,0)),e.output=[])}}},ye=e=>{e=((e,r)=>(A(r,"alignment argument is required"),Math.ceil(e/r)*r))(e,65536);var r=Je(65536,e);return r?((e,r)=>(b.fill(0,e,e+r),e))(r,e):0},ve={ops_table:null,mount:e=>ve.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Fe.isBlkdev(t)||Fe.isFIFO(t))throw new Fe.ErrnoError(63);ve.ops_table||={dir:{node:{getattr:ve.node_ops.getattr,setattr:ve.node_ops.setattr,lookup:ve.node_ops.lookup,mknod:ve.node_ops.mknod,rename:ve.node_ops.rename,unlink:ve.node_ops.unlink,rmdir:ve.node_ops.rmdir,readdir:ve.node_ops.readdir,symlink:ve.node_ops.symlink},stream:{llseek:ve.stream_ops.llseek}},file:{node:{getattr:ve.node_ops.getattr,setattr:ve.node_ops.setattr},stream:{llseek:ve.stream_ops.llseek,read:ve.stream_ops.read,write:ve.stream_ops.write,allocate:ve.stream_ops.allocate,mmap:ve.stream_ops.mmap,msync:ve.stream_ops.msync}},link:{node:{getattr:ve.node_ops.getattr,setattr:ve.node_ops.setattr,readlink:ve.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ve.node_ops.getattr,setattr:ve.node_ops.setattr},stream:Fe.chrdev_stream_ops}};var o=Fe.createNode(e,r,t,n);return Fe.isDir(o.mode)?(o.node_ops=ve.ops_table.dir.node,o.stream_ops=ve.ops_table.dir.stream,o.contents={}):Fe.isFile(o.mode)?(o.node_ops=ve.ops_table.file.node,o.stream_ops=ve.ops_table.file.stream,o.usedBytes=0,o.contents=null):Fe.isLink(o.mode)?(o.node_ops=ve.ops_table.link.node,o.stream_ops=ve.ops_table.link.stream):Fe.isChrdev(o.mode)&&(o.node_ops=ve.ops_table.chrdev.node,o.stream_ops=ve.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Fe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Fe.isDir(e.mode)?r.size=4096:Fe.isFile(e.mode)?r.size=e.usedBytes:Fe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ve.resizeFileStorage(e,r.size)},lookup(e,r){throw Fe.genericErrors[44]},mknod:(e,r,t,n)=>ve.createNode(e,r,t,n),rename(e,r,t){if(Fe.isDir(e.mode)){var n;try{n=Fe.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Fe.lookupNode(e,r);for(var n in t.contents)throw new Fe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){var n=ve.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Fe.isLink(e.mode))throw new Fe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(A(i>=0),i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(A(!(r instanceof ArrayBuffer)),r.buffer===w.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return A(0===o,"canOwn must imply no weird position inside the file"),i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(ve.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Fe.ErrnoError(28);return n},allocate(e,r,t){ve.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!Fe.isFile(e.node.mode))throw new Fe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==w.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ye(r)))throw new Fe.ErrnoError(48);w.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(ve.stream_ops.write(e,r,0,n,t,!1),0)}},we=o.preloadPlugins||[],be=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Se={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ke={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Te=e=>e.replace(/\b_Z[\w\d_]+/g,(function(e){var r,t=(r=e,se("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),r);return e===t?e:t+" ["+e+"]"})),Fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=ce.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new Fe.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Fe.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=Fe.lookupNode(n,t[a]),o=le.join2(o,t[a]),Fe.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;Fe.isLink(n.mode);){var l=Fe.readlink(o);if(o=ce.resolve(le.dirname(o),l),n=Fe.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Fe.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Fe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Fe.nameTable.length},hashAddNode(e){var r=Fe.hashName(e.parent.id,e.name);e.name_next=Fe.nameTable[r],Fe.nameTable[r]=e},hashRemoveNode(e){var r=Fe.hashName(e.parent.id,e.name);if(Fe.nameTable[r]===e)Fe.nameTable[r]=e.name_next;else for(var t=Fe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Fe.mayLookup(e);if(t)throw new Fe.ErrnoError(t,e);for(var n=Fe.hashName(e.id,r),o=Fe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Fe.lookup(e,r)},createNode(e,r,t,n){A("object"==typeof e);var o=new Fe.FSNode(e,r,t,n);return Fe.hashAddNode(o),o},destroyNode(e){Fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Fe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Fe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Fe.lookupNode(e,r),20}catch(e){}return Fe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Fe.lookupNode(e,r)}catch(e){return e.errno}var o=Fe.nodePermissions(e,"wx");if(o)return o;if(t){if(!Fe.isDir(n.mode))return 54;if(Fe.isRoot(n)||Fe.getPath(n)===Fe.cwd())return 10}else if(Fe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Fe.isLink(e.mode)?32:Fe.isDir(e.mode)&&("r"!==Fe.flagsToPermissionString(r)||512&r)?31:Fe.nodePermissions(e,Fe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Fe.MAX_OPEN_FDS;e++)if(!Fe.streams[e])return e;throw new Fe.ErrnoError(33)},getStreamChecked(e){var r=Fe.getStream(e);if(!r)throw new Fe.ErrnoError(8);return r},getStream:e=>Fe.streams[e],createStream:(e,r=-1)=>(Fe.FSStream||(Fe.FSStream=function(){this.shared={}},Fe.FSStream.prototype={},Object.defineProperties(Fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Fe.FSStream,e),-1==r&&(r=Fe.nextfd()),e.fd=r,Fe.streams[r]=e,e),closeStream(e){Fe.streams[e]=null},chrdev_stream_ops:{open(e){var r=Fe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new Fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Fe.devices[e]={stream_ops:r}},getDevice:e=>Fe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Fe.syncFSRequests++,Fe.syncFSRequests>1&&v(`warning: ${Fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Fe.getMounts(Fe.root.mount),n=0;function o(e){return A(Fe.syncFSRequests>0),Fe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){if("string"==typeof e)throw e;var n,o="/"===t,a=!t;if(o&&Fe.root)throw new Fe.ErrnoError(10);if(!o&&!a){var i=Fe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Fe.isMountpoint(n))throw new Fe.ErrnoError(10);if(!Fe.isDir(n.mode))throw new Fe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Fe.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=Fe.lookupPath(e,{follow_mount:!1});if(!Fe.isMountpoint(r.node))throw new Fe.ErrnoError(28);var t=r.node,n=t.mounted,o=Fe.getMounts(n);Object.keys(Fe.nameTable).forEach((e=>{for(var r=Fe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Fe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);A(-1!==a),t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Fe.lookupPath(e,{parent:!0}).node,o=le.basename(e);if(!o||"."===o||".."===o)throw new Fe.ErrnoError(28);var a=Fe.mayCreate(n,o);if(a)throw new Fe.ErrnoError(a);if(!n.node_ops.mknod)throw new Fe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Fe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Fe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Fe.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Fe.mknod(e,r,t)),symlink(e,r){if(!ce.resolve(e))throw new Fe.ErrnoError(44);var t=Fe.lookupPath(r,{parent:!0}).node;if(!t)throw new Fe.ErrnoError(44);var n=le.basename(r),o=Fe.mayCreate(t,n);if(o)throw new Fe.ErrnoError(o);if(!t.node_ops.symlink)throw new Fe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=le.dirname(e),a=le.dirname(r),i=le.basename(e),s=le.basename(r);if(t=Fe.lookupPath(e,{parent:!0}).node,n=Fe.lookupPath(r,{parent:!0}).node,!t||!n)throw new Fe.ErrnoError(44);if(t.mount!==n.mount)throw new Fe.ErrnoError(75);var l,d=Fe.lookupNode(t,i),c=ce.relative(e,a);if("."!==c.charAt(0))throw new Fe.ErrnoError(28);if("."!==(c=ce.relative(r,o)).charAt(0))throw new Fe.ErrnoError(55);try{l=Fe.lookupNode(n,s)}catch(e){}if(d!==l){var u=Fe.isDir(d.mode),f=Fe.mayDelete(t,i,u);if(f)throw new Fe.ErrnoError(f);if(f=l?Fe.mayDelete(n,s,u):Fe.mayCreate(n,s))throw new Fe.ErrnoError(f);if(!t.node_ops.rename)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(d)||l&&Fe.isMountpoint(l))throw new Fe.ErrnoError(10);if(n!==t&&(f=Fe.nodePermissions(t,"w")))throw new Fe.ErrnoError(f);Fe.hashRemoveNode(d);try{t.node_ops.rename(d,n,s)}catch(e){throw e}finally{Fe.hashAddNode(d)}}},rmdir(e){var r=Fe.lookupPath(e,{parent:!0}).node,t=le.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!0);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.rmdir)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.rmdir(r,t),Fe.destroyNode(n)},readdir(e){var r=Fe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Fe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Fe.lookupPath(e,{parent:!0}).node;if(!r)throw new Fe.ErrnoError(44);var t=le.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!1);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.unlink)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.unlink(r,t),Fe.destroyNode(n)},readlink(e){var r=Fe.lookupPath(e).node;if(!r)throw new Fe.ErrnoError(44);if(!r.node_ops.readlink)throw new Fe.ErrnoError(28);return ce.resolve(Fe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Fe.lookupPath(e,{follow:!r}).node;if(!t)throw new Fe.ErrnoError(44);if(!t.node_ops.getattr)throw new Fe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Fe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Fe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Fe.chmod(e,r,!0)},fchmod(e,r){var t=Fe.getStreamChecked(e);Fe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Fe.chown(e,r,t,!0)},fchown(e,r,t){var n=Fe.getStreamChecked(e);Fe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Fe.ErrnoError(28);var t;if(!(t="string"==typeof e?Fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);if(Fe.isDir(t.mode))throw new Fe.ErrnoError(31);if(!Fe.isFile(t.mode))throw new Fe.ErrnoError(28);var n=Fe.nodePermissions(t,"w");if(n)throw new Fe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Fe.getStreamChecked(e);if(0==(2097155&t.flags))throw new Fe.ErrnoError(28);Fe.truncate(t.node,r)},utime(e,r,t){var n=Fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Fe.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=le.normalize(e);try{n=Fe.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new Fe.ErrnoError(20)}else n=Fe.mknod(e,t,0),a=!0;if(!n)throw new Fe.ErrnoError(44);if(Fe.isChrdev(n.mode)&&(r&=-513),65536&r&&!Fe.isDir(n.mode))throw new Fe.ErrnoError(54);if(!a){var i=Fe.mayOpen(n,r);if(i)throw new Fe.ErrnoError(i)}512&r&&!a&&Fe.truncate(n,0),r&=-131713;var s=Fe.createStream({node:n,path:Fe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(Fe.readFiles||(Fe.readFiles={}),e in Fe.readFiles||(Fe.readFiles[e]=1)),s},close(e){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Fe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(A(t>=0),n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(1==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.read)throw new Fe.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(A(t>=0),n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.write)throw new Fe.ErrnoError(28);e.seekable&&1024&e.flags&&Fe.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(r<0||t<=0)throw new Fe.ErrnoError(28);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(!Fe.isFile(e.node.mode)&&!Fe.isDir(e.node.mode))throw new Fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Fe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Fe.ErrnoError(2);if(1==(2097155&e.flags))throw new Fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Fe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>(A(t>=0),e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0),munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Fe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Fe.open(e,r.flags),o=Fe.stat(e).size,a=new Uint8Array(o);return Fe.read(n,a,0,o,0),"utf8"===r.encoding?t=fe(a,0):"binary"===r.encoding&&(t=a),Fe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Fe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(me(r)+1),a=pe(r,o,0,o.length);Fe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Fe.write(n,r,0,r.byteLength,void 0,t.canOwn)}Fe.close(n)},cwd:()=>Fe.currentPath,chdir(e){var r=Fe.lookupPath(e,{follow:!0});if(null===r.node)throw new Fe.ErrnoError(44);if(!Fe.isDir(r.node.mode))throw new Fe.ErrnoError(54);var t=Fe.nodePermissions(r.node,"x");if(t)throw new Fe.ErrnoError(t);Fe.currentPath=r.path},createDefaultDirectories(){Fe.mkdir("/tmp"),Fe.mkdir("/home"),Fe.mkdir("/home/web_user")},createDefaultDevices(){Fe.mkdir("/dev"),Fe.registerDevice(Fe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Fe.mkdev("/dev/null",Fe.makedev(1,3)),ge.register(Fe.makedev(5,0),ge.default_tty_ops),ge.register(Fe.makedev(6,0),ge.default_tty1_ops),Fe.mkdev("/dev/tty",Fe.makedev(5,0)),Fe.mkdev("/dev/tty1",Fe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=de(e).byteLength),e[--r]);Fe.createDevice("/dev","random",t),Fe.createDevice("/dev","urandom",t),Fe.mkdir("/dev/shm"),Fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Fe.mkdir("/proc");var e=Fe.mkdir("/proc/self");Fe.mkdir("/proc/self/fd"),Fe.mount({mount(){var r=Fe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Fe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Fe.createDevice("/dev","stdin",o.stdin):Fe.symlink("/dev/tty","/dev/stdin"),o.stdout?Fe.createDevice("/dev","stdout",null,o.stdout):Fe.symlink("/dev/tty","/dev/stdout"),o.stderr?Fe.createDevice("/dev","stderr",null,o.stderr):Fe.symlink("/dev/tty1","/dev/stderr");var e=Fe.open("/dev/stdin",0),r=Fe.open("/dev/stdout",1),t=Fe.open("/dev/stderr",1);A(0===e.fd,`invalid handle for stdin (${e.fd})`),A(1===r.fd,`invalid handle for stdout (${r.fd})`),A(2===t.fd,`invalid handle for stderr (${t.fd})`)},ensureErrnoError(){Fe.ErrnoError||(Fe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){for(var r in this.errno=e,ke)if(ke[r]===e){this.code=r;break}},this.setErrno(e),this.message=Se[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Te(this.stack))},Fe.ErrnoError.prototype=new Error,Fe.ErrnoError.prototype.constructor=Fe.ErrnoError,[44].forEach((e=>{Fe.genericErrors[e]=new Fe.ErrnoError(e),Fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Fe.ensureErrnoError(),Fe.nameTable=new Array(4096),Fe.mount(ve,{},"/"),Fe.createDefaultDirectories(),Fe.createDefaultDevices(),Fe.createSpecialDirectories(),Fe.filesystems={MEMFS:ve}},init(e,r,t){A(!Fe.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Fe.init.initialized=!0,Fe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,Fe.createStandardStreams()},quit(){Fe.init.initialized=!1,Xe(0);for(var e=0;e<Fe.streams.length;e++){var r=Fe.streams[e];r&&Fe.close(r)}},findObject(e,r){var t=Fe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Fe.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Fe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=le.basename(e),n=Fe.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:Fe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=le.join2(e,a);try{Fe.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=le.join2("string"==typeof e?e:Fe.getPath(e),r),i=be(n,o);return Fe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:Fe.getPath(e),i=r?le.join2(e,r):e);var s=be(n,o),l=Fe.create(i,s);if(t){if("string"==typeof t){for(var d=new Array(t.length),c=0,u=t.length;c<u;++c)d[c]=t.charCodeAt(c);t=d}Fe.chmod(l,146|s);var f=Fe.open(l,577);Fe.write(f,t,0,t.length,0,a),Fe.close(f),Fe.chmod(l,s)}},createDevice(e,r,t,n){var o=le.join2("string"==typeof e?e:Fe.getPath(e),r),a=be(!!t,!!n);Fe.createDevice.major||(Fe.createDevice.major=64);var i=Fe.makedev(Fe.createDevice.major++,0);return Fe.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new Fe.ErrnoError(29)}if(void 0===l&&0===i)throw new Fe.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new Fe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),Fe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)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(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=_e(f(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Fe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):_e(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var l=Fe.createFile(e,r,s,n,o);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(A(i>=0),a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(l.stream_ops).forEach((e=>{var r=l.stream_ops[e];c[e]=function(){return Fe.forceLoadFile(l),r.apply(null,arguments)}})),c.read=(e,r,t,n,o)=>(Fe.forceLoadFile(l),u(e,r,t,n,o)),c.mmap=(e,r,t,n,o)=>{Fe.forceLoadFile(l);var a=ye(r);if(!a)throw new Fe.ErrnoError(48);return u(e,w,a,r,t),{ptr:a,allocated:!0}},l.stream_ops=c,l},absolutePath(){G("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){G("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){G("FS.createLink has been removed; use FS.symlink instead")},joinPath(){G("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){G("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){G("FS.standardizePath has been removed; use PATH.normalize instead")}},Ae=(e,r)=>(A("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?fe(b,e,r):""),Me={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(le.isAbs(r))return r;var n;if(n=-100===e?Fe.cwd():Me.getStreamFromFD(e).path,0==r.length){if(!t)throw new Fe.ErrnoError(44);return n}return le.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&le.normalize(r)!==le.normalize(Fe.getPath(e.node)))return-54;throw e}k[t>>2]=n.dev,k[t+4>>2]=n.mode,T[t+8>>2]=n.nlink,k[t+12>>2]=n.uid,k[t+16>>2]=n.gid,k[t+20>>2]=n.rdev,K=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[t+24>>2]=K[0],k[t+28>>2]=K[1],k[t+32>>2]=4096,k[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return K=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[t+40>>2]=K[0],k[t+44>>2]=K[1],T[t+48>>2]=o%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[t+56>>2]=K[0],k[t+60>>2]=K[1],T[t+64>>2]=a%1e3*1e3,K=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[t+72>>2]=K[0],k[t+76>>2]=K[1],T[t+80>>2]=i%1e3*1e3,K=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[t+88>>2]=K[0],k[t+92>>2]=K[1],0},doMsync(e,r,t,n,o){if(!Fe.isFile(r.node.mode))throw new Fe.ErrnoError(43);if(2&n)return 0;var a=b.slice(e,e+t);Fe.msync(r,a,o,t,n)},varargs:void 0,get(){A(null!=Me.varargs);var e=k[+Me.varargs>>2];return Me.varargs+=4,e},getp:()=>Me.get(),getStr:e=>Ae(e),getStreamFromFD:e=>Fe.getStreamChecked(e)},Ce=(e,r,t)=>(A("number"==typeof t,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),pe(e,b,r,t)),Ne={BUCKET_BUFFER_SIZE:8192,mount:e=>Fe.createNode(null,"/",16895,0),createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(Ne.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var r=Ne.nextname(),t=Ne.nextname(),n=Fe.createNode(Ne.root,r,4096,0),o=Fe.createNode(Ne.root,t,4096,0);n.pipe=e,o.pipe=e;var a=Fe.createStream({path:r,node:n,flags:0,seekable:!1,stream_ops:Ne.stream_ops});n.stream=a;var i=Fe.createStream({path:t,node:o,flags:1,seekable:!1,stream_ops:Ne.stream_ops});return o.stream=i,{readable_fd:a.fd,writable_fd:i.fd}},stream_ops:{poll(e){var r=e.node.pipe;if(1==(2097155&e.flags))return 260;if(r.buckets.length>0)for(var t=0;t<r.buckets.length;t++){var n=r.buckets[t];if(n.offset-n.roffset>0)return 65}return 0},ioctl:(e,r,t)=>28,fsync:e=>28,read(e,r,t,n,o){for(var a=e.node.pipe,i=0,s=0;s<a.buckets.length;s++){var l=a.buckets[s];i+=l.offset-l.roffset}A(r instanceof ArrayBuffer||ArrayBuffer.isView(r));var d=r.subarray(t,t+n);if(n<=0)return 0;if(0==i)throw new Fe.ErrnoError(6);var c=Math.min(i,n),u=c,f=0;for(s=0;s<a.buckets.length;s++){var h=a.buckets[s],m=h.offset-h.roffset;if(c<=m){var p=h.buffer.subarray(h.roffset,h.offset);c<m?(p=p.subarray(0,c),h.roffset+=c):f++,d.set(p);break}p=h.buffer.subarray(h.roffset,h.offset),d.set(p),d=d.subarray(p.byteLength),c-=p.byteLength,f++}return f&&f==a.buckets.length&&(f--,a.buckets[f].offset=0,a.buckets[f].roffset=0),a.buckets.splice(0,f),u},write(e,r,t,n,o){var a=e.node.pipe;A(r instanceof ArrayBuffer||ArrayBuffer.isView(r));var i=r.subarray(t,t+n),s=i.byteLength;if(s<=0)return 0;var l=null;0==a.buckets.length?(l={buffer:new Uint8Array(Ne.BUCKET_BUFFER_SIZE),offset:0,roffset:0},a.buckets.push(l)):l=a.buckets[a.buckets.length-1],A(l.offset<=Ne.BUCKET_BUFFER_SIZE);var d=Ne.BUCKET_BUFFER_SIZE-l.offset;if(d>=s)return l.buffer.set(i,l.offset),l.offset+=s,s;d>0&&(l.buffer.set(i.subarray(0,d),l.offset),l.offset+=d,i=i.subarray(d,i.byteLength));for(var c=i.byteLength/Ne.BUCKET_BUFFER_SIZE|0,u=i.byteLength%Ne.BUCKET_BUFFER_SIZE,f=0;f<c;f++){var h={buffer:new Uint8Array(Ne.BUCKET_BUFFER_SIZE),offset:Ne.BUCKET_BUFFER_SIZE,roffset:0};a.buckets.push(h),h.buffer.set(i.subarray(0,Ne.BUCKET_BUFFER_SIZE)),i=i.subarray(Ne.BUCKET_BUFFER_SIZE,i.byteLength)}return u>0&&(h={buffer:new Uint8Array(Ne.BUCKET_BUFFER_SIZE),offset:i.byteLength,roffset:0},a.buckets.push(h),h.buffer.set(i)),s},close(e){var r=e.node.pipe;r.refcnt--,0===r.refcnt&&(r.buckets=null)}},nextname:()=>(Ne.nextname.current||(Ne.nextname.current=0),"pipe["+Ne.nextname.current+++"]")},De=[0,31,60,91,121,152,182,213,244,274,305,335],Oe=[0,31,59,90,120,151,181,212,243,273,304,334],Pe=e=>{var r;return((r=e.getFullYear())%4!=0||r%100==0&&r%400!=0?Oe:De)[e.getMonth()]+e.getDate()-1},Le=(e,r)=>(A(e==e>>>0||e==(0|e)),A(r===(0|r)),r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN),Re=e=>{var r=me(e)+1,t=Ve(r);return t&&Ce(e,t,r),t};Ee=()=>performance.now();var Ie=e=>{var r=g.buffer,t=(e-r.byteLength+65535)/65536;try{return g.grow(t),M(),1}catch(t){v(`growMemory: Attempted to grow heap from ${r.byteLength} bytes to ${e} bytes, but got error: ${t}`)}},Ue={},xe=()=>{if(!xe.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:i||"./this.program"};for(var r in Ue)void 0===Ue[r]?delete e[r]:e[r]=Ue[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);xe.strings=t}return xe.strings},Be=()=>ae||!1,je=e=>{Be()||(o.onExit?.(e),F=!0),s(e,new ne(e))},ze=(e,r)=>{if(Be()||(A(!R),C(),Ze(),oe(O),Fe.quit(),R=!0),Be()&&!r){var t=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;n(t),v(t)}je(e)},He=(e,r,t,n,a)=>{var i={string:e=>{var r=0;return null!=e&&0!==e&&(r=(e=>{var r=me(e)+1,t=or(r);return Ce(e,t,r),t})(e)),r},array:e=>{var r,t,n=or(e.length);return t=n,A((r=e).length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),w.set(r,t),n}},s=(e=>{var r=o["_"+e];return A(r,"Cannot call unknown function "+e+", make sure it is exported"),r})(e),l=[],d=0;if(A("array"!==r,'Return type should not be "array".'),n)for(var c=0;c<n.length;c++){var u=i[t[c]];u?(0===d&&(d=tr()),l[c]=u(n[c])):l[c]=n[c]}var f=s.apply(null,l);return f=function(e){return 0!==d&&nr(d),function(e){return"string"===r?Ae(e):"boolean"===r?Boolean(e):e}(e)}(f)},Ge=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Fe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},$e=365,Ye=146;Object.defineProperties(Ge.prototype,{read:{get:function(){return(this.mode&$e)===$e},set:function(e){e?this.mode|=$e:this.mode&=-366}},write:{get:function(){return(this.mode&Ye)===Ye},set:function(e){e?this.mode|=Ye:this.mode&=-147}},isFolder:{get:function(){return Fe.isDir(this.mode)}},isDevice:{get:function(){return Fe.isChrdev(this.mode)}}}),Fe.FSNode=Ge,Fe.createPreloadedFile=(e,r,t,n,o,a,i,s,l,d)=>{var c=r?ce.resolve(le.join2(e,r)):e,u=j(`cp ${c}`);function f(t){function f(t){d?.(),s||((e,r,t,n,o,a)=>{Fe.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a?.(),H(u)}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return we.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,c,f,(()=>{i?.(),H(u)}))||f(t)}z(u),"string"==typeof t?((e,r,t,n)=>{var o=n?"":j(`al ${e}`);h(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&H(o)}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&z(o)})(t,f,i):f(t)},Fe.staticInit();var We={__syscall_dup:function(e){try{var r=Me.getStreamFromFD(e);return Fe.createStream(r).fd}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_dup3:function(e,r,t){try{var n=Me.getStreamFromFD(e);if(A(!t),n.fd===r)return-28;var o=Fe.getStream(r);return o&&Fe.close(o),Fe.createStream(n,r).fd}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fcntl64:function(e,r,t){Me.varargs=t;try{var n=Me.getStreamFromFD(e);switch(r){case 0:if((o=Me.get())<0)return-28;for(;Fe.streams[o];)o++;return Fe.createStream(n,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=Me.get();return n.flags|=o,0;case 12:return o=Me.getp(),S[o+0>>1]=2,0}return-28}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,r){try{var t=Me.getStreamFromFD(e);return Me.doStat(Fe.stat,t.path,r)}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getdents64:function(e,r,t){try{var n=Me.getStreamFromFD(e);n.getdents||=Fe.readdir(n.path);for(var o=280,a=0,i=Fe.llseek(n,0,1),s=Math.floor(i/o);s<n.getdents.length&&a+o<=t;){var l,d,c=n.getdents[s];if("."===c)l=n.node.id,d=4;else if(".."===c)l=Fe.lookupPath(n.path,{parent:!0}).node.id,d=4;else{var u=Fe.lookupNode(n.node,c);l=u.id,d=Fe.isChrdev(u.mode)?2:Fe.isDir(u.mode)?4:Fe.isLink(u.mode)?10:8}A(l),K=[l>>>0,(W=l,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+a>>2]=K[0],k[r+a+4>>2]=K[1],K=[(s+1)*o>>>0,(W=(s+1)*o,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+a+8>>2]=K[0],k[r+a+12>>2]=K[1],S[r+a+16>>1]=280,w[r+a+18>>0]=d,Ce(c,r+a+19,256),a+=o,s+=1}return Fe.llseek(n,s*o,0),a}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,r,t){Me.varargs=t;try{var n=Me.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=Me.getp();k[a>>2]=o.c_iflag||0,k[a+4>>2]=o.c_oflag||0,k[a+8>>2]=o.c_cflag||0,k[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)w[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=Me.getp();var s=k[a>>2],l=k[a+4>>2],d=k[a+8>>2],c=k[a+12>>2],u=[];for(i=0;i<32;i++)u.push(w[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:l,c_cflag:d,c_lflag:c,c_cc:u})}return 0;case 21519:return n.tty?(a=Me.getp(),k[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=Me.getp(),Fe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=Me.getp(),S[a>>1]=f[0],S[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,r){try{return e=Me.getStr(e),Me.doStat(Fe.lstat,e,r)}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,r,t,n){try{r=Me.getStr(r);var o=256&n,a=4096&n;return A(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),r=Me.calculateAt(e,r,a),Me.doStat(o?Fe.lstat:Fe.stat,r,t)}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,r,t,n){Me.varargs=n;try{r=Me.getStr(r),r=Me.calculateAt(e,r);var o=n?Me.get():0;return Fe.open(r,t,o).fd}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_pipe:function(e){try{if(0==e)throw new Fe.ErrnoError(21);var r=Ne.createPipe();return k[e>>2]=r.readable_fd,k[e+4>>2]=r.writable_fd,0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_poll:function(e,r,t){try{for(var n=0,o=0;o<r;o++){var a=e+8*o,i=k[a>>2],s=S[a+4>>1],l=32,d=Fe.getStream(i);d&&(l=Me.DEFAULT_POLLMASK,d.stream_ops.poll&&(l=d.stream_ops.poll(d,-1))),(l&=24|s)&&n++,S[a+6>>1]=l}return n}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,r){try{return e=Me.getStr(e),Me.doStat(Fe.stat,e,r)}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},_emscripten_get_now_is_monotonic:()=>1,_localtime_js:function(e,r,t){var n=Le(e,r),o=new Date(1e3*n);k[t>>2]=o.getSeconds(),k[t+4>>2]=o.getMinutes(),k[t+8>>2]=o.getHours(),k[t+12>>2]=o.getDate(),k[t+16>>2]=o.getMonth(),k[t+20>>2]=o.getFullYear()-1900,k[t+24>>2]=o.getDay();var a=0|Pe(o);k[t+28>>2]=a,k[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),d=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));k[t+32>>2]=d},_mktime_js:function(e){var r=(()=>{var r=new Date(k[e+20>>2]+1900,k[e+16>>2],k[e+12>>2],k[e+8>>2],k[e+4>>2],k[e>>2],0),t=k[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(t<0)k[e+32>>2]=Number(a!=i&&s==n);else if(t>0!=(s==n)){var l=Math.max(i,a),d=t>0?s:l;r.setTime(r.getTime()+6e4*(d-n))}k[e+24>>2]=r.getDay();var c=0|Pe(r);k[e+28>>2]=c,k[e>>2]=r.getSeconds(),k[e+4>>2]=r.getMinutes(),k[e+8>>2]=r.getHours(),k[e+12>>2]=r.getDate(),k[e+16>>2]=r.getMonth(),k[e+20>>2]=r.getYear();var u=r.getTime();return isNaN(u)?-1:u/1e3})();return Qe((W=r,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)),r>>>0},_munmap_js:function(e,r,t,n,o,a,i){var s=Le(a,i);try{if(isNaN(s))return 61;var l=Me.getStreamFromFD(o);2&t&&Me.doMsync(e,l,r,n,s),Fe.munmap(l)}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},_timegm_js:function(e){var r=(()=>{var r=Date.UTC(k[e+20>>2]+1900,k[e+16>>2],k[e+12>>2],k[e+8>>2],k[e+4>>2],k[e>>2],0),t=new Date(r);k[e+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;return k[e+28>>2]=o,t.getTime()/1e3})();return Qe((W=r,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)),r>>>0},_tzset_js:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),l=Math.max(i,s);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}T[e>>2]=60*l,k[r>>2]=Number(i!=s);var c=d(o),u=d(a),f=Re(c),h=Re(u);s<i?(T[t>>2]=f,T[t+4>>2]=h):(T[t>>2]=h,T[t+4>>2]=f)},abort:()=>{G("native code called abort()")},emscripten_date_now:()=>Date.now(),emscripten_err:e=>v(Ae(e)),emscripten_get_now:Ee,emscripten_memcpy_js:(e,r,t)=>b.copyWithin(e,r,r+t),emscripten_resize_heap:e=>{var r=b.length;A((e>>>=0)>r);var t=2147483648;if(e>t)return v(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(Ie(s))return!0}return v(`Failed to grow the heap from ${r} bytes to ${s} bytes, not enough memory!`),!1},environ_get:(e,r)=>{var t=0;return xe().forEach(((n,o)=>{var a=r+t;T[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)A(e.charCodeAt(t)===(255&e.charCodeAt(t))),w[r++>>0]=e.charCodeAt(t);w[r>>0]=0})(n,a),t+=n.length+1})),0},environ_sizes_get:(e,r)=>{var t=xe();T[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),T[r>>2]=n,0},exit:ze,fd_close:function(e){try{var r=Me.getStreamFromFD(e);return Fe.close(r),0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,r){try{var t=Me.getStreamFromFD(e),n=t.tty?2:Fe.isDir(t.mode)?3:Fe.isLink(t.mode)?7:4;return w[r>>0]=n,S[r+2>>1]=0,K=[0,(W=0,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+8>>2]=K[0],k[r+12>>2]=K[1],K=[0,(W=0,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+16>>2]=K[0],k[r+20>>2]=K[1],0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=T[r>>2],s=T[r+4>>2];r+=8;var l=Fe.read(e,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break;void 0!==n&&(n+=l)}return o})(Me.getStreamFromFD(e),r,t);return T[n>>2]=o,0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,r,t,n,o){var a=Le(r,t);try{if(isNaN(a))return 61;var i=Me.getStreamFromFD(e);return Fe.llseek(i,a,n),K=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[o>>2]=K[0],k[o+4>>2]=K[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=T[r>>2],s=T[r+4>>2];r+=8;var l=Fe.write(e,w,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o})(Me.getStreamFromFD(e),r,t);return T[n>>2]=o,0}catch(e){if(void 0===Fe||"ErrnoError"!==e.name)throw e;return e.errno}},proc_exit:je},Ke=function(){var e={env:We,wasi_snapshot_preview1:We};function r(e,r){var t;return Ke=e.exports,A(g=Ke.memory,"memory not found in wasm exports"),M(),t=Ke.__wasm_call_ctors,D.unshift(t),H("wasm-instantiate"),Ke}z("wasm-instantiate");var t,a,i,s,l=o;if(o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(e){v(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return(t=E,a=$,i=e,s=function(e){A(o===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),l=null,r(e.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||V(a)||"function"!=typeof fetch?J(a,i,s):fetch(a,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,i).then(s,(function(e){return v(`wasm streaming compile failed: ${e}`),v("falling back to ArrayBuffer instantiation"),J(a,i,s)}))))).catch(n),{}}();o._get_version=X("get_version"),o._archive_open=X("archive_open"),o._archive_read_add_passphrase=X("archive_read_add_passphrase"),o._archive_error_string=X("archive_error_string"),o._get_next_entry=X("get_next_entry"),o._get_filedata=X("get_filedata");var Ve=o._malloc=X("malloc");o._get_filesize=X("get_filesize"),o._archive_entry_size=X("archive_entry_size"),o._get_file_raw_filename_size=X("get_file_raw_filename_size"),o._archive_entry_pathname=X("archive_entry_pathname"),o._get_file_raw_filename=X("get_file_raw_filename"),o._collect_filenames=X("collect_filenames"),o._archive_close=X("archive_close"),o._archive_entry_filetype=X("archive_entry_filetype"),o._free=X("free"),o._archive_entry_pathname_utf8=X("archive_entry_pathname_utf8"),o._archive_entry_is_encrypted=X("archive_entry_is_encrypted"),o._archive_read_has_encrypted_entries=X("archive_read_has_encrypted_entries"),o._archive_read_data_skip=X("archive_read_data_skip");var qe,Xe=X("fflush"),Ze=X("__funcs_on_exit"),Je=X("emscripten_builtin_memalign"),Qe=X("setTempRet0"),er=()=>(er=Ke.emscripten_stack_init)(),rr=()=>(rr=Ke.emscripten_stack_get_end)(),tr=X("stackSave"),nr=X("stackRestore"),or=X("stackAlloc");function ar(){var e;er(),A(0==(3&(e=rr()))),0==e&&(e+=4),T[e>>2]=34821223,T[e+4>>2]=2310721022,T[0]=1668509029}function ir(){function e(){qe||(qe=!0,o.calledRun=!0,F||(A(!L),L=!0,C(),o.noFSInit||Fe.init.initialized||Fe.init(),Fe.ignorePermissions=!1,Ne.root=Fe.mount(Ne,{},null),oe(D),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),A(!o._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(C(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),P.unshift(e);var e;oe(P)}()))}I>0||(ar(),function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),N.unshift(e);var e;oe(N)}(),I>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e(),C()))}if(o.dynCall_jii=X("dynCall_jii"),o.dynCall_jiiji=X("dynCall_jiiji"),o.dynCall_jiij=X("dynCall_jiij"),o.dynCall_jiji=X("dynCall_jiji"),o.dynCall_iiiji=X("dynCall_iiiji"),o.dynCall_iiiij=X("dynCall_iiiij"),o.dynCall_ij=X("dynCall_ij"),o.dynCall_ji=X("dynCall_ji"),o.dynCall_viji=X("dynCall_viji"),o.dynCall_iiijii=X("dynCall_iiijii"),o.cwrap=(e,r,t,n)=>function(){return He(e,r,t,arguments)},o.intArrayFromString=_e,o.allocate=(e,r)=>{var t;return A("number"==typeof r,"allocate no longer takes a type argument"),A("number"!=typeof e,"allocate no longer takes a number as arg0"),t=1==r?or(e.length):Ve(e.length),e.subarray||e.slice||(e=new Uint8Array(e)),b.set(e,t),t},["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","writeStringToMemory","writeAsciiToMemory","setErrNo"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var r=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,t=e;t.startsWith("_")||(t="$"+e),r+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${t}')`,ee(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),se(r)}}),te(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","wasmMemory","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","ccall","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","stringToAscii","UTF16Decoder","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","ALLOC_NORMAL","ALLOC_STACK","allocateUTF8","allocateUTF8OnStack"].forEach(te),x=function e(){qe||ir(),qe||(x=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return ir(),e.ready});class o{constructor(){this.preRun=[],this.postRun=[],this.totalDependencies=0}print(...e){console.log(e)}printErr(...e){console.error(e)}initFunctions(){this.runCode={getVersion:this.cwrap("get_version","string",[]),openArchive:this.cwrap("archive_open","number",["number","number","string"]),getNextEntry:this.cwrap("get_next_entry","number",["number"]),getFileData:this.cwrap("get_filedata","number",["number","number"]),getFileSize:this.cwrap("get_filesize","number",["number","number","number","string"]),getFileRawFileNameSize:this.cwrap("get_file_raw_filename_size","number",["number"]),getFileRawFileName:this.cwrap("get_file_raw_filename","number",["number","number"]),collectFileNames:this.cwrap("collect_filenames","number",["number","number"]),skipEntry:this.cwrap("archive_read_data_skip","number",["number"]),closeArchive:this.cwrap("archive_close",null,["number"]),getEntrySize:this.cwrap("archive_entry_size","number",["number"]),getEntryName:this.cwrap("archive_entry_pathname","string",["number"]),getEntryType:this.cwrap("archive_entry_filetype","number",["number"]),getError:this.cwrap("archive_error_string","string",["number"]),entryIsEncrypted:this.cwrap("archive_entry_is_encrypted","number",["number"]),hasEncryptedEntries:this.cwrap("archive_read_has_encrypted_entries","number",["number"]),addPassphrase:this.cwrap("archive_read_add_passphrase","number",["number","string"]),string:e=>this.allocate(this.intArrayFromString(e),"i8",0),malloc:this.cwrap("malloc","number",["number"]),free:this.cwrap("free",null,["number"])}}monitorRunDependencies(){}locateFile(e){return`wasm-gen/${e}`}}let a=null,i=!1;var s;s=e=>{a=new r(e),i=!1,self.postMessage({type:"READY"})},n(new o).then((e=>{e.initFunctions(),s(e)})),self.onmessage=async({data:e})=>{if(i)return void self.postMessage({type:"BUSY"});let r=!1;i=!0;try{switch(e.type){case"HELLO":break;case"OPEN":await a.open(e.file),self.postMessage({type:"OPENED"});break;case"LIST_FILES":r=!0;case"EXTRACT_FILES":for(const e of a.entries(r))self.postMessage({type:"ENTRY",entry:e});self.postMessage({type:"END"});break;case"EXTRACT_SINGLE_FILE":for(const r of a.entries(!0,e.target))r.fileData&&self.postMessage({type:"FILE",entry:r});break;case"CHECK_ENCRYPTION":self.postMessage({type:"ENCRYPTION_STATUS",status:a.hasEncryptedData()});break;case"SET_PASSPHRASE":a.setPassphrase(e.passphrase),self.postMessage({type:"PASSPHRASE_STATUS",status:!0});break;case"COLLECT_FILENAMES":self.postMessage({type:"COLLECT_FILENAMES_STATUS",status:a.collectFileNames(e.bufsize)});break;default:throw new Error("Invalid Command")}}catch(e){self.postMessage({type:"ERROR",error:{message:e.message,name:e.name,stack:e.stack}})}finally{i=!1}}}();