Files
preview/ui/decoder-simd.js
bosscheng ca38d3bc19 add simd
2022-06-26 00:01:07 +08:00

2 lines
162 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _r=n(e),br=n(t),Pr=n(r),g=function(C){var e,k=C={exports:{}},g=void 0!==g?g:{},j={};for(e in g={print:function(e){console.log("Jessibuca: [worker]:",e)},printErr:function(e){console.warn("Jessibuca: [worker]:",e),postMessage({cmd:"wasmError",message:e})}})g.hasOwnProperty(e)&&(j[e]=g[e]);var H="./this.program",X="object"==typeof window,d="function"==typeof importScripts,Q="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,t=!X&&!Q&&!d;if(g.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var L,B,W,o,G,r="";if(Q){if("object"!=typeof process)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");r=d?_r.default.dirname(r)+"/":__dirname+"/",L=function(e,t){return o=o||br.default,e=(G=G||_r.default).normalize(e),o.readFileSync(e,t?null:"utf8")},W=function(e){e=L(e,!0);return A((e=e.buffer?e:new Uint8Array(e)).buffer),e},B=function(e,r,n){o=o||br.default,e=(G=G||_r.default).normalize(e),o.readFile(e,function(e,t){e?n(e):r(t.buffer)})},1<process.argv.length&&(H=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),k.exports=g,process.on("uncaughtException",function(e){if(!(e instanceof yr))throw e}),process.on("unhandledRejection",E),g.inspect=function(){return"[Emscripten Module object]"}}else if(t){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(L=function(e){return read(e)}),W=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(A("object"==typeof(e=read(e,"binary"))),e)},B=function(e,t,r){setTimeout(function(){t(W(e))},0)},"undefined"!=typeof print&&((console="undefined"==typeof console?{}:console).log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!X&&!d)throw new Error("environment detection error");if(d?r=self.location.href:"undefined"!=typeof document&&document.currentScript&&(r=document.currentScript.src),r=0!==r.indexOf("blob:")?r.substr(0,r.lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");L=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),B=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)}}var $,z,V=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);for(e in j)j.hasOwnProperty(e)&&(g[e]=j[e]);function T(e){T.shown||(T.shown={}),T.shown[e]||(T.shown[e]=1,s(e))}j=null,g.arguments,Object.getOwnPropertyDescriptor(g,"arguments")||Object.defineProperty(g,"arguments",{configurable:!0,get:function(){E("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),g.thisProgram&&(H=g.thisProgram),Object.getOwnPropertyDescriptor(g,"thisProgram")||Object.defineProperty(g,"thisProgram",{configurable:!0,get:function(){E("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),g.quit,Object.getOwnPropertyDescriptor(g,"quit")||Object.defineProperty(g,"quit",{configurable:!0,get:function(){E("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),A(void 0===g.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),A(void 0===g.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),A(void 0===g.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),A(void 0===g.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),A(void 0===g.read,"Module.read option was removed (modify read_ in JS)"),A(void 0===g.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),A(void 0===g.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),A(void 0===g.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),A(void 0===g.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(g,"read")||Object.defineProperty(g,"read",{configurable:!0,get:function(){E("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(g,"readAsync")||Object.defineProperty(g,"readAsync",{configurable:!0,get:function(){E("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(g,"readBinary")||Object.defineProperty(g,"readBinary",{configurable:!0,get:function(){E("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(g,"setWindowTitle")||Object.defineProperty(g,"setWindowTitle",{configurable:!0,get:function(){E("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),A(!t,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable."),g.wasmBinary&&($=g.wasmBinary),Object.getOwnPropertyDescriptor(g,"wasmBinary")||Object.defineProperty(g,"wasmBinary",{configurable:!0,get:function(){E("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),g.noExitRuntime,Object.getOwnPropertyDescriptor(g,"noExitRuntime")||Object.defineProperty(g,"noExitRuntime",{configurable:!0,get:function(){E("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&E("no native wasm support detected");var Y=!1;function A(e,t){e||E("Assertion failed: "+t)}var q="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function i(e,t,r){for(var n=t+r,o=t;e[o]&&!(n<=o);)++o;if(16<o-t&&e.subarray&&q)return q.decode(e.subarray(t,o));for(var i="";t<o;){var a,s,c=e[t++];128&c?(a=63&e[t++],192!=(224&c)?(s=63&e[t++],(c=224==(240&c)?(15&c)<<12|a<<6|s:(240!=(248&c)&&T("Invalid UTF-8 leading byte 0x"+c.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),(7&c)<<18|a<<12|s<<6|63&e[t++]))<65536?i+=String.fromCharCode(c):(s=c-65536,i+=String.fromCharCode(55296|s>>10,56320|1023&s))):i+=String.fromCharCode((31&c)<<6|a)):i+=String.fromCharCode(c)}return i}function K(e,t){return e?i(I,e,t):""}function J(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(i<=r+3)break;1114111<s&&T("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function Z(e,t,r){A("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),J(e,I,t,r)}function ee(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:4}return t}var te,F,I,c,re,N,p,ne,oe,ie="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ae(e,t){A(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r,n=e>>1,o=n+t/2;!(o<=n)&&re[n];)++n;if(32<(r=n<<1)-e&&ie)return ie.decode(I.subarray(e,r));for(var i="",a=0;!(t/2<=a);++a){var s=c[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function se(e,t,r){if(A(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),A("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),(r=void 0===r?2147483647:r)<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);c[t>>1]=a,t+=2}return c[t>>1]=0,t-n}function ce(e){return 2*e.length}function de(e,t){A(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(t/4<=r);){var o,i=N[e+4*r>>2];if(0==i)break;++r,65536<=i?(o=i-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o)):n+=String.fromCharCode(i)}return n}function ue(e,t,r){if(A(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),A("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),(r=void 0===r?2147483647:r)<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),N[t>>2]=a,(t+=4)+4>o)break}return N[t>>2]=0,t-n}function le(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&n<=57343&&++r,t+=4}return t}function pe(e){var t=ee(e)+1,r=ur(t);return r&&J(e,F,r,t),r}function fe(e){te=e,g.HEAP8=F=new Int8Array(e),g.HEAP16=c=new Int16Array(e),g.HEAP32=N=new Int32Array(e),g.HEAPU8=I=new Uint8Array(e),g.HEAPU16=re=new Uint16Array(e),g.HEAPU32=p=new Uint32Array(e),g.HEAPF32=ne=new Float32Array(e),g.HEAPF64=oe=new Float64Array(e)}t=5242880;g.TOTAL_STACK&&A(t===g.TOTAL_STACK,"the stack size can no longer be determined at runtime");var Ee,he=g.INITIAL_MEMORY||67108864;function ge(){var e=Er();A(0==(3&e)),p[1+(e>>2)]=34821223,p[2+(e>>2)]=2310721022,N[0]=1668509029}function Te(){var e,t;Y||(t=Er(),e=p[1+(t>>2)],t=p[2+(t>>2)],34821223==e&&2310721022==t||E("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==N[0]&&E("Runtime error: The application has corrupted its heap memory area (address zero)!"))}Object.getOwnPropertyDescriptor(g,"INITIAL_MEMORY")||Object.defineProperty(g,"INITIAL_MEMORY",{configurable:!0,get:function(){E("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),A(t<=he,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+he+"! (TOTAL_STACK=5242880)"),A("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),A(!g.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),A(67108864==he,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically");t=new Int16Array(1),he=new Int8Array(t.buffer);if(t[0]=25459,115!==he[0]||99!==he[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)";var a,u,l,Oe=[],me=[],we=[],ye=!1,n=(A(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),A(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),0),f=null,De=null,_e={};function be(e){for(var t=e;;){if(!_e[e])return e;e=t+Math.random()}}function Pe(e){n++,g.monitorRunDependencies&&g.monitorRunDependencies(n),e?(A(!_e[e]),_e[e]=1,null===f&&"undefined"!=typeof setInterval&&(f=setInterval(function(){if(Y)return clearInterval(f),void(f=null);var e,t=!1;for(e in _e)t||(t=!0,s("still waiting on run dependencies:")),s("dependency: "+e);t&&s("(end of list)")},1e4))):s("warning: run dependency added without ID")}function ve(e){n--,g.monitorRunDependencies&&g.monitorRunDependencies(n),e?(A(_e[e]),delete _e[e]):s("warning: run dependency removed without ID"),0==n&&(null!==f&&(clearInterval(f),f=null),De)&&(e=De,De=null,e())}function E(e){throw g.onAbort&&g.onAbort(e),s(e+=""),Y=!0,e="abort("+e+") at "+(t=Ie(),g.extraStackTrace&&(t+="\n"+g.extraStackTrace()),Fe(t)),new WebAssembly.RuntimeError(e);var t}function Re(e){return e.startsWith("data:application/octet-stream;base64,")}function Me(e){return e.startsWith("file://")}function h(r,n){return function(){var e=r,t=n;return n||(t=g.asm),A(ye,"native function `"+e+"` called before runtime initialization"),A(!0,"native function `"+e+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t[r]||A(t[r],"exported native function `"+e+"` not found"),t[r].apply(null,arguments)}}function Se(e){try{if(e==a&&$)return new Uint8Array($);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(e){E(e)}}function Ae(e){for(;0<e.length;){var t,r=e.shift();"function"!=typeof r?"number"==typeof(t=r.func)?void 0===r.arg?Ee.get(t)():Ee.get(t)(r.arg):t(void 0===r.arg?null:r.arg):r(g)}}function Fe(e){return e.replace(/\b_Z[\w\d_]+/g,function(e){var t=e;return T("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e===t?e:t+" ["+e+"]"})}function Ie(){var t=new Error;if(!t.stack){try{throw new Error}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}g.preloadedImages={},g.preloadedAudios={},Re(a="decoder-simd.wasm")||(a=function(e){return g.locateFile?g.locateFile(e,r):r+e}(a));var O={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=O.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t?e:".")&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var e=O.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=(e=O.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return O.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return O.normalize(e.join("/"))},join2:function(e,t){return O.normalize(e+"/"+t)}},m={resolve:function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:D.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?"/":"")+O.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=m.resolve(e).substr(1),t=m.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 c=[],s=a;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")}},w={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){w.ttys[e]={input:[],output:[],ops:t},D.registerDevice(e,w.stream_ops)},stream_ops:{open:function(e){var t=w.ttys[e.node.rdev];if(!t)throw new D.ErrnoError(43);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 D.ErrnoError(60);for(var i,a=0,s=0;s<n;s++){try{i=e.tty.ops.get_char(e.tty)}catch(e){throw new D.ErrnoError(29)}if(void 0===i&&0===a)throw new D.ErrnoError(6);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 D.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new D.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(Q){var r=Buffer.alloc(256),n=0;try{n=o.readSync(process.stdin.fd,r,0,256,null)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}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=ar(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(V(i(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(V(i(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(s(i(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(s(i(e.output,0)),e.output=[])}}};function Ne(e){t=e,A(65536,"alignment argument is required"),e=65536*Math.ceil(t/65536);var t=wr(65536,e);return t?(e=e,I.fill(0,t,t+e),t):0}var y={ops_table:null,mount:function(e){return y.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(D.isBlkdev(r)||D.isFIFO(r))throw new D.ErrnoError(63);y.ops_table||(y.ops_table={dir:{node:{getattr:y.node_ops.getattr,setattr:y.node_ops.setattr,lookup:y.node_ops.lookup,mknod:y.node_ops.mknod,rename:y.node_ops.rename,unlink:y.node_ops.unlink,rmdir:y.node_ops.rmdir,readdir:y.node_ops.readdir,symlink:y.node_ops.symlink},stream:{llseek:y.stream_ops.llseek}},file:{node:{getattr:y.node_ops.getattr,setattr:y.node_ops.setattr},stream:{llseek:y.stream_ops.llseek,read:y.stream_ops.read,write:y.stream_ops.write,allocate:y.stream_ops.allocate,mmap:y.stream_ops.mmap,msync:y.stream_ops.msync}},link:{node:{getattr:y.node_ops.getattr,setattr:y.node_ops.setattr,readlink:y.node_ops.readlink},stream:{}},chrdev:{node:{getattr:y.node_ops.getattr,setattr:y.node_ops.setattr},stream:D.chrdev_stream_ops}});r=D.createNode(e,t,r,n);return D.isDir(r.mode)?(r.node_ops=y.ops_table.dir.node,r.stream_ops=y.ops_table.dir.stream,r.contents={}):D.isFile(r.mode)?(r.node_ops=y.ops_table.file.node,r.stream_ops=y.ops_table.file.stream,r.usedBytes=0,r.contents=null):D.isLink(r.mode)?(r.node_ops=y.ops_table.link.node,r.stream_ops=y.ops_table.link.stream):D.isChrdev(r.mode)&&(r.node_ops=y.ops_table.chrdev.node,r.stream_ops=y.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},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,t){var r=e.contents?e.contents.length:0;t<=r||(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))},resizeFileStorage:function(e,t){var r;e.usedBytes!=t&&(0==t?(e.contents=null,e.usedBytes=0):(r=e.contents,e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t))},node_ops:{getattr:function(e){var t={};return t.dev=D.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,D.isDir(e.mode)?t.size=4096:D.isFile(e.mode)?t.size=e.usedBytes:D.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&&y.resizeFileStorage(e,t.size)},lookup:function(e,t){throw D.genericErrors[44]},mknod:function(e,t,r,n){return y.createNode(e,t,r,n)},rename:function(e,t,r){if(D.isDir(e.mode)){var n;try{n=D.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new D.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){for(var r in D.lookupNode(e,t).contents)throw new D.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},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=y.createNode(e,t,41471,0);return e.link=r,e},readlink:function(e){if(D.isLink(e.mode))return e.link;throw new D.ErrnoError(28)}},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(A(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(A(!(t instanceof ArrayBuffer)),t.buffer===F.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return A(0===o,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+n),a.usedBytes=n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(y.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&&D.isFile(e.node.mode)&&(t+=e.node.usedBytes),t<0)throw new D.ErrnoError(28);return t},allocate:function(e,t,r){y.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new D.ErrnoError(28);if(!D.isFile(e.node.mode))throw new D.ErrnoError(43);var a,s,t=e.node.contents;if(2&i||t.buffer!==te){if((0<n||n+r<t.length)&&(t=t.subarray?t.subarray(n,n+r):Array.prototype.slice.call(t,n,n+r)),s=!0,!(a=Ne(r)))throw new D.ErrnoError(48);F.set(t,a)}else s=!1,a=t.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(D.isFile(e.node.mode))return 2&o||y.stream_ops.write(e,t,0,n,r,!1),0;throw new D.ErrnoError(43)}}},Ue={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},xe={},D={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e,t){if(t=t||{},!(e=m.resolve(D.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 D.ErrnoError(32);for(var o=O.normalizeArray(e.split("/").filter(function(e){return!!e}),!1),i=D.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=D.lookupNode(i,o[s]),a=O.join2(a,o[s]),!D.isMountpoint(i)||c&&!t.follow_mount||(i=i.mounted.root),!c||t.follow)for(var d=0;D.isLink(i.mode);){var u=D.readlink(a),a=m.resolve(O.dirname(a),u),i=D.lookupPath(a,{recurse_count:t.recurse_count}).node;if(40<d++)throw new D.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var t,r;;){if(D.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)%D.nameTable.length},hashAddNode:function(e){var t=D.hashName(e.parent.id,e.name);e.name_next=D.nameTable[t],D.nameTable[t]=e},hashRemoveNode:function(e){var t=D.hashName(e.parent.id,e.name);if(D.nameTable[t]===e)D.nameTable[t]=e.name_next;else for(var r=D.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=D.mayLookup(e);if(r)throw new D.ErrnoError(r,e);for(var r=D.hashName(e.id,t),n=D.nameTable[r];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return D.lookup(e,t)},createNode:function(e,t,r,n){A("object"==typeof e);e=new D.FSNode(e,t,r,n);return D.hashAddNode(e),e},destroyNode:function(e){D.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,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=D.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 D.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){return D.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return D.lookupNode(e,t),20}catch(e){}return D.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=D.lookupNode(e,t)}catch(e){return e.errno}t=D.nodePermissions(e,"wx");if(t)return t;if(r){if(!D.isDir(n.mode))return 54;if(D.isRoot(n)||D.getPath(n)===D.cwd())return 10}else if(D.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?D.isLink(e.mode)?32:D.isDir(e.mode)&&("r"!==D.flagsToPermissionString(t)||512&t)?31:D.nodePermissions(e,D.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){t=t||D.MAX_OPEN_FDS;for(var r=e=e||0;r<=t;r++)if(!D.streams[r])return r;throw new D.ErrnoError(33)},getStream:function(e){return D.streams[e]},createStream:function(e,t,r){D.FSStream||(D.FSStream=function(){},D.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 D.FSStream;for(n in e)o[n]=e[n];e=o;t=D.nextfd(t,r);return e.fd=t,D.streams[t]=e},closeStream:function(e){D.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=D.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new D.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){D.devices[e]={stream_ops:t}},getDevice:function(e){return D.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),D.syncFSRequests++,1<D.syncFSRequests&&s("warning: "+D.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=D.getMounts(D.root.mount),o=0;function i(e){return A(0<D.syncFSRequests),D.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){if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&D.root)throw new D.ErrnoError(10);if(!o&&!i){i=D.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,D.isMountpoint(n))throw new D.ErrnoError(10);if(!D.isDir(n.mode))throw new D.ErrnoError(54)}i={type:e,opts:t,mountpoint:r,mounts:[]},t=e.mount(i);return(t.mount=i).root=t,o?D.root=t:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),t},unmount:function(e){e=D.lookupPath(e,{follow_mount:!1});if(!D.isMountpoint(e.node))throw new D.ErrnoError(28);var e=e.node,t=e.mounted,n=D.getMounts(t),t=(Object.keys(D.nameTable).forEach(function(e){for(var t=D.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&D.destroyNode(t),t=r}}),e.mounted=null,e.mount.mounts.indexOf(t));A(-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=D.lookupPath(e,{parent:!0}).node,e=O.basename(e);if(!e||"."===e||".."===e)throw new D.ErrnoError(28);var o=D.mayCreate(n,e);if(o)throw new D.ErrnoError(o);if(n.node_ops.mknod)return n.node_ops.mknod(n,e,t,r);throw new D.ErrnoError(63)},create:function(e,t){return D.mknod(e,t=(t=void 0!==t?t:438)&4095|32768,0)},mkdir:function(e,t){return D.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{D.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),D.mknod(e,t|=8192,r)},symlink:function(e,t){if(!m.resolve(e))throw new D.ErrnoError(44);var r=D.lookupPath(t,{parent:!0}).node;if(!r)throw new D.ErrnoError(44);var t=O.basename(t),n=D.mayCreate(r,t);if(n)throw new D.ErrnoError(n);if(r.node_ops.symlink)return r.node_ops.symlink(r,t,e);throw new D.ErrnoError(63)},rename:function(e,t){var r=O.dirname(e),n=O.dirname(t),o=O.basename(e),i=O.basename(t),a=D.lookupPath(e,{parent:!0}).node,s=D.lookupPath(t,{parent:!0}).node;if(!a||!s)throw new D.ErrnoError(44);if(a.mount!==s.mount)throw new D.ErrnoError(75);var c,d=D.lookupNode(a,o);if("."!==m.relative(e,n).charAt(0))throw new D.ErrnoError(28);if("."!==m.relative(t,r).charAt(0))throw new D.ErrnoError(55);try{c=D.lookupNode(s,i)}catch(e){}if(d!==c){n=D.isDir(d.mode),t=D.mayDelete(a,o,n);if(t)throw new D.ErrnoError(t);if(t=c?D.mayDelete(s,i,n):D.mayCreate(s,i))throw new D.ErrnoError(t);if(!a.node_ops.rename)throw new D.ErrnoError(63);if(D.isMountpoint(d)||c&&D.isMountpoint(c))throw new D.ErrnoError(10);if(s!==a&&(t=D.nodePermissions(a,"w")))throw new D.ErrnoError(t);D.hashRemoveNode(d);try{a.node_ops.rename(d,s,i)}catch(e){throw e}finally{D.hashAddNode(d)}}},rmdir:function(e){var t=D.lookupPath(e,{parent:!0}).node,e=O.basename(e),r=D.lookupNode(t,e),n=D.mayDelete(t,e,!0);if(n)throw new D.ErrnoError(n);if(!t.node_ops.rmdir)throw new D.ErrnoError(63);if(D.isMountpoint(r))throw new D.ErrnoError(10);t.node_ops.rmdir(t,e),D.destroyNode(r)},readdir:function(e){e=D.lookupPath(e,{follow:!0}).node;if(e.node_ops.readdir)return e.node_ops.readdir(e);throw new D.ErrnoError(54)},unlink:function(e){var t=D.lookupPath(e,{parent:!0}).node,e=O.basename(e),r=D.lookupNode(t,e),n=D.mayDelete(t,e,!1);if(n)throw new D.ErrnoError(n);if(!t.node_ops.unlink)throw new D.ErrnoError(63);if(D.isMountpoint(r))throw new D.ErrnoError(10);t.node_ops.unlink(t,e),D.destroyNode(r)},readlink:function(e){e=D.lookupPath(e).node;if(!e)throw new D.ErrnoError(44);if(e.node_ops.readlink)return m.resolve(D.getPath(e.parent),e.node_ops.readlink(e));throw new D.ErrnoError(28)},stat:function(e,t){e=D.lookupPath(e,{follow:!t}).node;if(!e)throw new D.ErrnoError(44);if(e.node_ops.getattr)return e.node_ops.getattr(e);throw new D.ErrnoError(63)},lstat:function(e){return D.stat(e,!0)},chmod:function(e,t,r){r="string"==typeof e?D.lookupPath(e,{follow:!r}).node:e;if(!r.node_ops.setattr)throw new D.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod:function(e,t){D.chmod(e,t,!0)},fchmod:function(e,t){e=D.getStream(e);if(!e)throw new D.ErrnoError(8);D.chmod(e.node,t)},chown:function(e,t,r,n){n="string"==typeof e?D.lookupPath(e,{follow:!n}).node:e;if(!n.node_ops.setattr)throw new D.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:function(e,t,r){D.chown(e,t,r,!0)},fchown:function(e,t,r){e=D.getStream(e);if(!e)throw new D.ErrnoError(8);D.chown(e.node,t,r)},truncate:function(e,t){if(t<0)throw new D.ErrnoError(28);e="string"==typeof e?D.lookupPath(e,{follow:!0}).node:e;if(!e.node_ops.setattr)throw new D.ErrnoError(63);if(D.isDir(e.mode))throw new D.ErrnoError(31);if(!D.isFile(e.mode))throw new D.ErrnoError(28);var r=D.nodePermissions(e,"w");if(r)throw new D.ErrnoError(r);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){e=D.getStream(e);if(!e)throw new D.ErrnoError(8);if(0==(2097155&e.flags))throw new D.ErrnoError(28);D.truncate(e.node,t)},utime:function(e,t,r){e=D.lookupPath(e,{follow:!0}).node;e.node_ops.setattr(e,{timestamp:Math.max(t,r)})},open:function(e,t,r,n,o){if(""===e)throw new D.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?D.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=O.normalize(e);try{i=D.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t)if(i){if(128&t)throw new D.ErrnoError(20)}else i=D.mknod(e,r,0),a=!0;if(!i)throw new D.ErrnoError(44);if(D.isChrdev(i.mode)&&(t&=-513),65536&t&&!D.isDir(i.mode))throw new D.ErrnoError(54);if(!a){r=D.mayOpen(i,t);if(r)throw new D.ErrnoError(r)}512&t&&D.truncate(i,0),t&=-131713;a=D.createStream({node:i,path:D.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1},n,o);return a.stream_ops.open&&a.stream_ops.open(a),!g.logReadFiles||1&t||(D.readFiles||(D.readFiles={}),e in D.readFiles||(D.readFiles[e]=1)),a},close:function(e){if(D.isClosed(e))throw new D.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{D.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(D.isClosed(e))throw new D.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new D.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new D.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new D.ErrnoError(28);if(D.isClosed(e))throw new D.ErrnoError(8);if(1==(2097155&e.flags))throw new D.ErrnoError(8);if(D.isDir(e.node.mode))throw new D.ErrnoError(31);if(!e.stream_ops.read)throw new D.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new D.ErrnoError(70)}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 D.ErrnoError(28);if(D.isClosed(e))throw new D.ErrnoError(8);if(0==(2097155&e.flags))throw new D.ErrnoError(8);if(D.isDir(e.node.mode))throw new D.ErrnoError(31);if(!e.stream_ops.write)throw new D.ErrnoError(28);e.seekable&&1024&e.flags&&D.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new D.ErrnoError(70)}else o=e.position;t=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=t),t},allocate:function(e,t,r){if(D.isClosed(e))throw new D.ErrnoError(8);if(t<0||r<=0)throw new D.ErrnoError(28);if(0==(2097155&e.flags))throw new D.ErrnoError(8);if(!D.isFile(e.node.mode)&&!D.isDir(e.node.mode))throw new D.ErrnoError(43);if(!e.stream_ops.allocate)throw new D.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new D.ErrnoError(2);if(1==(2097155&e.flags))throw new D.ErrnoError(2);if(e.stream_ops.mmap)return e.stream_ops.mmap(e,t,r,n,o,i);throw new D.ErrnoError(43)},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 D.ErrnoError(59)},readFile:function(e,t){if((t=t||{}).flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=D.open(e,t.flags),e=D.stat(e).size,o=new Uint8Array(e);return D.read(n,o,0,e,0),"utf8"===t.encoding?r=i(o,0):"binary"===t.encoding&&(r=o),D.close(n),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||577;e=D.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(ee(t)+1),o=J(t,n,0,n.length);D.write(e,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");D.write(e,t,0,t.byteLength,void 0,r.canOwn)}D.close(e)},cwd:function(){return D.currentPath},chdir:function(e){e=D.lookupPath(e,{follow:!0});if(null===e.node)throw new D.ErrnoError(44);if(!D.isDir(e.node.mode))throw new D.ErrnoError(54);var t=D.nodePermissions(e.node,"x");if(t)throw new D.ErrnoError(t);D.currentPath=e.path},createDefaultDirectories:function(){D.mkdir("/tmp"),D.mkdir("/home"),D.mkdir("/home/web_user")},createDefaultDevices:function(){D.mkdir("/dev"),D.registerDevice(D.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),D.mkdev("/dev/null",D.makedev(1,3)),w.register(D.makedev(5,0),w.default_tty_ops),w.register(D.makedev(6,0),w.default_tty1_ops),D.mkdev("/dev/tty",D.makedev(5,0)),D.mkdev("/dev/tty1",D.makedev(6,0));var e=function(){var e;if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=new Uint8Array(1),function(){return crypto.getRandomValues(e),e[0]};if(Q)try{var t=Pr.default;return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){E("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}}();D.createDevice("/dev","random",e),D.createDevice("/dev","urandom",e),D.mkdir("/dev/shm"),D.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){D.mkdir("/proc");var t=D.mkdir("/proc/self");D.mkdir("/proc/self/fd"),D.mount({mount:function(){var e=D.createNode(t,"fd",16895,73);return e.node_ops={lookup:function(e,t){var r=D.getStream(+t);if(!r)throw new D.ErrnoError(8);t={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return t.parent=t}},e}},{},"/proc/self/fd")},createStandardStreams:function(){g.stdin?D.createDevice("/dev","stdin",g.stdin):D.symlink("/dev/tty","/dev/stdin"),g.stdout?D.createDevice("/dev","stdout",null,g.stdout):D.symlink("/dev/tty","/dev/stdout"),g.stderr?D.createDevice("/dev","stderr",null,g.stderr):D.symlink("/dev/tty1","/dev/stderr");var e=D.open("/dev/stdin",0),t=D.open("/dev/stdout",1),r=D.open("/dev/stderr",1);A(0===e.fd,"invalid handle for stdin ("+e.fd+")"),A(1===t.fd,"invalid handle for stdout ("+t.fd+")"),A(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:function(){D.ErrnoError||(D.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,xe)if(xe[t]===e){this.code=t;break}},this.setErrno(e),this.message=Ue[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Fe(this.stack))},D.ErrnoError.prototype=new Error,D.ErrnoError.prototype.constructor=D.ErrnoError,[44].forEach(function(e){D.genericErrors[e]=new D.ErrnoError(e),D.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){D.ensureErrnoError(),D.nameTable=new Array(4096),D.mount(y,{},"/"),D.createDefaultDirectories(),D.createDefaultDevices(),D.createSpecialDirectories(),D.filesystems={MEMFS:y}},init:function(e,t,r){A(!D.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)"),D.init.initialized=!0,D.ensureErrnoError(),g.stdin=e||g.stdin,g.stdout=t||g.stdout,g.stderr=r||g.stderr,D.createStandardStreams()},quit:function(){D.init.initialized=!1;var e=g._fflush;e&&e(0);for(var t=0;t<D.streams.length;t++){var r=D.streams[t];r&&D.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:function(e,t){e=D.analyzePath(e,t);return e.exists?e.object:null},analyzePath:function(e,t){try{e=(n=D.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=D.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=O.basename(e),n=D.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},createPath:function(e,t,r,n){e="string"==typeof e?e:D.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=O.join2(e,i);try{D.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){e=O.join2("string"==typeof e?e:D.getPath(e),t),t=D.getMode(n,o);return D.create(e,t)},createDataFile:function(e,t,r,n,o,i){t=t?O.join2("string"==typeof e?e:D.getPath(e),t):e,e=D.getMode(n,o),n=D.create(t,e);if(r){if("string"==typeof r){for(var a=new Array(r.length),s=0,c=r.length;s<c;++s)a[s]=r.charCodeAt(s);r=a}D.chmod(n,146|e);o=D.open(n,577);D.write(o,r,0,r.length,0,i),D.close(o),D.chmod(n,e)}return n},createDevice:function(e,t,c,a){var e=O.join2("string"==typeof e?e:D.getPath(e),t),t=D.getMode(!!c,!!a),r=(D.createDevice.major||(D.createDevice.major=64),D.makedev(D.createDevice.major++,0));return D.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=c()}catch(e){throw new D.ErrnoError(29)}if(void 0===i&&0===a)throw new D.ErrnoError(6);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 D.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}}),D.mkdev(e,t,r)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!L)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ar(L(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new D.ErrnoError(29)}},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||[]):ar(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,V("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(!d)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 c=D.createFile(e,t,i,r,n),s=(i.contents?c.contents=i.contents:i.url&&(c.contents=null,c.url=i.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}}),{});return Object.keys(c.stream_ops).forEach(function(e){var t=c.stream_ops[e];s[e]=function(){return D.forceLoadFile(c),t.apply(null,arguments)}}),s.read=function(e,t,r,n,o){D.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(A(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},c.stream_ops=s,c},createPreloadedFile:function(o,i,e,a,s,c,d,u,l,p){Browser.init();var t,r,n,f=i?m.resolve(O.join2(o,i)):o,E=be("cp "+f);function h(t){function r(e){p&&p(),u||D.createDataFile(o,i,e,a,s,l),c&&c(),ve(E)}var n=!1;g.preloadPlugins.forEach(function(e){n||e.canHandle(f)&&(e.handle(t,f,r,function(){d&&d(),ve(E)}),n=!0)}),n||r(t)}Pe(E),"string"==typeof e?(r=d,n=be("al "+(t=e)),B(t,function(e){A(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),h(new Uint8Array(e)),n&&ve(n)},function(e){if(!r)throw'Loading data file "'+t+'" failed.';r()}),n&&Pe(n)):h(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,c){s=s||function(){},c=c||function(){};var e=D.indexedDB();try{var d=e.open(D.DB_NAME(),D.DB_VERSION)}catch(a){return c(a)}d.onupgradeneeded=function(){V("creating db"),d.result.createObjectStore(D.DB_STORE_NAME)},d.onsuccess=function(){var e=d.result.transaction([D.DB_STORE_NAME],"readwrite"),t=e.objectStore(D.DB_STORE_NAME),r=0,n=0,o=a.length;function i(){(0==n?s:c)()}a.forEach(function(e){e=t.put(D.analyzePath(e).object.contents,e);e.onsuccess=function(){++r+n==o&&i()},e.onerror=function(){r+ ++n==o&&i()}}),e.onerror=c},d.onerror=c},loadFilesFromDB:function(s,c,d){c=c||function(){},d=d||function(){};var e=D.indexedDB();try{var u=e.open(D.DB_NAME(),D.DB_VERSION)}catch(s){return d(s)}u.onupgradeneeded=d,u.onsuccess=function(){var e=u.result;try{var t=e.transaction([D.DB_STORE_NAME],"readonly")}catch(e){return void d(e)}var r=t.objectStore(D.DB_STORE_NAME),n=0,o=0,i=s.length;function a(){(0==o?c:d)()}s.forEach(function(e){var t=r.get(e);t.onsuccess=function(){D.analyzePath(e).exists&&D.unlink(e),D.createDataFile(O.dirname(e),O.basename(e),t.result,!0,!0,!0),++n+o==i&&a()},t.onerror=function(){n+ ++o==i&&a()}}),t.onerror=d},u.onerror=d},absolutePath:function(){E("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){E("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){E("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){E("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){E("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){E("FS.standardizePath has been removed; use PATH.normalize instead")}},_={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=D.cwd();else{e=D.getStream(e);if(!e)throw new D.ErrnoError(8);n=e.path}if(0!=t.length)return O.join2(n,t);if(r)return n;throw new D.ErrnoError(44)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&O.normalize(t)!==O.normalize(D.getPath(e.node)))return-54;throw e}return N[r>>2]=n.dev,N[r+4>>2]=0,N[r+8>>2]=n.ino,N[r+12>>2]=n.mode,N[r+16>>2]=n.nlink,N[r+20>>2]=n.uid,N[r+24>>2]=n.gid,N[r+28>>2]=n.rdev,N[r+32>>2]=0,l=[n.size>>>0,(u=n.size,1<=+Math.abs(u)?0<u?(0|Math.min(+Math.floor(u/4294967296),4294967295))>>>0:~~+Math.ceil((u-(~~u>>>0))/4294967296)>>>0:0)],N[r+40>>2]=l[0],N[r+44>>2]=l[1],N[r+48>>2]=4096,N[r+52>>2]=n.blocks,N[r+56>>2]=n.atime.getTime()/1e3|0,N[r+60>>2]=0,N[r+64>>2]=n.mtime.getTime()/1e3|0,N[r+68>>2]=0,N[r+72>>2]=n.ctime.getTime()/1e3|0,N[r+76>>2]=0,l=[n.ino>>>0,(u=n.ino,1<=+Math.abs(u)?0<u?(0|Math.min(+Math.floor(u/4294967296),4294967295))>>>0:~~+Math.ceil((u-(~~u>>>0))/4294967296)>>>0:0)],N[r+80>>2]=l[0],N[r+84>>2]=l[1],0},doMsync:function(e,t,r,n,o){e=I.slice(e,e+r);D.msync(t,e,o,r,n)},doMkdir:function(e,t){return"/"===(e=O.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),D.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-28}return D.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var e=D.readlink(e),n=Math.min(r,ee(e)),o=F[t+n];return Z(e,t,r+1),F[t+n]=o,n},doAccess:function(e,t){if(-8&t)return-28;if(!(e=D.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&D.nodePermissions(e,r)?-2:0},doDup:function(e,t,r){var n=D.getStream(r);return n&&D.close(n),D.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=N[t+8*i>>2],s=N[t+(8*i+4)>>2],a=D.read(e,F,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=N[t+8*i>>2],s=N[t+(8*i+4)>>2],a=D.write(e,F,a,s,n);if(a<0)return-1;o+=a}return o},varargs:void 0,get:function(){return A(null!=_.varargs),_.varargs+=4,N[_.varargs-4>>2]},getStr:function(e){return K(e)},getStreamFromFD:function(e){e=D.getStream(e);if(e)return e;throw new D.ErrnoError(8)},get64:function(e,t){return A(0<=e?0===t:-1===t),e}};function Ce(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ke=void 0;function b(e){for(var t="",r=e;I[r];)t+=ke[I[r++]];return t}var je={},He={},Xe={};function Qe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&t<=57?"_"+e:e}function Le(e,t){return e=Qe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Be(e,t){var r=Le(t,function(e){this.name=t,this.message=e;e=new Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),(r.prototype.constructor=r).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var We=void 0;function P(e){throw new We(e)}var Ge=void 0;function $e(e){throw new Ge(e)}function ze(n,t,o){function r(e){var t=o(e);t.length!==n.length&&$e("Mismatched type converter count");for(var r=0;r<n.length;++r)v(n[r],t[r])}n.forEach(function(e){Xe[e]=t});var i=new Array(t.length),a=[],s=0;t.forEach(function(e,t){He.hasOwnProperty(e)?i[t]=He[e]:(a.push(e),je.hasOwnProperty(e)||(je[e]=[]),je[e].push(function(){i[t]=He[e],++s===a.length&&r(i)}))}),0===a.length&&r(i)}function v(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||P('type "'+n+'" must have a positive integer typeid pointer'),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;P("Cannot register type '"+n+"' twice")}He[e]=t,delete Xe[e],je.hasOwnProperty(e)&&(r=je[e],delete je[e],r.forEach(function(e){e()}))}function Ve(e){if(!(this instanceof R))return!1;if(!(e instanceof R))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Ye(e){P(e.$$.ptrType.registeredClass.name+" instance already deleted")}var qe=!1;function Ke(e){}function Je(e){--e.count.value,0===e.count.value&&((e=e).smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr))}function Ze(e){return"undefined"==typeof FinalizationGroup?(Ze=function(e){return e},e):(qe=new FinalizationGroup(function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Je(r):console.warn("object already deleted: "+r.ptr)}}),Ke=function(e){qe.unregister(e.$$)},(Ze=function(e){return qe.register(e,e.$$,e.$$),e})(e))}function et(){if(this.$$.ptr||Ye(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ze(Object.create(Object.getPrototypeOf(this),{$$:{value:{count:(e=this.$$).count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function tt(){this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Ke(this),Je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function rt(){return!this.$$.ptr}var nt=void 0,ot=[];function it(){for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}}function at(){return this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),ot.push(this),1===ot.length&&nt&&nt(it),this.$$.deleteScheduled=!0,this}function R(){}var st={};function ct(e,t,r){var n;void 0===e[t].overloadTable&&(n=e[t],e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||P("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n)}function dt(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function ut(e,t,r){for(;t!==r;)t.upcast||P("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function lt(e,t){if(null===t)return this.isReference&&P("null is not a valid "+this.name),0;t.$$||P('Cannot pass "'+Xt(t)+'" as a '+this.name),t.$$.ptr||P("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return ut(t.$$.ptr,r,this.registeredClass)}function pt(e,t){if(null===t)return this.isReference&&P("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t.$$||P('Cannot pass "'+Xt(t)+'" as a '+this.name),t.$$.ptr||P("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&P("Cannot convert argument of type "+(t.$$.smartPtrType||t.$$.ptrType).name+" to parameter type "+this.name);var r,n,o=t.$$.ptrType.registeredClass;if(n=ut(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:P("Cannot convert argument of type "+(t.$$.smartPtrType||t.$$.ptrType).name+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:t.$$.smartPtrType===this?n=t.$$.smartPtr:(r=t.clone(),n=this.rawShare(n,Ht(function(){r.delete()})),null!==e&&e.push(this.rawDestructor,n));break;default:P("Unsupporting sharing policy")}return n}function ft(e,t){if(null===t)return this.isReference&&P("null is not a valid "+this.name),0;t.$$||P('Cannot pass "'+Xt(t)+'" as a '+this.name),t.$$.ptr||P("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&P("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return ut(t.$$.ptr,r,this.registeredClass)}function Et(e){return this.fromWireType(p[e>>2])}function ht(e){return e=this.rawGetPointee?this.rawGetPointee(e):e}function gt(e){this.rawDestructor&&this.rawDestructor(e)}function Tt(e){null!==e&&e.delete()}function Ot(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;e=Ot(e,t,r.baseClass);return null===e?null:r.downcast(e)}function mt(){return Object.keys(Dt).length}function wt(){var e,t=[];for(e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t}function yt(e){nt=e,ot.length&&nt&&nt(it)}var Dt={};function _t(e,t){return t=function(e,t){for(void 0===t&&P("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Dt[t]}function bt(e,t){return t.ptrType&&t.ptr||$e("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&$e("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ze(Object.create(e,{$$:{value:t}}))}function Pt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=_t(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();r=r.clone();return this.destructor(e),r}function n(){return this.isSmartPointer?bt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):bt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}r=this.registeredClass.getActualType(t),r=st[r];if(!r)return n.call(this);var r=this.isConst?r.constPointerType:r.pointerType,o=Ot(t,this.registeredClass,r.registeredClass);return null===o?n.call(this):this.isSmartPointer?bt(r.registeredClass.instancePrototype,{ptrType:r,ptr:o,smartPtrType:this,smartPtr:e}):bt(r.registeredClass.instancePrototype,{ptrType:r,ptr:o})}function M(e,t,r,n,o,i,a,s,c,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=d,this.rawDestructor=u,o||void 0!==t.baseClass?this.toWireType=pt:(this.toWireType=n?lt:ft,this.destructorFunction=null)}function vt(e,t,r){var n,o;return e.includes("j")?(n=t,o=r,A("dynCall_"+e in g,"bad function pointer type - no table for sig '"+e+"'"),o&&o.length?A(o.length===e.substring(1).replace(/j/g,"--").length):A(1==e.length),e=g["dynCall_"+e],o&&o.length?e.apply(null,[n].concat(o)):e.call(null,n)):(A(Ee.get(t),"missing table entry in dynCall: "+t),Ee.get(t).apply(null,r))}function S(e,t){var r,n,o,i=(e=b(e)).includes("j")?(n=t,A((r=e).includes("j"),"getDynCaller should only be called with i64 sigs"),o=[],function(){o.length=arguments.length;for(var e=0;e<arguments.length;e++)o[e]=arguments[e];return vt(r,n,o)}):Ee.get(t);return"function"!=typeof i&&P("unknown function pointer with signature "+e+": "+t),i}var Rt=void 0;function Mt(e){var e=fr(e),t=b(e);return x(e),t}function St(e,t){var r=[],n={};throw t.forEach(function e(t){n[t]||He[t]||(Xe[t]?Xe[t].forEach(e):(r.push(t),n[t]=!0))}),new Rt(e+": "+r.map(Mt).join([", "]))}function At(e,t){for(var r=[],n=0;n<e;n++)r.push(N[(t>>2)+n]);return r}function Ft(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function It(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Le(e.name||"unknownFunctionName",function(){}),r=(r.prototype=e.prototype,new r),e=e.apply(r,t);return e instanceof Object?e:r}function Nt(e,t,r,n,o){var i=t.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var r=null!==t[1]&&null!==r,a=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){a=!0;break}for(var c="void"!==t[0].name,d="",u="",s=0;s<i-2;++s)d+=(0!==s?", ":"")+"arg"+s,u+=(0!==s?", ":"")+"arg"+s+"Wired";var l="return function "+Qe(e)+"("+d+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n",p=(a&&(l+="var destructors = [];\n"),a?"destructors":"null"),f=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],E=[P,n,o,Ft,t[0],t[1]];for(r&&(l+="var thisWired = classParam.toWireType("+p+", this);\n"),s=0;s<i-2;++s)l+="var arg"+s+"Wired = argType"+s+".toWireType("+p+", arg"+s+"); // "+t[s+2].name+"\n",f.push("argType"+s),E.push(t[s+2]);if(l+=(c?"var rv = ":"")+"invoker(fn"+(0<(u=r?"thisWired"+(0<u.length?", ":"")+u:u).length?", ":"")+u+");\n",a)l+="runDestructors(destructors);\n";else for(s=r?1:2;s<t.length;++s){var h=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(l+=h+"_dtor("+h+"); // "+t[s].name+"\n",f.push(h+"_dtor"),E.push(t[s].destructorFunction))}return c&&(l+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f.push(l+="}\n"),It(Function,f).apply(null,E)}function Ut(e,t,r){return e instanceof Object||P(r+' with invalid "this": '+e),e instanceof t.registeredClass.constructor||P(r+' incompatible with "this" of type '+e.constructor.name),e.$$.ptr||P("cannot call emscripten binding method "+r+" on deleted object"),ut(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)}var xt=[],U=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ct(e){4<e&&0==--U[e].refcount&&(U[e]=void 0,xt.push(e))}function kt(){for(var e=0,t=5;t<U.length;++t)void 0!==U[t]&&++e;return e}function jt(){for(var e=5;e<U.length;++e)if(void 0!==U[e])return U[e];return null}function Ht(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=xt.length?xt.pop():U.length;return U[t]={refcount:1,value:e},t}}function Xt(e){if(null===e)return"null";var t=typeof e;return"object"==t||"array"==t||"function"==t?e.toString():""+e}function Qt(e,t){switch(t){case 2:return function(e){return this.fromWireType(ne[e>>2])};case 3:return function(e){return this.fromWireType(oe[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Lt(e,t,r){switch(t){case 0:return r?function(e){return F[e]}:function(e){return I[e]};case 1:return r?function(e){return c[e>>1]}:function(e){return re[e>>1]};case 2:return r?function(e){return N[e>>2]}:function(e){return p[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Bt(e){return e||P("Cannot use deleted val. handle = "+e),U[e].value}function Wt(e,t){var r=He[e];return void 0===r&&P(t+" has unknown type "+Mt(e)),r}var Gt={},$t=[];function zt(e,t){return A(t===(0|t)),(e>>>0)+4294967296*t}function Vt(e,t){if(e<=0)return e;var r=t<=32?Math.abs(1<<t-1):Math.pow(2,t-1);return e=r<=e&&(t<=32||r<e)?-2*r+e:e}function Yt(e,t){return 0<=e?e:t<=32?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e}function qt(e,t){A(0==(3&t));var r=e,n=t;function o(e){var t,r;return r=n,"double"===e||"i64"===e?7&r&&(A(4==(7&r)),r+=4):A(0==(3&r)),n=r,"double"===e?(t=oe[n>>3],n+=8):"i64"==e?(t=[N[n>>2],N[n+4>>2]],n+=8):(A(0==(3&n)),e="i32",t=N[n>>2],n+=4),t}for(var i,a,s=[];;){var c=r;if(0===(i=F[r>>0]))break;if(a=F[r+1>>0],37==i){var d=!1,u=!1,l=!1,p=!1,f=!1;e:for(;;){switch(a){case 43:d=!0;break;case 45:u=!0;break;case 35:l=!0;break;case 48:if(p)break e;p=!0;break;case 32:f=!0;break;default:break e}a=F[++r+1>>0]}var E=0;if(42==a)E=o("i32"),a=F[++r+1>>0];else for(;48<=a&&a<=57;)E=10*E+(a-48),a=F[++r+1>>0];var h,g=!1,T=-1;if(46==a){if(g=!(T=0),42==(a=F[++r+1>>0]))T=o("i32"),r++;else for(;;){var O=F[r+1>>0];if(O<48||57<O)break;T=10*T+(O-48),r++}a=F[r+1>>0]}switch(T<0&&(g=!(T=6)),String.fromCharCode(a)){case"h":h=104==F[r+2>>0]?(r++,1):2;break;case"l":h=108==F[r+2>>0]?(r++,8):4;break;case"L":case"q":case"j":h=8;break;case"z":case"t":case"I":h=4;break;default:h=null}switch(h&&r++,a=F[r+1>>0],String.fromCharCode(a)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var m=100==a||105==a,m=(y=o("i"+8*(h=h||4)),8==h&&(y=117==a?(y[0]>>>0)+4294967296*(y[1]>>>0):zt(y[0],y[1])),h<=4&&(y=(m?Vt:Yt)(y&Math.pow(256,h)-1,8*h)),Math.abs(y)),w="";if(100==a||105==a)D=Vt(y,8*h).toString(10);else if(117==a)D=Yt(y,8*h).toString(10),y=Math.abs(y);else if(111==a)D=(l?"0":"")+m.toString(8);else if(120==a||88==a){if(w=l&&0!=y?"0x":"",y<0){for(var y=-y,D=(m-1).toString(16),_=[],b=0;b<D.length;b++)_.push((15-parseInt(D[b],16)).toString(16));for(D=_.join("");D.length<2*h;)D="f"+D}else D=m.toString(16);88==a&&(w=w.toUpperCase(),D=D.toUpperCase())}else 112==a&&(D=0===m?"(nil)":(w="0x",m.toString(16)));if(g)for(;D.length<T;)D="0"+D;for(0<=y&&(d?w="+"+w:f&&(w=" "+w)),"-"==D.charAt(0)&&(w="-"+w,D=D.substr(1));w.length+D.length<E;)u?D+=" ":p?D="0"+D:w=" "+w;(D=w+D).split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"f":case"F":case"e":case"E":case"g":case"G":if(y=o("double"),isNaN(y))p=!(D="nan");else if(isFinite(y)){var m=!1,P=Math.min(T,20),v=(103!=a&&71!=a||(m=!0,T=T||1,(S=parseInt(y.toExponential(P).split("e")[1],10))<T&&-4<=S?(a=(103==a?"f":"F").charCodeAt(0),T-=S+1):(a=(103==a?"e":"E").charCodeAt(0),T--),P=Math.min(T,20)),101==a||69==a?(D=y.toExponential(P),/[eE][-+]\d$/.test(D)&&(D=D.slice(0,-1)+"0"+D.slice(-1))):102!=a&&70!=a||(D=y.toFixed(P),0===y&&(y<0||0===y&&1/y==-1/0)&&(D="-"+D)),D.split("e"));if(m&&!l)for(;1<v[0].length&&v[0].includes(".")&&("0"==v[0].slice(-1)||"."==v[0].slice(-1));)v[0]=v[0].slice(0,-1);else for(l&&-1==D.indexOf(".")&&(v[0]+=".");T>P++;)v[0]+="0";D=v[0]+(1<v.length?"e"+v[1]:""),69==a&&(D=D.toUpperCase()),0<=y&&(d?D="+"+D:f&&(D=" "+D))}else D=(y<0?"-":"")+"inf",p=!1;for(;D.length<E;)u?D+=" ":D=!p||"-"!=D[0]&&"+"!=D[0]?(p?"0":" ")+D:D[0]+"0"+D.slice(1);(D=a<97?D.toUpperCase():D).split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":var R=o("i8*"),M=R?lr(R):"(null)".length;if(g&&(M=Math.min(M,T)),!u)for(;M<E--;)s.push(32);if(R)for(b=0;b<M;b++)s.push(I[R++>>0]);else s=s.concat(ar("(null)".substr(0,M),!0));if(u)for(;M<E--;)s.push(32);break;case"c":for(u&&s.push(o("i8"));0<--E;)s.push(32);u||s.push(o("i8"));break;case"n":var S=o("i32*");N[S>>2]=s.length;break;case"%":s.push(i);break;default:for(b=c;b<r+2;b++)s.push(F[b>>0])}r+=2}else s.push(i),r+=1}return s}function Kt(e){if(!e||!e.callee||!e.callee.name)return[null,"",""];e.callee.toString();var t,r=e.callee.name,n="(",o=!0;for(t in e){var i=e[t];o||(n+=", "),o=!1,n+="number"==typeof i||"string"==typeof i?i:"("+typeof i+")"}n+=")";var a=e.callee.caller;return[e=a?a.arguments:[],r,n=o?"":n]}function Jt(e,t){24&e&&(t=t.replace(/\s+$/,""),t+=(0<t.length?"\n":"")+function(e){var t=(n=Ie()).lastIndexOf("_emscripten_log"),r=n.lastIndexOf("_emscripten_get_callstack"),t=n.indexOf("\n",Math.max(t,r))+1,n=n.slice(t),o=(32&e&&T("EM_LOG_DEMANGLE is deprecated; ignoring"),8&e&&"undefined"==typeof emscripten_source_map&&(T('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e=e^8|16),null);if(128&e)for(o=Kt(arguments);o[1].includes("_emscripten_");)o=Kt(o[0]);var i,a=n.split("\n"),s=(n="",new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)")),c=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),d=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(i in a){var u=a[i],l="",p="",f=0,E=0,h=d.exec(u);if(h&&5==h.length)l=h[1],p=h[2],f=h[3],E=h[4];else{if(!((h=(h=s.exec(u))?h:c.exec(u))&&4<=h.length)){n+=u+"\n";continue}l=h[1],p=h[2],f=h[3],E=0|h[4]}u=!1;8&e&&((u=(h=emscripten_source_map.originalPositionFor({line:f,column:E}))&&h.source)&&(64&e&&(h.source=h.source.substring(h.source.replace(/\\/g,"/").lastIndexOf("/")+1)),n+=" at "+l+" ("+h.source+":"+h.line+":"+h.column+")\n")),(16&e||!u)&&(n+=(u?" = "+l:" at "+l)+" ("+(p=64&e?p.substring(p.replace(/\\/g,"/").lastIndexOf("/")+1):p)+":"+f+":"+E+")\n"),128&e&&o[0]&&(o[1]==l&&0<o[2].length&&(n=n.replace(/\s+$/,""),n+=" with values: "+o[1]+o[2]+"\n"),o=Kt(o[0]))}return n.replace(/\s+$/,"")}(e)),1&e?4&e?s(t):2&e?console.warn(t):512&e?console.info(t):256&e?console.debug(t):V(t):(6&e?s:V)(t)}function Zt(t){try{return z.grow(t-te.byteLength+65535>>>16),fe(z.buffer),1}catch(e){s("emscripten_realloc_buffer: Attempted to grow heap from "+te.byteLength+" bytes to "+t+" bytes, but got error: "+e)}}var er={};function tr(){if(!tr.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",_:H||"./this.program"};for(t in er)void 0===er[t]?delete e[t]:e[t]=er[t];var t,r=[];for(t in e)r.push(t+"="+e[t]);tr.strings=r}return tr.strings}function rr(){function e(e){e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}var t,r,n,o,i;rr.called||(rr.called=!0,r=(new Date).getFullYear(),t=new Date(r,0,1),r=new Date(r,6,1),n=t.getTimezoneOffset(),o=r.getTimezoneOffset(),i=Math.max(n,o),N[Tr()>>2]=60*i,N[gr()>>2]=Number(n!=o),i=e(t),t=e(r),r=pe(i),i=pe(t),o<n?(N[hr()>>2]=r,N[hr()+4>>2]=i):(N[hr()>>2]=i,N[hr()+4>>2]=r))}function nr(e,t,r,n){e=e||this,this.parent=e,this.mount=e.mount,this.mounted=null,this.id=D.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n}var or=365,ir=146;function ar(e,t,r){r=0<r?r:ee(e)+1,r=new Array(r),e=J(e,r,0,r.length);return t&&(r.length=e),r}Object.defineProperties(nr.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 D.isDir(this.mode)}},isDevice:{get:function(){return D.isChrdev(this.mode)}}}),D.FSNode=nr,D.staticInit();for(var xe={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},sr=new Array(256),cr=0;cr<256;++cr)sr[cr]=String.fromCharCode(cr);ke=sr,We=g.BindingError=Be(Error,"BindingError"),Ge=g.InternalError=Be(Error,"InternalError"),R.prototype.isAliasOf=Ve,R.prototype.clone=et,R.prototype.delete=tt,R.prototype.isDeleted=rt,R.prototype.deleteLater=at,M.prototype.getPointee=ht,M.prototype.destructor=gt,M.prototype.argPackAdvance=8,M.prototype.readValueFromPointer=Et,M.prototype.deleteObject=Tt,M.prototype.fromWireType=Pt,g.getInheritedInstanceCount=mt,g.getLiveInheritedInstances=wt,g.flushPendingDeletes=it,g.setDelayFunction=yt,Rt=g.UnboundTypeError=Be(Error,"UnboundTypeError"),g.count_emval_handles=kt,g.get_first_emval=jt;var dr={__sys_fcntl64:function(e,t,r){_.varargs=r;try{var n=_.getStreamFromFD(e);switch(t){case 0:return(o=_.get())<0?-28:D.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=_.get();return n.flags|=o,0;case 12:return o=_.get(),c[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return N[pr()>>2]=28,-1}}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),-e.errno}},__sys_open:function(e,t,r){_.varargs=r;try{var n=_.getStr(e),o=r?_.get():0;return D.open(n,t,o).fd}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),-e.errno}},_embind_register_bigint:function(e,t,r,n,o){},_embind_register_bool:function(e,r,n,o,i){var a=Ce(n);v(e,{name:r=b(r),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?o:i},argPackAdvance:8,readValueFromPointer:function(e){var t;if(1===n)t=F;else if(2===n)t=c;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+r);t=N}return this.fromWireType(t[e>>a])},destructorFunction:null})},_embind_register_class:function(c,e,t,d,r,u,n,l,o,p,f,i,E){f=b(f),u=S(r,u),l=l&&S(n,l),p=p&&S(o,p),E=S(i,E);var a,h=Qe(f);r=h,n=function(){St("Cannot construct "+f+" due to unbound types",[d])},g.hasOwnProperty(r)?(P("Cannot register public name '"+r+"' twice"),ct(g,r,r),g.hasOwnProperty(a)&&P("Cannot register multiple overloads of a function with the same number of arguments ("+a+")!"),g[r].overloadTable[a]=n):g[r]=n,ze([c,e,t],d?[d]:[],function(e){e=e[0],e=d?(a=e.registeredClass).instancePrototype:R.prototype;var t,r,n=Le(h,function(){if(Object.getPrototypeOf(this)!==o)throw new We("Use 'new' to construct "+f);if(void 0===i.constructor_body)throw new We(f+" has no accessible constructor");var e=i.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(i.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),o=Object.create(e,{constructor:{value:n}}),i=(n.prototype=o,new dt(f,n,o,E,a,u,l,p)),e=new M(f,i,!0,!1,!1),a=new M(f+"*",i,!1,!1,!1),s=new M(f+" const*",i,!1,!0,!1);return st[c]={pointerType:a,constPointerType:s},t=h,n=n,g.hasOwnProperty(t)||$e("Replacing nonexistant public symbol"),g[t].overloadTable,g[t]=n,g[t].argCount=r,[e,a,s]})},_embind_register_class_constructor:function(e,n,t,r,o,i){A(0<n);var a=At(n,t);o=S(r,o),ze([],[e],function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[n-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(n-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[n-1]=function(){St("Cannot construct "+t.name+" due to unbound types",a)},ze([],a,function(e){return e.splice(1,0,null),t.registeredClass.constructor_body[n-1]=Nt(r,e,null,o,i),[]}),[]})},_embind_register_class_function:function(e,i,a,t,r,s,c,d){var u=At(a,t);i=b(i),s=S(r,s),ze([],[e],function(t){var r=(t=t[0]).name+"."+i;function e(){St("Cannot call "+r+" due to unbound types",u)}i.startsWith("@@")&&(i=Symbol[i.substring(2)]),d&&t.registeredClass.pureVirtualFunctions.push(i);var n=t.registeredClass.instancePrototype,o=n[i];return void 0===o||void 0===o.overloadTable&&o.className!==t.name&&o.argCount===a-2?(e.argCount=a-2,e.className=t.name,n[i]=e):(ct(n,i,r),n[i].overloadTable[a-2]=e),ze([],u,function(e){e=Nt(r,e,t,s,c);return void 0===n[i].overloadTable?(e.argCount=a-2,n[i]=e):n[i].overloadTable[a-2]=e,[]}),[]})},_embind_register_class_property:function(e,a,t,r,s,c,n,d,u,l){a=b(a),s=S(r,s),ze([],[e],function(o){var i=(o=o[0]).name+"."+a,e={get:function(){St("Cannot access "+i+" due to unbound types",[t,n])},enumerable:!0,configurable:!0};return e.set=u?function(){St("Cannot access "+i+" due to unbound types",[t,n])}:function(e){P(i+" is a read-only property")},Object.defineProperty(o.registeredClass.instancePrototype,a,e),ze([],u?[t,n]:[t],function(e){var n,t=e[0],r={get:function(){var e=Ut(this,o,i+" getter");return t.fromWireType(s(c,e))},enumerable:!0};return u&&(u=S(d,u),n=e[1],r.set=function(e){var t=Ut(this,o,i+" setter"),r=[];u(l,t,n.toWireType(r,e)),Ft(r)}),Object.defineProperty(o.registeredClass.instancePrototype,a,r),[]}),[]})},_embind_register_emval:function(e,t){v(e,{name:t=b(t),fromWireType:function(e){var t=U[e].value;return Ct(e),t},toWireType:function(e,t){return Ht(t)},argPackAdvance:8,readValueFromPointer:Et,destructorFunction:null})},_embind_register_float:function(e,t,r){r=Ce(r);v(e,{name:t=b(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Xt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Qt(t,r),destructorFunction:null})},_embind_register_integer:function(e,r,t,n,o){r=b(r),-1===o&&(o=4294967295);var i,a=Ce(t),s=function(e){return e},c=(0===n&&(i=32-8*t,s=function(e){return e<<i>>>i}),r.includes("unsigned"));v(e,{name:r,fromWireType:s,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Xt(t)+'" to '+this.name);if(t<n||o<t)throw new TypeError('Passing a number "'+Xt(t)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+n+", "+o+"]!");return c?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:Lt(r,a,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=p,r=t[e>>=2],t=t[e+1];return new n(te,t,r)}v(e,{name:r=b(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,t){var c="std::string"===(t=b(t));v(e,{name:t,fromWireType:function(e){var t,r=p[e>>2];if(c)for(var n=e+4,o=0;o<=r;++o){var i,a=e+4+o;o!=r&&0!=I[a]||(i=K(n,a-n),void 0===t?t=i:t=t+String.fromCharCode(0)+i,n=a+1)}else{for(var s=new Array(r),o=0;o<r;++o)s[o]=String.fromCharCode(I[e+4+o]);t=s.join("")}return x(e),t},toWireType:function(e,t){var r="string"==typeof(t=t instanceof ArrayBuffer?new Uint8Array(t):t),n=(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||P("Cannot pass non-string to std::string"),(c&&r?function(){return ee(t)}:function(){return t.length})()),o=ur(4+n+1);if(p[o>>2]=n,c&&r)Z(t,o+4,n+1);else if(r)for(var i=0;i<n;++i){var a=t.charCodeAt(i);255<a&&(x(o),P("String has UTF-16 code units that do not fit in 8 bits")),I[o+4+i]=a}else for(i=0;i<n;++i)I[o+4+i]=t[i];return null!==e&&e.push(x,o),o},argPackAdvance:8,readValueFromPointer:Et,destructorFunction:function(e){x(e)}})},_embind_register_std_wstring:function(e,c,o){var d,i,u,a,l;o=b(o),2===c?(d=ae,i=se,a=ce,u=function(){return re},l=1):4===c&&(d=de,i=ue,a=le,u=function(){return p},l=2),v(e,{name:o,fromWireType:function(e){for(var t,r=p[e>>2],n=u(),o=e+4,i=0;i<=r;++i){var a,s=e+4+i*c;i!=r&&0!=n[s>>l]||(a=d(o,s-o),void 0===t?t=a:t=t+String.fromCharCode(0)+a,o=s+c)}return x(e),t},toWireType:function(e,t){"string"!=typeof t&&P("Cannot pass non-string to C++ string type "+o);var r=a(t),n=ur(4+r+c);return p[n>>2]=r>>l,i(t,n+4,r+c),null!==e&&e.push(x,n),n},argPackAdvance:8,readValueFromPointer:Et,destructorFunction:function(e){x(e)}})},_embind_register_void:function(e,t){v(e,{isVoid:!0,name:t=b(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emval_as:function(e,t,r){e=Bt(e),t=Wt(t,"emval::as");var n=[],o=Ht(n);return N[r>>2]=o,t.toWireType(n,e)},_emval_call_void_method:function(e,t,r,n){(e=$t[e])(t=Bt(t),r=void 0===(t=Gt[e=r])?b(e):t,null,n)},_emval_decref:Ct,_emval_get_method_caller:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=Wt(N[(t>>2)+n],"parameter "+n);return r}(e,t),t=r[0],n=t.name+"_$"+r.slice(1).map(function(e){return e.name}).join("_")+"$",o=["retType"],i=[t],a="",s=0;s<e-1;++s)a+=(0!==s?", ":"")+"arg"+s,o.push("argType"+s),i.push(r[1+s]);for(var c="return function "+Qe("methodCaller_"+n)+"(handle, name, destructors, args) {\n",d=0,s=0;s<e-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=r[s+1].argPackAdvance;for(c+=" var rv = handle[name]("+a+");\n",s=0;s<e-1;++s)r[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");t.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),o.push(c+="};\n");n=It(Function,o).apply(null,i),t=$t.length;return $t.push(n),t},_emval_incref:function(e){4<e&&(U[e].refcount+=1)},_emval_run_destructors:function(e){Ft(U[e].value),Ct(e)},_emval_take_value:function(e,t){return Ht((e=Wt(e,"_emval_take_value")).readValueFromPointer(t))},abort:function(){E()},clock:function e(){return void 0===e.start&&(e.start=Date.now()),1e3*(Date.now()-e.start)|0},emscripten_log:function(e,t,r){Jt(e,i(qt(t,r),0))},emscripten_memcpy_big:function(e,t,r){I.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){var t=I.length;A((e>>>=0)>t);var r=2147483648;if(r<e)return s("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n),o=Math.min(o,e+100663296),i=Math.min(r,(0<(o=Math.max(e,o))%65536&&(o+=65536-o%65536),o));if(Zt(i))return!0}return s("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1},environ_get:function(a,s){var c=0;return tr().forEach(function(e,t){for(var r=s+c,n=(N[a+4*t>>2]=r,e),o=r,i=0;i<n.length;++i)A(n.charCodeAt(i)==n.charCodeAt(i)&255),F[o++>>0]=n.charCodeAt(i);F[o>>0]=0,c+=e.length+1}),0},environ_sizes_get:function(e,t){var r=tr(),n=(N[e>>2]=r.length,0);return r.forEach(function(e){n+=e.length+1}),N[t>>2]=n,0},fd_close:function(e){try{var t=_.getStreamFromFD(e);return D.close(t),0}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),e.errno}},fd_fdstat_get:function(e,t){try{var r=_.getStreamFromFD(e),n=r.tty?2:D.isDir(r.mode)?3:D.isLink(r.mode)?7:4;return F[t>>0]=n,0}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),e.errno}},fd_read:function(e,t,r,n){try{var o=_.getStreamFromFD(e),i=_.doReadv(o,t,r);return N[n>>2]=i,0}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),e.errno}},fd_seek:function(e,t,r,n,o){try{var i=_.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||s<=a?-61:(D.llseek(i,a,n),l=[i.position>>>0,(u=i.position,1<=+Math.abs(u)?0<u?(0|Math.min(+Math.floor(u/4294967296),4294967295))>>>0:~~+Math.ceil((u-(~~u>>>0))/4294967296)>>>0:0)],N[o>>2]=l[0],N[o+4>>2]=l[1],i.getdents&&0==a&&0===n&&(i.getdents=null),0)}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),e.errno}},fd_write:function(e,t,r,n){try{var o=_.getStreamFromFD(e),i=_.doWritev(o,t,r);return N[n>>2]=i,0}catch(e){return void 0!==D&&e instanceof D.ErrnoError||E(e),e.errno}},gettimeofday:function(e){var t=Date.now();return N[e>>2]=t/1e3|0,N[e+4>>2]=t%1e3*1e3|0,0},gmtime_r:function e(t,r){var t=new Date(1e3*N[t>>2]),n=(N[r>>2]=t.getUTCSeconds(),N[r+4>>2]=t.getUTCMinutes(),N[r+8>>2]=t.getUTCHours(),N[r+12>>2]=t.getUTCDate(),N[r+16>>2]=t.getUTCMonth(),N[r+20>>2]=t.getUTCFullYear()-1900,N[r+24>>2]=t.getUTCDay(),N[r+36>>2]=0,N[r+32>>2]=0,Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0)),t=(t.getTime()-n)/864e5|0;return N[r+28>>2]=t,e.GMTString||(e.GMTString=pe("GMT")),N[r+40>>2]=e.GMTString,r},localtime_r:function(e,t){rr();var e=new Date(1e3*N[e>>2]),r=(N[t>>2]=e.getSeconds(),N[t+4>>2]=e.getMinutes(),N[t+8>>2]=e.getHours(),N[t+12>>2]=e.getDate(),N[t+16>>2]=e.getMonth(),N[t+20>>2]=e.getFullYear()-1900,N[t+24>>2]=e.getDay(),new Date(e.getFullYear(),0,1)),n=(e.getTime()-r.getTime())/864e5|0,n=(N[t+28>>2]=n,N[t+36>>2]=-60*e.getTimezoneOffset(),new Date(e.getFullYear(),6,1).getTimezoneOffset()),r=r.getTimezoneOffset(),e=0|(n!=r&&e.getTimezoneOffset()==Math.min(r,n)),r=(N[t+32>>2]=e,N[hr()+(e?4:0)>>2]);return N[t+40>>2]=r,t},mktime:function(e){rr();var t=new Date(N[e+20>>2]+1900,N[e+16>>2],N[e+12>>2],N[e+8>>2],N[e+4>>2],N[e>>2],0),r=N[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i),r=(r<0?N[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))),N[e+24>>2]=t.getDay(),(t.getTime()-o.getTime())/864e5|0);return N[e+28>>2]=r,N[e>>2]=t.getSeconds(),N[e+4>>2]=t.getMinutes(),N[e+8>>2]=t.getHours(),N[e+12>>2]=t.getDate(),N[e+16>>2]=t.getMonth(),t.getTime()/1e3|0},setTempRet0:function(e){}},x=(function(){var t={env:dr,wasi_snapshot_preview1:dr};function r(e,t){var e=e.exports;g.asm=e,A(z=g.asm.memory,"memory not found in wasm exports"),fe(z.buffer),A(Ee=g.asm.__indirect_function_table,"table not found in wasm exports"),e=g.asm.__wasm_call_ctors,me.unshift(e),ve("wasm-instantiate")}Pe("wasm-instantiate");var n=g;function o(e){A(g===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,r(e.instance)}function i(e){return function(){if(!$&&(X||d)){if("function"==typeof fetch&&!Me(a))return fetch(a,{credentials:"same-origin"}).then(function(e){if(e.ok)return e.arrayBuffer();throw"failed to load wasm binary file at '"+a+"'"}).catch(function(){return Se(a)});if(B)return new Promise(function(t,e){B(a,function(e){t(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return Se(a)})}().then(function(e){return WebAssembly.instantiate(e,t)}).then(function(e){return e}).then(e,function(e){s("failed to asynchronously prepare wasm: "+e),Me(a)&&s("warning: Loading from a file URI ("+a+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),E(e)})}if(g.instantiateWasm)try{return g.instantiateWasm(t,r)}catch(t){return s("Module.instantiateWasm callback failed with error: "+t)}$||"function"!=typeof WebAssembly.instantiateStreaming||Re(a)||Me(a)||"function"!=typeof fetch?i(o):fetch(a,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(o,function(e){return s("wasm streaming compile failed: "+e),s("falling back to ArrayBuffer instantiation"),i(o)})})}(),g.___wasm_call_ctors=h("__wasm_call_ctors"),g._free=h("free")),ur=g._malloc=h("malloc"),lr=g._strlen=h("strlen"),pr=g.___errno_location=h("__errno_location"),fr=g.___getTypeName=h("__getTypeName"),Er=(g.___embind_register_native_and_builtin_types=h("__embind_register_native_and_builtin_types"),g._emscripten_stack_get_end=function(){return(Er=g._emscripten_stack_get_end=g.asm.emscripten_stack_get_end).apply(null,arguments)}),hr=(g._fflush=h("fflush"),g.__get_tzname=h("_get_tzname")),gr=g.__get_daylight=h("_get_daylight"),Tr=g.__get_timezone=h("_get_timezone"),Or=(g.stackSave=h("stackSave"),g.stackRestore=h("stackRestore"),g.stackAlloc=h("stackAlloc"),g._emscripten_stack_init=function(){return(Or=g._emscripten_stack_init=g.asm.emscripten_stack_init).apply(null,arguments)});g._emscripten_stack_get_free=function(){return(g._emscripten_stack_get_free=g.asm.emscripten_stack_get_free).apply(null,arguments)};var mr,wr=g._memalign=h("memalign");function yr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Dr(e){function t(){if(!mr&&(mr=!0,g.calledRun=!0,!Y)){if(Te(),A(!ye),ye=!0,g.noFSInit||D.init.initialized||D.init(),D.ignorePermissions=!1,Ae(me),g.onRuntimeInitialized&&g.onRuntimeInitialized(),A(!g._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),Te(),g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)e=g.postRun.shift(),we.unshift(e);var e;Ae(we)}}if(!(0<n)){if(Or(),ge(),g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)r=g.preRun.shift(),Oe.unshift(r);var r;Ae(Oe),0<n||(g.setStatus?(g.setStatus("Running..."),setTimeout(function(){setTimeout(function(){g.setStatus("")},1),t()},1)):t(),Te())}}if(g.dynCall_ijiii=h("dynCall_ijiii"),g.dynCall_viiijj=h("dynCall_viiijj"),g.dynCall_jij=h("dynCall_jij"),g.dynCall_jii=h("dynCall_jii"),g.dynCall_jiji=h("dynCall_jiji"),g._ff_h264_cabac_tables=113004,Object.getOwnPropertyDescriptor(g,"intArrayFromString")||(g.intArrayFromString=function(){E("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"intArrayToString")||(g.intArrayToString=function(){E("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ccall")||(g.ccall=function(){E("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"cwrap")||(g.cwrap=function(){E("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setValue")||(g.setValue=function(){E("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getValue")||(g.getValue=function(){E("'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"allocate")||(g.allocate=function(){E("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UTF8ArrayToString")||(g.UTF8ArrayToString=function(){E("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UTF8ToString")||(g.UTF8ToString=function(){E("'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToUTF8Array")||(g.stringToUTF8Array=function(){E("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToUTF8")||(g.stringToUTF8=function(){E("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"lengthBytesUTF8")||(g.lengthBytesUTF8=function(){E("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stackTrace")||(g.stackTrace=function(){E("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addOnPreRun")||(g.addOnPreRun=function(){E("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addOnInit")||(g.addOnInit=function(){E("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addOnPreMain")||(g.addOnPreMain=function(){E("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addOnExit")||(g.addOnExit=function(){E("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addOnPostRun")||(g.addOnPostRun=function(){E("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeStringToMemory")||(g.writeStringToMemory=function(){E("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeArrayToMemory")||(g.writeArrayToMemory=function(){E("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeAsciiToMemory")||(g.writeAsciiToMemory=function(){E("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addRunDependency")||(g.addRunDependency=function(){E("'addRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"removeRunDependency")||(g.removeRunDependency=function(){E("'removeRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_createFolder")||(g.FS_createFolder=function(){E("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"FS_createPath")||(g.FS_createPath=function(){E("'FS_createPath' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_createDataFile")||(g.FS_createDataFile=function(){E("'FS_createDataFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_createPreloadedFile")||(g.FS_createPreloadedFile=function(){E("'FS_createPreloadedFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_createLazyFile")||(g.FS_createLazyFile=function(){E("'FS_createLazyFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_createLink")||(g.FS_createLink=function(){E("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"FS_createDevice")||(g.FS_createDevice=function(){E("'FS_createDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"FS_unlink")||(g.FS_unlink=function(){E("'FS_unlink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(g,"getLEB")||(g.getLEB=function(){E("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getFunctionTables")||(g.getFunctionTables=function(){E("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"alignFunctionTables")||(g.alignFunctionTables=function(){E("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerFunctions")||(g.registerFunctions=function(){E("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"addFunction")||(g.addFunction=function(){E("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"removeFunction")||(g.removeFunction=function(){E("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getFuncWrapper")||(g.getFuncWrapper=function(){E("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"prettyPrint")||(g.prettyPrint=function(){E("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"dynCall")||(g.dynCall=function(){E("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getCompilerSetting")||(g.getCompilerSetting=function(){E("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"print")||(g.print=function(){E("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"printErr")||(g.printErr=function(){E("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getTempRet0")||(g.getTempRet0=function(){E("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setTempRet0")||(g.setTempRet0=function(){E("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"callMain")||(g.callMain=function(){E("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"abort")||(g.abort=function(){E("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"keepRuntimeAlive")||(g.keepRuntimeAlive=function(){E("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"zeroMemory")||(g.zeroMemory=function(){E("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToNewUTF8")||(g.stringToNewUTF8=function(){E("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setFileTime")||(g.setFileTime=function(){E("'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emscripten_realloc_buffer")||(g.emscripten_realloc_buffer=function(){E("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ENV")||(g.ENV=function(){E("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ERRNO_CODES")||(g.ERRNO_CODES=function(){E("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ERRNO_MESSAGES")||(g.ERRNO_MESSAGES=function(){E("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setErrNo")||(g.setErrNo=function(){E("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"inetPton4")||(g.inetPton4=function(){E("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"inetNtop4")||(g.inetNtop4=function(){E("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"inetPton6")||(g.inetPton6=function(){E("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"inetNtop6")||(g.inetNtop6=function(){E("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readSockaddr")||(g.readSockaddr=function(){E("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeSockaddr")||(g.writeSockaddr=function(){E("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"DNS")||(g.DNS=function(){E("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getHostByName")||(g.getHostByName=function(){E("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GAI_ERRNO_MESSAGES")||(g.GAI_ERRNO_MESSAGES=function(){E("'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"Protocols")||(g.Protocols=function(){E("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"Sockets")||(g.Sockets=function(){E("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getRandomDevice")||(g.getRandomDevice=function(){E("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"traverseStack")||(g.traverseStack=function(){E("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UNWIND_CACHE")||(g.UNWIND_CACHE=function(){E("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"withBuiltinMalloc")||(g.withBuiltinMalloc=function(){E("'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readAsmConstArgsArray")||(g.readAsmConstArgsArray=function(){E("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readAsmConstArgs")||(g.readAsmConstArgs=function(){E("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"mainThreadEM_ASM")||(g.mainThreadEM_ASM=function(){E("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"jstoi_q")||(g.jstoi_q=function(){E("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"jstoi_s")||(g.jstoi_s=function(){E("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getExecutableName")||(g.getExecutableName=function(){E("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"listenOnce")||(g.listenOnce=function(){E("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"autoResumeAudioContext")||(g.autoResumeAudioContext=function(){E("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"dynCallLegacy")||(g.dynCallLegacy=function(){E("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getDynCaller")||(g.getDynCaller=function(){E("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"dynCall")||(g.dynCall=function(){E("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"callRuntimeCallbacks")||(g.callRuntimeCallbacks=function(){E("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"handleException")||(g.handleException=function(){E("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"runtimeKeepalivePush")||(g.runtimeKeepalivePush=function(){E("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"runtimeKeepalivePop")||(g.runtimeKeepalivePop=function(){E("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"callUserCallback")||(g.callUserCallback=function(){E("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"maybeExit")||(g.maybeExit=function(){E("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"safeSetTimeout")||(g.safeSetTimeout=function(){E("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"asmjsMangle")||(g.asmjsMangle=function(){E("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"asyncLoad")||(g.asyncLoad=function(){E("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"alignMemory")||(g.alignMemory=function(){E("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"mmapAlloc")||(g.mmapAlloc=function(){E("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"reallyNegative")||(g.reallyNegative=function(){E("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"unSign")||(g.unSign=function(){E("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"reSign")||(g.reSign=function(){E("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"formatString")||(g.formatString=function(){E("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"PATH")||(g.PATH=function(){E("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"PATH_FS")||(g.PATH_FS=function(){E("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SYSCALLS")||(g.SYSCALLS=function(){E("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"syscallMmap2")||(g.syscallMmap2=function(){E("'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"syscallMunmap")||(g.syscallMunmap=function(){E("'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getSocketFromFD")||(g.getSocketFromFD=function(){E("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getSocketAddress")||(g.getSocketAddress=function(){E("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"JSEvents")||(g.JSEvents=function(){E("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerKeyEventCallback")||(g.registerKeyEventCallback=function(){E("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"specialHTMLTargets")||(g.specialHTMLTargets=function(){E("'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"maybeCStringToJsString")||(g.maybeCStringToJsString=function(){E("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"findEventTarget")||(g.findEventTarget=function(){E("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"findCanvasEventTarget")||(g.findCanvasEventTarget=function(){E("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getBoundingClientRect")||(g.getBoundingClientRect=function(){E("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillMouseEventData")||(g.fillMouseEventData=function(){E("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerMouseEventCallback")||(g.registerMouseEventCallback=function(){E("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerWheelEventCallback")||(g.registerWheelEventCallback=function(){E("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerUiEventCallback")||(g.registerUiEventCallback=function(){E("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerFocusEventCallback")||(g.registerFocusEventCallback=function(){E("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillDeviceOrientationEventData")||(g.fillDeviceOrientationEventData=function(){E("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerDeviceOrientationEventCallback")||(g.registerDeviceOrientationEventCallback=function(){E("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillDeviceMotionEventData")||(g.fillDeviceMotionEventData=function(){E("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerDeviceMotionEventCallback")||(g.registerDeviceMotionEventCallback=function(){E("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"screenOrientation")||(g.screenOrientation=function(){E("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillOrientationChangeEventData")||(g.fillOrientationChangeEventData=function(){E("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerOrientationChangeEventCallback")||(g.registerOrientationChangeEventCallback=function(){E("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillFullscreenChangeEventData")||(g.fillFullscreenChangeEventData=function(){E("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerFullscreenChangeEventCallback")||(g.registerFullscreenChangeEventCallback=function(){E("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerRestoreOldStyle")||(g.registerRestoreOldStyle=function(){E("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"hideEverythingExceptGivenElement")||(g.hideEverythingExceptGivenElement=function(){E("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"restoreHiddenElements")||(g.restoreHiddenElements=function(){E("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setLetterbox")||(g.setLetterbox=function(){E("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"currentFullscreenStrategy")||(g.currentFullscreenStrategy=function(){E("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"restoreOldWindowedStyle")||(g.restoreOldWindowedStyle=function(){E("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"softFullscreenResizeWebGLRenderTarget")||(g.softFullscreenResizeWebGLRenderTarget=function(){E("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"doRequestFullscreen")||(g.doRequestFullscreen=function(){E("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillPointerlockChangeEventData")||(g.fillPointerlockChangeEventData=function(){E("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerPointerlockChangeEventCallback")||(g.registerPointerlockChangeEventCallback=function(){E("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerPointerlockErrorEventCallback")||(g.registerPointerlockErrorEventCallback=function(){E("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"requestPointerLock")||(g.requestPointerLock=function(){E("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillVisibilityChangeEventData")||(g.fillVisibilityChangeEventData=function(){E("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerVisibilityChangeEventCallback")||(g.registerVisibilityChangeEventCallback=function(){E("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerTouchEventCallback")||(g.registerTouchEventCallback=function(){E("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillGamepadEventData")||(g.fillGamepadEventData=function(){E("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerGamepadEventCallback")||(g.registerGamepadEventCallback=function(){E("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerBeforeUnloadEventCallback")||(g.registerBeforeUnloadEventCallback=function(){E("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"fillBatteryEventData")||(g.fillBatteryEventData=function(){E("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"battery")||(g.battery=function(){E("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerBatteryEventCallback")||(g.registerBatteryEventCallback=function(){E("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setCanvasElementSize")||(g.setCanvasElementSize=function(){E("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getCanvasElementSize")||(g.getCanvasElementSize=function(){E("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"polyfillSetImmediate")||(g.polyfillSetImmediate=function(){E("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"demangle")||(g.demangle=function(){E("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"demangleAll")||(g.demangleAll=function(){E("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"jsStackTrace")||(g.jsStackTrace=function(){E("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stackTrace")||(g.stackTrace=function(){E("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getEnvStrings")||(g.getEnvStrings=function(){E("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"checkWasiClock")||(g.checkWasiClock=function(){E("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeI53ToI64")||(g.writeI53ToI64=function(){E("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeI53ToI64Clamped")||(g.writeI53ToI64Clamped=function(){E("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeI53ToI64Signaling")||(g.writeI53ToI64Signaling=function(){E("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeI53ToU64Clamped")||(g.writeI53ToU64Clamped=function(){E("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeI53ToU64Signaling")||(g.writeI53ToU64Signaling=function(){E("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readI53FromI64")||(g.readI53FromI64=function(){E("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readI53FromU64")||(g.readI53FromU64=function(){E("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"convertI32PairToI53")||(g.convertI32PairToI53=function(){E("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"convertU32PairToI53")||(g.convertU32PairToI53=function(){E("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"uncaughtExceptionCount")||(g.uncaughtExceptionCount=function(){E("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"exceptionLast")||(g.exceptionLast=function(){E("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"exceptionCaught")||(g.exceptionCaught=function(){E("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ExceptionInfo")||(g.ExceptionInfo=function(){E("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"CatchInfo")||(g.CatchInfo=function(){E("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"exception_addRef")||(g.exception_addRef=function(){E("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"exception_decRef")||(g.exception_decRef=function(){E("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"Browser")||(g.Browser=function(){E("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"funcWrappers")||(g.funcWrappers=function(){E("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getFuncWrapper")||(g.getFuncWrapper=function(){E("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setMainLoop")||(g.setMainLoop=function(){E("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"wget")||(g.wget=function(){E("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"FS")||(g.FS=function(){E("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"MEMFS")||(g.MEMFS=function(){E("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"TTY")||(g.TTY=function(){E("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"PIPEFS")||(g.PIPEFS=function(){E("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SOCKFS")||(g.SOCKFS=function(){E("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"_setNetworkCallback")||(g._setNetworkCallback=function(){E("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"tempFixedLengthArray")||(g.tempFixedLengthArray=function(){E("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"miniTempWebGLFloatBuffers")||(g.miniTempWebGLFloatBuffers=function(){E("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"heapObjectForWebGLType")||(g.heapObjectForWebGLType=function(){E("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"heapAccessShiftForWebGLHeap")||(g.heapAccessShiftForWebGLHeap=function(){E("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GL")||(g.GL=function(){E("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emscriptenWebGLGet")||(g.emscriptenWebGLGet=function(){E("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"computeUnpackAlignedImageSize")||(g.computeUnpackAlignedImageSize=function(){E("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emscriptenWebGLGetTexPixelData")||(g.emscriptenWebGLGetTexPixelData=function(){E("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emscriptenWebGLGetUniform")||(g.emscriptenWebGLGetUniform=function(){E("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"webglGetUniformLocation")||(g.webglGetUniformLocation=function(){E("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"webglPrepareUniformLocationsBeforeFirstUse")||(g.webglPrepareUniformLocationsBeforeFirstUse=function(){E("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"webglGetLeftBracePos")||(g.webglGetLeftBracePos=function(){E("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emscriptenWebGLGetVertexAttrib")||(g.emscriptenWebGLGetVertexAttrib=function(){E("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"writeGLArray")||(g.writeGLArray=function(){E("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"AL")||(g.AL=function(){E("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SDL_unicode")||(g.SDL_unicode=function(){E("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SDL_ttfContext")||(g.SDL_ttfContext=function(){E("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SDL_audio")||(g.SDL_audio=function(){E("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SDL")||(g.SDL=function(){E("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"SDL_gfx")||(g.SDL_gfx=function(){E("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GLUT")||(g.GLUT=function(){E("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"EGL")||(g.EGL=function(){E("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GLFW_Window")||(g.GLFW_Window=function(){E("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GLFW")||(g.GLFW=function(){E("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"GLEW")||(g.GLEW=function(){E("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"IDBStore")||(g.IDBStore=function(){E("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"runAndAbortIfError")||(g.runAndAbortIfError=function(){E("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_handle_array")||(g.emval_handle_array=function(){E("'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_free_list")||(g.emval_free_list=function(){E("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_symbols")||(g.emval_symbols=function(){E("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"init_emval")||(g.init_emval=function(){E("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"count_emval_handles")||(g.count_emval_handles=function(){E("'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"get_first_emval")||(g.get_first_emval=function(){E("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getStringOrSymbol")||(g.getStringOrSymbol=function(){E("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"requireHandle")||(g.requireHandle=function(){E("'requireHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_newers")||(g.emval_newers=function(){E("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"craftEmvalAllocator")||(g.craftEmvalAllocator=function(){E("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_get_global")||(g.emval_get_global=function(){E("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"emval_methodCallers")||(g.emval_methodCallers=function(){E("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"InternalError")||(g.InternalError=function(){E("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"BindingError")||(g.BindingError=function(){E("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UnboundTypeError")||(g.UnboundTypeError=function(){E("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"PureVirtualError")||(g.PureVirtualError=function(){E("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"init_embind")||(g.init_embind=function(){E("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"throwInternalError")||(g.throwInternalError=function(){E("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"throwBindingError")||(g.throwBindingError=function(){E("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"throwUnboundTypeError")||(g.throwUnboundTypeError=function(){E("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ensureOverloadTable")||(g.ensureOverloadTable=function(){E("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"exposePublicSymbol")||(g.exposePublicSymbol=function(){E("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"replacePublicSymbol")||(g.replacePublicSymbol=function(){E("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"extendError")||(g.extendError=function(){E("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"createNamedFunction")||(g.createNamedFunction=function(){E("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registeredInstances")||(g.registeredInstances=function(){E("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getBasestPointer")||(g.getBasestPointer=function(){E("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerInheritedInstance")||(g.registerInheritedInstance=function(){E("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"unregisterInheritedInstance")||(g.unregisterInheritedInstance=function(){E("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getInheritedInstance")||(g.getInheritedInstance=function(){E("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getInheritedInstanceCount")||(g.getInheritedInstanceCount=function(){E("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getLiveInheritedInstances")||(g.getLiveInheritedInstances=function(){E("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registeredTypes")||(g.registeredTypes=function(){E("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"awaitingDependencies")||(g.awaitingDependencies=function(){E("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"typeDependencies")||(g.typeDependencies=function(){E("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registeredPointers")||(g.registeredPointers=function(){E("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"registerType")||(g.registerType=function(){E("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"whenDependentTypesAreResolved")||(g.whenDependentTypesAreResolved=function(){E("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"embind_charCodes")||(g.embind_charCodes=function(){E("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"embind_init_charCodes")||(g.embind_init_charCodes=function(){E("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"readLatin1String")||(g.readLatin1String=function(){E("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getTypeName")||(g.getTypeName=function(){E("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"heap32VectorToArray")||(g.heap32VectorToArray=function(){E("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"requireRegisteredType")||(g.requireRegisteredType=function(){E("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"getShiftFromSize")||(g.getShiftFromSize=function(){E("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"integerReadValueFromPointer")||(g.integerReadValueFromPointer=function(){E("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"enumReadValueFromPointer")||(g.enumReadValueFromPointer=function(){E("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"floatReadValueFromPointer")||(g.floatReadValueFromPointer=function(){E("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"simpleReadValueFromPointer")||(g.simpleReadValueFromPointer=function(){E("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"runDestructors")||(g.runDestructors=function(){E("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"new_")||(g.new_=function(){E("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"craftInvokerFunction")||(g.craftInvokerFunction=function(){E("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"embind__requireFunction")||(g.embind__requireFunction=function(){E("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"tupleRegistrations")||(g.tupleRegistrations=function(){E("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"structRegistrations")||(g.structRegistrations=function(){E("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"genericPointerToWireType")||(g.genericPointerToWireType=function(){E("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"constNoSmartPtrRawPointerToWireType")||(g.constNoSmartPtrRawPointerToWireType=function(){E("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"nonConstNoSmartPtrRawPointerToWireType")||(g.nonConstNoSmartPtrRawPointerToWireType=function(){E("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"init_RegisteredPointer")||(g.init_RegisteredPointer=function(){E("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredPointer")||(g.RegisteredPointer=function(){E("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredPointer_getPointee")||(g.RegisteredPointer_getPointee=function(){E("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredPointer_destructor")||(g.RegisteredPointer_destructor=function(){E("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredPointer_deleteObject")||(g.RegisteredPointer_deleteObject=function(){E("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredPointer_fromWireType")||(g.RegisteredPointer_fromWireType=function(){E("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"runDestructor")||(g.runDestructor=function(){E("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"releaseClassHandle")||(g.releaseClassHandle=function(){E("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"finalizationGroup")||(g.finalizationGroup=function(){E("'finalizationGroup' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"detachFinalizer_deps")||(g.detachFinalizer_deps=function(){E("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"detachFinalizer")||(g.detachFinalizer=function(){E("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"attachFinalizer")||(g.attachFinalizer=function(){E("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"makeClassHandle")||(g.makeClassHandle=function(){E("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"init_ClassHandle")||(g.init_ClassHandle=function(){E("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle")||(g.ClassHandle=function(){E("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle_isAliasOf")||(g.ClassHandle_isAliasOf=function(){E("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"throwInstanceAlreadyDeleted")||(g.throwInstanceAlreadyDeleted=function(){E("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle_clone")||(g.ClassHandle_clone=function(){E("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle_delete")||(g.ClassHandle_delete=function(){E("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"deletionQueue")||(g.deletionQueue=function(){E("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle_isDeleted")||(g.ClassHandle_isDeleted=function(){E("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"ClassHandle_deleteLater")||(g.ClassHandle_deleteLater=function(){E("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"flushPendingDeletes")||(g.flushPendingDeletes=function(){E("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"delayFunction")||(g.delayFunction=function(){E("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"setDelayFunction")||(g.setDelayFunction=function(){E("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"RegisteredClass")||(g.RegisteredClass=function(){E("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"shallowCopyInternalPointer")||(g.shallowCopyInternalPointer=function(){E("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"downcastPointer")||(g.downcastPointer=function(){E("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"upcastPointer")||(g.upcastPointer=function(){E("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"validateThis")||(g.validateThis=function(){E("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"char_0")||(g.char_0=function(){E("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"char_9")||(g.char_9=function(){E("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"makeLegalFunctionName")||(g.makeLegalFunctionName=function(){E("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"warnOnce")||(g.warnOnce=function(){E("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stackSave")||(g.stackSave=function(){E("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stackRestore")||(g.stackRestore=function(){E("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stackAlloc")||(g.stackAlloc=function(){E("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"AsciiToString")||(g.AsciiToString=function(){E("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToAscii")||(g.stringToAscii=function(){E("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UTF16ToString")||(g.UTF16ToString=function(){E("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToUTF16")||(g.stringToUTF16=function(){E("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"lengthBytesUTF16")||(g.lengthBytesUTF16=function(){E("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"UTF32ToString")||(g.UTF32ToString=function(){E("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"stringToUTF32")||(g.stringToUTF32=function(){E("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"lengthBytesUTF32")||(g.lengthBytesUTF32=function(){E("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"allocateUTF8")||(g.allocateUTF8=function(){E("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(g,"allocateUTF8OnStack")||(g.allocateUTF8OnStack=function(){E("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),g.writeStackCookie=ge,g.checkStackCookie=Te,Object.getOwnPropertyDescriptor(g,"ALLOC_NORMAL")||Object.defineProperty(g,"ALLOC_NORMAL",{configurable:!0,get:function(){E("'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(g,"ALLOC_STACK")||Object.defineProperty(g,"ALLOC_STACK",{configurable:!0,get:function(){E("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),De=function e(){mr||Dr(),mr||(De=e)},g.run=Dr,g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();return Dr(),k.exports=g,C.exports}();const p="player",f="playbackTF",E={playType:p,videoBuffer:1e3,videoBufferDelay:1e3,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isWebrtc:!1,debug:!1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,loadingTimeoutReplay:!1,heartTimeoutReplay:!1,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,supportDblclickFullscreen:!1,showBandwidth:!1,keepScreenOn:!1,isNotMute:!1,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1},watermarkConfig:{},controlAutoHide:!1,hasControl:!1,loadingText:"",background:"",decoder:"decoder.js",url:"",rotate:0,playbackConfig:{playList:[],fps:""},forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:2,demuxType:"flv",useWasm:!1,useWCS:!1,wcsUseVideoRender:!1,wasmUseVideoRender:!1,useMSE:!1,useOffscreen:!1,autoWasm:!0,wasmDecodeErrorReplay:!0,openWebglAlignment:!1,playbackDelayTime:1e3,playbackFps:20,playbackForwardMaxRateDecodeIFrame:4},T="initVideo",O="render",m="playAudio",w="workerFetch",y={init:"init",decode:"decode",audioDecode:"audioDecode",videoDecode:"videoDecode",close:"close",updateConfig:"updateConfig",resetDecode:"resetDecode",resetAudioDecode:"resetAudioDecode",resetVideoDecode:"resetVideoDecode"},D="streamSuccess",_="fetchError";function b(){return(performance&&"function"==typeof performance.now?performance:Date).now()}try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var o=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(o instanceof WebAssembly.Module)new WebAssembly.Instance(o),WebAssembly.Instance}}catch(e){}e=window.navigator.userAgent;/^((?!chrome|android).)*safari/i.test(e),/MicroMessenger/i.test(e);const i=[[Uint8Array,Int8Array],[Uint16Array,Int16Array],[Uint32Array,Int32Array,Float32Array],[Float64Array]],a=Symbol(32),s=Symbol(16),c=Symbol(8),d=new Map;i.forEach((e,t)=>e.forEach(e=>d.set(e,t)));class P{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}fillFromReader(r){return e=this,c=function*(){var{done:e,value:t}=yield r.read();return e?void this.close():(this.write(t),this.fillFromReader(r))},new(s=(s=a=void 0)||Promise)(function(r,t){function n(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((c=c.apply(e,a||[])).next())});var e,a,s,c}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(r){return new Promise((t,e)=>{if(this.resolve)return e("last read not complete yet");this.resolve=e=>{delete this.resolve,delete this.need,t(e)},this.demand(r,!0)})}readU32(){return this.read(a)}readU16(){return this.read(s)}readU8(){return this.read(c)}close(){this.g&&this.g.return()}flush(){if(this.buffer&&this.need){let e=null;const n=this.buffer.subarray(this.consumed);let t=0;var r=e=>n.length<(t=e);if("number"==typeof this.need){if(r(this.need))return;e=n.subarray(0,t)}else if(this.need instanceof ArrayBuffer){if(r(this.need.byteLength))return;new Uint8Array(this.need).set(n.subarray(0,t)),e=this.need}else if(this.need===a){if(r(4))return;e=n[0]<<24|n[1]<<16|n[2]<<8|n[3]}else if(this.need===s){if(r(2))return;e=n[0]<<8|n[1]}else if(this.need===c){if(r(1))return;e=n[0]}else if(d.has(this.need.constructor)){if(r(this.need.length<<d.get(this.need.constructor)))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(n.subarray(0,t)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"));return this.consumed+=t,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}}write(e){e instanceof ArrayBuffer?this.malloc(e.byteLength).set(new Uint8Array(e)):this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),(this.g||this.resolve)&&this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){var t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}P.U32=a,P.U16=s,P.U8=c,Date.now||(Date.now=function(){return(new Date).getTime()}),g.postRun=function(){function r(){i&&(i.abort(),i=null)}var n=[],l=[],o={},i=new AbortController,a=null,s=null,c=null,h=("VideoEncoder"in self&&(o={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){o.isEmitInfo||(h.opt.debug&&console.log("Jessibuca: [worker] Webcodecs Video Decoder initSize"),postMessage({cmd:T,w:e.codedWidth,h:e.codedHeight}),o.isEmitInfo=!0,o.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),o.offscreenCanvasCtx=o.offscreenCanvas.getContext("2d")),o.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);var t=o.offscreenCanvas.transferToImageBitmap();postMessage({cmd:O,buffer:t,delay:h.delay,ts:0},[t]),setTimeout(function(){e.close?e.close():e.destroy()},100)},error:function(e){console.error(e)}}),decode:function(e,t){const r=e[0]>>4==1;if(o.hasInit){t=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:r?"key":"delta"});o.decoder.decode(t)}else if(r&&0===e[1]){const t=15&e[0],r=(h.setVideoCodec(t),function(e){let r=e.subarray(1,4),n="avc1.";for(let t=0;t<3;t++){let e=r[t].toString(16);e.length<2&&(e="0"+e),n+=e}return{codec:n,description:e}}(e.slice(5)));o.decoder.configure(r),o.hasInit=!0}},reset(){o.hasInit=!1,o.isEmitInfo=!1,o.offscreenCanvas=null,o.offscreenCanvasCtx=null}}),{opt:{debug:E.debug,forceNoOffscreen:E.forceNoOffscreen,useWCS:E.useWCS,videoBuffer:E.videoBuffer,openWebglAlignment:E.openWebglAlignment,playType:E.playType,hasAudio:E.hasAudio,isFlv:E.isFlv},useOffscreen:function(){return!h.opt.forceNoOffscreen&&"undefined"!=typeof OffscreenCanvas},initAudioPlanar:function(c,e){postMessage({cmd:"initAudio",sampleRate:e,channels:c});var d=[],u=0;this.playAudioPlanar=function(e,t,r){for(var n=t,o=[],i=0,a=0;a<2;a++){var s=g.HEAPU32[(e>>2)+a]>>2;o[a]=g.HEAPF32.subarray(s,s+n)}if(u){if(!(n>=(t=1024-u)))return u+=n,l[0]=Float32Array.of(...l[0],...o[0]),void(2==c&&(l[1]=Float32Array.of(...l[1],...o[1])));d[0]=Float32Array.of(...l[0],...o[0].subarray(0,t)),2==c&&(d[1]=Float32Array.of(...l[1],...o[1].subarray(0,t))),postMessage({cmd:m,buffer:d,ts:r},d.map(e=>e.buffer)),n-=i=t}for(u=n;1024<=u;u-=1024)d[0]=o[0].slice(i,i+=1024),2==c&&(d[1]=o[1].slice(i-1024,i)),postMessage({cmd:m,buffer:d,ts:r},d.map(e=>e.buffer));u&&(l[0]=o[0].slice(i),2==c&&(l[1]=o[1].slice(i)))}},setVideoCodec:function(e){postMessage({cmd:"videoCode",code:e})},setAudioCodec:function(e){postMessage({cmd:"audioCode",code:e})},setVideoSize:function(o,i){postMessage({cmd:T,w:o,h:i});var a,e,t,r,n,s,c,d,u,l,p=o*i,f=p>>2;function E(e,t){var r=a.createTexture();return a.bindTexture(a.TEXTURE_2D,r),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.bindTexture(a.TEXTURE_2D,null),a.uniform1i(a.getUniformLocation(n,e),t),r}h.useOffscreen()?(this.offscreenCanvas=new OffscreenCanvas(o,i),this.offscreenCanvasGL=this.offscreenCanvas.getContext("webgl"),this.webglObj=(a=this.offscreenCanvasGL,e=h.opt.openWebglAlignment,t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),r=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),e&&a.pixelStorei(a.UNPACK_ALIGNMENT,1),e=a.createShader(a.VERTEX_SHADER),a.shaderSource(e,t),a.compileShader(e),a.getShaderParameter(e,a.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+a.getShaderInfoLog(e)),t=a.createShader(a.FRAGMENT_SHADER),a.shaderSource(t,r),a.compileShader(t),a.getShaderParameter(t,a.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+a.getShaderInfoLog(t)),n=a.createProgram(),a.attachShader(n,e),a.attachShader(n,t),a.linkProgram(n),a.getProgramParameter(n,a.LINK_STATUS)||console.log("Program failed to compile: "+a.getProgramInfoLog(n)),a.useProgram(n),s=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,s),a.bufferData(a.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),a.STATIC_DRAW),r=a.getAttribLocation(n,"vertexPos"),a.enableVertexAttribArray(r),a.vertexAttribPointer(r,2,a.FLOAT,!1,0,0),c=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,c),a.bufferData(a.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),a.STATIC_DRAW),e=a.getAttribLocation(n,"texturePos"),a.enableVertexAttribArray(e),a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0),d=E("ySampler",0),u=E("uSampler",1),l=E("vSampler",2),{render:function(e,t,r,n,o){a.viewport(0,0,e,t),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e,t,0,a.LUMINANCE,a.UNSIGNED_BYTE,r),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,u),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,n),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,l),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,o),a.drawArrays(a.TRIANGLE_STRIP,0,4)},destroy:function(){try{a.deleteProgram(n),a.deleteBuffer(s),a.deleteBuffer(c),a.deleteTexture(d),a.deleteTexture(u),a.deleteBuffer(l)}catch(e){}}}),this.draw=function(e,t,r,n){this.webglObj.render(o,i,g.HEAPU8.subarray(t,t+p),g.HEAPU8.subarray(r,r+f),g.HEAPU8.subarray(n,n+f));t=this.offscreenCanvas.transferToImageBitmap();postMessage({cmd:O,buffer:t,delay:this.delay,ts:e},[t])}):this.draw=function(e,t,r,n){t=[g.HEAPU8.subarray(t,t+p),g.HEAPU8.subarray(r,r+f),g.HEAPU8.subarray(n,n+f)].map(e=>Uint8Array.from(e));postMessage({cmd:O,output:t,delay:this.delay,ts:e},t.map(e=>e.buffer))}},getDelay:function(e){return e?(this.firstTimestamp?e&&(this.delay=Date.now()-this.startTimestamp-(e-this.firstTimestamp)):(this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1),this.delay):-1},resetDelay:function(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1},init:function(){h.opt.debug&&console.log("Jessibuca: [worker] init");const t=e=>{(h.opt.useWCS&&h.useOffscreen()&&2===e.type&&o.decode?o:e.decoder).decode(e.payload,e.ts)};this.stopId=setInterval(()=>{if(n.length)if(this.dropping){for(h.opt.debug&&console.log("Jessibuca: [worker]: loop is dropping"),1===(e=n.shift()).type&&0===e.payload[1]&&t(e);!e.isIFrame&&n.length;)h.opt.debug&&console.log("Jessibuca: [worker]: loop is dropping = true, isIFrame is",e.isIFrame),1===(e=n.shift()).type&&0===e.payload[1]&&t(e);e.isIFrame&&(this.dropping=!1,t(e))}else{var e=n[0];if(-1===this.getDelay(e.ts))h.opt.debug&&console.log("Jessibuca: [worker]: common dumex delay is -1"),n.shift(),t(e);else if(this.delay>h.opt.videoBuffer+1e3)h.opt.debug&&console.log("Jessibuca: [worker]:",`delay is ${this.delay}, set dropping is true`),this.resetDelay(),this.dropping=!0;else for(;n.length&&(e=n[0],this.getDelay(e.ts)>h.opt.videoBuffer);)n.shift(),t(e)}},10)},close:function(){h.opt.debug&&console.log("Jessibuca: [worker]: close"),clearInterval(this.stopId),this.stopId=null,d.clear(),u.clear(),o.reset&&o.reset(),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1,this.webglObj&&(this.webglObj.destroy(),this.offscreenCanvas=null,this.offscreenCanvasGL=null,this.offscreenCanvasCtx=null),n=[],l=[],i=null,a&&(a.close(),a=null),delete this.playAudioPlanar,delete this.draw},pushBuffer:function(e,t){1===t.type?n.push({ts:t.ts,payload:e,decoder:d,type:1}):2===t.type&&n.push({ts:t.ts,payload:e,decoder:u,type:2,isIFrame:t.isIFrame})},fetchStream:function(e,t){h.opt.debug&&console.log("Jessibuca: [worker]: fetchStream, url is "+e,"options:",t),s=function(){let r=0,n=b();return e=>{r+=e;var e=b(),t=e-n;1e3<=t&&(t=r/t*1e3,postMessage({cmd:w,type:"streamRate",value:t}),n=e,r=0)}}(),2===t.protocol?(c=new P(h.demuxFlv()),fetch(e,{signal:i.signal}).then(e=>{postMessage({cmd:w,type:D}),e.body.pipeTo(new WritableStream({write:e=>(s(e.byteLength),c.write(e)),close:()=>{c=null},abort:e=>{c=null,postMessage({cmd:w,type:_,value:e.toString()}),r()}}))}).catch(e=>{postMessage({cmd:w,type:_,value:e.toString()}),r()})):1===t.protocol&&(h.opt.isFlv&&(c=new P(h.demuxFlv())),(a=new WebSocket(e)).binaryType="arraybuffer",a.onopen=()=>{h.opt.debug&&console.log("Jessibuca: [worker]: fetchStream, WebsocketStream socket open"),postMessage({cmd:w,type:D})},a.onclose=()=>{h.opt.debug&&console.log("Jessibuca: [worker]: fetchStream, WebsocketStream socket close"),h.opt.isFlv&&(c=null),postMessage({cmd:w,type:"streamEnd"})},a.onerror=e=>{h.opt.debug&&console.log("Jessibuca: [worker]: fetchStream, WebsocketStream socket error"),h.opt.isFlv&&(c=null),postMessage({cmd:w,type:"websocketError",value:e.toString()})},a.onmessage=e=>{if(s(e.data.byteLength),h.opt.isFlv)c.write(e.data);else{const n=new DataView(e.data),o=(n.getUint8(0),n.getUint32(1,!1));switch(i){case 1:const i=new Uint8Array(e.data,5);h.decode(i,{type:1,ts:o});break;case 2:var t,r;5<n.byteLength&&(t=new Uint8Array(e.data,5),r=n.getUint8(5)>>4==1,h.decode(t,{type:2,ts:o,isIFrame:r}))}}})},demuxFlv:function*(){yield 9;const t=new ArrayBuffer(4),r=new Uint8Array(t),n=new Uint32Array(t);for(;;){r[3]=0;const t=yield 15,a=t[4];r[0]=t[7],r[1]=t[6],r[2]=t[5];var o=n[0];r[0]=t[10],r[1]=t[9],r[2]=t[8];let e=n[0];16777215===e&&(r[3]=t[11],e=n[0]);var i=(yield o).slice();switch(a){case 8:h.decode(i,{type:1,ts:e});break;case 9:const t=i[0]>>4==1;0<i.byteLength&&h.decode(i,{type:2,ts:e,isIFrame:t})}}},decode:function(e,t){var r=h.opt.playType;1===t.type?h.opt.hasAudio&&(postMessage({cmd:w,type:"streamAbps",value:e.byteLength}),r===p?h.pushBuffer(e,{type:t.type,ts:t.ts}):r===f&&d.decode(e,t.ts)):2===t.type&&(postMessage({cmd:w,type:"streamVbps",value:e.byteLength}),r===p?h.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame}):r===f&&u.decode(e,t.ts))}}),d=new g.AudioDecoder(h),u=new g.VideoDecoder(h);postMessage({cmd:y.init}),self.onmessage=function(e){var t=e.data;switch(t.cmd){case y.init:try{h.opt=Object.assign(h.opt,JSON.parse(t.opt))}catch(e){}d.sample_rate=t.sampleRate,h.init();break;case y.decode:h.pushBuffer(t.buffer,t.options);break;case y.audioDecode:d.decode(t.buffer,t.ts);break;case y.videoDecode:u.decode(t.buffer,t.ts);break;case y.fetchStream:h.fetchStream(t.url,JSON.parse(t.opt));break;case y.close:h.close();break;case y.updateConfig:h.opt[t.key]=t.value}}}});