IntelligentRecognition/ah-jjsp-web/.svn/pristine/c3/c3da46ff77ae0ef1d21fa09d1d1...

1 line
94 KiB
Plaintext

"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var key,Module=void 0!==Module?Module:{},moduleOverrides={};for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);Module.arguments=[],Module.thisProgram="./this.program",Module.quit=function(e,t){throw t},Module.preRun=[];var nodeFS,nodePath,ENVIRONMENT_IS_WEB=!(Module.postRun=[]),ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"===("undefined"==typeof window?"undefined":_typeof(window)),ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"===("undefined"==typeof process?"undefined":_typeof(process))&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.read=function(e,t){return nodeFS=nodeFS||require("fs"),e=(nodePath=nodePath||require("path")).normalize(e),e=nodeFS.readFileSync(e),t?e:e.toString()},Module.readBinary=function(e){e=Module.read(e,!0);return assert((e=e.buffer?e:new Uint8Array(e)).buffer),e},1<process.argv.length&&(Module.thisProgram=process.argv[1].replace(/\\/g,"/")),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof ExitStatus))throw e}),process.on("unhandledRejection",function(e,t){process.exit(1)}),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)"undefined"!=typeof read&&(Module.read=function(e){return read(e)}),Module.readBinary=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(assert("object"===_typeof(e=read(e,"binary"))),e)},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:"undefined"!=typeof arguments&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw new Error("not compiled for this environment");Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)},Module.setWindowTitle=function(e){document.title=e}}for(key in Module.print="undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null,Module.printErr="undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||Module.print,Module.print=Module.print,Module.printErr=Module.printErr,moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);var moduleOverrides=void 0,STACK_ALIGN=16;function staticAlloc(e){assert(!staticSealed);var t=STATICTOP;return STATICTOP=STATICTOP+e+15&-16,t}function dynamicAlloc(e){assert(DYNAMICTOP_PTR);var t=HEAP32[DYNAMICTOP_PTR>>2],e=t+e+15&-16;if((HEAP32[DYNAMICTOP_PTR>>2]=e,TOTAL_MEMORY<=e)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t}function alignMemory(e,t){t=t||STACK_ALIGN;e=Math.ceil(e/t)*t;return e}function getNativeTypeSize(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:var t;return"*"===e[e.length-1]?4:"i"===e[0]?(assert((t=parseInt(e.substr(1)))%8==0),t/8):0}}var asm2wasmImports={"f64-rem":function(e,t){return e%t},debugger:function(){}},jsCallStartIndex=1,functionPointers=new Array(14);function addFunction(e,t){for(var r=0;r<14;r++)if(!functionPointers[r])return functionPointers[r]=e,jsCallStartIndex+r;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}var GLOBAL_BASE=1024,ABORT=0,EXITSTATUS=0;function assert(e,t){e||abort("Assertion failed: "+t)}function setValue(e,t,r,n){switch(r="*"===(r=r||"i8").charAt(r.length-1)?"i32":r){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,1<=+Math_abs(tempDouble)?0<tempDouble?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+r)}}var ALLOC_NORMAL=0,ALLOC_STATIC=2,ALLOC_NONE=4;function allocate(e,t,r,n){var o,i,a="number"==typeof e?(o=!0,e):(o=!1,e.length),s="string"==typeof t?t:null,u=r==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][void 0===r?ALLOC_STATIC:r](Math.max(a,s?1:t.length));if(o){for(assert(0==(3&(n=u))),i=u+(-4&a);n<i;n+=4)HEAP32[n>>2]=0;for(i=u+a;n<i;)HEAP8[n++>>0]=0}else{if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,u):HEAPU8.set(new Uint8Array(e),u),u;for(var l,c,d=0;d<a;){var E,f=e[d];0===(E=s||t[d])?d++:(setValue(u+d,f,E="i64"==E?"i32":E),c!==E&&(l=getNativeTypeSize(E),c=E),d+=l)}}return u}function getMemory(e){return(staticSealed?runtimeInitialized?_malloc:dynamicAlloc:staticAlloc)(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var r,n=0,o=0;(n|=r=HEAPU8[e+o>>0],0!=r||t)&&(o++,!t||o!=t););t=t||o;var i="";if(n<128){for(var a;0<t;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,1024))),i=i?i+a:a,e+=1024,t-=1024;return i}return UTF8ToString(e)}var UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var r=t;e[r];)++r;if(16<r-t&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,r));for(var n,o,i,a,s,u="";;){if(!(a=e[t++]))return u;128&a?(s=63&e[t++],192==(224&a)?u+=String.fromCharCode((31&a)<<6|s):(i=63&e[t++],(a=224==(240&a)?(15&a)<<12|s<<6|i:(n=63&e[t++],240==(248&a)?(7&a)<<18|s<<12|i<<6|n:(o=63&e[t++],248==(252&a)?(3&a)<<24|s<<18|i<<12|n<<6|o:(1&a)<<30|s<<24|i<<18|n<<12|o<<6|63&e[t++])))<65536?u+=String.fromCharCode(a):(s=a-65536,u+=String.fromCharCode(55296|s>>10,56320|1023&s)))):u+=String.fromCharCode(a)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,r,n){if(!(0<n))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if((s=55296<=s&&s<=57343?65536+((1023&s)<<10)|1023&e.charCodeAt(++a):s)<=127){if(i<=r)break;t[r++]=s}else if(s<=2047){if(i<=r+1)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(i<=r+2)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else if(s<=2097151){if(i<=r+3)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}else if(s<=67108863){if(i<=r+4)break;t[r++]=248|s>>24,t[r++]=128|s>>18&63,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(i<=r+5)break;t[r++]=252|s>>30,t[r++]=128|s>>24&63,t[r++]=128|s>>18&63,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function stringToUTF8(e,t,r){return stringToUTF8Array(e,HEAPU8,t,r)}function lengthBytesUTF8(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);(n=55296<=n&&n<=57343?65536+((1023&n)<<10)|1023&e.charCodeAt(++r):n)<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}var UTF16Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function allocateUTF8(e){var t=lengthBytesUTF8(e)+1,r=_malloc(t);return r&&stringToUTF8Array(e,HEAP8,r,t),r}function demangle(e){return e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength,PAGE_SIZE=16384,WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216;function alignUp(e,t){return 0<e%t&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var r=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=r,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t,r;try{ArrayBuffer.transfer?r=ArrayBuffer.transfer(buffer,e):(t=HEAP8,r=new ArrayBuffer(e),new Int8Array(r).set(t))}catch(e){return!1}return!!_emscripten_replace_memory(r)&&r});try{(byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get))(new ArrayBuffer(4))}catch(e){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||67108864;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:(buffer="object"===("undefined"==typeof WebAssembly?"undefined":_typeof(WebAssembly))&&"function"==typeof WebAssembly.Memory?(Module.wasmMemory=new WebAssembly.Memory({initial:TOTAL_MEMORY/WASM_PAGE_SIZE}),Module.wasmMemory.buffer):new ArrayBuffer(TOTAL_MEMORY),Module.buffer=buffer),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;0<e.length;){var t,r=e.shift();"function"==typeof r?r():"number"==typeof(t=r.func)?void 0===r.arg?Module.dynCall_v(t):Module.dynCall_vi(t,r.arg):t(void 0===r.arg?null:r.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,r){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);r||(HEAP8[t>>0]=0)}var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_max=Math.max,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){var t;runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled&&(t=dependenciesFulfilled,dependenciesFulfilled=null,t()))}Module.preloadedImages={},Module.preloadedAudios={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(e){return String.prototype.startsWith?e.startsWith(dataURIPrefix):0===e.indexOf(dataURIPrefix)}function integrateWasmJS(){var e="libffmpeg.wast",i="libffmpeg.wasm",t="libffmpeg.temp.asm.js",a=("function"==typeof Module.locateFile&&(isDataURI(e)||(e=Module.locateFile(e)),isDataURI(i)||(i=Module.locateFile(i)),isDataURI(t)||(t=Module.locateFile(t))),{global:null,env:null,asm2wasm:asm2wasmImports,parent:Module}),s=null;function u(){try{if(Module.wasmBinary)return new Uint8Array(Module.wasmBinary);if(Module.readBinary)return Module.readBinary(i);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)"}catch(e){abort(e)}}function l(e,t){if("object"!==("undefined"==typeof WebAssembly?"undefined":_typeof(WebAssembly)))return Module.printErr("no native wasm support detected"),!1;if(!(Module.wasmMemory instanceof WebAssembly.Memory))return Module.printErr("no native wasm Memory in use"),!1;function r(e,t){var r;(s=e.exports).memory&&(e=s.memory,r=Module.buffer,e.byteLength<r.byteLength&&Module.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),r=new Int8Array(r),new Int8Array(e).set(r),updateGlobalBuffer(e),updateGlobalBufferViews()),Module.asm=s,Module.usingWasm=!0,removeRunDependency("wasm-instantiate")}if(t.memory=Module.wasmMemory,a.global={NaN:NaN,Infinity:1/0},a["global.Math"]=Math,a.env=t,addRunDependency("wasm-instantiate"),Module.instantiateWasm)try{return Module.instantiateWasm(a,r)}catch(e){return Module.printErr("Module.instantiateWasm callback failed with error: "+e),!1}function n(e){r(e.instance,e.module)}function o(e){(Module.wasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!=typeof fetch?new Promise(function(e,t){e(u())}):fetch(i,{credentials:"same-origin"}).then(function(e){if(e.ok)return e.arrayBuffer();throw"failed to load wasm binary file at '"+i+"'"}).catch(u)).then(function(e){return WebAssembly.instantiate(e,a)}).then(e).catch(function(e){Module.printErr("failed to asynchronously prepare wasm: "+e),abort(e)})}return Module.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(i)||"function"!=typeof fetch?o(n):WebAssembly.instantiateStreaming(fetch(i,{credentials:"same-origin"}),a).then(n).catch(function(e){Module.printErr("wasm streaming compile failed: "+e),Module.printErr("falling back to ArrayBuffer instantiation"),o(n)}),{}}Module.asmPreload=Module.asm;var r=Module.reallocBuffer,n=(Module.reallocBuffer=function(e){if("asmjs"===n)return r(e);var t=e,e=(t=alignUp(e,Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE),Module.buffer.byteLength);if(Module.usingWasm)try{return-1!==Module.wasmMemory.grow((t-e)/65536)?Module.buffer=Module.wasmMemory.buffer:null}catch(e){return null}},"");Module.asm=function(e,t,r){var n,o;return t.table||(void 0===(n=Module.wasmTableSize)&&(n=1024),o=Module.wasmMaxTableSize,"object"===("undefined"==typeof WebAssembly?"undefined":_typeof(WebAssembly))&&"function"==typeof WebAssembly.Table?t.table=void 0!==o?new WebAssembly.Table({initial:n,maximum:o,element:"anyfunc"}):new WebAssembly.Table({initial:n,element:"anyfunc"}):t.table=new Array(n),Module.wasmTable=t.table),t.memoryBase||(t.memoryBase=Module.STATIC_BASE),t.tableBase||(t.tableBase=0),assert(o=l(0,t),"no binaryen method succeeded."),o}}integrateWasmJS(),STATICTOP=(STATIC_BASE=GLOBAL_BASE)+1282368,__ATINIT__.push({func:function(){___emscripten_environ_constructor()}});var STATIC_BUMP=1282368,ENV=(Module.STATIC_BASE=STATIC_BASE,Module.STATIC_BUMP=STATIC_BUMP,STATICTOP+=16,{});function ___buildEnvironment(e){___buildEnvironment.called?(r=HEAP32[e>>2],t=HEAP32[r>>2]):(___buildEnvironment.called=!0,ENV.USER=ENV.LOGNAME="web_user",ENV.PATH="/",ENV.PWD="/",ENV.HOME="/home/web_user",ENV.LANG="C.UTF-8",ENV._=Module.thisProgram,t=getMemory(1024),r=getMemory(256),HEAP32[r>>2]=t,HEAP32[e>>2]=r);var t,r,n,o=[],i=0;for(n in ENV)"string"==typeof ENV[n]&&(a=n+"="+ENV[n],o.push(a),i+=a.length);if(1024<i)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var a,s=0;s<o.length;s++)writeAsciiToMemory(a=o[s],t),HEAP32[r+4*s>>2]=t,t+=a.length+1;HEAP32[r+4*o.length>>2]=0}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86},ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PATH={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;0<=n;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=(e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t?e:".")&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var e=PATH.splitPath(e),t=e[0],e=e[1];return t||e?t+(e=e&&e.substr(0,e.length-1)):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return PATH.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return PATH.normalize(e.join("/"))},join2:function(e,t){return PATH.normalize(e+"/"+t)},resolve:function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:FS.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=PATH.resolve(e).substr(1),t=PATH.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}for(var u=[],s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var i,a=0,s=0;s<n;s++){try{i=e.tty.ops.get_char(e.tty)}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===i&&0===a)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null==i)break;a++,t[r+s]=i}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var i=0;i<n;i++)try{e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(ENVIRONMENT_IS_NODE){var r=new Buffer(256),n=0,o="win32"!=process.platform,i=process.stdin.fd;if(o){var a=!1;try{i=fs.openSync("/dev/stdin","r"),a=!0}catch(e){}}try{n=fs.readSync(i,r,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;n=0}a&&fs.closeSync(i),t=0<n?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=intArrayFromString(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(Module.print(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(Module.print(UTF8ArrayToString(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(Module.printErr(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(Module.printErr(UTF8ArrayToString(e.output,0)),e.output=[])}}},MEMFS={ops_table:null,mount:function(e){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(FS.isBlkdev(r)||FS.isFIFO(r))throw new FS.ErrnoError(ERRNO_CODES.EPERM);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});r=FS.createNode(e,t,r,n);return FS.isDir(r.mode)?(r.node_ops=MEMFS.ops_table.dir.node,r.stream_ops=MEMFS.ops_table.dir.stream,r.contents={}):FS.isFile(r.mode)?(r.node_ops=MEMFS.ops_table.file.node,r.stream_ops=MEMFS.ops_table.file.stream,r.usedBytes=0,r.contents=null):FS.isLink(r.mode)?(r.node_ops=MEMFS.ops_table.link.node,r.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(r.mode)&&(r.node_ops=MEMFS.ops_table.chrdev.node,r.stream_ops=MEMFS.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r),r},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r<e.usedBytes;++r)t.push(e.contents[r]);return t}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array},expandFileStorage:function(e,t){var r;if(e.contents&&e.contents.subarray&&t>e.contents.length&&(e.contents=MEMFS.getFileDataAsRegularArray(e),e.usedBytes=e.contents.length),!e.contents||e.contents.subarray)t<=(r=e.contents?e.contents.length:0)||(t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256)),r=e.contents,e.contents=new Uint8Array(t),0<e.usedBytes&&e.contents.set(r.subarray(0,e.usedBytes),0));else for(!e.contents&&0<t&&(e.contents=[]);e.contents.length<t;)e.contents.push(0)},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);var r;if(!e.contents||e.contents.subarray)return r=e.contents,e.contents=new Uint8Array(new ArrayBuffer(t)),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t);if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length<t;)e.contents.push(0);e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=FS.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,FS.isDir(e.mode)?t.size=4096:FS.isFile(e.mode)?t.size=e.usedBytes:FS.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&MEMFS.resizeFileStorage(e,t.size)},lookup:function(e,t){throw FS.genericErrors[ERRNO_CODES.ENOENT]},mknod:function(e,t,r,n){return MEMFS.createNode(e,t,r,n)},rename:function(e,t,r){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete e.parent.contents[e.name],e.name=r,(t.contents[r]=e).parent=t},unlink:function(e,t){delete e.contents[t]},rmdir:function(e,t){for(var r in FS.lookupNode(e,t).contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);delete e.contents[t]},readdir:function(e){var t,r=[".",".."];for(t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,t,r){e=MEMFS.createNode(e,t,41471,0);return e.link=r,e},readlink:function(e){if(FS.isLink(e.mode))return e.link;throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(assert(0<=a),8<a&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n;if(0===a.usedBytes&&0===o)return a.contents=new Uint8Array(t.subarray(r,r+n)),a.usedBytes=n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(MEMFS.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){if(1===r?t+=e.position:2===r&&FS.isFile(e.node.mode)&&(t+=e.node.usedBytes),t<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return t},allocate:function(e,t,r){MEMFS.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i,a){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);var s,u,l=e.node.contents;if(2&a||l.buffer!==t&&l.buffer!==t.buffer){if((0<o||o+n<e.node.usedBytes)&&(l=l.subarray?l.subarray(o,o+n):Array.prototype.slice.call(l,o,o+n)),u=!0,!(s=_malloc(n)))throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);t.set(l,s)}else u=!1,s=l.byteOffset;return{ptr:s,allocated:u}},msync:function(e,t,r,n,o){if(FS.isFile(e.node.mode))return 2&o||MEMFS.stream_ops.write(e,t,0,n,r,!1),0;throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}}},IDBFS={dbs:{},indexedDB:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return assert(e="object"===("undefined"==typeof window?"undefined":_typeof(window))?window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB:e,"IDBFS used, but indexedDB not supported"),e}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(e){return MEMFS.mount.apply(null,arguments)},syncfs:function(t,n,o){IDBFS.getLocalSet(t,function(e,r){if(e)return o(e);IDBFS.getRemoteSet(t,function(e,t){if(e)return o(e);IDBFS.reconcile(n?t:r,n?r:t,o)})})},getDB:function(e,t){var r,n=IDBFS.dbs[e];if(n)return t(null,n);try{r=IDBFS.indexedDB().open(e,IDBFS.DB_VERSION)}catch(e){return t(e)}if(!r)return t("Unable to connect to IndexedDB");r.onupgradeneeded=function(e){var t=e.target.result,e=e.target.transaction,e=t.objectStoreNames.contains(IDBFS.DB_STORE_NAME)?e.objectStore(IDBFS.DB_STORE_NAME):t.createObjectStore(IDBFS.DB_STORE_NAME);e.indexNames.contains("timestamp")||e.createIndex("timestamp","timestamp",{unique:!1})},r.onsuccess=function(){n=r.result,IDBFS.dbs[e]=n,t(null,n)},r.onerror=function(e){t(this.error),e.preventDefault()}},getLocalSet:function(e,t){var r={};function n(e){return"."!==e&&".."!==e}function o(t){return function(e){return PATH.join2(t,e)}}for(var i=FS.readdir(e.mountpoint).filter(n).map(o(e.mountpoint));i.length;){var a,s=i.pop();try{a=FS.stat(s)}catch(e){return t(e)}FS.isDir(a.mode)&&i.push.apply(i,FS.readdir(s).filter(n).map(o(s))),r[s]={timestamp:a.mtime}}return t(null,{type:"local",entries:r})},getRemoteSet:function(e,n){var o={};IDBFS.getDB(e.mountpoint,function(e,t){if(e)return n(e);try{var r=t.transaction([IDBFS.DB_STORE_NAME],"readonly");r.onerror=function(e){n(this.error),e.preventDefault()},r.objectStore(IDBFS.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=function(e){e=e.target.result;if(!e)return n(null,{type:"remote",db:t,entries:o});o[e.primaryKey]={timestamp:e.key},e.continue()}}catch(e){return n(e)}})},loadLocalEntry:function(e,t){try{var r=FS.lookupPath(e).node,n=FS.stat(e)}catch(e){return t(e)}return FS.isDir(n.mode)?t(null,{timestamp:n.mtime,mode:n.mode}):FS.isFile(n.mode)?(r.contents=MEMFS.getFileDataAsTypedArray(r),t(null,{timestamp:n.mtime,mode:n.mode,contents:r.contents})):t(new Error("node type not supported"))},storeLocalEntry:function(e,t,r){try{if(FS.isDir(t.mode))FS.mkdir(e,t.mode);else{if(!FS.isFile(t.mode))return r(new Error("node type not supported"));FS.writeFile(e,t.contents,{canOwn:!0})}FS.chmod(e,t.mode),FS.utime(e,t.timestamp,t.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(e,t){try{FS.lookupPath(e);var r=FS.stat(e);FS.isDir(r.mode)?FS.rmdir(e):FS.isFile(r.mode)&&FS.unlink(e)}catch(e){return t(e)}t(null)},loadRemoteEntry:function(e,t,r){e=e.get(t);e.onsuccess=function(e){r(null,e.target.result)},e.onerror=function(e){r(this.error),e.preventDefault()}},storeRemoteEntry:function(e,t,r,n){e=e.put(r,t);e.onsuccess=function(){n(null)},e.onerror=function(e){n(this.error),e.preventDefault()}},removeRemoteEntry:function(e,t,r){e=e.delete(t);e.onsuccess=function(){r(null)},e.onerror=function(e){r(this.error),e.preventDefault()}},reconcile:function(n,o,t){var i=0,a=[],r=(Object.keys(n.entries).forEach(function(e){var t=n.entries[e],r=o.entries[e];(!r||t.timestamp>r.timestamp)&&(a.push(e),i++)}),[]);if(Object.keys(o.entries).forEach(function(e){o.entries[e];n.entries[e]||(r.push(e),i++)}),!i)return t(null);var s=0,e=("remote"===n.type?n:o).db.transaction([IDBFS.DB_STORE_NAME],"readwrite"),u=e.objectStore(IDBFS.DB_STORE_NAME);function l(e){return e?l.errored?void 0:(l.errored=!0,t(e)):++s>=i?t(null):void 0}e.onerror=function(e){l(this.error),e.preventDefault()},a.sort().forEach(function(r){"local"===o.type?IDBFS.loadRemoteEntry(u,r,function(e,t){if(e)return l(e);IDBFS.storeLocalEntry(r,t,l)}):IDBFS.loadLocalEntry(r,function(e,t){if(e)return l(e);IDBFS.storeRemoteEntry(u,r,t,l)})}),r.sort().reverse().forEach(function(e){"local"===o.type?IDBFS.removeLocalEntry(e,l):IDBFS.removeRemoteEntry(u,e,l)})}},NODEFS={isWindows:!1,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var e=process.binding("constants");e.fs&&(e=e.fs),NODEFS.flagsForNodeMap={1024:e.O_APPEND,64:e.O_CREAT,128:e.O_EXCL,0:e.O_RDONLY,2:e.O_RDWR,4096:e.O_SYNC,512:e.O_TRUNC,1:e.O_WRONLY}},bufferFrom:function(e){return Buffer.alloc?Buffer.from(e):new Buffer(e)},mount:function(e){return assert(ENVIRONMENT_IS_NODE),NODEFS.createNode(null,"/",NODEFS.getMode(e.opts.root),0)},createNode:function(e,t,r,n){if(!FS.isDir(r)&&!FS.isFile(r)&&!FS.isLink(r))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);e=FS.createNode(e,t,r);return e.node_ops=NODEFS.node_ops,e.stream_ops=NODEFS.stream_ops,e},getMode:function(e){var t;try{t=fs.lstatSync(e),NODEFS.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}return t.mode},realPath:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.mount.opts.root),t.reverse(),PATH.join.apply(null,t)},flagsForNode:function(e){e=-2097153&e&-2049&-32769&-524289;var t,r=0;for(t in NODEFS.flagsForNodeMap)e&t&&(r|=NODEFS.flagsForNodeMap[t],e^=t);if(e)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return r},node_ops:{getattr:function(e){var t,e=NODEFS.realPath(e);try{t=fs.lstatSync(e)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}return NODEFS.isWindows&&!t.blksize&&(t.blksize=4096),NODEFS.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:function(e,t){var r,n=NODEFS.realPath(e);try{void 0!==t.mode&&(fs.chmodSync(n,t.mode),e.mode=t.mode),void 0!==t.timestamp&&(r=new Date(t.timestamp),fs.utimesSync(n,r,r)),void 0!==t.size&&fs.truncateSync(n,t.size)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},lookup:function(e,t){var r=PATH.join2(NODEFS.realPath(e),t),r=NODEFS.getMode(r);return NODEFS.createNode(e,t,r)},mknod:function(e,t,r,n){e=NODEFS.createNode(e,t,r,n),t=NODEFS.realPath(e);try{FS.isDir(e.mode)?fs.mkdirSync(t,e.mode):fs.writeFileSync(t,"",{mode:e.mode})}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}return e},rename:function(e,t,r){e=NODEFS.realPath(e),t=PATH.join2(NODEFS.realPath(t),r);try{fs.renameSync(e,t)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},unlink:function(e,t){e=PATH.join2(NODEFS.realPath(e),t);try{fs.unlinkSync(e)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},rmdir:function(e,t){e=PATH.join2(NODEFS.realPath(e),t);try{fs.rmdirSync(e)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},readdir:function(e){e=NODEFS.realPath(e);try{return fs.readdirSync(e)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},symlink:function(e,t,r){e=PATH.join2(NODEFS.realPath(e),t);try{fs.symlinkSync(r,e)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},readlink:function(e){var t=NODEFS.realPath(e);try{return t=fs.readlinkSync(t),NODEJS_PATH.relative(NODEJS_PATH.resolve(e.mount.opts.root),t)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}}},stream_ops:{open:function(e){var t=NODEFS.realPath(e.node);try{FS.isFile(e.node.mode)&&(e.nfd=fs.openSync(t,NODEFS.flagsForNode(e.flags)))}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},close:function(e){try{FS.isFile(e.node.mode)&&e.nfd&&fs.closeSync(e.nfd)}catch(e){if(e.code)throw new FS.ErrnoError(ERRNO_CODES[e.code]);throw e}},read:function(e,t,r,n,o){if(0===n)return 0;try{return fs.readSync(e.nfd,NODEFS.bufferFrom(t.buffer),r,n,o)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}},write:function(e,t,r,n,o){try{return fs.writeSync(e.nfd,NODEFS.bufferFrom(t.buffer),r,n,o)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}},llseek:function(e,t,r){if(1===r)t+=e.position;else if(2===r&&FS.isFile(e.node.mode))try{t+=fs.fstatSync(e.nfd).size}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(t<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return t}}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var i=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),a={};function n(e){for(var t=e.split("/"),r=i,n=0;n<t.length-1;n++){var o=t.slice(0,n+1).join("/");a[o]||(a[o]=WORKERFS.createNode(r,t[n],WORKERFS.DIR_MODE,0)),r=a[o]}return r}function o(e){e=e.split("/");return e[e.length-1]}return Array.prototype.forEach.call(e.opts.files||[],function(e){WORKERFS.createNode(n(e.name),o(e.name),WORKERFS.FILE_MODE,0,e,e.lastModifiedDate)}),(e.opts.blobs||[]).forEach(function(e){WORKERFS.createNode(n(e.name),o(e.name),WORKERFS.FILE_MODE,0,e.data)}),(e.opts.packages||[]).forEach(function(r){r.metadata.files.forEach(function(e){var t=e.filename.substr(1);WORKERFS.createNode(n(t),o(t),WORKERFS.FILE_MODE,0,r.blob.slice(e.start,e.end))})}),i},createNode:function(e,t,r,n,o,i){var a=FS.createNode(e,t,r);return a.mode=r,a.node_ops=WORKERFS.node_ops,a.stream_ops=WORKERFS.stream_ops,a.timestamp=(i||new Date).getTime(),assert(WORKERFS.FILE_MODE!==WORKERFS.DIR_MODE),r===WORKERFS.FILE_MODE?(a.size=o.size,a.contents=o):(a.size=4096,a.contents={}),e&&(e.contents[t]=a),a},node_ops:{getattr:function(e){return{dev:1,ino:void 0,mode:e.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:e.size,atime:new Date(e.timestamp),mtime:new Date(e.timestamp),ctime:new Date(e.timestamp),blksize:4096,blocks:Math.ceil(e.size/4096)}},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp)},lookup:function(e,t){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)},mknod:function(e,t,r,n){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rename:function(e,t,r){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},unlink:function(e,t){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rmdir:function(e,t){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readdir:function(e){var t,r=[".",".."];for(t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,t,r){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readlink:function(e){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},stream_ops:{read:function(e,t,r,n,o){if(o>=e.node.size)return 0;e=e.node.contents.slice(o,o+n),o=WORKERFS.reader.readAsArrayBuffer(e);return t.set(new Uint8Array(o),r),e.size},write:function(e,t,r,n,o){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(e,t,r){if(1===r?t+=e.position:2===r&&FS.isFile(e.node.mode)&&(t+=e.node.size),t<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return t}}},FS=(STATICTOP=(STATICTOP+=16)+16+16,{root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(e instanceof FS.ErrnoError)return ___setErrNo(e.errno);throw e+" : "+stackTrace()},lookupPath:function(e,t){if(t=t||{},!(e=PATH.resolve(FS.cwd(),e)))return{path:"",node:null};var r,n={follow_mount:!0,recurse_count:0};for(r in n)void 0===t[r]&&(t[r]=n[r]);if(8<t.recurse_count)throw new FS.ErrnoError(ERRNO_CODES.ELOOP);for(var o=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!1),i=FS.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&t.parent)break;if(i=FS.lookupNode(i,o[s]),a=PATH.join2(a,o[s]),!FS.isMountpoint(i)||u&&!t.follow_mount||(i=i.mounted.root),!u||t.follow)for(var l=0;FS.isLink(i.mode);){var c=FS.readlink(a),a=PATH.resolve(PATH.dirname(a),c),i=FS.lookupPath(a,{recurse_count:t.recurse_count}).node;if(40<l++)throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}return{path:a,node:i}},getPath:function(e){for(var t,r;;){if(FS.isRoot(e))return r=e.mount.mountpoint,t?"/"!==r[r.length-1]?r+"/"+t:r+t:r;t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%FS.nameTable.length},hashAddNode:function(e){var t=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[t],FS.nameTable[t]=e},hashRemoveNode:function(e){var t=FS.hashName(e.parent.id,e.name);if(FS.nameTable[t]===e)FS.nameTable[t]=e.name_next;else for(var r=FS.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=FS.mayLookup(e);if(r)throw new FS.ErrnoError(r,e);for(var r=FS.hashName(e.id,t),n=FS.nameTable[r];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return FS.lookup(e,t)},createNode:function(e,t,r,n){FS.FSNode||(FS.FSNode=function(e,t,r,n){this.parent=e=e||this,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},FS.FSNode.prototype={},Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}));e=new FS.FSNode(e,t,r,n);return FS.hashAddNode(e),e},destroyNode:function(e){FS.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=FS.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return FS.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:ERRNO_CODES.EACCES},mayLookup:function(e){var t=FS.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:ERRNO_CODES.EACCES)},mayCreate:function(e,t){try{FS.lookupNode(e,t);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=FS.lookupNode(e,t)}catch(e){return e.errno}t=FS.nodePermissions(e,"wx");if(t)return t;if(r){if(!FS.isDir(n.mode))return ERRNO_CODES.ENOTDIR;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return ERRNO_CODES.EBUSY}else if(FS.isDir(n.mode))return ERRNO_CODES.EISDIR;return 0},mayOpen:function(e,t){return e?FS.isLink(e.mode)?ERRNO_CODES.ELOOP:FS.isDir(e.mode)&&("r"!==FS.flagsToPermissionString(t)||512&t)?ERRNO_CODES.EISDIR:FS.nodePermissions(e,FS.flagsToPermissionString(t)):ERRNO_CODES.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(e,t){t=t||FS.MAX_OPEN_FDS;for(var r=e=e||0;r<=t;r++)if(!FS.streams[r])return r;throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(e){return FS.streams[e]},createStream:function(e,t,r){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var n,o=new FS.FSStream;for(n in e)o[n]=e[n];e=o;t=FS.nextfd(t,r);return e.fd=t,FS.streams[t]=e},closeStream:function(e){FS.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=FS.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){FS.devices[e]={stream_ops:t}},getDevice:function(e){return FS.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(t,r){"function"==typeof t&&(r=t,t=!1),FS.syncFSRequests++,1<FS.syncFSRequests&&console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=FS.getMounts(FS.root.mount),o=0;function i(e){return assert(0<FS.syncFSRequests),FS.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,i(e));++o>=n.length&&i(null)}n.forEach(function(e){if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)})},mount:function(e,t,r){var n,o="/"===r,i=!r;if(o&&FS.root)throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!o&&!i){i=FS.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,FS.isMountpoint(n))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!FS.isDir(n.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}i={type:e,opts:t,mountpoint:r,mounts:[]},t=e.mount(i);return(t.mount=i).root=t,o?FS.root=t:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),t},unmount:function(e){e=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(e.node))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var e=e.node,t=e.mounted,n=FS.getMounts(t),t=(Object.keys(FS.nameTable).forEach(function(e){for(var t=FS.nameTable[e];t;){var r=t.name_next;-1!==n.indexOf(t.mount)&&FS.destroyNode(t),t=r}}),e.mounted=null,e.mount.mounts.indexOf(t));assert(-1!==t),e.mount.mounts.splice(t,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=FS.lookupPath(e,{parent:!0}).node,e=PATH.basename(e);if(!e||"."===e||".."===e)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var o=FS.mayCreate(n,e);if(o)throw new FS.ErrnoError(o);if(n.node_ops.mknod)return n.node_ops.mknod(n,e,t,r);throw new FS.ErrnoError(ERRNO_CODES.EPERM)},create:function(e,t){return FS.mknod(e,t=(t=void 0!==t?t:438)&4095|32768,0)},mkdir:function(e,t){return FS.mknod(e,t=(t=void 0!==t?t:511)&1023|16384,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{FS.mkdir(n,t)}catch(e){if(e.errno!=ERRNO_CODES.EEXIST)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),FS.mknod(e,t|=8192,r)},symlink:function(e,t){if(!PATH.resolve(e))throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var r=FS.lookupPath(t,{parent:!0}).node;if(!r)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var t=PATH.basename(t),n=FS.mayCreate(r,t);if(n)throw new FS.ErrnoError(n);if(r.node_ops.symlink)return r.node_ops.symlink(r,t,e);throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rename:function(t,r){var e,n,o=PATH.dirname(t),i=PATH.dirname(r),a=PATH.basename(t),s=PATH.basename(r);try{e=FS.lookupPath(t,{parent:!0}).node,n=FS.lookupPath(r,{parent:!0}).node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!e||!n)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(e.mount!==n.mount)throw new FS.ErrnoError(ERRNO_CODES.EXDEV);var u,l=FS.lookupNode(e,a),i=PATH.relative(t,i);if("."!==i.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if("."!==(i=PATH.relative(r,o)).charAt(0))throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);try{u=FS.lookupNode(n,s)}catch(e){}if(l!==u){o=FS.isDir(l.mode),i=FS.mayDelete(e,a,o);if(i)throw new FS.ErrnoError(i);if(i=u?FS.mayDelete(n,s,o):FS.mayCreate(n,s))throw new FS.ErrnoError(i);if(!e.node_ops.rename)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(l)||u&&FS.isMountpoint(u))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(n!==e&&(i=FS.nodePermissions(e,"w")))throw new FS.ErrnoError(i);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(t,r)}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+t+"', '"+r+"') threw an exception: "+e.message)}FS.hashRemoveNode(l);try{e.node_ops.rename(l,n,s)}catch(e){throw e}finally{FS.hashAddNode(l)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(t,r)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+t+"', '"+r+"') threw an exception: "+e.message)}}},rmdir:function(t){var e=FS.lookupPath(t,{parent:!0}).node,r=PATH.basename(t),n=FS.lookupNode(e,r),o=FS.mayDelete(e,r,!0);if(o)throw new FS.ErrnoError(o);if(!e.node_ops.rmdir)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(n))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(t)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,r),FS.destroyNode(n);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(t)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readdir:function(e){e=FS.lookupPath(e,{follow:!0}).node;if(e.node_ops.readdir)return e.node_ops.readdir(e);throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)},unlink:function(t){var e=FS.lookupPath(t,{parent:!0}).node,r=PATH.basename(t),n=FS.lookupNode(e,r),o=FS.mayDelete(e,r,!1);if(o)throw new FS.ErrnoError(o);if(!e.node_ops.unlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(n))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(t)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.unlink(e,r),FS.destroyNode(n);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(t)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readlink:function(e){e=FS.lookupPath(e).node;if(!e)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(e.node_ops.readlink)return PATH.resolve(FS.getPath(e.parent),e.node_ops.readlink(e));throw new FS.ErrnoError(ERRNO_CODES.EINVAL)},stat:function(e,t){e=FS.lookupPath(e,{follow:!t}).node;if(!e)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(e.node_ops.getattr)return e.node_ops.getattr(e);throw new FS.ErrnoError(ERRNO_CODES.EPERM)},lstat:function(e){return FS.stat(e,!0)},chmod:function(e,t,r){if(!(r="string"==typeof e?FS.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod:function(e,t){FS.chmod(e,t,!0)},fchmod:function(e,t){e=FS.getStream(e);if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chmod(e.node,t)},chown:function(e,t,r,n){if(!(n="string"==typeof e?FS.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:function(e,t,r){FS.chown(e,t,r,!0)},fchown:function(e,t,r){e=FS.getStream(e);if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chown(e.node,t,r)},truncate:function(e,t){if(t<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(!(e="string"==typeof e?FS.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isDir(e.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!FS.isFile(e.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var r=FS.nodePermissions(e,"w");if(r)throw new FS.ErrnoError(r);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){e=FS.getStream(e);if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(0==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);FS.truncate(e.node,t)},utime:function(e,t,r){e=FS.lookupPath(e,{follow:!0}).node;e.node_ops.setattr(e,{timestamp:Math.max(t,r)})},open:function(t,e,r,n,o){if(""===t)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(r=void 0===r?438:r,r=64&(e="string"==typeof e?FS.modeStringToFlags(e):e)?4095&r|32768:0,"object"===_typeof(t))i=t;else{t=PATH.normalize(t);try{var i=FS.lookupPath(t,{follow:!(131072&e)}).node}catch(e){}}var a=!1;if(64&e)if(i){if(128&e)throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}else i=FS.mknod(t,r,0),a=!0;if(!i)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(FS.isChrdev(i.mode)&&(e&=-513),65536&e&&!FS.isDir(i.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);if(!a){r=FS.mayOpen(i,e);if(r)throw new FS.ErrnoError(r)}512&e&&FS.truncate(i,0),e&=-641;var s,a=FS.createStream({node:i,path:FS.getPath(i),flags:e,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1},n,o);a.stream_ops.open&&a.stream_ops.open(a),!Module.logReadFiles||1&e||(FS.readFiles||(FS.readFiles={}),t in FS.readFiles||(FS.readFiles[t]=1,Module.printErr("read file: "+t)));try{FS.trackingDelegate.onOpenFile&&(s=0,1!=(2097155&e)&&(s|=FS.tracking.openFlags.READ),0!=(2097155&e)&&(s|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(t,s))}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return a},close:function(e){if(FS.isClosed(e))throw new FS.ErrnoError(ERRNO_CODES.EBADF);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{FS.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(e.seekable&&e.stream_ops.llseek)return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position;throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)},read:function(e,t,r,n,o){if(n<0||o<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(FS.isClosed(e))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(1==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.read)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var i=void 0!==o;if(i){if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}else o=e.position;t=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=t),t},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(FS.isClosed(e))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(0==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.write)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);1024&e.flags&&FS.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}else o=e.position;t=e.stream_ops.write(e,t,r,n,o,i);a||(e.position+=t);try{e.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return t},allocate:function(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(t<0||r<=0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(!e.stream_ops.allocate)throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o,i,a){if(1==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EACCES);if(e.stream_ops.mmap)return e.stream_ops.mmap(e,t,r,n,o,i,a);throw new FS.ErrnoError(ERRNO_CODES.ENODEV)},msync:function(e,t,r,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(e.stream_ops.ioctl)return e.stream_ops.ioctl(e,t,r);throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)},readFile:function(e,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=FS.open(e,t.flags),e=FS.stat(e).size,o=new Uint8Array(e);return FS.read(n,o,0,e,0),"utf8"===t.encoding?r=UTF8ArrayToString(o,0):"binary"===t.encoding&&(r=o),FS.close(n),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||"w";e=FS.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(lengthBytesUTF8(t)+1),o=stringToUTF8Array(t,n,0,n.length);FS.write(e,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");FS.write(e,t,0,t.byteLength,void 0,r.canOwn)}FS.close(e)},cwd:function(){return FS.currentPath},chdir:function(e){e=FS.lookupPath(e,{follow:!0});if(null===e.node)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);var t=FS.nodePermissions(e.node,"x");if(t)throw new FS.ErrnoError(t);FS.currentPath=e.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){var e,t;FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0)),t="undefined"!=typeof crypto?(e=new Uint8Array(1),function(){return crypto.getRandomValues(e),e[0]}):ENVIRONMENT_IS_NODE?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0},FS.createDevice("/dev","random",t),FS.createDevice("/dev","urandom",t),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc"),FS.mkdir("/proc/self"),FS.mkdir("/proc/self/fd"),FS.mount({mount:function(){var e=FS.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,t){var r=FS.getStream(+t);if(!r)throw new FS.ErrnoError(ERRNO_CODES.EBADF);t={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return t.parent=t}},e}},{},"/proc/self/fd")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin","r"),e=(assert(0===e.fd,"invalid handle for stdin ("+e.fd+")"),FS.open("/dev/stdout","w")),e=(assert(1===e.fd,"invalid handle for stdout ("+e.fd+")"),FS.open("/dev/stderr","w"));assert(2===e.fd,"invalid handle for stderr ("+e.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ERRNO_CODES)if(ERRNO_CODES[t]===e){this.code=t;break}},this.setErrno(e),this.message=ERRNO_MESSAGES[e],this.stack&&Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0})},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[ERRNO_CODES.ENOENT].forEach(function(e){FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:NODEFS,WORKERFS:WORKERFS}},init:function(e,t,r){assert(!FS.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)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=t||Module.stdout,Module.stderr=r||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var e=Module._fflush;e&&e(0);for(var t=0;t<FS.streams.length;t++){var r=FS.streams[t];r&&FS.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},joinPath:function(e,t){e=PATH.join.apply(null,e);return e=t&&"/"==e[0]?e.substr(1):e},absolutePath:function(e,t){return PATH.resolve(t,e)},standardizePath:function(e){return PATH.normalize(e)},findObject:function(e,t){e=FS.analyzePath(e,t);return e.exists?e.object:(___setErrNo(e.error),null)},analyzePath:function(e,t){try{e=(n=FS.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=FS.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=PATH.basename(e),n=FS.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createFolder:function(e,t,r,n){e=PATH.join2("string"==typeof e?e:FS.getPath(e),t),t=FS.getMode(r,n);return FS.mkdir(e,t)},createPath:function(e,t,r,n){e="string"==typeof e?e:FS.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=PATH.join2(e,i);try{FS.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){e=PATH.join2("string"==typeof e?e:FS.getPath(e),t),t=FS.getMode(n,o);return FS.create(e,t)},createDataFile:function(e,t,r,n,o,i){t=t?PATH.join2("string"==typeof e?e:FS.getPath(e),t):e,e=FS.getMode(n,o),n=FS.create(t,e);if(r){if("string"==typeof r){for(var a=new Array(r.length),s=0,u=r.length;s<u;++s)a[s]=r.charCodeAt(s);r=a}FS.chmod(n,146|e);o=FS.open(n,"w");FS.write(o,r,0,r.length,0,i),FS.close(o),FS.chmod(n,e)}return n},createDevice:function(e,t,u,a){var e=PATH.join2("string"==typeof e?e:FS.getPath(e),t),t=FS.getMode(!!u,!!a),r=(FS.createDevice.major||(FS.createDevice.major=64),FS.makedev(FS.createDevice.major++,0));return FS.registerDevice(r,{open:function(e){e.seekable=!1},close:function(e){a&&a.buffer&&a.buffer.length&&a(10)},read:function(e,t,r,n,o){for(var i,a=0,s=0;s<n;s++){try{i=u()}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===i&&0===a)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null==i)break;a++,t[r+s]=i}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n,o){for(var i=0;i<n;i++)try{a(t[r+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return n&&(e.node.timestamp=Date.now()),i}}),FS.mkdev(e,t,r)},createLink:function(e,t,r,n,o){e=PATH.join2("string"==typeof e?e:FS.getPath(e),t);return FS.symlink(r,e)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var t=!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(!Module.read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(Module.read(e.url),!0),e.usedBytes=e.contents.length}catch(e){t=!1}return t||___setErrNo(ERRNO_CODES.EIO),t},createLazyFile:function(e,t,a,r,n){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){var t;if(!(e>this.length-1||e<0))return t=e%this.chunkSize,e=e/this.chunkSize|0,this.getter(e)[t]},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",a,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw new Error("Couldn't load "+a+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,e=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576,i=(r||(o=n),this);i.setDataGetter(function(e){var t=e*o,r=(e+1)*o-1,r=Math.min(r,n-1);if(void 0===i.chunks[e]&&(i.chunks[e]=function(e,t){if(t<e)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(n-1<t)throw new Error("only "+n+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",a,!1),n!==o&&r.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(r.responseType="arraybuffer"),r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),200<=r.status&&r.status<300||304===r.status)return void 0!==r.response?new Uint8Array(r.response||[]):intArrayFromString(r.responseText||"",!0);throw new Error("Couldn't load "+a+". Status: "+r.status)}(t,r)),void 0===i.chunks[e])throw new Error("doXHR failed!");return i.chunks[e]}),!e&&n||(o=n=1,n=this.getter(0).length,o=n,console.log("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new o,i=(Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}),{isDevice:!1,contents:i})}else i={isDevice:!1,url:a};var u=FS.createFile(e,t,i,r,n),s=(i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}}),{});return Object.keys(u.stream_ops).forEach(function(e){var t=u.stream_ops[e];s[e]=function(){if(FS.forceLoadFile(u))return t.apply(null,arguments);throw new FS.ErrnoError(ERRNO_CODES.EIO)}}),s.read=function(e,t,r,n,o){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(ERRNO_CODES.EIO);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(assert(0<=a),i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a},u.stream_ops=s,u},createPreloadedFile:function(o,i,e,a,s,u,l,c,d,E){Browser.init();var f=i?PATH.resolve(PATH.join2(o,i)):o,S=getUniqueRunDependency("cp "+f);function t(t){function r(e){E&&E(),c||FS.createDataFile(o,i,e,a,s,d),u&&u(),removeRunDependency(S)}var n=!1;Module.preloadPlugins.forEach(function(e){n||e.canHandle(f)&&(e.handle(t,f,r,function(){l&&l(),removeRunDependency(S)}),n=!0)}),n||r(t)}addRunDependency(S),"string"==typeof e?Browser.asyncLoad(e,function(e){t(e)},l):t(e)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(a,s,u){s=s||function(){},u=u||function(){};var e=FS.indexedDB();try{var l=e.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return u(e)}l.onupgradeneeded=function(){console.log("creating db"),l.result.createObjectStore(FS.DB_STORE_NAME)},l.onsuccess=function(){var e=l.result.transaction([FS.DB_STORE_NAME],"readwrite"),t=e.objectStore(FS.DB_STORE_NAME),r=0,n=0,o=a.length;function i(){(0==n?s:u)()}a.forEach(function(e){e=t.put(FS.analyzePath(e).object.contents,e);e.onsuccess=function(){++r+n==o&&i()},e.onerror=function(){r+ ++n==o&&i()}}),e.onerror=u},l.onerror=u},loadFilesFromDB:function(s,u,l){u=u||function(){},l=l||function(){};var e=FS.indexedDB();try{var c=e.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return l(e)}c.onupgradeneeded=l,c.onsuccess=function(){var e=c.result;try{var t=e.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){return void l(e)}var r=t.objectStore(FS.DB_STORE_NAME),n=0,o=0,i=s.length;function a(){(0==o?u:l)()}s.forEach(function(e){var t=r.get(e);t.onsuccess=function(){FS.analyzePath(e).exists&&FS.unlink(e),FS.createDataFile(PATH.dirname(e),PATH.basename(e),t.result,!0,!0,!0),++n+o==i&&a()},t.onerror=function(){n+ ++o==i&&a()}}),t.onerror=l},c.onerror=l}}),SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(e,t){if("/"!==t[0]){var r;if(-100===e)r=FS.cwd();else{e=FS.getStream(e);if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);r=e.path}t=PATH.join2(r,t)}return t},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(FS.getPath(e.node)))return-ERRNO_CODES.ENOTDIR;throw e}return HEAP32[r>>2]=n.dev,HEAP32[r+4>>2]=0,HEAP32[r+8>>2]=n.ino,HEAP32[r+12>>2]=n.mode,HEAP32[r+16>>2]=n.nlink,HEAP32[r+20>>2]=n.uid,HEAP32[r+24>>2]=n.gid,HEAP32[r+28>>2]=n.rdev,HEAP32[r+32>>2]=0,HEAP32[r+36>>2]=n.size,HEAP32[r+40>>2]=4096,HEAP32[r+44>>2]=n.blocks,HEAP32[r+48>>2]=n.atime.getTime()/1e3|0,HEAP32[r+52>>2]=0,HEAP32[r+56>>2]=n.mtime.getTime()/1e3|0,HEAP32[r+60>>2]=0,HEAP32[r+64>>2]=n.ctime.getTime()/1e3|0,HEAP32[r+68>>2]=0,HEAP32[r+72>>2]=n.ino,0},doMsync:function(e,t,r,n){e=new Uint8Array(HEAPU8.subarray(e,e+r));FS.msync(t,e,0,r,n)},doMkdir:function(e,t){return"/"===(e=PATH.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),FS.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}return FS.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-ERRNO_CODES.EINVAL;var e=FS.readlink(e),n=Math.min(r,lengthBytesUTF8(e)),o=HEAP8[t+n];return stringToUTF8(e,t,r+1),HEAP8[t+n]=o,n},doAccess:function(e,t){if(-8&t)return-ERRNO_CODES.EINVAL;var e=FS.lookupPath(e,{follow:!0}).node,r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&FS.nodePermissions(e,r)?-ERRNO_CODES.EACCES:0},doDup:function(e,t,r){var n=FS.getStream(r);return n&&FS.close(n),FS.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=HEAP32[t+8*i>>2],s=HEAP32[t+(8*i+4)>>2],a=FS.read(e,HEAP8,a,s,n);if(a<0)return-1;if(o+=a,a<s)break}return o},doWritev:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=HEAP32[t+8*i>>2],s=HEAP32[t+(8*i+4)>>2],a=FS.write(e,HEAP8,a,s,n);if(a<0)return-1;o+=a}return o},varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},getStreamFromFD:function(){var e=FS.getStream(SYSCALLS.get());if(e)return e;throw new FS.ErrnoError(ERRNO_CODES.EBADF)},getSocketFromFD:function(){var e=SOCKFS.getSocket(SYSCALLS.get());if(e)return e;throw new FS.ErrnoError(ERRNO_CODES.EBADF)},getSocketAddress:function(e){var t=SYSCALLS.get(),r=SYSCALLS.get();if(e&&0===t)return null;e=__read_sockaddr(t,r);if(e.errno)throw new FS.ErrnoError(e.errno);return e.addr=DNS.lookup_addr(e.addr)||e.addr,e},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(0<=e?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall140(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),o=SYSCALLS.get(),i=SYSCALLS.get(),a=n;return FS.llseek(r,a,i),HEAP32[o>>2]=r.position,r.getdents&&0===a&&0===i&&(r.getdents=null),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get(),o=SYSCALLS.get();return SYSCALLS.doWritev(r,n,o)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall221(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();switch(SYSCALLS.get()){case 0:return(n=SYSCALLS.get())<0?-ERRNO_CODES.EINVAL:FS.open(r.path,r.flags,0,n).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var n=SYSCALLS.get();return r.flags|=n,0;case 12:case 12:n=SYSCALLS.get();return HEAP16[n+0>>1]=2,0;case 13:case 14:case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:return ___setErrNo(ERRNO_CODES.EINVAL),-1;default:return-ERRNO_CODES.EINVAL}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall3(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get(),o=SYSCALLS.get();return FS.read(r,HEAP8,n,o)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall5(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),n=SYSCALLS.get(),o=SYSCALLS.get();return FS.open(r,n,o).fd}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get();switch(n){case 21509:case 21505:return r.tty?0:-ERRNO_CODES.ENOTTY;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.tty?0:-ERRNO_CODES.ENOTTY;case 21519:if(!r.tty)return-ERRNO_CODES.ENOTTY;var o=SYSCALLS.get();return HEAP32[o>>2]=0;case 21520:return r.tty?-ERRNO_CODES.EINVAL:-ERRNO_CODES.ENOTTY;case 21531:o=SYSCALLS.get();return FS.ioctl(r,n,o);case 21523:case 21524:return r.tty?0:-ERRNO_CODES.ENOTTY;default:abort("bad ioctl syscall "+n)}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall6(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function _abort(){Module.abort()}function _clock(){return void 0===_clock.start&&(_clock.start=Date.now()),1e3*(Date.now()-_clock.start)|0}var _fabs=Math_abs;function _ftime(e){var t=Date.now();return HEAP32[e>>2]=t/1e3|0,HEAP16[e+4>>1]=t%1e3,HEAP16[e+6>>1]=0,HEAP16[e+8>>1]=0}function _getenv(e){return 0===e?0:(e=Pointer_stringify(e),ENV.hasOwnProperty(e)?(_getenv.ret&&_free(_getenv.ret),_getenv.ret=allocateUTF8(ENV[e]),_getenv.ret):0)}function _gettimeofday(e){var t=Date.now();return HEAP32[e>>2]=t/1e3|0,HEAP32[e+4>>2]=t%1e3*1e3|0,0}var ___tm_timezone=allocate(intArrayFromString("GMT"),"i8",ALLOC_STATIC);function _gmtime_r(e,t){var e=new Date(1e3*HEAP32[e>>2]),r=(HEAP32[t>>2]=e.getUTCSeconds(),HEAP32[t+4>>2]=e.getUTCMinutes(),HEAP32[t+8>>2]=e.getUTCHours(),HEAP32[t+12>>2]=e.getUTCDate(),HEAP32[t+16>>2]=e.getUTCMonth(),HEAP32[t+20>>2]=e.getUTCFullYear()-1900,HEAP32[t+24>>2]=e.getUTCDay(),HEAP32[t+36>>2]=0,HEAP32[t+32>>2]=0,Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0)),e=(e.getTime()-r)/864e5|0;return HEAP32[t+28>>2]=e,HEAP32[t+40>>2]=___tm_timezone,t}function _llvm_exp2_f32(e){return Math.pow(2,e)}function _llvm_exp2_f64(){return _llvm_exp2_f32.apply(null,arguments)}function _llvm_log2_f32(e){return Math.log(e)/Math.LN2}var _llvm_trunc_f64=Math_trunc;function _tzset(){var e,t,r,n;function o(e){e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}_tzset.called||(_tzset.called=!0,HEAP32[__get_timezone()>>2]=60*(new Date).getTimezoneOffset(),e=new Date(2e3,0,1),t=new Date(2e3,6,1),HEAP32[__get_daylight()>>2]=Number(e.getTimezoneOffset()!=t.getTimezoneOffset()),r=o(e),n=o(t),r=allocate(intArrayFromString(r),"i8",ALLOC_NORMAL),n=allocate(intArrayFromString(n),"i8",ALLOC_NORMAL),t.getTimezoneOffset()<e.getTimezoneOffset()?(HEAP32[__get_tzname()>>2]=r,HEAP32[__get_tzname()+4>>2]=n):(HEAP32[__get_tzname()>>2]=n,HEAP32[__get_tzname()+4>>2]=r))}function _localtime_r(e,t){_tzset();var e=new Date(1e3*HEAP32[e>>2]),r=(HEAP32[t>>2]=e.getSeconds(),HEAP32[t+4>>2]=e.getMinutes(),HEAP32[t+8>>2]=e.getHours(),HEAP32[t+12>>2]=e.getDate(),HEAP32[t+16>>2]=e.getMonth(),HEAP32[t+20>>2]=e.getFullYear()-1900,HEAP32[t+24>>2]=e.getDay(),new Date(e.getFullYear(),0,1)),n=(e.getTime()-r.getTime())/864e5|0,n=(HEAP32[t+28>>2]=n,HEAP32[t+36>>2]=-60*e.getTimezoneOffset(),new Date(2e3,6,1).getTimezoneOffset()),r=r.getTimezoneOffset(),e=0|(n!=r&&e.getTimezoneOffset()==Math.min(r,n)),r=(HEAP32[t+32>>2]=e,HEAP32[__get_tzname()+(e?4:0)>>2]);return HEAP32[t+40>>2]=r,t}function _emscripten_memcpy_big(e,t,r){return HEAPU8.set(HEAPU8.subarray(t,t+r),e),e}function _mktime(e){_tzset();var t=new Date(HEAP32[e+20>>2]+1900,HEAP32[e+16>>2],HEAP32[e+12>>2],HEAP32[e+8>>2],HEAP32[e+4>>2],HEAP32[e>>2],0),r=HEAP32[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(2e3,6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i),r=(r<0?HEAP32[e+32>>2]=Number(i!=a&&s==n):0<r!=(s==n)&&(a=Math.max(a,i),i=0<r?s:a,t.setTime(t.getTime()+6e4*(i-n))),HEAP32[e+24>>2]=t.getDay(),(t.getTime()-o.getTime())/864e5|0);return HEAP32[e+28>>2]=r,t.getTime()/1e3|0}function _pthread_cond_destroy(){return 0}function _pthread_cond_init(){return 0}function _pthread_cond_signal(){return 0}function _pthread_cond_wait(){return 0}function _pthread_create(){return 11}function _pthread_join(){}function _pthread_mutex_destroy(){}function _pthread_mutex_init(){}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),e in _pthread_once.seen||(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function __isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function __arraySum(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var fs,NODEJS_PATH,__MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(e,t){for(var r=new Date(e.getTime());0<t;){var n=__isLeapYear(r.getFullYear()),o=r.getMonth(),n=(n?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[o];if(!(t>n-r.getDate()))return r.setDate(r.getDate()+t),r;t-=n-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function _strftime(e,t,r,n){var o=HEAP32[n+40>>2],i={tm_sec:HEAP32[n>>2],tm_min:HEAP32[n+4>>2],tm_hour:HEAP32[n+8>>2],tm_mday:HEAP32[n+12>>2],tm_mon:HEAP32[n+16>>2],tm_year:HEAP32[n+20>>2],tm_wday:HEAP32[n+24>>2],tm_yday:HEAP32[n+28>>2],tm_isdst:HEAP32[n+32>>2],tm_gmtoff:HEAP32[n+36>>2],tm_zone:o?Pointer_stringify(o):""},a=Pointer_stringify(r),s={"%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"};for(_ in s)a=a.replace(new RegExp(_,"g"),s[_]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function d(e,t){return c(e,t,"0")}function E(e,t){function r(e){return e<0?-1:0<e?1:0}var n;return n=0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))?r(e.getDate()-t.getDate()):n}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function S(e){var e=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(e.getFullYear(),0,4),r=new Date(e.getFullYear()+1,0,4),t=f(t),r=f(r);return E(t,e)<=0?E(r,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var _,m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return c(e.tm_mday,2," ")},"%g":function(e){return S(e).toString().substring(2)},"%G":S,"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){e=e.tm_hour;return 0==e?e=12:12<e&&(e-=12),d(e,2)},"%j":function(e){return d(e.tm_mday+__arraySum(__isLeapYear(e.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.tm_hour&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return new Date(e.tm_year+1900,e.tm_mon+1,e.tm_mday,0,0,0,0).getDay()||7},"%U":function(e){var t,r=new Date(e.tm_year+1900,0,1),n=0===r.getDay()?r:__addDays(r,7-r.getDay()),e=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);return E(n,e)<0?(t=__arraySum(__isLeapYear(e.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.getMonth()-1)-31,t=31-n.getDate()+t+e.getDate(),d(Math.ceil(t/7),2)):0===E(n,r)?"01":"00"},"%V":function(e){var t=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),t=f(t),r=f(r),n=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday);return E(n,t)<0?"53":E(r,n)<=0?"01":(r=t.getFullYear()<e.tm_year+1900?e.tm_yday+32-t.getDate():e.tm_yday+1-t.getDate(),d(Math.ceil(r/7),2))},"%w":function(e){return new Date(e.tm_year+1900,e.tm_mon+1,e.tm_mday,0,0,0,0).getDay()},"%W":function(e){var t,r=new Date(e.tm_year,0,1),n=1===r.getDay()?r:__addDays(r,0===r.getDay()?1:7-r.getDay()+1),e=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);return E(n,e)<0?(t=__arraySum(__isLeapYear(e.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.getMonth()-1)-31,t=31-n.getDate()+t+e.getDate(),d(Math.ceil(t/7),2)):0===E(n,r)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=0<=(e=e.tm_gmtoff),e=Math.abs(e)/60;return(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(_ in m)0<=a.indexOf(_)&&(a=a.replace(new RegExp(_,"g"),m[_](i)));n=intArrayFromString(a,!1);return n.length>t?0:(writeArrayToMemory(n,e),n.length-1)}function _sysconf(e){switch(e){case 30:return PAGE_SIZE;case 85:return 2147418112/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":_typeof(navigator))&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}function intArrayFromString(e,t,r){r=0<r?r:lengthBytesUTF8(e)+1,r=new Array(r),e=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=e),r}function jsCall_dd(e,t){return functionPointers[e](t)}function jsCall_did(e,t,r){return functionPointers[e](t,r)}function jsCall_didd(e,t,r,n){return functionPointers[e](t,r,n)}function jsCall_fii(e,t,r){return functionPointers[e](t,r)}function jsCall_fiii(e,t,r,n){return functionPointers[e](t,r,n)}function jsCall_ii(e,t){return functionPointers[e](t)}function jsCall_iii(e,t,r){return functionPointers[e](t,r)}function jsCall_iiii(e,t,r,n){return functionPointers[e](t,r,n)}function jsCall_iiiii(e,t,r,n,o){return functionPointers[e](t,r,n,o)}function jsCall_iiiiii(e,t,r,n,o,i){return functionPointers[e](t,r,n,o,i)}function jsCall_iiiiiii(e,t,r,n,o,i,a){return functionPointers[e](t,r,n,o,i,a)}function jsCall_iiiiij(e,t,r,n,o,i){return functionPointers[e](t,r,n,o,i)}function jsCall_iiiji(e,t,r,n,o){return functionPointers[e](t,r,n,o)}function jsCall_jiiij(e,t,r,n,o){return functionPointers[e](t,r,n,o)}function jsCall_jiji(e,t,r,n){return functionPointers[e](t,r,n)}function jsCall_v(e){functionPointers[e]()}function jsCall_vi(e,t){functionPointers[e](t)}function jsCall_vii(e,t,r){functionPointers[e](t,r)}function jsCall_viidi(e,t,r,n,o){functionPointers[e](t,r,n,o)}function jsCall_viidii(e,t,r,n,o,i){functionPointers[e](t,r,n,o,i)}function jsCall_viifi(e,t,r,n,o){functionPointers[e](t,r,n,o)}function jsCall_viii(e,t,r,n){functionPointers[e](t,r,n)}function jsCall_viiii(e,t,r,n,o){functionPointers[e](t,r,n,o)}function jsCall_viiiifii(e,t,r,n,o,i,a,s){functionPointers[e](t,r,n,o,i,a,s)}function jsCall_viiiii(e,t,r,n,o,i){functionPointers[e](t,r,n,o,i)}function jsCall_viiiiii(e,t,r,n,o,i,a){functionPointers[e](t,r,n,o,i,a)}function jsCall_viiiiiifi(e,t,r,n,o,i,a,s,u){functionPointers[e](t,r,n,o,i,a,s,u)}function jsCall_viiiiiii(e,t,r,n,o,i,a,s){functionPointers[e](t,r,n,o,i,a,s)}function jsCall_viiiiiiii(e,t,r,n,o,i,a,s,u){functionPointers[e](t,r,n,o,i,a,s,u)}function jsCall_viiiiiiiii(e,t,r,n,o,i,a,s,u,l){functionPointers[e](t,r,n,o,i,a,s,u,l)}function jsCall_viiiiiiiiii(e,t,r,n,o,i,a,s,u,l,c){functionPointers[e](t,r,n,o,i,a,s,u,l,c)}function jsCall_viiiiiiiiiii(e,t,r,n,o,i,a,s,u,l,c,d){functionPointers[e](t,r,n,o,i,a,s,u,l,c,d)}function jsCall_viiiiiiiiiiii(e,t,r,n,o,i,a,s,u,l,c,d,E){functionPointers[e](t,r,n,o,i,a,s,u,l,c,d,E)}function jsCall_viiiiiiiiiiiiii(e,t,r,n,o,i,a,s,u,l,c,d,E,f,S){functionPointers[e](t,r,n,o,i,a,s,u,l,c,d,E,f,S)}FS.staticInit(),__ATINIT__.unshift(function(){Module.noFSInit||FS.init.initialized||FS.init()}),__ATMAIN__.push(function(){FS.ignorePermissions=!1}),__ATEXIT__.push(function(){FS.quit()}),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,__ATINIT__.unshift(function(){TTY.init()}),__ATEXIT__.push(function(){TTY.shutdown()}),ENVIRONMENT_IS_NODE&&(fs=require("fs"),NODEJS_PATH=require("path"),NODEFS.staticInit()),DYNAMICTOP_PTR=staticAlloc(4),STACK_BASE=STACKTOP=alignMemory(STATICTOP),DYNAMIC_BASE=alignMemory(STACK_MAX=STACK_BASE+TOTAL_STACK),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.wasmTableSize=3008,Module.wasmMaxTableSize=3008,Module.asmGlobalArg={},Module.asmLibraryArg={abort:abort,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,jsCall_dd:jsCall_dd,jsCall_did:jsCall_did,jsCall_didd:jsCall_didd,jsCall_fii:jsCall_fii,jsCall_fiii:jsCall_fiii,jsCall_ii:jsCall_ii,jsCall_iii:jsCall_iii,jsCall_iiii:jsCall_iiii,jsCall_iiiii:jsCall_iiiii,jsCall_iiiiii:jsCall_iiiiii,jsCall_iiiiiii:jsCall_iiiiiii,jsCall_iiiiij:jsCall_iiiiij,jsCall_iiiji:jsCall_iiiji,jsCall_jiiij:jsCall_jiiij,jsCall_jiji:jsCall_jiji,jsCall_v:jsCall_v,jsCall_vi:jsCall_vi,jsCall_vii:jsCall_vii,jsCall_viidi:jsCall_viidi,jsCall_viidii:jsCall_viidii,jsCall_viifi:jsCall_viifi,jsCall_viii:jsCall_viii,jsCall_viiii:jsCall_viiii,jsCall_viiiifii:jsCall_viiiifii,jsCall_viiiii:jsCall_viiiii,jsCall_viiiiii:jsCall_viiiiii,jsCall_viiiiiifi:jsCall_viiiiiifi,jsCall_viiiiiii:jsCall_viiiiiii,jsCall_viiiiiiii:jsCall_viiiiiiii,jsCall_viiiiiiiii:jsCall_viiiiiiiii,jsCall_viiiiiiiiii:jsCall_viiiiiiiiii,jsCall_viiiiiiiiiii:jsCall_viiiiiiiiiii,jsCall_viiiiiiiiiiii:jsCall_viiiiiiiiiiii,jsCall_viiiiiiiiiiiiii:jsCall_viiiiiiiiiiiiii,___buildEnvironment:___buildEnvironment,___setErrNo:___setErrNo,___syscall140:___syscall140,___syscall146:___syscall146,___syscall221:___syscall221,___syscall3:___syscall3,___syscall5:___syscall5,___syscall54:___syscall54,___syscall6:___syscall6,_abort:_abort,_clock:_clock,_emscripten_memcpy_big:_emscripten_memcpy_big,_fabs:_fabs,_ftime:_ftime,_getenv:_getenv,_gettimeofday:_gettimeofday,_gmtime_r:_gmtime_r,_llvm_exp2_f64:_llvm_exp2_f64,_llvm_log2_f32:_llvm_log2_f32,_llvm_trunc_f64:_llvm_trunc_f64,_localtime_r:_localtime_r,_mktime:_mktime,_pthread_cond_destroy:_pthread_cond_destroy,_pthread_cond_init:_pthread_cond_init,_pthread_cond_signal:_pthread_cond_signal,_pthread_cond_wait:_pthread_cond_wait,_pthread_create:_pthread_create,_pthread_join:_pthread_join,_pthread_mutex_destroy:_pthread_mutex_destroy,_pthread_mutex_init:_pthread_mutex_init,_pthread_once:_pthread_once,_strftime:_strftime,_sysconf:_sysconf,DYNAMICTOP_PTR:DYNAMICTOP_PTR,STACKTOP:STACKTOP};var initialStackTop,asm=Module.asm(Module.asmGlobalArg,Module.asmLibraryArg,buffer),___emscripten_environ_constructor=(Module.asm=asm,Module.___emscripten_environ_constructor=function(){return Module.asm.___emscripten_environ_constructor.apply(null,arguments)}),___errno_location=Module.___errno_location=function(){return Module.asm.___errno_location.apply(null,arguments)},__get_daylight=Module.__get_daylight=function(){return Module.asm.__get_daylight.apply(null,arguments)},__get_timezone=Module.__get_timezone=function(){return Module.asm.__get_timezone.apply(null,arguments)},__get_tzname=Module.__get_tzname=function(){return Module.asm.__get_tzname.apply(null,arguments)},_closeDecoder=Module._closeDecoder=function(){return Module.asm._closeDecoder.apply(null,arguments)},_decodeOnePacket=Module._decodeOnePacket=function(){return Module.asm._decodeOnePacket.apply(null,arguments)},_emscripten_replace_memory=Module._emscripten_replace_memory=function(){return Module.asm._emscripten_replace_memory.apply(null,arguments)},_free=Module._free=function(){return Module.asm._free.apply(null,arguments)},_initDecoder=Module._initDecoder=function(){return Module.asm._initDecoder.apply(null,arguments)},_malloc=Module._malloc=function(){return Module.asm._malloc.apply(null,arguments)},_openDecoder=Module._openDecoder=function(){return Module.asm._openDecoder.apply(null,arguments)},_seekTo=Module._seekTo=function(){return Module.asm._seekTo.apply(null,arguments)},_sendData=Module._sendData=function(){return Module.asm._sendData.apply(null,arguments)},_uninitDecoder=Module._uninitDecoder=function(){return Module.asm._uninitDecoder.apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return Module.asm.stackAlloc.apply(null,arguments)},dynCall_v=Module.dynCall_v=function(){return Module.asm.dynCall_v.apply(null,arguments)},dynCall_vi=Module.dynCall_vi=function(){return Module.asm.dynCall_vi.apply(null,arguments)};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),postRun()))}e=e||Module.arguments,0<runDependencies||(preRun(),0<runDependencies||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}function exit(e,t){t&&Module.noExitRuntime&&0===e||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=e,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}function abort(e){throw Module.onAbort&&Module.onAbort(e),e=void 0!==e?(Module.print(e),Module.printErr(e),JSON.stringify(e)):"",ABORT=!0,EXITSTATUS=1,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(Module.asm=asm,Module.getMemory=getMemory,Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,Module.addFunction=addFunction,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.run=run,Module.exit=exit,Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);0<Module.preInit.length;)Module.preInit.pop()();Module.noExitRuntime=!0,run();