montana/Russian/Site/messenger/dist/rlottie-wasm.b8cd14b929a7127811bd.js
2026-05-18 18:05:32 +03:00

1 line
64 KiB
JavaScript

var key,Module=void 0!==Module?Module:{},moduleOverrides={};for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var arguments_=[],thisProgram="./this.program",quit_=function(e,r){throw r},ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var read_,readAsync,readBinary,setWindowTitle,nodeFS,nodePath,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}ENVIRONMENT_IS_NODE?(scriptDirectory=ENVIRONMENT_IS_WORKER?require("path").dirname(scriptDirectory)+"/":__dirname+"/",read_=function(e,r){return nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e),nodeFS.readFileSync(e,r?null:"utf8")},readBinary=function(e){var r=read_(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),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",abort),quit_=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"}):ENVIRONMENT_IS_SHELL?("undefined"!=typeof read&&(read_=function(e){return read(e)}),readBinary=function(e){var r;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(assert("object"==typeof(r=read(e,"binary"))),r)},"undefined"!=typeof scriptArgs?arguments_=scriptArgs:"undefined"!=typeof arguments&&(arguments_=arguments),"function"==typeof quit&&(quit_=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",read_=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),readAsync=function(e,r,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)},setWindowTitle=function(e){document.title=e});var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);function dynamicAlloc(e){var r=HEAP32[DYNAMICTOP_PTR>>2],t=r+e+15&-16;return HEAP32[DYNAMICTOP_PTR>>2]=t,r}function getNativeTypeSize(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var r=Number(e.substr(1));return assert(r%8==0,"getNativeTypeSize invalid bits "+r+", type "+e),r/8}return 0}}moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var wasmBinary,noExitRuntime,wasmMemory,tempRet0=0,setTempRet0=function(e){tempRet0=e},getTempRet0=function(){return tempRet0};function setValue(e,r,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":HEAP8[0|e]=r;break;case"i16":HEAP16[e>>1]=r;break;case"i32":HEAP32[e>>2]=r;break;case"i64":tempI64=[r>>>0,(tempDouble=r,+Math_abs(tempDouble)>=1?tempDouble>0?(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]=r;break;case"double":HEAPF64[e>>3]=r;break;default:abort("invalid type for setValue: "+t)}}Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),"object"!=typeof WebAssembly&&err("no native wasm support detected");var wasmTable=new WebAssembly.Table({initial:522,maximum:522,element:"anyfunc"}),ABORT=!1,EXITSTATUS=0;function assert(e,r){e||abort("Assertion failed: "+r)}function getCFunc(e){var r=Module["_"+e];return assert(r,"Cannot call unknown function "+e+", make sure it is exported"),r}function ccall(e,r,t,n,o){var a={string:function(e){var r=0;if(null!=e&&0!==e){var t=1+(e.length<<2);stringToUTF8(e,r=stackAlloc(t),t)}return r},array:function(e){var r=stackAlloc(e.length);return writeArrayToMemory(e,r),r}},i=getCFunc(e),s=[],u=0;if(n)for(var l=0;l<n.length;l++){var c=a[t[l]];c?(0===u&&(u=stackSave()),s[l]=c(n[l])):s[l]=n[l]}var d=i.apply(null,s);return d=function(e){return"string"===r?UTF8ToString(e):"boolean"===r?Boolean(e):e}(d),0!==u&&stackRestore(u),d}function cwrap(e,r,t,n){var o=(t=t||[]).every(function(e){return"number"===e});return"string"!==r&&o&&!n?getCFunc(e):function(){return ccall(e,r,t,arguments,n)}}var ALLOC_NONE=3;function allocate(e,r,t,n){var o,a;"number"==typeof e?(o=!0,a=e):(o=!1,a=e.length);var i,s="string"==typeof r?r:null;if(i=t==ALLOC_NONE?n:[_malloc,stackAlloc,dynamicAlloc][t](Math.max(a,s?1:r.length)),o){var u;for(n=i,assert(!(3&i)),u=i+(-4&a);n<u;n+=4)HEAP32[n>>2]=0;for(u=i+a;n<u;)HEAP8[0|n++]=0;return i}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,i):HEAPU8.set(new Uint8Array(e),i),i;for(var l,c,d,f=0;f<a;){var m=e[f];0!==(l=s||r[f])?("i64"==l&&(l="i32"),setValue(i+f,m,l),d!==l&&(c=getNativeTypeSize(l),d=l),f+=c):f++}return i}var UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function UTF8ToString(e,r){return e?UTF8ArrayToString(HEAPU8,e,r):""}function stringToUTF8Array(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function stringToUTF8(e,r,t){return stringToUTF8Array(e,HEAPU8,r,t)}function lengthBytesUTF8(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}function writeArrayToMemory(e,r){HEAP8.set(e,r)}function writeAsciiToMemory(e,r,t){for(var n=0;n<e.length;++n)HEAP8[0|r++]=e.charCodeAt(n);t||(HEAP8[0|r]=0)}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,WASM_PAGE_SIZE=65536;function alignUp(e,r){return e%r>0&&(e+=r-e%r),e}function updateGlobalBufferAndViews(e){buffer=e,Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var DYNAMIC_BASE=5275232,DYNAMICTOP_PTR=32192,INITIAL_INITIAL_MEMORY=Module.INITIAL_MEMORY||16777216;function callRuntimeCallbacks(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var t=r.func;"number"==typeof t?void 0===r.arg?Module.dynCall_v(t):Module.dynCall_vi(t,r.arg):t(void 0===r.arg?null:r.arg)}else r(Module)}}(wasmMemory=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:INITIAL_INITIAL_MEMORY/WASM_PAGE_SIZE,maximum:2147483648/WASM_PAGE_SIZE}))&&(buffer=wasmMemory.buffer),INITIAL_INITIAL_MEMORY=buffer.byteLength,updateGlobalBufferAndViews(buffer),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],runtimeInitialized=!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 initRuntime(){runtimeInitialized=!0,Module.noFSInit||FS.init.initialized||FS.init(),TTY.init(),callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=!1,callRuntimeCallbacks(__ATMAIN__)}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)}var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}function abort(e){throw Module.onAbort&&Module.onAbort(e),out(e+=""),err(e),ABORT=!0,EXITSTATUS=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function hasPrefix(e,r){return String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r)}Module.preloadedImages={},Module.preloadedAudios={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(e){return hasPrefix(e,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(e){return hasPrefix(e,fileURIPrefix)}var tempDouble,tempI64,wasmBinaryFile="rlottie-wasm.wasm";function getBinary(){try{if(wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(wasmBinaryFile);throw"both async and sync fetching of the wasm failed"}catch(e){abort(e)}}function getBinaryPromise(){return wasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!=typeof fetch||isFileURI(wasmBinaryFile)?new Promise(function(e,r){e(getBinary())}):fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()}).catch(function(){return getBinary()})}function createWasm(){var e={a:asmLibraryArg};function r(e,r){var t=e.exports;Module.asm=t,removeRunDependency("wasm-instantiate")}function t(e){r(e.instance)}function n(r){return getBinaryPromise().then(function(r){return WebAssembly.instantiate(r,e)}).then(r,function(e){err("failed to asynchronously prepare wasm: "+e),abort(e)})}if(addRunDependency("wasm-instantiate"),Module.instantiateWasm)try{return Module.instantiateWasm(e,r)}catch(e){return err("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||isFileURI(wasmBinaryFile)||"function"!=typeof fetch)return n(t);fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(r){return WebAssembly.instantiateStreaming(r,e).then(t,function(e){err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),n(t)})})}(),{}}function demangle(e){return e}function demangleAll(e){return e.replace(/\b_Z[\w\d_]+/g,function(e){var r=demangle(e);return e===r?e:r+" ["+e+"]"})}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}function __ZN7VRegionC1ERK5VRect(){err("missing function: _ZN7VRegionC1ERK5VRect"),abort(-1)}function __ZN7VRegionD1Ev(){err("missing function: _ZN7VRegionD1Ev"),abort(-1)}function __ZN7VRegionpLERK5VRect(){err("missing function: _ZN7VRegionpLERK5VRect"),abort(-1)}function __ZNK7VRegion12boundingRectEv(){err("missing function: _ZNK7VRegion12boundingRectEv"),abort(-1)}function ___assert_fail(e,r,t,n){abort("Assertion failed: "+UTF8ToString(e)+", at: "+[r?UTF8ToString(r):"unknown filename",t,n?UTF8ToString(n):"unknown function"])}function setErrNo(e){return HEAP32[___errno_location()>>2]=e,e}function ___map_file(e,r){return setErrNo(63),-1}isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile)),__ATINIT__.push({func:function(){___wasm_call_ctors()}});var PATH={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,r){for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:function(e){var r="/"===e.charAt(0),t="/"===e.substr(-1);return(e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:function(e){var r=PATH.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(e){if("/"===e)return"/";var r=e.lastIndexOf("/");return-1===r?e:e.substr(r+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,r){return PATH.normalize(e+"/"+r)}},PATH_FS={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:FS.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r="/"===n.charAt(0)}return(r?"/":"")+(e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!r).join("/"))||"."},relative:function(e,r){function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=PATH_FS.resolve(e).substr(1),r=PATH_FS.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){TTY.ttys[e]={input:[],output:[],ops:r},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var r=TTY.ttys[e.node.rdev];if(!r)throw new FS.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new FS.ErrnoError(29)}if(void 0===s&&0===a)throw new FS.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new FS.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if(ENVIRONMENT_IS_NODE){var t=Buffer.alloc?Buffer.alloc(256):new Buffer(256),n=0;try{n=nodeFS.readSync(process.stdin.fd,t,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;n=0}r=n>0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n");if(!r)return null;e.input=intArrayFromString(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(out(UTF8ArrayToString(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(err(UTF8ArrayToString(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},MEMFS={ops_table:null,mount:function(e){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(FS.isBlkdev(t)||FS.isFIFO(t))throw new FS.ErrnoError(63);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}});var o=FS.createNode(e,r,t,n);return FS.isDir(o.mode)?(o.node_ops=MEMFS.ops_table.dir.node,o.stream_ops=MEMFS.ops_table.dir.stream,o.contents={}):FS.isFile(o.mode)?(o.node_ops=MEMFS.ops_table.file.node,o.stream_ops=MEMFS.ops_table.file.stream,o.usedBytes=0,o.contents=null):FS.isLink(o.mode)?(o.node_ops=MEMFS.ops_table.link.node,o.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(o.mode)&&(o.node_ops=MEMFS.ops_table.chrdev.node,o.stream_ops=MEMFS.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o),o},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var r=[],t=0;t<e.usedBytes;++t)r.push(e.contents[t]);return r}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var t=e.contents;return e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),void(e.usedBytes=r)}if(e.contents||(e.contents=[]),e.contents.length>r)e.contents.length=r;else for(;e.contents.length<r;)e.contents.push(0);e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=FS.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,FS.isDir(e.mode)?r.size=4096:FS.isFile(e.mode)?r.size=e.usedBytes:FS.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&MEMFS.resizeFileStorage(e,r.size)},lookup:function(e,r){throw FS.genericErrors[44]},mknod:function(e,r,t,n){return MEMFS.createNode(e,r,t,n)},rename:function(e,r,t){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new FS.ErrnoError(55)}delete e.parent.contents[e.name],e.name=t,r.contents[t]=e,e.parent=r},unlink:function(e,r){delete e.contents[r]},rmdir:function(e,r){var t=FS.lookupNode(e,r);for(var n in t.contents)throw new FS.ErrnoError(55);delete e.contents[r]},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=MEMFS.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===HEAP8.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(MEMFS.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&FS.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new FS.ErrnoError(28);return n},allocate:function(e,r,t){MEMFS.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o,a,i){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(43);var s,u,l=e.node.contents;if(2&i||l.buffer!==r.buffer){(o>0||o+n<l.length)&&(l=l.subarray?l.subarray(o,o+n):Array.prototype.slice.call(l,o,o+n)),u=!0;var c=r.buffer==HEAP8.buffer;if(!(s=_malloc(n)))throw new FS.ErrnoError(48);(c?HEAP8:r).set(l,s)}else u=!1,s=l.byteOffset;return{ptr:s,allocated:u}},msync:function(e,r,t,n,o){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(43);return 2&o||MEMFS.stream_ops.write(e,r,0,n,t,!1),0}}},FS={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))throw e+" : "+stackTrace();return setErrNo(e.errno)},lookupPath:function(e,r){if(r=r||{},!(e=PATH_FS.resolve(FS.cwd(),e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===r[n]&&(r[n]=t[n]);if(r.recurse_count>8)throw new FS.ErrnoError(32);for(var o=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!1),a=FS.root,i="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&r.parent)break;if(a=FS.lookupNode(a,o[s]),i=PATH.join2(i,o[s]),FS.isMountpoint(a)&&(!u||u&&r.follow_mount)&&(a=a.mounted.root),!u||r.follow)for(var l=0;FS.isLink(a.mode);){var c=FS.readlink(i);if(i=PATH_FS.resolve(PATH.dirname(i),c),a=FS.lookupPath(i,{recurse_count:r.recurse_count}).node,l++>40)throw new FS.ErrnoError(32)}}return{path:i,node:a}},getPath:function(e){for(var r;;){if(FS.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:function(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%FS.nameTable.length},hashAddNode:function(e){var r=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[r],FS.nameTable[r]=e},hashRemoveNode:function(e){var r=FS.hashName(e.parent.id,e.name);if(FS.nameTable[r]===e)FS.nameTable[r]=e.name_next;else for(var t=FS.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:function(e,r){var t=FS.mayLookup(e);if(t)throw new FS.ErrnoError(t,e);for(var n=FS.hashName(e.id,r),o=FS.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return FS.lookup(e,r)},createNode:function(e,r,t,n){var o=new FS.FSNode(e,r,t,n);return FS.hashAddNode(o),o},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&~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 r=FS.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:function(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:function(e,r){return FS.ignorePermissions||(-1===r.indexOf("r")||292&e.mode)&&(-1===r.indexOf("w")||146&e.mode)&&(-1===r.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){return FS.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,r){try{return FS.lookupNode(e,r),20}catch(e){}return FS.nodePermissions(e,"wx")},mayDelete:function(e,r,t){var n;try{n=FS.lookupNode(e,r)}catch(e){return e.errno}var o=FS.nodePermissions(e,"wx");if(o)return o;if(t){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen:function(e,r){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&("r"!==FS.flagsToPermissionString(r)||512&r)?31:FS.nodePermissions(e,FS.flagsToPermissionString(r)):44},MAX_OPEN_FDS:4096,nextfd:function(e,r){e=e||0,r=r||FS.MAX_OPEN_FDS;for(var t=e;t<=r;t++)if(!FS.streams[t])return t;throw new FS.ErrnoError(33)},getStream:function(e){return FS.streams[e]},createStream:function(e,r,t){FS.FSStream||(FS.FSStream=function(){},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!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new FS.FSStream;for(var o in e)n[o]=e[o];e=n;var a=FS.nextfd(r,t);return e.fd=a,FS.streams[a]=e,e},closeStream:function(e){FS.streams[e]=null},chrdev_stream_ops:{open:function(e){var r=FS.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new FS.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,r){return e<<8|r},registerDevice:function(e,r){FS.devices[e]={stream_ops:r}},getDevice:function(e){return FS.devices[e]},getMounts:function(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:function(e,r){"function"==typeof e&&(r=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=FS.getMounts(FS.root.mount),n=0;function o(e){return FS.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(function(r){if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:function(e,r,t){var n,o="/"===t,a=!t;if(o&&FS.root)throw new FS.ErrnoError(10);if(!o&&!a){var i=FS.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,FS.isMountpoint(n))throw new FS.ErrnoError(10);if(!FS.isDir(n.mode))throw new FS.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?FS.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var r=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(r.node))throw new FS.ErrnoError(28);var t=r.node,n=t.mounted,o=FS.getMounts(n);Object.keys(FS.nameTable).forEach(function(e){for(var r=FS.nameTable[e];r;){var t=r.name_next;-1!==o.indexOf(r.mount)&&FS.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:function(e,r){return e.node_ops.lookup(e,r)},mknod:function(e,r,t){var n=FS.lookupPath(e,{parent:!0}).node,o=PATH.basename(e);if(!o||"."===o||".."===o)throw new FS.ErrnoError(28);var a=FS.mayCreate(n,o);if(a)throw new FS.ErrnoError(a);if(!n.node_ops.mknod)throw new FS.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:function(e,r){return r=void 0!==r?r:438,r&=4095,r|=32768,FS.mknod(e,r,0)},mkdir:function(e,r){return r=void 0!==r?r:511,r&=1023,r|=16384,FS.mknod(e,r,0)},mkdirTree:function(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{FS.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,r,t){return void 0===t&&(t=r,r=438),r|=8192,FS.mknod(e,r,t)},symlink:function(e,r){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var t=FS.lookupPath(r,{parent:!0}).node;if(!t)throw new FS.ErrnoError(44);var n=PATH.basename(r),o=FS.mayCreate(t,n);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.symlink)throw new FS.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:function(e,r){var t,n,o=PATH.dirname(e),a=PATH.dirname(r),i=PATH.basename(e),s=PATH.basename(r);try{t=FS.lookupPath(e,{parent:!0}).node,n=FS.lookupPath(r,{parent:!0}).node}catch(e){throw new FS.ErrnoError(10)}if(!t||!n)throw new FS.ErrnoError(44);if(t.mount!==n.mount)throw new FS.ErrnoError(75);var u,l=FS.lookupNode(t,i),c=PATH_FS.relative(e,a);if("."!==c.charAt(0))throw new FS.ErrnoError(28);if("."!==(c=PATH_FS.relative(r,o)).charAt(0))throw new FS.ErrnoError(55);try{u=FS.lookupNode(n,s)}catch(e){}if(l!==u){var d=FS.isDir(l.mode),f=FS.mayDelete(t,i,d);if(f)throw new FS.ErrnoError(f);if(f=u?FS.mayDelete(n,s,d):FS.mayCreate(n,s))throw new FS.ErrnoError(f);if(!t.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(l)||u&&FS.isMountpoint(u))throw new FS.ErrnoError(10);if(n!==t&&(f=FS.nodePermissions(t,"w")))throw new FS.ErrnoError(f);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(e,r)}catch(t){err("FS.trackingDelegate['willMovePath']('"+e+"', '"+r+"') threw an exception: "+t.message)}FS.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{FS.hashAddNode(l)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(e,r)}catch(t){err("FS.trackingDelegate['onMovePath']('"+e+"', '"+r+"') threw an exception: "+t.message)}}},rmdir:function(e){var r=FS.lookupPath(e,{parent:!0}).node,t=PATH.basename(e),n=FS.lookupNode(r,t),o=FS.mayDelete(r,t,!0);if(o)throw new FS.ErrnoError(o);if(!r.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(n))throw new FS.ErrnoError(10);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(r){err("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+r.message)}r.node_ops.rmdir(r,t),FS.destroyNode(n);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(r){err("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+r.message)}},readdir:function(e){var r=FS.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new FS.ErrnoError(54);return r.node_ops.readdir(r)},unlink:function(e){var r=FS.lookupPath(e,{parent:!0}).node,t=PATH.basename(e),n=FS.lookupNode(r,t),o=FS.mayDelete(r,t,!1);if(o)throw new FS.ErrnoError(o);if(!r.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(n))throw new FS.ErrnoError(10);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(r){err("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+r.message)}r.node_ops.unlink(r,t),FS.destroyNode(n);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(r){err("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+r.message)}},readlink:function(e){var r=FS.lookupPath(e).node;if(!r)throw new FS.ErrnoError(44);if(!r.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(r.parent),r.node_ops.readlink(r))},stat:function(e,r){var t=FS.lookupPath(e,{follow:!r}).node;if(!t)throw new FS.ErrnoError(44);if(!t.node_ops.getattr)throw new FS.ErrnoError(63);return t.node_ops.getattr(t)},lstat:function(e){return FS.stat(e,!0)},chmod:function(e,r,t){var n;if(!(n="string"==typeof e?FS.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,r){FS.chmod(e,r,!0)},fchmod:function(e,r){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);FS.chmod(t.node,r)},chown:function(e,r,t,n){var o;if(!(o="string"==typeof e?FS.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new FS.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,r,t){FS.chown(e,r,t,!0)},fchown:function(e,r,t){var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(8);FS.chown(n.node,r,t)},truncate:function(e,r){if(r<0)throw new FS.ErrnoError(28);var t;if(!(t="string"==typeof e?FS.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(t.mode))throw new FS.ErrnoError(31);if(!FS.isFile(t.mode))throw new FS.ErrnoError(28);var n=FS.nodePermissions(t,"w");if(n)throw new FS.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:function(e,r){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);if(!(2097155&t.flags))throw new FS.ErrnoError(28);FS.truncate(t.node,r)},utime:function(e,r,t){var n=FS.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:function(e,r,t,n,o){if(""===e)throw new FS.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?FS.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)a=e;else{e=PATH.normalize(e);try{a=FS.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var i=!1;if(64&r)if(a){if(128&r)throw new FS.ErrnoError(20)}else a=FS.mknod(e,t,0),i=!0;if(!a)throw new FS.ErrnoError(44);if(FS.isChrdev(a.mode)&&(r&=-513),65536&r&&!FS.isDir(a.mode))throw new FS.ErrnoError(54);if(!i){var s=FS.mayOpen(a,r);if(s)throw new FS.ErrnoError(s)}512&r&&FS.truncate(a,0),r&=-131713;var u=FS.createStream({node:a,path:FS.getPath(a),flags:r,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,o);u.stream_ops.open&&u.stream_ops.open(u),!Module.logReadFiles||1&r||(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1,err("FS.trackingDelegate error on read file: "+e)));try{if(FS.trackingDelegate.onOpenFile){var l=0;1!=(2097155&r)&&(l|=FS.tracking.openFlags.READ),2097155&r&&(l|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(e,l)}}catch(r){err("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+r.message)}return u},close:function(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);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,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:function(e,r,t,n,o){if(n<0||o<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(1==(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new FS.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:function(e,r,t,n,o,a){if(n<0||o<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&1024&e.flags&&FS.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new FS.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);i||(e.position+=s);try{e.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(e.path)}catch(r){err("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+r.message)}return s},allocate:function(e,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(r<0||t<=0)throw new FS.ErrnoError(28);if(!(2097155&e.flags))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:function(e,r,t,n,o,a,i){if(2&a&&!(2&i)&&2!=(2097155&e.flags))throw new FS.ErrnoError(2);if(1==(2097155&e.flags))throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o,a,i)},msync:function(e,r,t,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0},munmap:function(e){return 0},ioctl:function(e,r,t){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:function(e,r){if((r=r||{}).flags=r.flags||"r",r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=FS.open(e,r.flags),o=FS.stat(e).size,a=new Uint8Array(o);return FS.read(n,a,0,o,0),"utf8"===r.encoding?t=UTF8ArrayToString(a,0):"binary"===r.encoding&&(t=a),FS.close(n),t},writeFile:function(e,r,t){(t=t||{}).flags=t.flags||"w";var n=FS.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(lengthBytesUTF8(r)+1),a=stringToUTF8Array(r,o,0,o.length);FS.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");FS.write(n,r,0,r.byteLength,void 0,t.canOwn)}FS.close(n)},cwd:function(){return FS.currentPath},chdir:function(e){var r=FS.lookupPath(e,{follow:!0});if(null===r.node)throw new FS.ErrnoError(44);if(!FS.isDir(r.node.mode))throw new FS.ErrnoError(54);var t=FS.nodePermissions(r.node,"x");if(t)throw new FS.ErrnoError(t);FS.currentPath=r.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){var e;if(FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(e,r,t,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)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);e=function(){return crypto.getRandomValues(r),r[0]}}else if(ENVIRONMENT_IS_NODE)try{var t=require("crypto");e=function(){return t.randomBytes(1)[0]}}catch(e){}e||(e=function(){abort("random_device")}),FS.createDevice("/dev","random",e),FS.createDevice("/dev","urandom",e),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,r){var t=+r,n=FS.getStream(t);if(!n)throw new FS.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},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"),FS.open("/dev/stdin","r"),FS.open("/dev/stdout","w"),FS.open("/dev/stderr","w")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[44].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}},init:function(e,r,t){FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=r||Module.stdout,Module.stderr=t||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var e=Module._fflush;e&&e(0);for(var r=0;r<FS.streams.length;r++){var t=FS.streams[r];t&&FS.close(t)}},getMode:function(e,r){var t=0;return e&&(t|=365),r&&(t|=146),t},joinPath:function(e,r){var t=PATH.join.apply(null,e);return r&&"/"==t[0]&&(t=t.substr(1)),t},absolutePath:function(e,r){return PATH_FS.resolve(r,e)},standardizePath:function(e){return PATH.normalize(e)},findObject:function(e,r){var t=FS.analyzePath(e,r);return t.exists?t.object:(setErrNo(t.error),null)},analyzePath:function(e,r){try{e=(n=FS.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=FS.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=PATH.basename(e),n=FS.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createFolder:function(e,r,t,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),r),a=FS.getMode(t,n);return FS.mkdir(o,a)},createPath:function(e,r,t,n){e="string"==typeof e?e:FS.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=PATH.join2(e,a);try{FS.mkdir(i)}catch(e){}e=i}}return i},createFile:function(e,r,t,n,o){var a=PATH.join2("string"==typeof e?e:FS.getPath(e),r),i=FS.getMode(n,o);return FS.create(a,i)},createDataFile:function(e,r,t,n,o,a){var i=r?PATH.join2("string"==typeof e?e:FS.getPath(e),r):e,s=FS.getMode(n,o),u=FS.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}FS.chmod(u,146|s);var f=FS.open(u,"w");FS.write(f,t,0,t.length,0,a),FS.close(f),FS.chmod(u,s)}return u},createDevice:function(e,r,t,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),r),a=FS.getMode(!!t,!!n);FS.createDevice.major||(FS.createDevice.major=64);var i=FS.makedev(FS.createDevice.major++,0);return FS.registerDevice(i,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new FS.ErrnoError(29)}if(void 0===u&&0===i)throw new FS.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new FS.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),FS.mkdev(o,a,i)},createLink:function(e,r,t,n,o){var a=PATH.join2("string"==typeof e?e:FS.getPath(e),r);return FS.symlink(t,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var r=!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(!read_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(read_(e.url),!0),e.usedBytes=e.contents.length}catch(e){r=!1}return r||setErrNo(29),r},createLazyFile:function(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter(function(e){var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,r){if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):intArrayFromString(o.responseText||"",!0)}(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!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 a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=FS.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(u.stream_ops).forEach(function(e){var r=u.stream_ops[e];l[e]=function(){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(29);return r.apply(null,arguments)}}),l.read=function(e,r,t,n,o){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(29);var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i},u.stream_ops=l,u},createPreloadedFile:function(e,r,t,n,o,a,i,s,u,l){Browser.init();var c=r?PATH_FS.resolve(PATH.join2(e,r)):e,d=getUniqueRunDependency("cp "+c);function f(t){function f(t){l&&l(),s||FS.createDataFile(e,r,t,n,o,u),a&&a(),removeRunDependency(d)}var m=!1;Module.preloadPlugins.forEach(function(e){m||e.canHandle(c)&&(e.handle(t,c,f,function(){i&&i(),removeRunDependency(d)}),m=!0)}),m||f(t)}addRunDependency(d),"string"==typeof t?Browser.asyncLoad(t,function(e){f(e)},i):f(t)},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(e,r,t){r=r||function(){},t=t||function(){};var n=FS.indexedDB();try{var o=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=function(){out("creating db"),o.result.createObjectStore(FS.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([FS.DB_STORE_NAME],"readwrite"),a=n.objectStore(FS.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(function(e){var r=a.put(FS.analyzePath(e).object.contents,e);r.onsuccess=function(){++i+s==u&&l()},r.onerror=function(){s++,i+s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:function(e,r,t){r=r||function(){},t=t||function(){};var n=FS.indexedDB();try{var o=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=function(){var n=o.result;try{var a=n.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){return void t(e)}var i=a.objectStore(FS.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(function(e){var r=i.get(e);r.onsuccess=function(){FS.analyzePath(e).exists&&FS.unlink(e),FS.createDataFile(PATH.dirname(e),PATH.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=function(){u++,s+u==l&&c()}}),a.onerror=t},o.onerror=t}},SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(e,r){if("/"!==r[0]){var t;if(-100===e)t=FS.cwd();else{var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(8);t=n.path}r=PATH.join2(t,r)}return r},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&PATH.normalize(r)!==PATH.normalize(FS.getPath(e.node)))return-54;throw e}return HEAP32[t>>2]=n.dev,HEAP32[t+4>>2]=0,HEAP32[t+8>>2]=n.ino,HEAP32[t+12>>2]=n.mode,HEAP32[t+16>>2]=n.nlink,HEAP32[t+20>>2]=n.uid,HEAP32[t+24>>2]=n.gid,HEAP32[t+28>>2]=n.rdev,HEAP32[t+32>>2]=0,tempI64=[n.size>>>0,(tempDouble=n.size,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+40>>2]=tempI64[0],HEAP32[t+44>>2]=tempI64[1],HEAP32[t+48>>2]=4096,HEAP32[t+52>>2]=n.blocks,HEAP32[t+56>>2]=n.atime.getTime()/1e3|0,HEAP32[t+60>>2]=0,HEAP32[t+64>>2]=n.mtime.getTime()/1e3|0,HEAP32[t+68>>2]=0,HEAP32[t+72>>2]=n.ctime.getTime()/1e3|0,HEAP32[t+76>>2]=0,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+80>>2]=tempI64[0],HEAP32[t+84>>2]=tempI64[1],0},doMsync:function(e,r,t,n,o){var a=HEAPU8.slice(e,e+t);FS.msync(r,a,o,t,n)},doMkdir:function(e,r){return"/"===(e=PATH.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),FS.mkdir(e,r,0),0},doMknod:function(e,r,t){switch(61440&r){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(e,r,t),0},doReadlink:function(e,r,t){if(t<=0)return-28;var n=FS.readlink(e),o=Math.min(t,lengthBytesUTF8(n)),a=HEAP8[r+o];return stringToUTF8(n,r,t+1),HEAP8[r+o]=a,o},doAccess:function(e,r){if(-8&r)return-28;var t;if(!(t=FS.lookupPath(e,{follow:!0}).node))return-44;var n="";return 4&r&&(n+="r"),2&r&&(n+="w"),1&r&&(n+="x"),n&&FS.nodePermissions(t,n)?-2:0},doDup:function(e,r,t){var n=FS.getStream(t);return n&&FS.close(n),FS.open(e,r,0,t,t).fd},doReadv:function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=HEAP32[r+8*a>>2],s=HEAP32[r+(8*a+4)>>2],u=FS.read(e,HEAP8,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=HEAP32[r+8*a>>2],s=HEAP32[r+(8*a+4)>>2],u=FS.write(e,HEAP8,i,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(e){return UTF8ToString(e)},getStreamFromFD:function(e){var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);return r},get64:function(e,r){return e}};function ___sys_fcntl64(e,r,t){SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 0:return(o=SYSCALLS.get())<0?-28:FS.open(n.path,n.flags,0,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=SYSCALLS.get();return n.flags|=o,0;case 12:return o=SYSCALLS.get(),HEAP16[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return setErrNo(28),-1}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___sys_ioctl(e,r,t){SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=SYSCALLS.get();return HEAP32[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=SYSCALLS.get(),FS.ioctl(n,r,o);default:abort("bad ioctl syscall "+r)}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function syscallMunmap(e,r){if(-1==(0|e)||0===r)return-28;var t=SYSCALLS.mappings[e];if(!t)return 0;if(r===t.len){var n=FS.getStream(t.fd);2&t.prot&&SYSCALLS.doMsync(e,n,r,t.flags,t.offset),FS.munmap(n),SYSCALLS.mappings[e]=null,t.allocated&&_free(t.malloc)}return 0}function ___sys_munmap(e,r){try{return syscallMunmap(e,r)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___sys_open(e,r,t){SYSCALLS.varargs=t;try{var n=SYSCALLS.getStr(e),o=SYSCALLS.get();return FS.open(n,r,o).fd}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function _abort(){abort()}var setjmpId=0;function _saveSetjmp(e,r,t,n){r|=0,t|=0,n|=0;var o=0;for(setjmpId=setjmpId+1|0,HEAP32[(e|=0)>>2]=setjmpId;(0|o)<(0|n);){if(!(0|HEAP32[t+(o<<3)>>2]))return HEAP32[t+(o<<3)>>2]=setjmpId,HEAP32[t+(4+(o<<3))>>2]=r,HEAP32[t+(8+(o<<3))>>2]=0,setTempRet0(0|n),0|t;o=o+1|0}return t=0|_saveSetjmp(0|e,0|r,0|(t=0|_realloc(0|t,8*(1+(n=2*n|0)|0)|0)),0|n),setTempRet0(0|n),0|t}function _testSetjmp(e,r,t){e|=0,r|=0,t|=0;for(var n=0,o=0;(0|n)<(0|t)&&0|(o=0|HEAP32[r+(n<<3)>>2]);){if((0|o)==(0|e))return 0|HEAP32[r+(4+(n<<3))>>2];n=n+1|0}return 0}function _longjmp(e,r){throw _setThrew(e,r||1),"longjmp"}function _emscripten_longjmp(e,r){_longjmp(e,r)}function _emscripten_memcpy_big(e,r,t){HEAPU8.copyWithin(e,r,r+t)}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(e){try{return wasmMemory.grow(e-buffer.byteLength+65535>>>16),updateGlobalBufferAndViews(wasmMemory.buffer),1}catch(e){}}function _emscripten_resize_heap(e){e>>>=0;var r=_emscripten_get_heap_size(),t=2147483648;if(e>t)return!1;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),emscripten_realloc_buffer(Math.min(t,alignUp(Math.max(16777216,e,o),65536))))return!0}return!1}var ENV={};function __getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:__getExecutableName()};for(var r in ENV)e[r]=ENV[r];var t=[];for(var r in e)t.push(r+"="+e[r]);getEnvStrings.strings=t}return getEnvStrings.strings}function _environ_get(e,r){var t=0;return getEnvStrings().forEach(function(n,o){var a=r+t;HEAP32[e+4*o>>2]=a,writeAsciiToMemory(n,a),t+=n.length+1}),0}function _environ_sizes_get(e,r){var t=getEnvStrings();HEAP32[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),HEAP32[r>>2]=n,0}function _fd_close(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.close(r),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_read(e,r,t,n){try{var o=SYSCALLS.getStreamFromFD(e),a=SYSCALLS.doReadv(o,r,t);return HEAP32[n>>2]=a,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_seek(e,r,t,n,o){try{var a=SYSCALLS.getStreamFromFD(e),i=4294967296*t+(r>>>0),s=9007199254740992;return i<=-s||i>=s?-61:(FS.llseek(a,i,n),tempI64=[a.position>>>0,(tempDouble=a.position,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[o>>2]=tempI64[0],HEAP32[o+4>>2]=tempI64[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_write(e,r,t,n){try{var o=SYSCALLS.getStreamFromFD(e),a=SYSCALLS.doWritev(o,r,t);return HEAP32[n>>2]=a,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _getTempRet0(){return 0|getTempRet0()}function _round(e){return(e=+e)>=0?+Math_floor(e+.5):+Math_ceil(e-.5)}function _setTempRet0(e){setTempRet0(0|e)}function __isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function __arraySum(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}var __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,r){for(var t=new Date(e.getTime());r>0;){var n=__isLeapYear(t.getFullYear()),o=t.getMonth(),a=(n?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function _strftime(e,r,t,n){var o=HEAP32[n+40>>2],a={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?UTF8ToString(o):""},i=UTF8ToString(t),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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return d(e,r,"0")}function m(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function S(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 p(e){var r=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=S(t),a=S(n);return m(o,r)<=0?m(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var _={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":function(e){return f(e.tm_mday+__arraySum(__isLeapYear(e.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=new Date(e.tm_year+1900,0,1),t=0===r.getDay()?r:__addDays(r,7-r.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(t,n)<0){var o=__arraySum(__isLeapYear(n.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,n.getMonth()-1)-31,a=31-t.getDate()+o+n.getDate();return f(Math.ceil(a/7),2)}return 0===m(t,r)?"01":"00"},"%V":function(e){var r,t=new Date(e.tm_year+1900,0,4),n=new Date(e.tm_year+1901,0,4),o=S(t),a=S(n),i=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday);return m(i,o)<0?"53":m(a,i)<=0?"01":(r=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),f(Math.ceil(r/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var r=new Date(e.tm_year,0,1),t=1===r.getDay()?r:__addDays(r,0===r.getDay()?1:7-r.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(t,n)<0){var o=__arraySum(__isLeapYear(n.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,n.getMonth()-1)-31,a=31-t.getDate()+o+n.getDate();return f(Math.ceil(a/7),2)}return 0===m(t,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 r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in _)i.indexOf(u)>=0&&(i=i.replace(new RegExp(u,"g"),_[u](a)));var F=intArrayFromString(i,!1);return F.length>r?0:(writeArrayToMemory(F,e),F.length-1)}function _strftime_l(e,r,t,n){return _strftime(e,r,t,n)}var FSNode=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},readMode=365,writeMode=146;function intArrayFromString(e,r,t){var n=t>0?t:lengthBytesUTF8(e)+1,o=new Array(n),a=stringToUTF8Array(e,o,0,o.length);return r&&(o.length=a),o}Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(e){e?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(e){e?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}),FS.FSNode=FSNode,FS.staticInit();var asmLibraryArg={o:__ZN7VRegionC1ERK5VRect,m:__ZN7VRegionD1Ev,n:__ZN7VRegionpLERK5VRect,x:__ZNK7VRegion12boundingRectEv,a:___assert_fail,u:___map_file,h:___sys_fcntl64,z:___sys_ioctl,t:___sys_munmap,A:___sys_open,d:_abort,c:_emscripten_longjmp,q:_emscripten_memcpy_big,r:_emscripten_resize_heap,v:_environ_get,w:_environ_sizes_get,g:_fd_close,y:_fd_read,p:_fd_seek,f:_fd_write,b:_getTempRet0,k:invoke_iii,B:invoke_vi,memory:wasmMemory,i:_round,l:_saveSetjmp,j:_setTempRet0,s:_strftime_l,table:wasmTable,e:_testSetjmp},asm=createWasm();Module.asm=asm;var calledRun,___wasm_call_ctors=Module.___wasm_call_ctors=function(){return(___wasm_call_ctors=Module.___wasm_call_ctors=Module.asm.C).apply(null,arguments)},_lottie_init=Module._lottie_init=function(){return(_lottie_init=Module._lottie_init=Module.asm.D).apply(null,arguments)},_lottie_resize=Module._lottie_resize=function(){return(_lottie_resize=Module._lottie_resize=Module.asm.E).apply(null,arguments)},_free=Module._free=function(){return(_free=Module._free=Module.asm.F).apply(null,arguments)},_lottie_load_from_data=Module._lottie_load_from_data=function(){return(_lottie_load_from_data=Module._lottie_load_from_data=Module.asm.G).apply(null,arguments)},_lottie_buffer=Module._lottie_buffer=function(){return(_lottie_buffer=Module._lottie_buffer=Module.asm.H).apply(null,arguments)},_lottie_destroy=Module._lottie_destroy=function(){return(_lottie_destroy=Module._lottie_destroy=Module.asm.I).apply(null,arguments)},_lottie_render=Module._lottie_render=function(){return(_lottie_render=Module._lottie_render=Module.asm.J).apply(null,arguments)},_malloc=Module._malloc=function(){return(_malloc=Module._malloc=Module.asm.K).apply(null,arguments)},_realloc=Module._realloc=function(){return(_realloc=Module._realloc=Module.asm.L).apply(null,arguments)},___errno_location=Module.___errno_location=function(){return(___errno_location=Module.___errno_location=Module.asm.M).apply(null,arguments)},_setThrew=Module._setThrew=function(){return(_setThrew=Module._setThrew=Module.asm.N).apply(null,arguments)},dynCall_vi=Module.dynCall_vi=function(){return(dynCall_vi=Module.dynCall_vi=Module.asm.O).apply(null,arguments)},dynCall_iii=Module.dynCall_iii=function(){return(dynCall_iii=Module.dynCall_iii=Module.asm.P).apply(null,arguments)},stackSave=Module.stackSave=function(){return(stackSave=Module.stackSave=Module.asm.Q).apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return(stackAlloc=Module.stackAlloc=Module.asm.R).apply(null,arguments)},stackRestore=Module.stackRestore=function(){return(stackRestore=Module.stackRestore=Module.asm.S).apply(null,arguments)},dynCall_v=Module.dynCall_v=function(){return(dynCall_v=Module.dynCall_v=Module.asm.T).apply(null,arguments)};function invoke_iii(e,r,t){var n=stackSave();try{return dynCall_iii(e,r,t)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_vi(e,r){var t=stackSave();try{dynCall_vi(e,r)}catch(e){if(stackRestore(t),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function r(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),postRun()))}e=e||arguments_,runDependencies>0||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()))}if(Module.asm=asm,Module.intArrayFromString=intArrayFromString,Module.cwrap=cwrap,Module.allocate=allocate,dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.run=run,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();noExitRuntime=!0,run();