@sketch-hq/sketch-web-renderer 11.2.0 → 11.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/module-debug-80123553.js +1 -0
- package/dist/{module-debug-e35fdff2.js → module-debug-b4e2711a.js} +116 -21
- package/dist/module-debug.wasm +0 -0
- package/dist/module-release-3e3b1207.js +15 -0
- package/dist/module-release-b93dd701.js +1 -0
- package/dist/module-release.wasm +0 -0
- package/dist/ts/canvas-renderer/CanvasRenderer.d.ts +17 -0
- package/dist/ts/canvas-renderer/CanvasRenderer.d.ts.map +1 -1
- package/dist/ts/canvas-renderer/constants.d.ts +8 -0
- package/dist/ts/canvas-renderer/constants.d.ts.map +1 -0
- package/dist/ts/canvas-renderer/react/hooks/actions.d.ts +4 -0
- package/dist/ts/canvas-renderer/react/hooks/actions.d.ts.map +1 -1
- package/dist/ts/types/Exporter.d.ts +16 -0
- package/dist/ts/types/Exporter.d.ts.map +1 -0
- package/dist/ts/types/index.d.ts +1 -0
- package/dist/ts/types/index.d.ts.map +1 -1
- package/dist/ts/types/wasm/CanvasRendererWasm.d.ts +2 -0
- package/dist/ts/types/wasm/CanvasRendererWasm.d.ts.map +1 -1
- package/dist/ts/types/wasm/JSBridge.d.ts +1 -0
- package/dist/ts/types/wasm/JSBridge.d.ts.map +1 -1
- package/dist/ts/types/wasm/Marina/Enums.d.ts +2 -1
- package/dist/ts/types/wasm/Marina/Enums.d.ts.map +1 -1
- package/dist/ts/types/wasm/WasmModule.d.ts +2 -0
- package/dist/ts/types/wasm/WasmModule.d.ts.map +1 -1
- package/dist/ts/utils/WasmModule.d.ts +2 -0
- package/dist/ts/utils/WasmModule.d.ts.map +1 -1
- package/package.json +3 -5
- package/dist/module-debug-d3065ab9.js +0 -1
- package/dist/module-release-02395954.js +0 -1
- package/dist/module-release-0b6909af.js +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,t=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var r,n,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(e,t){r=e,n=t})),Object.getOwnPropertyDescriptor(i.ready,"_malloc")||(Object.defineProperty(i.ready,"_malloc",{configurable:!0,get:function(){le("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_malloc",{configurable:!0,set:function(){le("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_free")||(Object.defineProperty(i.ready,"_free",{configurable:!0,get:function(){le("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_free",{configurable:!0,set:function(){le("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___getTypeName")||(Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,get:function(){le("You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,set:function(){le("You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___embind_register_native_and_builtin_types")||(Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,get:function(){le("You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,set:function(){le("You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___stdio_exit")||(Object.defineProperty(i.ready,"___stdio_exit",{configurable:!0,get:function(){le("You are getting ___stdio_exit on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___stdio_exit",{configurable:!0,set:function(){le("You are setting ___stdio_exit on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"onRuntimeInitialized")||(Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,get:function(){le("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,set:function(){le("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}));var a=Object.assign({},i),o="./this.program",s=(e,t)=>{throw t},u=!0;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var c,l="";if("undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),e&&(l=e),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var f,d=i.print||console.log.bind(console),m=i.printErr||console.warn.bind(console);function g(e){g.shown||(g.shown={}),g.shown[e]||(g.shown[e]=1,m(e))}function p(e,t){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get:function(){le("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function v(e,t){var r="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";return t&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),r}function h(e,t){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get:function(){le(v(e,t))}})}function y(e,t){Object.getOwnPropertyDescriptor(i,e)||(i[e]=()=>le(v(e,t)))}Object.assign(i,a),a=null,f="fetchSettings",Object.getOwnPropertyDescriptor(i,f)&&le("`Module."+f+"` was supplied but `"+f+"` not included in INCOMING_MODULE_JS_API"),i.arguments&&i.arguments,p("arguments","arguments_"),i.thisProgram&&(o=i.thisProgram),p("thisProgram","thisProgram"),i.quit&&(s=i.quit),p("quit","quit_"),x(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),x(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),x(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),x(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),x(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),x(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),x(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),x(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),x(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),p("read","read_"),p("readAsync","readAsync"),p("readBinary","readBinary"),p("setWindowTitle","setWindowTitle"),x(!0,"worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."),x(!0,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),x(!0,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var b,_=0;i.wasmBinary&&(b=i.wasmBinary),p("wasmBinary","wasmBinary");var w,T=i.noExitRuntime||!0;p("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&le("no native wasm support detected");var P=!1;function x(e,t){e||le("Assertion failed"+(t?": "+t:""))}var E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&E)return E.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var u=63&e[t++];if(224==(240&o)?o=(15&o)<<12|s<<6|u:(240!=(248&o)&&g("Invalid UTF-8 leading byte 0x"+o.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),o=(7&o)<<18|s<<12|u<<6|63&e[t++]),o<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}function C(e,t){return e?S(D,e,t):""}function A(e,t,r,n){if(!(n>0))return 0;for(var i=r,a=r+n-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),s<=127){if(r>=a)break;t[r++]=s}else if(s<=2047){if(r+1>=a)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=a)break;s>1114111&&g("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-i}function I(e,t,r){return x("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),A(e,D,t,r)}function F(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var k,O,D,L,M,U,R,B,$,W,N,j="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function G(e,t){x(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&M[n];)++n;if((r=n<<1)-e>32&&j)return j.decode(D.subarray(e,r));for(var a="",o=0;!(o>=t/2);++o){var s=L[e+2*o>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function V(e,t,r){if(x(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),x("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);L[t>>1]=o,t+=2}return L[t>>1]=0,t-n}function Y(e){return 2*e.length}function H(e,t){x(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var i=U[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(i)}return n}function z(e,t,r){if(x(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),x("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,a=0;a<e.length;++a){var o=e.charCodeAt(a);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),U[t>>2]=o,(t+=4)+4>i)break}return U[t>>2]=0,t-n}function J(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function q(e){k=e,i.HEAP8=O=new Int8Array(e),i.HEAP16=L=new Int16Array(e),i.HEAP32=U=new Int32Array(e),i.HEAPU8=D=new Uint8Array(e),i.HEAPU16=M=new Uint16Array(e),i.HEAPU32=R=new Uint32Array(e),i.HEAPF32=B=new Float32Array(e),i.HEAPF64=N=new Float64Array(e),i.HEAP64=$=new BigInt64Array(e),i.HEAPU64=W=new BigUint64Array(e)}var Z=5242880;i.TOTAL_STACK&&x(Z===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X,K=i.INITIAL_MEMORY||134217728;function Q(){var e=Fr();x(0==(3&e)),U[e>>2]=34821223,U[e+4>>2]=2310721022,R[0]=1668509029}function ee(){if(!P){var e=Fr(),t=R[e>>2],r=R[e+4>>2];34821223==t&&2310721022==r||le("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==R[0]&&le("Runtime error: The application has corrupted its heap memory area (address zero)!")}}p("INITIAL_MEMORY","INITIAL_MEMORY"),x(K>=Z,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+K+"! (TOTAL_STACK="+Z+")"),x("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),x(!i.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),x(134217728==K,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var te=[],re=[],ne=[],ie=!1;function ae(){return T}x(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var oe=0,se=null,ue=null,ce={};function le(e){i.onAbort&&i.onAbort(e),m(e="Aborted("+e+")"),P=!0;var t=new WebAssembly.RuntimeError(e);throw n(t),t}var fe={error:function(){le("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){fe.error()},createDataFile:function(){fe.error()},createPreloadedFile:function(){fe.error()},createLazyFile:function(){fe.error()},open:function(){fe.error()},mkdev:function(){fe.error()},registerDevice:function(){fe.error()},analyzePath:function(){fe.error()},loadFilesFromDB:function(){fe.error()},ErrnoError:function(){fe.error()}};i.FS_createDataFile=fe.createDataFile,i.FS_createPreloadedFile=fe.createPreloadedFile;var de,me,ge="data:application/octet-stream;base64,";function pe(e){return e.startsWith(ge)}function ve(e,t){return function(){var r=e,n=t;return t||(n=i.asm),x(ie,"native function `"+r+"` called before runtime initialization"),n[e]||x(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function he(e){try{if(e==de&&b)return new Uint8Array(b);if(!c)throw"both async and sync fetching of the wasm failed"}catch(e){le(e)}}function ye(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?_e(r)():_e(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(i)}}pe(de="module-debug.wasm")||(me=de,de=i.locateFile?i.locateFile(me,l):l+me);var be=[];function _e(e){var t=be[e];return t||(e>=be.length&&(be.length=e+1),be[e]=t=X.get(e)),x(X.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}var we={};function Te(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Pe(e){return this.fromWireType(R[e>>2])}var xe={},Ee={},Se={},Ce=48,Ae=57;function Ie(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ce&&t<=Ae?"_"+e:e}function Fe(e,t){return e=Ie(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ke(e,t){var r=Fe(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Oe=void 0;function De(e){throw new Oe(e)}function Le(e,t,r){function n(t){var n=r(t);n.length!==e.length&&De("Mismatched type converter count");for(var i=0;i<e.length;++i)We(e[i],n[i])}e.forEach((function(e){Se[e]=t}));var i=new Array(t.length),a=[],o=0;t.forEach(((e,t)=>{Ee.hasOwnProperty(e)?i[t]=Ee[e]:(a.push(e),xe.hasOwnProperty(e)||(xe[e]=[]),xe[e].push((()=>{i[t]=Ee[e],++o===a.length&&n(i)})))})),0===a.length&&n(i)}function Me(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}var Ue=void 0;function Re(e){for(var t="",r=e;D[r];)t+=Ue[D[r++]];return t}var Be=void 0;function $e(e){throw new Be(e)}function We(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||$e('type "'+n+'" must have a positive integer typeid pointer'),Ee.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;$e("Cannot register type '"+n+"' twice")}if(Ee[e]=t,delete Se[e],xe.hasOwnProperty(e)){var i=xe[e];delete xe[e],i.forEach((e=>e()))}}function Ne(e,t,r){switch(t){case 0:return r?function(e){return O[e]}:function(e){return D[e]};case 1:return r?function(e){return L[e>>1]}:function(e){return M[e>>1]};case 2:return r?function(e){return U[e>>2]}:function(e){return R[e>>2]};case 3:return r?function(e){return $[e>>3]}:function(e){return W[e>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function je(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)}}function Ge(e){if(!(this instanceof ft))return!1;if(!(e instanceof ft))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}function Ve(e){$e(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Ye=!1;function He(e){}function ze(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function Je(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Je(e,t,r.baseClass);return null===n?null:r.downcast(n)}var qe={};function Ze(){return Object.keys(rt).length}function Xe(){var e=[];for(var t in rt)rt.hasOwnProperty(t)&&e.push(rt[t]);return e}var Ke=[];function Qe(){for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}}var et=void 0;function tt(e){et=e,Ke.length&&et&&et(Qe)}var rt={};function nt(e,t){return t=function(e,t){for(void 0===t&&$e("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),rt[t]}function it(e,t){return t.ptrType&&t.ptr||De("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&De("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ot(Object.create(e,{$$:{value:t}}))}function at(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=nt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?it(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):it(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,o=this.registeredClass.getActualType(t),s=qe[o];if(!s)return i.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=Je(t,this.registeredClass,a.registeredClass);return null===u?i.call(this):this.isSmartPointer?it(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):it(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function ot(e){return"undefined"==typeof FinalizationRegistry?(ot=e=>e,e):(Ye=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),ze(e.$$)})),ot=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,at),Ye.register(e,r,e)}return e},He=e=>Ye.unregister(e),ot(e))}function st(){if(this.$$.ptr||Ve(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=ot(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ut(){this.$$.ptr||Ve(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$e("Object already scheduled for deletion"),He(this),ze(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ct(){return!this.$$.ptr}function lt(){return this.$$.ptr||Ve(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$e("Object already scheduled for deletion"),Ke.push(this),1===Ke.length&&et&&et(Qe),this.$$.deleteScheduled=!0,this}function ft(){}function dt(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||$e("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 mt(e,t,r){i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&$e("Cannot register public name '"+e+"' twice"),dt(i,e,e),i.hasOwnProperty(r)&&$e("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))}function gt(e,t,r,n,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}function pt(e,t,r){for(;t!==r;)t.upcast||$e("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function vt(e,t){if(null===t)return this.isReference&&$e("null is not a valid "+this.name),0;t.$$||$e('Cannot pass "'+Me(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return pt(t.$$.ptr,r,this.registeredClass)}function ht(e,t){var r;if(null===t)return this.isReference&&$e("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||$e('Cannot pass "'+Me(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&$e("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=pt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&$e("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:$e("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,Ut.toHandle((function(){i.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:$e("Unsupporting sharing policy")}return r}function yt(e,t){if(null===t)return this.isReference&&$e("null is not a valid "+this.name),0;t.$$||$e('Cannot pass "'+Me(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&$e("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return pt(t.$$.ptr,r,this.registeredClass)}function bt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function _t(e){this.rawDestructor&&this.rawDestructor(e)}function wt(e){null!==e&&e.delete()}function Tt(e,t,r,n,i,a,o,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=ht:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=yt,this.destructorFunction=null)}function Pt(e,t){e=Re(e);var r=_e(t);return"function"!=typeof r&&$e("unknown function pointer with signature "+e+": "+t),r}var xt=void 0;function Et(e){var t=Er(e),r=Re(t);return xr(t),r}function St(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Ee[t]||(Se[t]?Se[t].forEach(e):(r.push(t),n[t]=!0))})),new xt(e+": "+r.map(Et).join([", "]))}function Ct(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Fe(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function At(e,t,r,n,i){var a=t.length;a<2&&$e("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,l="",f="";for(u=0;u<a-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+Ie(e)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var m=s?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],p=[$e,n,i,Te,t[0],t[1]];for(o&&(d+="var thisWired = classParam.toWireType("+m+", this);\n"),u=0;u<a-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+m+", arg"+u+"); // "+t[u+2].name+"\n",g.push("argType"+u),p.push(t[u+2]);if(o&&(f="thisWired"+(f.length>0?", ":"")+f),d+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)d+="runDestructors(destructors);\n";else for(u=o?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",g.push(v+"_dtor"),p.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",g.push(d),Ct(Function,g).apply(null,p)}function It(e,t){for(var r=[],n=0;n<e;n++)r.push(U[(t>>2)+n]);return r}function Ft(e,t,r){return e instanceof Object||$e(r+' with invalid "this": '+e),e instanceof t.registeredClass.constructor||$e(r+' incompatible with "this" of type '+e.constructor.name),e.$$.ptr||$e("cannot call emscripten binding method "+r+" on deleted object"),pt(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)}var kt=[],Ot=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Dt(e){e>4&&0==--Ot[e].refcount&&(Ot[e]=void 0,kt.push(e))}function Lt(){for(var e=0,t=5;t<Ot.length;++t)void 0!==Ot[t]&&++e;return e}function Mt(){for(var e=5;e<Ot.length;++e)if(void 0!==Ot[e])return Ot[e];return null}var Ut={toValue:e=>(e||$e("Cannot use deleted val. handle = "+e),Ot[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=kt.length?kt.pop():Ot.length;return Ot[t]={refcount:1,value:e},t}}};function Rt(e,t,r){switch(t){case 0:return function(e){var t=r?O:D;return this.fromWireType(t[e])};case 1:return function(e){var t=r?L:M;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?U:R;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Bt(e,t){var r=Ee[e];return void 0===r&&$e(t+" has unknown type "+Et(e)),r}function $t(e,t){switch(t){case 2:return function(e){return this.fromWireType(B[e>>2])};case 3:return function(e){return this.fromWireType(N[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Wt(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=Bt(U[(t>>2)+n],"parameter "+n);return r}var Nt={};function jt(e){var t=Nt[e];return void 0===t?Re(e):t}var Gt=[];function Vt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Yt,Ht=[];function zt(e){try{return w.grow(e-k.byteLength+65535>>>16),q(w.buffer),1}catch(t){m("emscripten_realloc_buffer: Attempted to grow heap from "+k.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}Yt=()=>performance.now();var Jt={};function qt(){if(!qt.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",_:o||"./this.program"};for(var t in Jt)void 0===Jt[t]?delete e[t]:e[t]=Jt[t];var r=[];for(var t in e)r.push(t+"="+e[t]);qt.strings=r}return qt.strings}var Zt=[null,[],[]];function Xt(e,t){var r=Zt[e];x(r),0===t||10===t?((1===e?d:m)(S(r,0)),r.length=0):r.push(t)}function Kt(){Sr(),Zt[1].length&&Xt(1,10),Zt[2].length&&Xt(2,10)}var Qt={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){Qt.lastError||(Qt.lastError=e)},getNewId:function(e){for(var t=Qt.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var i="",a=0;a<t;++a){var o=n?U[n+4*a>>2]:-1;i+=C(U[r+4*a>>2],o<0?void 0:o)}return i},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?Qt.registerContext(r,t):0},registerContext:function(e,t){var r=Qt.getNewId(Qt.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),Qt.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&Qt.initExtensions(n),r},makeContextCurrent:function(e){return Qt.currentContext=Qt.contexts[e],i.ctx=pr=Qt.currentContext&&Qt.currentContext.GLctx,!(e&&!pr)},getContext:function(e){return Qt.contexts[e]},deleteContext:function(e){Qt.currentContext===Qt.contexts[e]&&(Qt.currentContext=null),"object"==typeof JSEvents&&JSEvents.removeAllHandlersOnTarget(Qt.contexts[e].GLctx.canvas),Qt.contexts[e]&&Qt.contexts[e].GLctx.canvas&&(Qt.contexts[e].GLctx.canvas.GLctxObject=void 0),Qt.contexts[e]=null},initExtensions:function(e){if(e||(e=Qt.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t,r=e.GLctx;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,i){t.drawArraysInstancedANGLE(e,r,n,i)},e.drawElementsInstanced=function(e,r,n,i,a){t.drawElementsInstancedANGLE(e,r,n,i,a)})}(r),function(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}(r),function(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)})}(r),(t=r).dibvbi=t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),function(e){e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")}(r),e.version>=2&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!r.disjointTimerQueryExt)&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query")),function(e){e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")}(r),(r.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||r.getExtension(e)}))}}};function er(e,t){return x(t===(0|t)),(e>>>0)+4294967296*t}var tr=[];function rr(e,t,r,n){pr.drawElements(e,t,r,n)}function nr(e,t,r,n){for(var i=0;i<e;i++){var a=pr[r](),o=a&&Qt.getNewId(n);a?(a.name=o,n[o]=a):Qt.recordError(1282),U[t+4*i>>2]=o}}function ir(e,t){R[e>>2]=t,R[e+4>>2]=(t-R[e>>2])/4294967296;var r=t>=0?function(e){return R[e>>2]+4294967296*R[e+4>>2]}(e):function(e){return R[e>>2]+4294967296*U[e+4>>2]}(e);r!=t&&g("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+R[e>>2].toString(16)+", hi=0x"+R[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function ar(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&Qt.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var i=pr.getParameter(34467);n=i?i.length:0;break;case 33309:if(Qt.currentContext.version<2)return void Qt.recordError(1282);n=2*(pr.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(Qt.currentContext.version<2)return void Qt.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=pr.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void Qt.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void Qt.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var o=0;o<a.length;++o)switch(r){case 0:U[t+4*o>>2]=a[o];break;case 2:B[t+4*o>>2]=a[o];break;case 4:O[t+o>>0]=a[o]?1:0}return}try{n=0|a.name}catch(t){return Qt.recordError(1280),void m("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Qt.recordError(1280),void m("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(r){case 1:ir(t,n);break;case 0:U[t>>2]=n;break;case 2:B[t>>2]=n;break;case 4:O[t>>0]=n?1:0}}else Qt.recordError(1281)}function or(e){var t=F(e)+1,r=Pr(t);return I(e,r,t),r}function sr(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function ur(e){return 0==(e-=5120)?O:1==e?D:2==e?L:4==e?U:6==e?B:5==e||28922==e||28520==e||30779==e||30782==e?R:M}function cr(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function lr(e,t,r,n,i,a){var o=ur(e),s=cr(o),u=1<<s,c=function(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}(t)*u,l=function(e,t,r,n){var i;return t*(e*r+(i=n)-1&-i)}(r,n,c,Qt.unpackAlignment);return o.subarray(i>>s,i+l>>s)}function fr(e){var t=pr.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=pr.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}Qt.recordError(1282)}var dr=[],mr=[];function gr(e){return e%4==0&&(e%100!=0||e%400==0)}var pr,vr=[31,29,31,30,31,30,31,31,30,31,30,31],hr=[31,28,31,30,31,30,31,31,30,31,30,31];function yr(e,t,r,n){var i=U[n+40>>2],a={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:i?C(i):""},o=C(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)o=o.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function d(e,t){return f(e,t,"0")}function m(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function g(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=function(e,t){for(var r=new Date(e.getTime());t>0;){var n=gr(r.getFullYear()),i=r.getMonth(),a=(n?vr:hr)[i];if(!(t>a-r.getDate()))return r.setDate(r.getDate()+t),r;t-=a-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=g(r),a=g(n);return m(i,t)<=0?m(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}(gr(e.tm_year+1900)?vr:hr,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&gr(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&gr(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in o=o.replace(/%%/g,"\0\0"),v)o.includes(u)&&(o=o.replace(new RegExp(u,"g"),v[u](a)));var h,y,b,_,w,T,P=(h=o=o.replace(/\0\0/g,"%"),y=!1,_=b>0?b:F(h)+1,w=new Array(_),T=A(h,w,0,w.length),y&&(w.length=T),w);return P.length>t?0:(function(e,t){x(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),O.set(e,t)}(P,e),P.length-1)}Oe=i.InternalError=ke(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ue=e}(),Be=i.BindingError=ke(Error,"BindingError"),ft.prototype.isAliasOf=Ge,ft.prototype.clone=st,ft.prototype.delete=ut,ft.prototype.isDeleted=ct,ft.prototype.deleteLater=lt,i.getInheritedInstanceCount=Ze,i.getLiveInheritedInstances=Xe,i.flushPendingDeletes=Qe,i.setDelayFunction=tt,Tt.prototype.getPointee=bt,Tt.prototype.destructor=_t,Tt.prototype.argPackAdvance=8,Tt.prototype.readValueFromPointer=Pe,Tt.prototype.deleteObject=wt,Tt.prototype.fromWireType=at,xt=i.UnboundTypeError=ke(Error,"UnboundTypeError"),i.count_emval_handles=Lt,i.get_first_emval=Mt;for(var br=0;br<32;++br)tr.push(new Array(br));var _r=new Float32Array(288);for(br=0;br<288;++br)dr[br]=_r.subarray(0,br+1);var wr=new Int32Array(288);for(br=0;br<288;++br)mr[br]=wr.subarray(0,br+1);var Tr={__assert_fail:function(e,t,r,n){le("Assertion failed: "+C(e)+", at: "+[t?C(t):"unknown filename",r,n?C(n):"unknown function"])},_embind_finalize_value_object:function(e){var t=we[e];delete we[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields;Le([e],i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType))),(e=>{var a={};return i.forEach(((t,r)=>{var n=t.fieldName,o=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],l=t.setter,f=t.setterContext;a[n]={read:e=>o.fromWireType(s(u,e)),write:(e,t)=>{var r=[];l(f,e,c.toWireType(r,t)),Te(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in a)t[r]=a[r].read(e);return n(e),t},toWireType:function(e,t){for(var i in a)if(!(i in t))throw new TypeError('Missing field: "'+i+'"');var o=r();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(n,o),o},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:n}]}))},_embind_register_bigint:function(e,t,r,n,i){t=Re(t);var a=je(r),o=-1!=t.indexOf("u");o&&(i=(BigInt(1)<<BigInt(64))-BigInt(1)),We(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,r){if("bigint"!=typeof r)throw new TypeError('Cannot convert "'+Me(r)+'" to '+this.name);if(r<n||r>i)throw new TypeError('Passing a number "'+Me(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+i+"]!");return r},argPackAdvance:8,readValueFromPointer:Ne(t,a,!o),destructorFunction:null})},_embind_register_bool:function(e,t,r,n,i){var a=je(r);We(e,{name:t=Re(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=O;else if(2===r)n=L;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=U}return this.fromWireType(n[e>>a])},destructorFunction:null})},_embind_register_class:function(e,t,r,n,a,o,s,u,c,l,f,d,m){f=Re(f),o=Pt(a,o),u&&(u=Pt(s,u)),l&&(l=Pt(c,l)),m=Pt(d,m);var g=Ie(f);mt(g,(function(){St("Cannot construct "+f+" due to unbound types",[n])})),Le([e,t,r],n?[n]:[],(function(t){var r,a;t=t[0],a=n?(r=t.registeredClass).instancePrototype:ft.prototype;var s=Fe(g,(function(){if(Object.getPrototypeOf(this)!==c)throw new Be("Use 'new' to construct "+f);if(void 0===d.constructor_body)throw new Be(f+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Be("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(a,{constructor:{value:s}});s.prototype=c;var d=new gt(f,s,c,m,r,o,u,l),p=new Tt(f,d,!0,!1,!1),v=new Tt(f+"*",d,!1,!1,!1),h=new Tt(f+" const*",d,!1,!0,!1);return qe[e]={pointerType:v,constPointerType:h},function(e,t,r){i.hasOwnProperty(e)||De("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)}(g,s),[p,v,h]}))},_embind_register_class_class_function:function(e,t,r,n,i,a,o){var s=It(r,n);t=Re(t),a=Pt(i,a),Le([],[e],(function(e){var n=(e=e[0]).name+"."+t;function i(){St("Cannot call "+n+" due to unbound types",s)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.registeredClass.constructor;return void 0===u[t]?(i.argCount=r-1,u[t]=i):(dt(u,t,n),u[t].overloadTable[r-1]=i),Le([],s,(function(e){var i=[e[0],null].concat(e.slice(1)),s=At(n,i,null,a,o);return void 0===u[t].overloadTable?(s.argCount=r-1,u[t]=s):u[t].overloadTable[r-1]=s,[]})),[]}))},_embind_register_class_constructor:function(e,t,r,n,i,a){x(t>0);var o=It(t,r);i=Pt(n,i),Le([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Be("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{St("Cannot construct "+e.name+" due to unbound types",o)},Le([],o,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=At(r,n,null,i,a),[]})),[]}))},_embind_register_class_function:function(e,t,r,n,i,a,o,s){var u=It(r,n);t=Re(t),a=Pt(i,a),Le([],[e],(function(e){var n=(e=e[0]).name+"."+t;function i(){St("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(i.argCount=r-2,i.className=e.name,c[t]=i):(dt(c,t,n),c[t].overloadTable[r-2]=i),Le([],u,(function(i){var s=At(n,i,e,a,o);return void 0===c[t].overloadTable?(s.argCount=r-2,c[t]=s):c[t].overloadTable[r-2]=s,[]})),[]}))},_embind_register_class_property:function(e,t,r,n,i,a,o,s,u,c){t=Re(t),i=Pt(n,i),Le([],[e],(function(e){var n=(e=e[0]).name+"."+t,l={get:function(){St("Cannot access "+n+" due to unbound types",[r,o])},enumerable:!0,configurable:!0};return l.set=u?()=>{St("Cannot access "+n+" due to unbound types",[r,o])}:e=>{$e(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,t,l),Le([],u?[r,o]:[r],(function(r){var o=r[0],l={get:function(){var t=Ft(this,e,n+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=Pt(s,u);var f=r[1];l.set=function(t){var r=Ft(this,e,n+" setter"),i=[];u(c,r,f.toWireType(i,t)),Te(i)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,l),[]})),[]}))},_embind_register_emval:function(e,t){We(e,{name:t=Re(t),fromWireType:function(e){var t=Ut.toValue(e);return Dt(e),t},toWireType:function(e,t){return Ut.toHandle(t)},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:null})},_embind_register_enum:function(e,t,r,n){var i=je(r);function a(){}t=Re(t),a.values={},We(e,{name:t,constructor:a,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:Rt(t,i,n),destructorFunction:null}),mt(t,a)},_embind_register_enum_value:function(e,t,r){var n=Bt(e,"enum");t=Re(t);var i=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Fe(n.name+"_"+t,(function(){}))}});i.values[r]=a,i[t]=a},_embind_register_float:function(e,t,r){var n=je(r);We(e,{name:t=Re(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Me(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:$t(t,n),destructorFunction:null})},_embind_register_integer:function(e,t,r,n,i){t=Re(t),-1===i&&(i=4294967295);var a=je(r),o=e=>e;if(0===n){var s=32-8*r;o=e=>e<<s>>>s}var u=t.includes("unsigned"),c=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+Me(e)+'" to '+r);if(e<n||e>i)throw new TypeError('Passing a number "'+Me(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+i+"]!")};We(e,{name:t,fromWireType:o,toWireType:u?function(e,t){return c(t,this.name),t>>>0}:function(e,t){return c(t,this.name),t},argPackAdvance:8,readValueFromPointer:Ne(t,a,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=R,r=t[e>>=2],i=t[e+1];return new n(k,i,r)}We(e,{name:r=Re(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_smart_ptr:function(e,t,r,n,i,a,o,s,u,c,l,f){r=Re(r),a=Pt(i,a),s=Pt(o,s),c=Pt(u,c),f=Pt(l,f),Le([e],[t],(function(e){return e=e[0],[new Tt(r,e.registeredClass,!1,!1,!0,e,n,a,s,c,f)]}))},_embind_register_std_string:function(e,t){var r="std::string"===(t=Re(t));We(e,{name:t,fromWireType:function(e){var t,n=R[e>>2];if(r)for(var i=e+4,a=0;a<=n;++a){var o=e+4+a;if(a==n||0==D[o]){var s=C(i,o-i);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),i=o+1}}else{var u=new Array(n);for(a=0;a<n;++a)u[a]=String.fromCharCode(D[e+4+a]);t=u.join("")}return xr(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||$e("Cannot pass non-string to std::string");var i=(r&&n?()=>F(t):()=>t.length)(),a=Pr(4+i+1);if(R[a>>2]=i,r&&n)I(t,a+4,i+1);else if(n)for(var o=0;o<i;++o){var s=t.charCodeAt(o);s>255&&(xr(a),$e("String has UTF-16 code units that do not fit in 8 bits")),D[a+4+o]=s}else for(o=0;o<i;++o)D[a+4+o]=t[o];return null!==e&&e.push(xr,a),a},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:function(e){xr(e)}})},_embind_register_std_wstring:function(e,t,r){var n,i,a,o,s;r=Re(r),2===t?(n=G,i=V,o=Y,a=()=>M,s=1):4===t&&(n=H,i=z,o=J,a=()=>R,s=2),We(e,{name:r,fromWireType:function(e){for(var r,i=R[e>>2],o=a(),u=e+4,c=0;c<=i;++c){var l=e+4+c*t;if(c==i||0==o[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+t}}return xr(e),r},toWireType:function(e,n){"string"!=typeof n&&$e("Cannot pass non-string to C++ string type "+r);var a=o(n),u=Pr(4+a+t);return R[u>>2]=a>>s,i(n,u+4,a+t),null!==e&&e.push(xr,u),u},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:function(e){xr(e)}})},_embind_register_value_object:function(e,t,r,n,i,a){we[e]={name:Re(t),rawConstructor:Pt(r,n),rawDestructor:Pt(i,a),fields:[]}},_embind_register_value_object_field:function(e,t,r,n,i,a,o,s,u,c){we[e].fields.push({fieldName:Re(t),getterReturnType:r,getter:Pt(n,i),getterContext:a,setterArgumentType:o,setter:Pt(s,u),setterContext:c})},_embind_register_void:function(e,t){We(e,{isVoid:!0,name:t=Re(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emscripten_date_now:function(){return Date.now()},_emscripten_get_now_is_monotonic:function(){return!0},_emscripten_throw_longjmp:function(){throw 1/0},_emval_as:function(e,t,r){e=Ut.toValue(e),t=Bt(t,"emval::as");var n=[],i=Ut.toHandle(n);return U[r>>2]=i,t.toWireType(n,e)},_emval_call:function(e,t,r,n){e=Ut.toValue(e);for(var i=Wt(t,r),a=new Array(t),o=0;o<t;++o){var s=i[o];a[o]=s.readValueFromPointer(n),n+=s.argPackAdvance}var u=e.apply(void 0,a);return Ut.toHandle(u)},_emval_call_method:function(e,t,r,n,i){return(e=Gt[e])(t=Ut.toValue(t),r=jt(r),function(e){var t=[];return U[e>>2]=Ut.toHandle(t),t}(n),i)},_emval_call_void_method:function(e,t,r,n){(e=Gt[e])(t=Ut.toValue(t),r=jt(r),null,n)},_emval_decref:Dt,_emval_get_global:function(e){return 0===e?Ut.toHandle(Vt()):(e=jt(e),Ut.toHandle(Vt()[e]))},_emval_get_method_caller:function(e,t){var r=Wt(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",a=Ht[i];if(void 0!==a)return a;for(var o=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,o.push("argType"+c),s.push(r[1+c]);var l="return function "+Ie("methodCaller_"+i)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=r[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",o.push(l);var d,m,g=Ct(Function,o).apply(null,s);return d=g,m=Gt.length,Gt.push(d),a=m,Ht[i]=a,a},_emval_get_module_property:function(e){return e=jt(e),Ut.toHandle(i[e])},_emval_get_property:function(e,t){return e=Ut.toValue(e),t=Ut.toValue(t),Ut.toHandle(e[t])},_emval_incref:function(e){e>4&&(Ot[e].refcount+=1)},_emval_new_array:function(){return Ut.toHandle([])},_emval_new_cstring:function(e){return Ut.toHandle(jt(e))},_emval_run_destructors:function(e){Te(Ut.toValue(e)),Dt(e)},_emval_take_value:function(e,t){var r=(e=Bt(e,"_emval_take_value")).readValueFromPointer(t);return Ut.toHandle(r)},abort:function(){le("native code called abort()")},emscripten_cancel_animation_frame:function(e){cancelAnimationFrame(e)},emscripten_get_now:Yt,emscripten_memcpy_big:function(e,t,r){D.copyWithin(e,t,t+r)},emscripten_request_animation_frame:function(e,t){return requestAnimationFrame((function(r){_e(e)(r,t)}))},emscripten_resize_heap:function(e){var t=D.length;x((e>>>=0)>t);var r,n,i=2147483648;if(e>i)return m("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+i+" bytes!"),!1;for(var a=1;a<=4;a*=2){var o=t*(1+.2/a);o=Math.min(o,e+100663296);var s=Math.min(i,(r=Math.max(e,o))+((n=65536)-r%n)%n);if(zt(s))return!0}return m("Failed to grow the heap from "+t+" bytes to "+s+" bytes, not enough memory!"),!1},emscripten_webgl_make_context_current:function(e){return Qt.makeContextCurrent(e)?0:-5},environ_get:function(e,t){var r=0;return qt().forEach((function(n,i){var a=t+r;U[e+4*i>>2]=a,function(e,t,r){for(var n=0;n<e.length;++n)x(e.charCodeAt(n)===(255&e.charCodeAt(n))),O[t++>>0]=e.charCodeAt(n);r||(O[t>>0]=0)}(n,a),r+=n.length+1})),0},environ_sizes_get:function(e,t){var r=qt();U[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),U[t>>2]=n,0},exit:function(e){!function(e,t){if(function(){var e=d,t=m,r=!1;d=m=e=>{r=!0};try{Kt&&Kt()}catch(e){}d=e,m=t,r&&(g("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."),g("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}(),ae()&&!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";n(r),m(r)}var a;a=e,ae()||(i.onExit&&i.onExit(a),P=!0),s(a,new Dr(a))}(e)},fd_close:function(e){le("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM")},fd_seek:function(e,t,r,n){return 70},fd_write:function(e,t,r,n){for(var i=0,a=0;a<r;a++){var o=R[t>>2],s=R[t+4>>2];t+=8;for(var u=0;u<s;u++)Xt(e,D[o+u]);i+=s}return U[n>>2]=i,0},getTempRet0:function(){return _},glActiveTexture:function(e){pr.activeTexture(e)},glAttachShader:function(e,t){pr.attachShader(Qt.programs[e],Qt.shaders[t])},glBindAttribLocation:function(e,t,r){pr.bindAttribLocation(Qt.programs[e],t,C(r))},glBindBuffer:function(e,t){35051==e?pr.currentPixelPackBufferBinding=t:35052==e&&(pr.currentPixelUnpackBufferBinding=t),pr.bindBuffer(e,Qt.buffers[t])},glBindFramebuffer:function(e,t){pr.bindFramebuffer(e,Qt.framebuffers[t])},glBindRenderbuffer:function(e,t){pr.bindRenderbuffer(e,Qt.renderbuffers[t])},glBindSampler:function(e,t){pr.bindSampler(e,Qt.samplers[t])},glBindTexture:function(e,t){pr.bindTexture(e,Qt.textures[t])},glBindVertexArray:function(e){pr.bindVertexArray(Qt.vaos[e])},glBlendColor:function(e,t,r,n){pr.blendColor(e,t,r,n)},glBlendEquation:function(e){pr.blendEquation(e)},glBlendFunc:function(e,t){pr.blendFunc(e,t)},glBlitFramebuffer:function(e,t,r,n,i,a,o,s,u,c){pr.blitFramebuffer(e,t,r,n,i,a,o,s,u,c)},glBufferData:function(e,t,r,n){Qt.currentContext.version>=2?r&&t?pr.bufferData(e,D,n,r,t):pr.bufferData(e,t,n):pr.bufferData(e,r?D.subarray(r,r+t):t,n)},glBufferSubData:function(e,t,r,n){Qt.currentContext.version>=2?r&&pr.bufferSubData(e,t,D,n,r):pr.bufferSubData(e,t,D.subarray(n,n+r))},glCheckFramebufferStatus:function(e){return pr.checkFramebufferStatus(e)},glClear:function(e){pr.clear(e)},glClearColor:function(e,t,r,n){pr.clearColor(e,t,r,n)},glClearStencil:function(e){pr.clearStencil(e)},glClientWaitSync:function(e,t,r,n){return pr.clientWaitSync(Qt.syncs[e],t,er(r,n))},glColorMask:function(e,t,r,n){pr.colorMask(!!e,!!t,!!r,!!n)},glCompileShader:function(e){pr.compileShader(Qt.shaders[e])},glCompressedTexImage2D:function(e,t,r,n,i,a,o,s){Qt.currentContext.version>=2?pr.currentPixelUnpackBufferBinding||!o?pr.compressedTexImage2D(e,t,r,n,i,a,o,s):pr.compressedTexImage2D(e,t,r,n,i,a,D,s,o):pr.compressedTexImage2D(e,t,r,n,i,a,s?D.subarray(s,s+o):null)},glCompressedTexSubImage2D:function(e,t,r,n,i,a,o,s,u){Qt.currentContext.version>=2?pr.currentPixelUnpackBufferBinding||!s?pr.compressedTexSubImage2D(e,t,r,n,i,a,o,s,u):pr.compressedTexSubImage2D(e,t,r,n,i,a,o,D,u,s):pr.compressedTexSubImage2D(e,t,r,n,i,a,o,u?D.subarray(u,u+s):null)},glCopyBufferSubData:function(e,t,r,n,i){pr.copyBufferSubData(e,t,r,n,i)},glCopyTexSubImage2D:function(e,t,r,n,i,a,o,s){pr.copyTexSubImage2D(e,t,r,n,i,a,o,s)},glCreateProgram:function(){var e=Qt.getNewId(Qt.programs),t=pr.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,Qt.programs[e]=t,e},glCreateShader:function(e){var t=Qt.getNewId(Qt.shaders);return Qt.shaders[t]=pr.createShader(e),t},glCullFace:function(e){pr.cullFace(e)},glDeleteBuffers:function(e,t){for(var r=0;r<e;r++){var n=U[t+4*r>>2],i=Qt.buffers[n];i&&(pr.deleteBuffer(i),i.name=0,Qt.buffers[n]=null,n==pr.currentPixelPackBufferBinding&&(pr.currentPixelPackBufferBinding=0),n==pr.currentPixelUnpackBufferBinding&&(pr.currentPixelUnpackBufferBinding=0))}},glDeleteFramebuffers:function(e,t){for(var r=0;r<e;++r){var n=U[t+4*r>>2],i=Qt.framebuffers[n];i&&(pr.deleteFramebuffer(i),i.name=0,Qt.framebuffers[n]=null)}},glDeleteProgram:function(e){if(e){var t=Qt.programs[e];t?(pr.deleteProgram(t),t.name=0,Qt.programs[e]=null):Qt.recordError(1281)}},glDeleteRenderbuffers:function(e,t){for(var r=0;r<e;r++){var n=U[t+4*r>>2],i=Qt.renderbuffers[n];i&&(pr.deleteRenderbuffer(i),i.name=0,Qt.renderbuffers[n]=null)}},glDeleteSamplers:function(e,t){for(var r=0;r<e;r++){var n=U[t+4*r>>2],i=Qt.samplers[n];i&&(pr.deleteSampler(i),i.name=0,Qt.samplers[n]=null)}},glDeleteShader:function(e){if(e){var t=Qt.shaders[e];t?(pr.deleteShader(t),Qt.shaders[e]=null):Qt.recordError(1281)}},glDeleteSync:function(e){if(e){var t=Qt.syncs[e];t?(pr.deleteSync(t),t.name=0,Qt.syncs[e]=null):Qt.recordError(1281)}},glDeleteTextures:function(e,t){for(var r=0;r<e;r++){var n=U[t+4*r>>2],i=Qt.textures[n];i&&(pr.deleteTexture(i),i.name=0,Qt.textures[n]=null)}},glDeleteVertexArrays:function(e,t){for(var r=0;r<e;r++){var n=U[t+4*r>>2];pr.deleteVertexArray(Qt.vaos[n]),Qt.vaos[n]=null}},glDepthMask:function(e){pr.depthMask(!!e)},glDisable:function(e){pr.disable(e)},glDisableVertexAttribArray:function(e){pr.disableVertexAttribArray(e)},glDrawArrays:function(e,t,r){pr.drawArrays(e,t,r)},glDrawArraysInstanced:function(e,t,r,n){pr.drawArraysInstanced(e,t,r,n)},glDrawArraysInstancedBaseInstanceWEBGL:function(e,t,r,n,i){pr.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,i)},glDrawBuffers:function(e,t){for(var r=tr[e],n=0;n<e;n++)r[n]=U[t+4*n>>2];pr.drawBuffers(r)},glDrawElements:rr,glDrawElementsInstanced:function(e,t,r,n,i){pr.drawElementsInstanced(e,t,r,n,i)},glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:function(e,t,r,n,i,a,o){pr.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,i,a,o)},glDrawRangeElements:function(e,t,r,n,i,a){rr(e,n,i,a)},glEnable:function(e){pr.enable(e)},glEnableVertexAttribArray:function(e){pr.enableVertexAttribArray(e)},glFenceSync:function(e,t){var r=pr.fenceSync(e,t);if(r){var n=Qt.getNewId(Qt.syncs);return r.name=n,Qt.syncs[n]=r,n}return 0},glFinish:function(){pr.finish()},glFlush:function(){pr.flush()},glFramebufferRenderbuffer:function(e,t,r,n){pr.framebufferRenderbuffer(e,t,r,Qt.renderbuffers[n])},glFramebufferTexture2D:function(e,t,r,n,i){pr.framebufferTexture2D(e,t,r,Qt.textures[n],i)},glFrontFace:function(e){pr.frontFace(e)},glGenBuffers:function(e,t){nr(e,t,"createBuffer",Qt.buffers)},glGenFramebuffers:function(e,t){nr(e,t,"createFramebuffer",Qt.framebuffers)},glGenRenderbuffers:function(e,t){nr(e,t,"createRenderbuffer",Qt.renderbuffers)},glGenSamplers:function(e,t){nr(e,t,"createSampler",Qt.samplers)},glGenTextures:function(e,t){nr(e,t,"createTexture",Qt.textures)},glGenVertexArrays:function(e,t){nr(e,t,"createVertexArray",Qt.vaos)},glGenerateMipmap:function(e){pr.generateMipmap(e)},glGetBufferParameteriv:function(e,t,r){r?U[r>>2]=pr.getBufferParameter(e,t):Qt.recordError(1281)},glGetError:function(){var e=pr.getError()||Qt.lastError;return Qt.lastError=0,e},glGetFloatv:function(e,t){ar(e,t,2)},glGetFramebufferAttachmentParameteriv:function(e,t,r,n){var i=pr.getFramebufferAttachmentParameter(e,t,r);(i instanceof WebGLRenderbuffer||i instanceof WebGLTexture)&&(i=0|i.name),U[n>>2]=i},glGetIntegerv:function(e,t){ar(e,t,0)},glGetProgramInfoLog:function(e,t,r,n){var i=pr.getProgramInfoLog(Qt.programs[e]);null===i&&(i="(unknown error)");var a=t>0&&n?I(i,n,t):0;r&&(U[r>>2]=a)},glGetProgramiv:function(e,t,r){if(r)if(e>=Qt.counter)Qt.recordError(1281);else if(e=Qt.programs[e],35716==t){var n=pr.getProgramInfoLog(e);null===n&&(n="(unknown error)"),U[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var i=0;i<pr.getProgramParameter(e,35718);++i)e.maxUniformLength=Math.max(e.maxUniformLength,pr.getActiveUniform(e,i).name.length+1);U[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(i=0;i<pr.getProgramParameter(e,35721);++i)e.maxAttributeLength=Math.max(e.maxAttributeLength,pr.getActiveAttrib(e,i).name.length+1);U[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(i=0;i<pr.getProgramParameter(e,35382);++i)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,pr.getActiveUniformBlockName(e,i).length+1);U[r>>2]=e.maxUniformBlockNameLength}else U[r>>2]=pr.getProgramParameter(e,t);else Qt.recordError(1281)},glGetRenderbufferParameteriv:function(e,t,r){r?U[r>>2]=pr.getRenderbufferParameter(e,t):Qt.recordError(1281)},glGetShaderInfoLog:function(e,t,r,n){var i=pr.getShaderInfoLog(Qt.shaders[e]);null===i&&(i="(unknown error)");var a=t>0&&n?I(i,n,t):0;r&&(U[r>>2]=a)},glGetShaderPrecisionFormat:function(e,t,r,n){var i=pr.getShaderPrecisionFormat(e,t);U[r>>2]=i.rangeMin,U[r+4>>2]=i.rangeMax,U[n>>2]=i.precision},glGetShaderiv:function(e,t,r){if(r)if(35716==t){var n=pr.getShaderInfoLog(Qt.shaders[e]);null===n&&(n="(unknown error)");var i=n?n.length+1:0;U[r>>2]=i}else if(35720==t){var a=pr.getShaderSource(Qt.shaders[e]),o=a?a.length+1:0;U[r>>2]=o}else U[r>>2]=pr.getShaderParameter(Qt.shaders[e],t);else Qt.recordError(1281)},glGetString:function(e){var t=Qt.stringCache[e];if(!t){switch(e){case 7939:var r=pr.getSupportedExtensions()||[];t=or((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=pr.getParameter(e);n||Qt.recordError(1280),t=n&&or(n);break;case 7938:var i=pr.getParameter(7938);t=or(i=Qt.currentContext.version>=2?"OpenGL ES 3.0 ("+i+")":"OpenGL ES 2.0 ("+i+")");break;case 35724:var a=pr.getParameter(35724),o=a.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==o&&(3==o[1].length&&(o[1]=o[1]+"0"),a="OpenGL ES GLSL ES "+o[1]+" ("+a+")"),t=or(a);break;default:Qt.recordError(1280)}Qt.stringCache[e]=t}return t},glGetStringi:function(e,t){if(Qt.currentContext.version<2)return Qt.recordError(1282),0;var r=Qt.stringiCache[e];if(r)return t<0||t>=r.length?(Qt.recordError(1281),0):r[t];if(7939===e){var n=pr.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return or(e)})),r=Qt.stringiCache[e]=n,t<0||t>=r.length?(Qt.recordError(1281),0):r[t]}return Qt.recordError(1280),0},glGetUniformLocation:function(e,t){if(t=C(t),e=Qt.programs[e]){!function(e){var t,r,n=e.uniformLocsById,i=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<pr.getProgramParameter(e,35718);++t){var a=pr.getActiveUniform(e,t),o=a.name,s=a.size,u=sr(o),c=u>0?o.slice(0,u):o,l=e.uniformIdCounter;for(e.uniformIdCounter+=s,i[c]=[s,l],r=0;r<s;++r)n[l]=r,e.uniformArrayNamesById[l++]=c}}(e);var r=e.uniformLocsById,n=0,i=t,a=sr(t);a>0&&(s=t.slice(a+1),n=parseInt(s)>>>0,i=t.slice(0,a));var o=e.uniformSizeAndIdsByName[i];if(o&&n<o[0]&&(r[n+=o[1]]=r[n]||pr.getUniformLocation(e,t)))return n}else Qt.recordError(1281);var s;return-1},glInvalidateFramebuffer:function(e,t,r){for(var n=tr[t],i=0;i<t;i++)n[i]=U[r+4*i>>2];pr.invalidateFramebuffer(e,n)},glInvalidateSubFramebuffer:function(e,t,r,n,i,a,o){for(var s=tr[t],u=0;u<t;u++)s[u]=U[r+4*u>>2];pr.invalidateSubFramebuffer(e,s,n,i,a,o)},glIsSync:function(e){return pr.isSync(Qt.syncs[e])},glIsTexture:function(e){var t=Qt.textures[e];return t?pr.isTexture(t):0},glLineWidth:function(e){pr.lineWidth(e)},glLinkProgram:function(e){e=Qt.programs[e],pr.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}},glMultiDrawArraysInstancedBaseInstanceWEBGL:function(e,t,r,n,i,a){pr.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,U,t>>2,U,r>>2,U,n>>2,R,i>>2,a)},glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:function(e,t,r,n,i,a,o,s){pr.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,U,t>>2,r,U,n>>2,U,i>>2,U,a>>2,R,o>>2,s)},glPixelStorei:function(e,t){3317==e&&(Qt.unpackAlignment=t),pr.pixelStorei(e,t)},glReadBuffer:function(e){pr.readBuffer(e)},glReadPixels:function(e,t,r,n,i,a,o){if(Qt.currentContext.version>=2)if(pr.currentPixelPackBufferBinding)pr.readPixels(e,t,r,n,i,a,o);else{var s=ur(a);pr.readPixels(e,t,r,n,i,a,s,o>>cr(s))}else{var u=lr(a,i,r,n,o);u?pr.readPixels(e,t,r,n,i,a,u):Qt.recordError(1280)}},glRenderbufferStorage:function(e,t,r,n){pr.renderbufferStorage(e,t,r,n)},glRenderbufferStorageMultisample:function(e,t,r,n,i){pr.renderbufferStorageMultisample(e,t,r,n,i)},glSamplerParameterf:function(e,t,r){pr.samplerParameterf(Qt.samplers[e],t,r)},glSamplerParameteri:function(e,t,r){pr.samplerParameteri(Qt.samplers[e],t,r)},glSamplerParameteriv:function(e,t,r){var n=U[r>>2];pr.samplerParameteri(Qt.samplers[e],t,n)},glScissor:function(e,t,r,n){pr.scissor(e,t,r,n)},glShaderSource:function(e,t,r,n){var i=Qt.getSource(e,t,r,n);pr.shaderSource(Qt.shaders[e],i)},glStencilFunc:function(e,t,r){pr.stencilFunc(e,t,r)},glStencilFuncSeparate:function(e,t,r,n){pr.stencilFuncSeparate(e,t,r,n)},glStencilMask:function(e){pr.stencilMask(e)},glStencilMaskSeparate:function(e,t){pr.stencilMaskSeparate(e,t)},glStencilOp:function(e,t,r){pr.stencilOp(e,t,r)},glStencilOpSeparate:function(e,t,r,n){pr.stencilOpSeparate(e,t,r,n)},glTexImage2D:function(e,t,r,n,i,a,o,s,u){if(Qt.currentContext.version>=2)if(pr.currentPixelUnpackBufferBinding)pr.texImage2D(e,t,r,n,i,a,o,s,u);else if(u){var c=ur(s);pr.texImage2D(e,t,r,n,i,a,o,s,c,u>>cr(c))}else pr.texImage2D(e,t,r,n,i,a,o,s,null);else pr.texImage2D(e,t,r,n,i,a,o,s,u?lr(s,o,n,i,u):null)},glTexParameterf:function(e,t,r){pr.texParameterf(e,t,r)},glTexParameterfv:function(e,t,r){var n=B[r>>2];pr.texParameterf(e,t,n)},glTexParameteri:function(e,t,r){pr.texParameteri(e,t,r)},glTexParameteriv:function(e,t,r){var n=U[r>>2];pr.texParameteri(e,t,n)},glTexStorage2D:function(e,t,r,n,i){pr.texStorage2D(e,t,r,n,i)},glTexSubImage2D:function(e,t,r,n,i,a,o,s,u){if(Qt.currentContext.version>=2)if(pr.currentPixelUnpackBufferBinding)pr.texSubImage2D(e,t,r,n,i,a,o,s,u);else if(u){var c=ur(s);pr.texSubImage2D(e,t,r,n,i,a,o,s,c,u>>cr(c))}else pr.texSubImage2D(e,t,r,n,i,a,o,s,null);else{var l=null;u&&(l=lr(s,o,i,a,u)),pr.texSubImage2D(e,t,r,n,i,a,o,s,l)}},glUniform1f:function(e,t){pr.uniform1f(fr(e),t)},glUniform1fv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform1fv(fr(e),B,r>>2,t);else{if(t<=288)for(var n=dr[t-1],i=0;i<t;++i)n[i]=B[r+4*i>>2];else n=B.subarray(r>>2,r+4*t>>2);pr.uniform1fv(fr(e),n)}},glUniform1i:function(e,t){pr.uniform1i(fr(e),t)},glUniform1iv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform1iv(fr(e),U,r>>2,t);else{if(t<=288)for(var n=mr[t-1],i=0;i<t;++i)n[i]=U[r+4*i>>2];else n=U.subarray(r>>2,r+4*t>>2);pr.uniform1iv(fr(e),n)}},glUniform2f:function(e,t,r){pr.uniform2f(fr(e),t,r)},glUniform2fv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform2fv(fr(e),B,r>>2,2*t);else{if(t<=144)for(var n=dr[2*t-1],i=0;i<2*t;i+=2)n[i]=B[r+4*i>>2],n[i+1]=B[r+(4*i+4)>>2];else n=B.subarray(r>>2,r+8*t>>2);pr.uniform2fv(fr(e),n)}},glUniform2i:function(e,t,r){pr.uniform2i(fr(e),t,r)},glUniform2iv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform2iv(fr(e),U,r>>2,2*t);else{if(t<=144)for(var n=mr[2*t-1],i=0;i<2*t;i+=2)n[i]=U[r+4*i>>2],n[i+1]=U[r+(4*i+4)>>2];else n=U.subarray(r>>2,r+8*t>>2);pr.uniform2iv(fr(e),n)}},glUniform3f:function(e,t,r,n){pr.uniform3f(fr(e),t,r,n)},glUniform3fv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform3fv(fr(e),B,r>>2,3*t);else{if(t<=96)for(var n=dr[3*t-1],i=0;i<3*t;i+=3)n[i]=B[r+4*i>>2],n[i+1]=B[r+(4*i+4)>>2],n[i+2]=B[r+(4*i+8)>>2];else n=B.subarray(r>>2,r+12*t>>2);pr.uniform3fv(fr(e),n)}},glUniform3i:function(e,t,r,n){pr.uniform3i(fr(e),t,r,n)},glUniform3iv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform3iv(fr(e),U,r>>2,3*t);else{if(t<=96)for(var n=mr[3*t-1],i=0;i<3*t;i+=3)n[i]=U[r+4*i>>2],n[i+1]=U[r+(4*i+4)>>2],n[i+2]=U[r+(4*i+8)>>2];else n=U.subarray(r>>2,r+12*t>>2);pr.uniform3iv(fr(e),n)}},glUniform4f:function(e,t,r,n,i){pr.uniform4f(fr(e),t,r,n,i)},glUniform4fv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform4fv(fr(e),B,r>>2,4*t);else{if(t<=72){var n=dr[4*t-1],i=B;r>>=2;for(var a=0;a<4*t;a+=4){var o=r+a;n[a]=i[o],n[a+1]=i[o+1],n[a+2]=i[o+2],n[a+3]=i[o+3]}}else n=B.subarray(r>>2,r+16*t>>2);pr.uniform4fv(fr(e),n)}},glUniform4i:function(e,t,r,n,i){pr.uniform4i(fr(e),t,r,n,i)},glUniform4iv:function(e,t,r){if(Qt.currentContext.version>=2)t&&pr.uniform4iv(fr(e),U,r>>2,4*t);else{if(t<=72)for(var n=mr[4*t-1],i=0;i<4*t;i+=4)n[i]=U[r+4*i>>2],n[i+1]=U[r+(4*i+4)>>2],n[i+2]=U[r+(4*i+8)>>2],n[i+3]=U[r+(4*i+12)>>2];else n=U.subarray(r>>2,r+16*t>>2);pr.uniform4iv(fr(e),n)}},glUniformMatrix2fv:function(e,t,r,n){if(Qt.currentContext.version>=2)t&&pr.uniformMatrix2fv(fr(e),!!r,B,n>>2,4*t);else{if(t<=72)for(var i=dr[4*t-1],a=0;a<4*t;a+=4)i[a]=B[n+4*a>>2],i[a+1]=B[n+(4*a+4)>>2],i[a+2]=B[n+(4*a+8)>>2],i[a+3]=B[n+(4*a+12)>>2];else i=B.subarray(n>>2,n+16*t>>2);pr.uniformMatrix2fv(fr(e),!!r,i)}},glUniformMatrix3fv:function(e,t,r,n){if(Qt.currentContext.version>=2)t&&pr.uniformMatrix3fv(fr(e),!!r,B,n>>2,9*t);else{if(t<=32)for(var i=dr[9*t-1],a=0;a<9*t;a+=9)i[a]=B[n+4*a>>2],i[a+1]=B[n+(4*a+4)>>2],i[a+2]=B[n+(4*a+8)>>2],i[a+3]=B[n+(4*a+12)>>2],i[a+4]=B[n+(4*a+16)>>2],i[a+5]=B[n+(4*a+20)>>2],i[a+6]=B[n+(4*a+24)>>2],i[a+7]=B[n+(4*a+28)>>2],i[a+8]=B[n+(4*a+32)>>2];else i=B.subarray(n>>2,n+36*t>>2);pr.uniformMatrix3fv(fr(e),!!r,i)}},glUniformMatrix4fv:function(e,t,r,n){if(Qt.currentContext.version>=2)t&&pr.uniformMatrix4fv(fr(e),!!r,B,n>>2,16*t);else{if(t<=18){var i=dr[16*t-1],a=B;n>>=2;for(var o=0;o<16*t;o+=16){var s=n+o;i[o]=a[s],i[o+1]=a[s+1],i[o+2]=a[s+2],i[o+3]=a[s+3],i[o+4]=a[s+4],i[o+5]=a[s+5],i[o+6]=a[s+6],i[o+7]=a[s+7],i[o+8]=a[s+8],i[o+9]=a[s+9],i[o+10]=a[s+10],i[o+11]=a[s+11],i[o+12]=a[s+12],i[o+13]=a[s+13],i[o+14]=a[s+14],i[o+15]=a[s+15]}}else i=B.subarray(n>>2,n+64*t>>2);pr.uniformMatrix4fv(fr(e),!!r,i)}},glUseProgram:function(e){e=Qt.programs[e],pr.useProgram(e),pr.currentProgram=e},glVertexAttrib1f:function(e,t){pr.vertexAttrib1f(e,t)},glVertexAttrib2fv:function(e,t){pr.vertexAttrib2f(e,B[t>>2],B[t+4>>2])},glVertexAttrib3fv:function(e,t){pr.vertexAttrib3f(e,B[t>>2],B[t+4>>2],B[t+8>>2])},glVertexAttrib4fv:function(e,t){pr.vertexAttrib4f(e,B[t>>2],B[t+4>>2],B[t+8>>2],B[t+12>>2])},glVertexAttribDivisor:function(e,t){pr.vertexAttribDivisor(e,t)},glVertexAttribIPointer:function(e,t,r,n,i){pr.vertexAttribIPointer(e,t,r,n,i)},glVertexAttribPointer:function(e,t,r,n,i,a){pr.vertexAttribPointer(e,t,r,!!n,i,a)},glViewport:function(e,t,r,n){pr.viewport(e,t,r,n)},glWaitSync:function(e,t,r,n){pr.waitSync(Qt.syncs[e],t,er(r,n))},invoke_ii:function(e,t){var r=kr();try{return _e(e)(t)}catch(e){if(Or(r),e!==e+0)throw e;Cr(1,0)}},invoke_iii:function(e,t,r){var n=kr();try{return _e(e)(t,r)}catch(e){if(Or(n),e!==e+0)throw e;Cr(1,0)}},invoke_iiii:function(e,t,r,n){var i=kr();try{return _e(e)(t,r,n)}catch(e){if(Or(i),e!==e+0)throw e;Cr(1,0)}},invoke_iiiii:function(e,t,r,n,i){var a=kr();try{return _e(e)(t,r,n,i)}catch(e){if(Or(a),e!==e+0)throw e;Cr(1,0)}},invoke_v:function(e){var t=kr();try{_e(e)()}catch(e){if(Or(t),e!==e+0)throw e;Cr(1,0)}},invoke_vi:function(e,t){var r=kr();try{_e(e)(t)}catch(e){if(Or(r),e!==e+0)throw e;Cr(1,0)}},invoke_vii:function(e,t,r){var n=kr();try{_e(e)(t,r)}catch(e){if(Or(n),e!==e+0)throw e;Cr(1,0)}},invoke_viii:function(e,t,r,n){var i=kr();try{_e(e)(t,r,n)}catch(e){if(Or(i),e!==e+0)throw e;Cr(1,0)}},invoke_viiii:function(e,t,r,n,i){var a=kr();try{_e(e)(t,r,n,i)}catch(e){if(Or(a),e!==e+0)throw e;Cr(1,0)}},invoke_viiiii:function(e,t,r,n,i,a){var o=kr();try{_e(e)(t,r,n,i,a)}catch(e){if(Or(o),e!==e+0)throw e;Cr(1,0)}},invoke_viiiiii:function(e,t,r,n,i,a,o){var s=kr();try{_e(e)(t,r,n,i,a,o)}catch(e){if(Or(s),e!==e+0)throw e;Cr(1,0)}},invoke_viiiiiiiii:function(e,t,r,n,i,a,o,s,u,c){var l=kr();try{_e(e)(t,r,n,i,a,o,s,u,c)}catch(e){if(Or(l),e!==e+0)throw e;Cr(1,0)}},setTempRet0:function(e){_=e},strftime_l:function(e,t,r,n){return yr(e,t,r,n)}};!function(){var e,t={env:Tr,wasi_snapshot_preview1:Tr};function r(e,t){var r,n=e.exports;i.asm=n,x(w=i.asm.memory,"memory not found in wasm exports"),q(w.buffer),x(X=i.asm.__indirect_function_table,"table not found in wasm exports"),r=i.asm.__wasm_call_ctors,re.unshift(r),function(e){if(oe--,i.monitorRunDependencies&&i.monitorRunDependencies(oe),e?(x(ce[e]),delete ce[e]):m("warning: run dependency removed without ID"),0==oe&&(null!==se&&(clearInterval(se),se=null),ue)){var t=ue;ue=null,t()}}("wasm-instantiate")}e="wasm-instantiate",oe++,i.monitorRunDependencies&&i.monitorRunDependencies(oe),e?(x(!ce[e]),ce[e]=1,null===se&&"undefined"!=typeof setInterval&&(se=setInterval((function(){if(P)return clearInterval(se),void(se=null);var e=!1;for(var t in ce)e||(e=!0,m("still waiting on run dependencies:")),m("dependency: "+t);e&&m("(end of list)")}),1e4))):m("warning: run dependency added without ID");var a=i;function o(e){x(i===a,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),a=null,r(e.instance)}function s(e){return(!b&&u&&"function"==typeof fetch?fetch(de,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+de+"'";return e.arrayBuffer()})).catch((function(){return he(de)})):Promise.resolve().then((function(){return he(de)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(e,(function(e){m("failed to asynchronously prepare wasm: "+e),de.startsWith("file://")&&m("warning: Loading from a file URI ("+de+") 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"),le(e)}))}if(i.instantiateWasm)try{return i.instantiateWasm(t,r)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e),!1}(b||"function"!=typeof WebAssembly.instantiateStreaming||pe(de)||"function"!=typeof fetch?s(o):fetch(de,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),s(o)}))}))).catch(n)}(),i.___wasm_call_ctors=ve("__wasm_call_ctors");var Pr=i._malloc=ve("malloc"),xr=i._free=ve("free");i.___errno_location=ve("__errno_location"),i._saveSetjmp=ve("saveSetjmp");var Er=i.___getTypeName=ve("__getTypeName");i.___embind_register_native_and_builtin_types=ve("__embind_register_native_and_builtin_types");var Sr=i.___stdio_exit=ve("__stdio_exit");i.___dl_seterr=ve("__dl_seterr");var Cr=i._setThrew=ve("setThrew"),Ar=i._emscripten_stack_init=function(){return(Ar=i._emscripten_stack_init=i.asm.emscripten_stack_init).apply(null,arguments)};i._emscripten_stack_get_free=function(){return(i._emscripten_stack_get_free=i.asm.emscripten_stack_get_free).apply(null,arguments)},i._emscripten_stack_get_base=function(){return(i._emscripten_stack_get_base=i.asm.emscripten_stack_get_base).apply(null,arguments)};var Ir,Fr=i._emscripten_stack_get_end=function(){return(Fr=i._emscripten_stack_get_end=i.asm.emscripten_stack_get_end).apply(null,arguments)},kr=i.stackSave=ve("stackSave"),Or=i.stackRestore=ve("stackRestore");function Dr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Lr(e){function t(){Ir||(Ir=!0,i.calledRun=!0,P||(ee(),x(!ie),ie=!0,ye(re),r(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),x(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(ee(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),ne.unshift(e);var e;ye(ne)}()))}oe>0||(Ar(),Q(),function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),te.unshift(e);var e;ye(te)}(),oe>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),t()}),1)):t(),ee()))}if(i.stackAlloc=ve("stackAlloc"),y("ccall",!1),y("cwrap",!1),y("setValue",!1),y("getValue",!1),y("allocate",!1),y("UTF8ArrayToString",!1),y("UTF8ToString",!1),y("stringToUTF8Array",!1),y("stringToUTF8",!1),y("lengthBytesUTF8",!1),y("addOnPreRun",!1),y("addOnInit",!1),y("addOnPreMain",!1),y("addOnExit",!1),y("addOnPostRun",!1),y("addRunDependency",!0),y("removeRunDependency",!0),y("FS_createFolder",!1),y("FS_createPath",!0),y("FS_createDataFile",!0),y("FS_createPreloadedFile",!0),y("FS_createLazyFile",!0),y("FS_createLink",!1),y("FS_createDevice",!0),y("FS_unlink",!0),y("getLEB",!1),y("getFunctionTables",!1),y("alignFunctionTables",!1),y("registerFunctions",!1),y("addFunction",!1),y("removeFunction",!1),y("prettyPrint",!1),y("getCompilerSetting",!1),y("print",!1),y("printErr",!1),y("getTempRet0",!1),y("setTempRet0",!1),y("callMain",!1),y("abort",!1),y("keepRuntimeAlive",!1),y("wasmMemory",!1),y("warnOnce",!1),y("stackSave",!1),y("stackRestore",!1),y("stackAlloc",!1),y("AsciiToString",!1),y("stringToAscii",!1),y("UTF16ToString",!1),y("stringToUTF16",!1),y("lengthBytesUTF16",!1),y("UTF32ToString",!1),y("stringToUTF32",!1),y("lengthBytesUTF32",!1),y("allocateUTF8",!1),y("allocateUTF8OnStack",!1),y("ExitStatus",!1),y("intArrayFromString",!1),y("intArrayToString",!1),y("writeStringToMemory",!1),y("writeArrayToMemory",!1),y("writeAsciiToMemory",!1),i.writeStackCookie=Q,i.checkStackCookie=ee,y("ptrToString",!1),y("zeroMemory",!1),y("stringToNewUTF8",!1),y("emscripten_realloc_buffer",!1),y("ENV",!1),y("ERRNO_CODES",!1),y("ERRNO_MESSAGES",!1),y("setErrNo",!1),y("inetPton4",!1),y("inetNtop4",!1),y("inetPton6",!1),y("inetNtop6",!1),y("readSockaddr",!1),y("writeSockaddr",!1),y("DNS",!1),y("getHostByName",!1),y("Protocols",!1),y("Sockets",!1),y("getRandomDevice",!1),y("traverseStack",!1),y("UNWIND_CACHE",!1),y("convertPCtoSourceLocation",!1),y("readAsmConstArgsArray",!1),y("readAsmConstArgs",!1),y("mainThreadEM_ASM",!1),y("jstoi_q",!1),y("jstoi_s",!1),y("getExecutableName",!1),y("listenOnce",!1),y("autoResumeAudioContext",!1),y("dynCall",!1),y("handleException",!1),y("runtimeKeepalivePush",!1),y("runtimeKeepalivePop",!1),y("callUserCallback",!1),y("maybeExit",!1),y("safeSetTimeout",!1),y("asmjsMangle",!1),y("asyncLoad",!1),y("alignMemory",!1),y("mmapAlloc",!1),y("reallyNegative",!1),y("unSign",!1),y("reSign",!1),y("formatString",!1),y("PATH",!1),y("PATH_FS",!1),y("SYSCALLS",!1),y("getSocketFromFD",!1),y("getSocketAddress",!1),y("JSEvents",!1),y("registerKeyEventCallback",!1),y("specialHTMLTargets",!1),y("maybeCStringToJsString",!1),y("findEventTarget",!1),y("findCanvasEventTarget",!1),y("getBoundingClientRect",!1),y("fillMouseEventData",!1),y("registerMouseEventCallback",!1),y("registerWheelEventCallback",!1),y("registerUiEventCallback",!1),y("registerFocusEventCallback",!1),y("fillDeviceOrientationEventData",!1),y("registerDeviceOrientationEventCallback",!1),y("fillDeviceMotionEventData",!1),y("registerDeviceMotionEventCallback",!1),y("screenOrientation",!1),y("fillOrientationChangeEventData",!1),y("registerOrientationChangeEventCallback",!1),y("fillFullscreenChangeEventData",!1),y("registerFullscreenChangeEventCallback",!1),y("registerRestoreOldStyle",!1),y("hideEverythingExceptGivenElement",!1),y("restoreHiddenElements",!1),y("setLetterbox",!1),y("currentFullscreenStrategy",!1),y("restoreOldWindowedStyle",!1),y("softFullscreenResizeWebGLRenderTarget",!1),y("doRequestFullscreen",!1),y("fillPointerlockChangeEventData",!1),y("registerPointerlockChangeEventCallback",!1),y("registerPointerlockErrorEventCallback",!1),y("requestPointerLock",!1),y("fillVisibilityChangeEventData",!1),y("registerVisibilityChangeEventCallback",!1),y("registerTouchEventCallback",!1),y("fillGamepadEventData",!1),y("registerGamepadEventCallback",!1),y("registerBeforeUnloadEventCallback",!1),y("fillBatteryEventData",!1),y("battery",!1),y("registerBatteryEventCallback",!1),y("setCanvasElementSize",!1),y("getCanvasElementSize",!1),y("demangle",!1),y("demangleAll",!1),y("jsStackTrace",!1),y("stackTrace",!1),y("getEnvStrings",!1),y("checkWasiClock",!1),y("flush_NO_FILESYSTEM",!1),y("writeI53ToI64",!1),y("writeI53ToI64Clamped",!1),y("writeI53ToI64Signaling",!1),y("writeI53ToU64Clamped",!1),y("writeI53ToU64Signaling",!1),y("readI53FromI64",!1),y("readI53FromU64",!1),y("convertI32PairToI53",!1),y("convertU32PairToI53",!1),y("setImmediateWrapped",!1),y("clearImmediateWrapped",!1),y("polyfillSetImmediate",!1),y("Browser",!1),y("setMainLoop",!1),y("wget",!1),y("tempFixedLengthArray",!1),y("miniTempWebGLFloatBuffers",!1),y("heapObjectForWebGLType",!1),y("heapAccessShiftForWebGLHeap",!1),i.GL=Qt,y("emscriptenWebGLGet",!1),y("computeUnpackAlignedImageSize",!1),y("emscriptenWebGLGetTexPixelData",!1),y("emscriptenWebGLGetUniform",!1),y("webglGetUniformLocation",!1),y("webglPrepareUniformLocationsBeforeFirstUse",!1),y("webglGetLeftBracePos",!1),y("emscriptenWebGLGetVertexAttrib",!1),y("emscriptenWebGLGetIndexed",!1),y("Fetch",!1),y("fetchDeleteCachedData",!1),y("fetchLoadCachedData",!1),y("fetchCacheData",!1),y("fetchXHR",!1),y("InternalError",!1),y("BindingError",!1),y("UnboundTypeError",!1),y("PureVirtualError",!1),y("init_embind",!1),y("throwInternalError",!1),y("throwBindingError",!1),y("throwUnboundTypeError",!1),y("ensureOverloadTable",!1),y("exposePublicSymbol",!1),y("replacePublicSymbol",!1),y("extendError",!1),y("createNamedFunction",!1),y("registeredInstances",!1),y("getBasestPointer",!1),y("registerInheritedInstance",!1),y("unregisterInheritedInstance",!1),y("getInheritedInstance",!1),y("getInheritedInstanceCount",!1),y("getLiveInheritedInstances",!1),y("registeredTypes",!1),y("awaitingDependencies",!1),y("typeDependencies",!1),y("registeredPointers",!1),y("registerType",!1),y("whenDependentTypesAreResolved",!1),y("embind_charCodes",!1),y("embind_init_charCodes",!1),y("readLatin1String",!1),y("getTypeName",!1),y("heap32VectorToArray",!1),y("requireRegisteredType",!1),y("getShiftFromSize",!1),y("integerReadValueFromPointer",!1),y("enumReadValueFromPointer",!1),y("floatReadValueFromPointer",!1),y("simpleReadValueFromPointer",!1),y("runDestructors",!1),y("new_",!1),y("craftInvokerFunction",!1),y("embind__requireFunction",!1),y("tupleRegistrations",!1),y("structRegistrations",!1),y("genericPointerToWireType",!1),y("constNoSmartPtrRawPointerToWireType",!1),y("nonConstNoSmartPtrRawPointerToWireType",!1),y("init_RegisteredPointer",!1),y("RegisteredPointer",!1),y("RegisteredPointer_getPointee",!1),y("RegisteredPointer_destructor",!1),y("RegisteredPointer_deleteObject",!1),y("RegisteredPointer_fromWireType",!1),y("runDestructor",!1),y("releaseClassHandle",!1),y("finalizationRegistry",!1),y("detachFinalizer_deps",!1),y("detachFinalizer",!1),y("attachFinalizer",!1),y("makeClassHandle",!1),y("init_ClassHandle",!1),y("ClassHandle",!1),y("ClassHandle_isAliasOf",!1),y("throwInstanceAlreadyDeleted",!1),y("ClassHandle_clone",!1),y("ClassHandle_delete",!1),y("deletionQueue",!1),y("ClassHandle_isDeleted",!1),y("ClassHandle_deleteLater",!1),y("flushPendingDeletes",!1),y("delayFunction",!1),y("setDelayFunction",!1),y("RegisteredClass",!1),y("shallowCopyInternalPointer",!1),y("downcastPointer",!1),y("upcastPointer",!1),y("validateThis",!1),y("char_0",!1),y("char_9",!1),y("makeLegalFunctionName",!1),y("emval_handle_array",!1),y("emval_free_list",!1),y("emval_symbols",!1),y("init_emval",!1),y("count_emval_handles",!1),y("get_first_emval",!1),y("getStringOrSymbol",!1),y("Emval",!1),y("emval_newers",!1),y("craftEmvalAllocator",!1),y("emval_get_global",!1),y("emval_methodCallers",!1),y("emval_registeredMethods",!1),y("writeGLArray",!1),h("ALLOC_NORMAL",!1),h("ALLOC_STACK",!1),ue=function e(){Ir||Lr(),Ir||(ue=e)},i.run=Lr,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Lr(),t.ready});"object"==typeof exports&&"object"==typeof module?module.exports=t:"function"==typeof define&&define.amd?define([],(function(){return t})):"object"==typeof exports&&(exports.WebRendererWasmFactory=t);
|
|
@@ -76,6 +76,9 @@ Module['ready'] = new Promise(function(resolve, reject) {
|
|
|
76
76
|
// defensive during initialization.
|
|
77
77
|
var moduleOverrides = Object.assign({}, Module);
|
|
78
78
|
var thisProgram = './this.program';
|
|
79
|
+
var quit_ = (status, toThrow) => {
|
|
80
|
+
throw toThrow;
|
|
81
|
+
};
|
|
79
82
|
|
|
80
83
|
// Determine the runtime environment we are in. You can customize this by
|
|
81
84
|
// setting the ENVIRONMENT setting at compile time (see settings.js).
|
|
@@ -144,7 +147,7 @@ if (Module['arguments']) Module['arguments'];legacyModuleProp('arguments', 'argu
|
|
|
144
147
|
|
|
145
148
|
if (Module['thisProgram']) thisProgram = Module['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram');
|
|
146
149
|
|
|
147
|
-
if (Module['quit']) Module['quit'];legacyModuleProp('quit', 'quit_');
|
|
150
|
+
if (Module['quit']) quit_ = Module['quit'];legacyModuleProp('quit', 'quit_');
|
|
148
151
|
|
|
149
152
|
// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
|
|
150
153
|
// Assertions on removed incoming Module JS APIs.
|
|
@@ -241,7 +244,7 @@ var getTempRet0 = () => tempRet0;
|
|
|
241
244
|
|
|
242
245
|
var wasmBinary;
|
|
243
246
|
if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
|
|
244
|
-
Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime');
|
|
247
|
+
var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime');
|
|
245
248
|
|
|
246
249
|
if (typeof WebAssembly != 'object') {
|
|
247
250
|
abort('no native wasm support detected');
|
|
@@ -701,6 +704,10 @@ var __ATPOSTRUN__ = []; // functions called after the main() is called
|
|
|
701
704
|
|
|
702
705
|
var runtimeInitialized = false;
|
|
703
706
|
|
|
707
|
+
function keepRuntimeAlive() {
|
|
708
|
+
return noExitRuntime;
|
|
709
|
+
}
|
|
710
|
+
|
|
704
711
|
function preRun() {
|
|
705
712
|
|
|
706
713
|
if (Module['preRun']) {
|
|
@@ -3440,6 +3447,12 @@ function createWasm() {
|
|
|
3440
3447
|
return 0;
|
|
3441
3448
|
}
|
|
3442
3449
|
|
|
3450
|
+
function _exit(status) {
|
|
3451
|
+
// void _exit(int status);
|
|
3452
|
+
// http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html
|
|
3453
|
+
exit(status);
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3443
3456
|
function _fd_close(fd) {
|
|
3444
3457
|
abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM');
|
|
3445
3458
|
}
|
|
@@ -3459,6 +3472,12 @@ function createWasm() {
|
|
|
3459
3472
|
buffer.push(curr);
|
|
3460
3473
|
}
|
|
3461
3474
|
}
|
|
3475
|
+
function flush_NO_FILESYSTEM() {
|
|
3476
|
+
// flush anything remaining in the buffers during shutdown
|
|
3477
|
+
___stdio_exit();
|
|
3478
|
+
if (printCharBuffers[1].length) printChar(1, 10);
|
|
3479
|
+
if (printCharBuffers[2].length) printChar(2, 10);
|
|
3480
|
+
}
|
|
3462
3481
|
function _fd_write(fd, iov, iovcnt, pnum) {
|
|
3463
3482
|
// hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
|
|
3464
3483
|
var num = 0;
|
|
@@ -5538,6 +5557,7 @@ var asmLibraryArg = {
|
|
|
5538
5557
|
"emscripten_webgl_make_context_current": _emscripten_webgl_make_context_current,
|
|
5539
5558
|
"environ_get": _environ_get,
|
|
5540
5559
|
"environ_sizes_get": _environ_sizes_get,
|
|
5560
|
+
"exit": _exit,
|
|
5541
5561
|
"fd_close": _fd_close,
|
|
5542
5562
|
"fd_seek": _fd_seek,
|
|
5543
5563
|
"fd_write": _fd_write,
|
|
@@ -5689,6 +5709,7 @@ var asmLibraryArg = {
|
|
|
5689
5709
|
"invoke_vii": invoke_vii,
|
|
5690
5710
|
"invoke_viii": invoke_viii,
|
|
5691
5711
|
"invoke_viiii": invoke_viiii,
|
|
5712
|
+
"invoke_viiiii": invoke_viiiii,
|
|
5692
5713
|
"invoke_viiiiii": invoke_viiiiii,
|
|
5693
5714
|
"invoke_viiiiiiiii": invoke_viiiiiiiii,
|
|
5694
5715
|
"setTempRet0": _setTempRet0,
|
|
@@ -5717,7 +5738,7 @@ var ___getTypeName = Module["___getTypeName"] = createExportWrapper("__getTypeNa
|
|
|
5717
5738
|
Module["___embind_register_native_and_builtin_types"] = createExportWrapper("__embind_register_native_and_builtin_types");
|
|
5718
5739
|
|
|
5719
5740
|
/** @type {function(...*):?} */
|
|
5720
|
-
Module["___stdio_exit"] = createExportWrapper("__stdio_exit");
|
|
5741
|
+
var ___stdio_exit = Module["___stdio_exit"] = createExportWrapper("__stdio_exit");
|
|
5721
5742
|
|
|
5722
5743
|
/** @type {function(...*):?} */
|
|
5723
5744
|
Module["___dl_seterr"] = createExportWrapper("__dl_seterr");
|
|
@@ -5755,10 +5776,10 @@ var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore");
|
|
|
5755
5776
|
Module["stackAlloc"] = createExportWrapper("stackAlloc");
|
|
5756
5777
|
|
|
5757
5778
|
|
|
5758
|
-
function
|
|
5779
|
+
function invoke_ii(index,a1) {
|
|
5759
5780
|
var sp = stackSave();
|
|
5760
5781
|
try {
|
|
5761
|
-
return getWasmTableEntry(index)(a1
|
|
5782
|
+
return getWasmTableEntry(index)(a1);
|
|
5762
5783
|
} catch(e) {
|
|
5763
5784
|
stackRestore(sp);
|
|
5764
5785
|
if (e !== e+0) throw e;
|
|
@@ -5766,10 +5787,10 @@ function invoke_iiii(index,a1,a2,a3) {
|
|
|
5766
5787
|
}
|
|
5767
5788
|
}
|
|
5768
5789
|
|
|
5769
|
-
function
|
|
5790
|
+
function invoke_iii(index,a1,a2) {
|
|
5770
5791
|
var sp = stackSave();
|
|
5771
5792
|
try {
|
|
5772
|
-
return getWasmTableEntry(index)(a1);
|
|
5793
|
+
return getWasmTableEntry(index)(a1,a2);
|
|
5773
5794
|
} catch(e) {
|
|
5774
5795
|
stackRestore(sp);
|
|
5775
5796
|
if (e !== e+0) throw e;
|
|
@@ -5777,10 +5798,10 @@ function invoke_ii(index,a1) {
|
|
|
5777
5798
|
}
|
|
5778
5799
|
}
|
|
5779
5800
|
|
|
5780
|
-
function
|
|
5801
|
+
function invoke_viii(index,a1,a2,a3) {
|
|
5781
5802
|
var sp = stackSave();
|
|
5782
5803
|
try {
|
|
5783
|
-
getWasmTableEntry(index)(a1,a2,a3
|
|
5804
|
+
getWasmTableEntry(index)(a1,a2,a3);
|
|
5784
5805
|
} catch(e) {
|
|
5785
5806
|
stackRestore(sp);
|
|
5786
5807
|
if (e !== e+0) throw e;
|
|
@@ -5788,10 +5809,10 @@ function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
|
5788
5809
|
}
|
|
5789
5810
|
}
|
|
5790
5811
|
|
|
5791
|
-
function
|
|
5812
|
+
function invoke_vii(index,a1,a2) {
|
|
5792
5813
|
var sp = stackSave();
|
|
5793
5814
|
try {
|
|
5794
|
-
getWasmTableEntry(index)(a1,a2
|
|
5815
|
+
getWasmTableEntry(index)(a1,a2);
|
|
5795
5816
|
} catch(e) {
|
|
5796
5817
|
stackRestore(sp);
|
|
5797
5818
|
if (e !== e+0) throw e;
|
|
@@ -5799,10 +5820,10 @@ function invoke_viii(index,a1,a2,a3) {
|
|
|
5799
5820
|
}
|
|
5800
5821
|
}
|
|
5801
5822
|
|
|
5802
|
-
function
|
|
5823
|
+
function invoke_iiiii(index,a1,a2,a3,a4) {
|
|
5803
5824
|
var sp = stackSave();
|
|
5804
5825
|
try {
|
|
5805
|
-
getWasmTableEntry(index)(a1,a2);
|
|
5826
|
+
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
5806
5827
|
} catch(e) {
|
|
5807
5828
|
stackRestore(sp);
|
|
5808
5829
|
if (e !== e+0) throw e;
|
|
@@ -5810,10 +5831,21 @@ function invoke_vii(index,a1,a2) {
|
|
|
5810
5831
|
}
|
|
5811
5832
|
}
|
|
5812
5833
|
|
|
5813
|
-
function
|
|
5834
|
+
function invoke_iiii(index,a1,a2,a3) {
|
|
5814
5835
|
var sp = stackSave();
|
|
5815
5836
|
try {
|
|
5816
|
-
getWasmTableEntry(index)();
|
|
5837
|
+
return getWasmTableEntry(index)(a1,a2,a3);
|
|
5838
|
+
} catch(e) {
|
|
5839
|
+
stackRestore(sp);
|
|
5840
|
+
if (e !== e+0) throw e;
|
|
5841
|
+
_setThrew(1, 0);
|
|
5842
|
+
}
|
|
5843
|
+
}
|
|
5844
|
+
|
|
5845
|
+
function invoke_vi(index,a1) {
|
|
5846
|
+
var sp = stackSave();
|
|
5847
|
+
try {
|
|
5848
|
+
getWasmTableEntry(index)(a1);
|
|
5817
5849
|
} catch(e) {
|
|
5818
5850
|
stackRestore(sp);
|
|
5819
5851
|
if (e !== e+0) throw e;
|
|
@@ -5832,10 +5864,10 @@ function invoke_viiii(index,a1,a2,a3,a4) {
|
|
|
5832
5864
|
}
|
|
5833
5865
|
}
|
|
5834
5866
|
|
|
5835
|
-
function
|
|
5867
|
+
function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
5836
5868
|
var sp = stackSave();
|
|
5837
5869
|
try {
|
|
5838
|
-
getWasmTableEntry(index)(a1);
|
|
5870
|
+
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
5839
5871
|
} catch(e) {
|
|
5840
5872
|
stackRestore(sp);
|
|
5841
5873
|
if (e !== e+0) throw e;
|
|
@@ -5843,10 +5875,10 @@ function invoke_vi(index,a1) {
|
|
|
5843
5875
|
}
|
|
5844
5876
|
}
|
|
5845
5877
|
|
|
5846
|
-
function
|
|
5878
|
+
function invoke_v(index) {
|
|
5847
5879
|
var sp = stackSave();
|
|
5848
5880
|
try {
|
|
5849
|
-
|
|
5881
|
+
getWasmTableEntry(index)();
|
|
5850
5882
|
} catch(e) {
|
|
5851
5883
|
stackRestore(sp);
|
|
5852
5884
|
if (e !== e+0) throw e;
|
|
@@ -5865,10 +5897,10 @@ function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) {
|
|
|
5865
5897
|
}
|
|
5866
5898
|
}
|
|
5867
5899
|
|
|
5868
|
-
function
|
|
5900
|
+
function invoke_viiiii(index,a1,a2,a3,a4,a5) {
|
|
5869
5901
|
var sp = stackSave();
|
|
5870
5902
|
try {
|
|
5871
|
-
|
|
5903
|
+
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
5872
5904
|
} catch(e) {
|
|
5873
5905
|
stackRestore(sp);
|
|
5874
5906
|
if (e !== e+0) throw e;
|
|
@@ -6177,6 +6209,16 @@ unexportedRuntimeSymbol('ALLOC_STACK', false);
|
|
|
6177
6209
|
|
|
6178
6210
|
var calledRun;
|
|
6179
6211
|
|
|
6212
|
+
/**
|
|
6213
|
+
* @constructor
|
|
6214
|
+
* @this {ExitStatus}
|
|
6215
|
+
*/
|
|
6216
|
+
function ExitStatus(status) {
|
|
6217
|
+
this.name = "ExitStatus";
|
|
6218
|
+
this.message = "Program terminated with exit(" + status + ")";
|
|
6219
|
+
this.status = status;
|
|
6220
|
+
}
|
|
6221
|
+
|
|
6180
6222
|
dependenciesFulfilled = function runCaller() {
|
|
6181
6223
|
// If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
|
|
6182
6224
|
if (!calledRun) run();
|
|
@@ -6243,6 +6285,59 @@ function run(args) {
|
|
|
6243
6285
|
}
|
|
6244
6286
|
Module['run'] = run;
|
|
6245
6287
|
|
|
6288
|
+
function checkUnflushedContent() {
|
|
6289
|
+
// Compiler settings do not allow exiting the runtime, so flushing
|
|
6290
|
+
// the streams is not possible. but in ASSERTIONS mode we check
|
|
6291
|
+
// if there was something to flush, and if so tell the user they
|
|
6292
|
+
// should request that the runtime be exitable.
|
|
6293
|
+
// Normally we would not even include flush() at all, but in ASSERTIONS
|
|
6294
|
+
// builds we do so just for this check, and here we see if there is any
|
|
6295
|
+
// content to flush, that is, we check if there would have been
|
|
6296
|
+
// something a non-ASSERTIONS build would have not seen.
|
|
6297
|
+
// How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0
|
|
6298
|
+
// mode (which has its own special function for this; otherwise, all
|
|
6299
|
+
// the code is inside libc)
|
|
6300
|
+
var oldOut = out;
|
|
6301
|
+
var oldErr = err;
|
|
6302
|
+
var has = false;
|
|
6303
|
+
out = err = (x) => {
|
|
6304
|
+
has = true;
|
|
6305
|
+
};
|
|
6306
|
+
try { // it doesn't matter if it fails
|
|
6307
|
+
var flush = flush_NO_FILESYSTEM;
|
|
6308
|
+
if (flush) flush();
|
|
6309
|
+
} catch(e) {}
|
|
6310
|
+
out = oldOut;
|
|
6311
|
+
err = oldErr;
|
|
6312
|
+
if (has) {
|
|
6313
|
+
warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.');
|
|
6314
|
+
warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)');
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
|
|
6318
|
+
/** @param {boolean|number=} implicit */
|
|
6319
|
+
function exit(status, implicit) {
|
|
6320
|
+
|
|
6321
|
+
checkUnflushedContent();
|
|
6322
|
+
|
|
6323
|
+
// if exit() was called explicitly, warn the user if the runtime isn't actually being shut down
|
|
6324
|
+
if (keepRuntimeAlive() && !implicit) {
|
|
6325
|
+
var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
|
|
6326
|
+
readyPromiseReject(msg);
|
|
6327
|
+
err(msg);
|
|
6328
|
+
}
|
|
6329
|
+
|
|
6330
|
+
procExit(status);
|
|
6331
|
+
}
|
|
6332
|
+
|
|
6333
|
+
function procExit(code) {
|
|
6334
|
+
if (!keepRuntimeAlive()) {
|
|
6335
|
+
if (Module['onExit']) Module['onExit'](code);
|
|
6336
|
+
ABORT = true;
|
|
6337
|
+
}
|
|
6338
|
+
quit_(code, new ExitStatus(code));
|
|
6339
|
+
}
|
|
6340
|
+
|
|
6246
6341
|
if (Module['preInit']) {
|
|
6247
6342
|
if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
|
|
6248
6343
|
while (Module['preInit'].length > 0) {
|
package/dist/module-debug.wasm
CHANGED
|
Binary file
|