moorhen 0.9.0 → 0.9.2

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.
Files changed (156) hide show
  1. package/README.md +12 -2
  2. package/moorhen.js +91 -14
  3. package/package.json +22 -12
  4. package/public/CootWorker.js +1 -0
  5. package/{baby-gru → public}/CootWorker.ts +58 -10
  6. package/public/favicon.ico +0 -0
  7. package/public/manifest.json +25 -0
  8. package/{baby-gru → public}/moorhen.css +18 -3
  9. package/public/moorhen.js +1 -0
  10. package/{baby-gru → public}/moorhen.wasm +0 -0
  11. package/public/pixmaps/MoorhenLogo.svg +96 -0
  12. package/public/pixmaps/README +10 -0
  13. package/public/pixmaps/add-alt-conf.png +0 -0
  14. package/public/pixmaps/add-peptide-1.png +0 -0
  15. package/public/pixmaps/atom-at-pointer.png +0 -0
  16. package/public/pixmaps/auto-fit-rotamer.png +0 -0
  17. package/public/pixmaps/delete.png +0 -0
  18. package/public/pixmaps/density-fit.svg +96 -0
  19. package/public/pixmaps/edit-chi.png +0 -0
  20. package/public/pixmaps/flip-peptide.png +0 -0
  21. package/public/pixmaps/lhasa_icons/icons/hicolor_apps_scalable_coot-layla.svg +105 -0
  22. package/public/pixmaps/lhasa_icons/layla_3c.svg +82 -0
  23. package/public/pixmaps/lhasa_icons/layla_4c.svg +82 -0
  24. package/public/pixmaps/lhasa_icons/layla_5c.svg +82 -0
  25. package/public/pixmaps/lhasa_icons/layla_6arom.svg +89 -0
  26. package/public/pixmaps/lhasa_icons/layla_6c.svg +82 -0
  27. package/public/pixmaps/lhasa_icons/layla_7c.svg +82 -0
  28. package/public/pixmaps/lhasa_icons/layla_8c.svg +82 -0
  29. package/public/pixmaps/lhasa_icons/layla_charge_tool.svg +78 -0
  30. package/public/pixmaps/lhasa_icons/layla_delete_hydrogens_tool.svg +384 -0
  31. package/public/pixmaps/lhasa_icons/layla_double_bond.svg +78 -0
  32. package/public/pixmaps/lhasa_icons/layla_format_tool.svg +283 -0
  33. package/public/pixmaps/lhasa_icons/layla_geometry_tool-dark.svg +105 -0
  34. package/public/pixmaps/lhasa_icons/layla_geometry_tool.svg +105 -0
  35. package/public/pixmaps/lhasa_icons/layla_key.svg +76 -0
  36. package/public/pixmaps/lhasa_icons/layla_move_tool.svg +110 -0
  37. package/public/pixmaps/lhasa_icons/layla_single_bond.svg +73 -0
  38. package/public/pixmaps/lhasa_icons/layla_triple_bond.svg +87 -0
  39. package/public/pixmaps/lhasa_icons/lhasa_delete_tool.svg +401 -0
  40. package/public/pixmaps/lhasa_icons/lhasa_flip_x_tool.svg +106 -0
  41. package/public/pixmaps/lhasa_icons/lhasa_flip_y_tool.svg +106 -0
  42. package/public/pixmaps/lhasa_icons/lhasa_rotate_tool.svg +112 -0
  43. package/public/pixmaps/mutate.png +0 -0
  44. package/public/pixmaps/rama_all.png +0 -0
  45. package/public/pixmaps/rama_gly.png +0 -0
  46. package/public/pixmaps/rama_non_gly_pro.png +0 -0
  47. package/public/pixmaps/rama_pro.png +0 -0
  48. package/public/pixmaps/ramachandran.png +0 -0
  49. package/public/pixmaps/refine-1.png +0 -0
  50. package/public/pixmaps/refine.png +0 -0
  51. package/public/pixmaps/rigid-body.png +0 -0
  52. package/public/pixmaps/rotamers.png +0 -0
  53. package/public/pixmaps/rtz.png +0 -0
  54. package/public/pixmaps/side-chain-180.png +0 -0
  55. package/public/pixmaps/spin-view.png +0 -0
  56. package/public/pixmaps/temperature.png +0 -0
  57. package/public/pixmaps/torsion-general.png +0 -0
  58. package/public/pixmaps/torsion-general.svg +320 -0
  59. package/public/robots.txt +3 -0
  60. package/public/web_example.js +1 -0
  61. package/{baby-gru → public}/web_example.wasm +0 -0
  62. package/types/index.d.ts +1 -0
  63. package/types/lhasa.d.ts +313 -0
  64. package/types/libcoot.d.ts +21 -2
  65. package/types/main.d.ts +57 -54
  66. package/types/mgWebGL.d.ts +4 -2
  67. package/types/moorhen.d.ts +137 -50
  68. package/baby-gru/CootWorker.js +0 -1
  69. package/baby-gru/moorhen.js +0 -1
  70. package/baby-gru/web_example.js +0 -1
  71. /package/{baby-gru → public}/coot_env_web.js +0 -0
  72. /package/{baby-gru → public}/darkly.css +0 -0
  73. /package/{baby-gru → public}/flatly.css +0 -0
  74. /package/{baby-gru → public}/monomers/a/A.cif +0 -0
  75. /package/{baby-gru → public}/monomers/a/ALA.cif +0 -0
  76. /package/{baby-gru → public}/monomers/a/ARG.cif +0 -0
  77. /package/{baby-gru → public}/monomers/a/ASN.cif +0 -0
  78. /package/{baby-gru → public}/monomers/a/ASP.cif +0 -0
  79. /package/{baby-gru → public}/monomers/c/C.cif +0 -0
  80. /package/{baby-gru → public}/monomers/c/CIT.cif +0 -0
  81. /package/{baby-gru → public}/monomers/c/CYS.cif +0 -0
  82. /package/{baby-gru → public}/monomers/d/DA.cif +0 -0
  83. /package/{baby-gru → public}/monomers/d/DC.cif +0 -0
  84. /package/{baby-gru → public}/monomers/d/DG.cif +0 -0
  85. /package/{baby-gru → public}/monomers/d/DT.cif +0 -0
  86. /package/{baby-gru → public}/monomers/e/EDO.cif +0 -0
  87. /package/{baby-gru → public}/monomers/g/G.cif +0 -0
  88. /package/{baby-gru → public}/monomers/g/GLN.cif +0 -0
  89. /package/{baby-gru → public}/monomers/g/GLU.cif +0 -0
  90. /package/{baby-gru → public}/monomers/g/GLY.cif +0 -0
  91. /package/{baby-gru → public}/monomers/g/GOL.cif +0 -0
  92. /package/{baby-gru → public}/monomers/h/HIS.cif +0 -0
  93. /package/{baby-gru → public}/monomers/h/HOH.cif +0 -0
  94. /package/{baby-gru → public}/monomers/i/ILE.cif +0 -0
  95. /package/{baby-gru → public}/monomers/l/LEU.cif +0 -0
  96. /package/{baby-gru → public}/monomers/l/LYS.cif +0 -0
  97. /package/{baby-gru → public}/monomers/m/MET.cif +0 -0
  98. /package/{baby-gru → public}/monomers/m/MSE.cif +0 -0
  99. /package/{baby-gru → public}/monomers/n/NA.cif +0 -0
  100. /package/{baby-gru → public}/monomers/p/PHE.cif +0 -0
  101. /package/{baby-gru → public}/monomers/p/PO4.cif +0 -0
  102. /package/{baby-gru → public}/monomers/p/PRO.cif +0 -0
  103. /package/{baby-gru → public}/monomers/s/SER.cif +0 -0
  104. /package/{baby-gru → public}/monomers/s/SO4.cif +0 -0
  105. /package/{baby-gru → public}/monomers/t/THR.cif +0 -0
  106. /package/{baby-gru → public}/monomers/t/TRP.cif +0 -0
  107. /package/{baby-gru → public}/monomers/t/TYR.cif +0 -0
  108. /package/{baby-gru → public}/monomers/u/U.cif +0 -0
  109. /package/{baby-gru → public}/monomers/v/VAL.cif +0 -0
  110. /package/{baby-gru → public}/moorhen.data +0 -0
  111. /package/{baby-gru → public}/moorhen.worker.js +0 -0
  112. /package/{baby-gru → public}/pixmaps/MoorhenLogo.png +0 -0
  113. /package/{baby-gru → public}/pixmaps/add-alt-conf.svg +0 -0
  114. /package/{baby-gru → public}/pixmaps/add-peptide-1.svg +0 -0
  115. /package/{baby-gru → public}/pixmaps/atom-at-pointer.svg +0 -0
  116. /package/{baby-gru → public}/pixmaps/auto-fit-rotamer.svg +0 -0
  117. /package/{baby-gru → public}/pixmaps/cis-trans.svg +0 -0
  118. /package/{baby-gru → public}/pixmaps/delete.svg +0 -0
  119. /package/{baby-gru → public}/pixmaps/drag.svg +0 -0
  120. /package/{baby-gru → public}/pixmaps/edit-chi.svg +0 -0
  121. /package/{baby-gru → public}/pixmaps/flip-peptide.svg +0 -0
  122. /package/{baby-gru → public}/pixmaps/jed-flip-reverse.svg +0 -0
  123. /package/{baby-gru → public}/pixmaps/keyboard-blank.svg +0 -0
  124. /package/{baby-gru → public}/pixmaps/map-grey.svg +0 -0
  125. /package/{baby-gru → public}/pixmaps/moorhen-ligand.svg +0 -0
  126. /package/{baby-gru → public}/pixmaps/mutate.svg +0 -0
  127. /package/{baby-gru → public}/pixmaps/rama-plot-gly-normal.png +0 -0
  128. /package/{baby-gru → public}/pixmaps/rama-plot-gly-outlier.png +0 -0
  129. /package/{baby-gru → public}/pixmaps/rama-plot-other-normal.png +0 -0
  130. /package/{baby-gru → public}/pixmaps/rama-plot-other-outlier.png +0 -0
  131. /package/{baby-gru → public}/pixmaps/rama-plot-pro-normal.png +0 -0
  132. /package/{baby-gru → public}/pixmaps/rama-plot-pro-outlier.png +0 -0
  133. /package/{baby-gru → public}/pixmaps/rama2_all.png +0 -0
  134. /package/{baby-gru → public}/pixmaps/rama2_gly.png +0 -0
  135. /package/{baby-gru → public}/pixmaps/rama2_ileval.png +0 -0
  136. /package/{baby-gru → public}/pixmaps/rama2_non_gly_pro.png +0 -0
  137. /package/{baby-gru → public}/pixmaps/rama2_non_gly_pro_pre_pro_ileval.png +0 -0
  138. /package/{baby-gru → public}/pixmaps/rama2_pre_pro.png +0 -0
  139. /package/{baby-gru → public}/pixmaps/rama2_pro.png +0 -0
  140. /package/{baby-gru → public}/pixmaps/refine-1.svg +0 -0
  141. /package/{baby-gru → public}/pixmaps/rigid-body.svg +0 -0
  142. /package/{baby-gru → public}/pixmaps/rotamers.svg +0 -0
  143. /package/{baby-gru → public}/pixmaps/rtz.svg +0 -0
  144. /package/{baby-gru → public}/pixmaps/secondary-structure-grey.svg +0 -0
  145. /package/{baby-gru → public}/pixmaps/side-chain-180.svg +0 -0
  146. /package/{baby-gru → public}/pixmaps/spin-view.svg +0 -0
  147. /package/{baby-gru → public}/pixmaps/temperature.svg +0 -0
  148. /package/{baby-gru → public}/tutorials/NUT.cif +0 -0
  149. /package/{baby-gru → public}/tutorials/moorhen-tutorial-map-number-1.mtz +0 -0
  150. /package/{baby-gru → public}/tutorials/moorhen-tutorial-map-number-2.mtz +0 -0
  151. /package/{baby-gru → public}/tutorials/moorhen-tutorial-map-number-3.mtz +0 -0
  152. /package/{baby-gru → public}/tutorials/moorhen-tutorial-map-number-4.mtz +0 -0
  153. /package/{baby-gru → public}/tutorials/moorhen-tutorial-structure-number-1.pdb +0 -0
  154. /package/{baby-gru → public}/tutorials/moorhen-tutorial-structure-number-2.pdb +0 -0
  155. /package/{baby-gru → public}/tutorials/moorhen-tutorial-structure-number-3.pdb +0 -0
  156. /package/{baby-gru → public}/tutorials/moorhen-tutorial-structure-number-4.pdb +0 -0
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1 @@
1
+ var createCCP4Module=(()=>{var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(e=e||__filename),function(r={}){function t(){return N.buffer!=W.buffer&&K(),W}function n(){return N.buffer!=W.buffer&&K(),j}function o(){return N.buffer!=W.buffer&&K(),U}function a(){return N.buffer!=W.buffer&&K(),B}function i(){return N.buffer!=W.buffer&&K(),z}function s(){return N.buffer!=W.buffer&&K(),H}function l(){return N.buffer!=W.buffer&&K(),Y}var c,u,d=r;d.ready=new Promise(((e,r)=>{c=e,u=r})),["_main","__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","___get_exception_message","_free","___indirect_function_table","_fflush","__embind_initialize_bindings","__emscripten_check_mailbox","___set_stack_limits","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(d.ready,e)||Object.defineProperty(d.ready,e,{get:()=>pe("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>pe("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));var f=Object.assign({},d),h="./this.program",p=(e,r)=>{throw r},m="object"==typeof window,v="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g=!m&&!y&&!v;if(d.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 _,w,E,b=d.ENVIRONMENT_IS_PTHREAD||!1,T="";function k(e){return d.locateFile?d.locateFile(e,T):T+e}if(y){if("undefined"==typeof process||!process.release||"node"!==process.release.name)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 S=process.versions.node,P=S.split(".").slice(0,3);if((P=1e4*P[0]+100*P[1]+1*P[2].split("-")[0])<16e4)throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+S+")");var A=require("fs"),C=require("path");let e;T=v?C.dirname(T)+"/":__dirname+"/",_=(e,r)=>(e=we(e)?new URL(e):C.normalize(e),A.readFileSync(e,r?void 0:"utf8")),E=e=>{var r=_(e,!0);return r.buffer||(r=new Uint8Array(r)),q(r.buffer),r},w=(e,r,t,n=!0)=>{e=we(e)?new URL(e):C.normalize(e),A.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!d.thisProgram&&process.argv.length>1&&(h=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),p=(e,r)=>{throw process.exitCode=e,r},d.inspect=()=>"[Emscripten Module object]";try{e=require("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=e.Worker}else if(g){if("object"==typeof process&&"function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(_=read),E=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let r=read(e,"binary");return q("object"==typeof r),r},w=(e,r,t)=>{setTimeout((()=>r(E(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():pe()),"undefined"!=typeof scriptArgs?scriptArgs:void 0!==arguments&&arguments,"function"==typeof quit&&(p=(e,r)=>{throw setTimeout((()=>{if(!(r instanceof Le)){let e=r;r&&"object"==typeof r&&r.stack&&(e=[r,r.stack]),I(`exiting due to exception: ${e}`)}quit(e)})),r}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!m&&!v)throw new Error("environment detection error");if(v?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),e&&(T=e),T=0!==T.indexOf("blob:")?T.substr(0,T.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?)");y||(_=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},v&&(E=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),w=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)})}y&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var F=console.log.bind(console),D=console.error.bind(console);y&&(F=(...e)=>A.writeSync(1,e.join(" ")+"\n"),D=(...e)=>A.writeSync(2,e.join(" ")+"\n"));var O,M,$=d.print||F,I=d.printErr||D;Object.assign(d,f),f=null,O="fetchSettings",Object.getOwnPropertyDescriptor(d,O)&&pe(`\`Module.${O}\` was supplied but \`${O}\` not included in INCOMING_MODULE_JS_API`),d.arguments&&d.arguments,Pe("arguments","arguments_"),d.thisProgram&&(h=d.thisProgram),Pe("thisProgram","thisProgram"),d.quit&&(p=d.quit),Pe("quit","quit_"),q(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),q(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),q(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),q(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),q(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),q(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),q(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),q(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),q(void 0===d.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Pe("asm","wasmExports"),Pe("read","read_"),Pe("readAsync","readAsync"),Pe("readBinary","readBinary"),Pe("setWindowTitle","setWindowTitle"),q(m||v||y,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),q(!g,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),d.wasmBinary&&(M=d.wasmBinary),Pe("wasmBinary","wasmBinary");var N,R,x=d.noExitRuntime||!0;Pe("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&pe("no native wasm support detected");var L,W,j,U,B,z,H,G,Y,V=!1;function q(e,r){e||pe("Assertion failed"+(r?": "+r:""))}function K(){var e=N.buffer;d.HEAP8=W=new Int8Array(e),d.HEAP16=U=new Int16Array(e),d.HEAPU8=j=new Uint8Array(e),d.HEAPU16=B=new Uint16Array(e),d.HEAP32=z=new Int32Array(e),d.HEAPU32=H=new Uint32Array(e),d.HEAPF32=G=new Float32Array(e),d.HEAPF64=Y=new Float64Array(e)}q(!d.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),q("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var X=d.INITIAL_MEMORY||16777216;if(Pe("INITIAL_MEMORY","INITIAL_MEMORY"),q(X>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+X+"! (STACK_SIZE=5242880)"),b)N=d.wasmMemory;else if(d.wasmMemory)N=d.wasmMemory;else if(!((N=new WebAssembly.Memory({initial:X/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw I("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),y&&I("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");function J(){var e=Hn();q(!(3&e)),0==e&&(e+=4),s()[e>>2]=34821223,Ne(34821223),s()[e+4>>2]=2310721022,Ne(2310721022),s()[0]=1668509029,Ne(1668509029)}function Z(){if(!V){var e=Hn();0==e&&(e+=4);var r=s()[e>>2],t=s()[e+4>>2];34821223==r&&2310721022==t||pe(`Stack overflow! Stack cookie has been overwritten at ${fr(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${fr(t)} ${fr(r)}`),1668509029!=s()[0]&&pe("Runtime error: The application has corrupted its heap memory area (address zero)!")}}K(),q((X=N.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),r=new Int8Array(e.buffer);if(e[0]=25459,115!==r[0]||99!==r[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var Q=[],ee=[],re=[],te=!1,ne=0;function oe(){return x||ne>0}function ae(){q(!te),te=!0,b||(Z(),br(),d.noFSInit||lr.init.initialized||lr.init(),lr.ignorePermissions=!1,Xe.init(),mr(ee))}function ie(e){Q.unshift(e)}q(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),q(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),q(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),q(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 se=0,le=null,ce=null,ue={};function de(e){for(var r=e;;){if(!ue[e])return e;e=r+Math.random()}}function fe(e){se++,d.monitorRunDependencies&&d.monitorRunDependencies(se),e?(q(!ue[e]),ue[e]=1,null===le&&"undefined"!=typeof setInterval&&(le=setInterval((()=>{if(V)return clearInterval(le),void(le=null);var e=!1;for(var r in ue)e||(e=!0,I("still waiting on run dependencies:")),I(`dependency: ${r}`);e&&I("(end of list)")}),1e4))):I("warning: run dependency added without ID")}function he(e){if(se--,d.monitorRunDependencies&&d.monitorRunDependencies(se),e?(q(ue[e]),delete ue[e]):I("warning: run dependency removed without ID"),0==se&&(null!==le&&(clearInterval(le),le=null),ce)){var r=ce;ce=null,r()}}function pe(e){d.onAbort&&d.onAbort(e),I(e="Aborted("+e+")"),V=!0,L=1;var r=new WebAssembly.RuntimeError(e);throw u(r),r}var me,ve,ye,ge="data:application/octet-stream;base64,";function _e(e){return e.startsWith(ge)}function we(e){return e.startsWith("file://")}function Ee(e){return function(){q(te,`native function \`${e}\` called before runtime initialization`);var r=In[e];return q(r,`exported native function \`${e}\` not found`),r.apply(null,arguments)}}class be extends Error{}class Te extends be{constructor(e){super(e),this.excPtr=e;const r=yr(e);this.name=r[0],this.message=r[1]}}function ke(e){if(e==me&&M)return new Uint8Array(M);if(E)return E(e);throw"both async and sync fetching of the wasm failed"}function Se(e,r,t){return function(e){if(!M&&(m||v)){if("function"==typeof fetch&&!we(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>ke(e)));if(w)return new Promise(((r,t)=>{w(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>ke(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{I(`failed to asynchronously prepare wasm: ${e}`),we(me)&&I(`warning: Loading from a file URI (${me}) 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`),pe(e)}))}function Pe(e,r,t=!0){Object.getOwnPropertyDescriptor(d,e)||Object.defineProperty(d,e,{configurable:!0,get(){pe(`\`Module.${e}\` has been replaced by \`${r}\``+(t?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function Ae(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function Ce(e,r){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){Tr("`"+e+"` is not longer defined by emscripten. "+r)}})}function Fe(e){Object.getOwnPropertyDescriptor(d,e)||Object.defineProperty(d,e,{configurable:!0,get(){var r="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";Ae(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),pe(r)}})}_e(me="web_example.wasm")||(me=k(me)),Ce("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),Ce("asm","Please use wasmExports instead");var De=2**64-1,Oe=1-2**63;function Me(e,r,t,n){q(Number.isInteger(Number(e)),"attempt to write non-integer ("+e+") into integer heap"),q(e<=n,"value ("+e+") too large to write as "+r+"-bit value"),q(e>=t,"value ("+e+") too small to write as "+r+"-bit value")}var $e=e=>Me(e,8,-127,255),Ie=e=>Me(e,16,-32767,65535),Ne=e=>Me(e,32,-2147483647,4294967295),Re=e=>Me(e,64,Oe,De);function xe(e){y?A.writeSync(2,Array.from(arguments).join(" ")+"\n"):console.warn.apply(console,arguments)}function Le(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var We=e=>{e.terminate(),e.onmessage=r=>{var t=r.data.cmd;I(`received "${t}" command from terminated worker: ${e.workerID}`)}},je=e=>{q(!b,"Internal Error! cleanupThread() can only ever be called from main application thread!"),q(e,"Internal Error! Null pthread_ptr in cleanupThread!");var r=pr.pthreads[e];q(r),pr.returnWorkerToPool(r)},Ue={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Ue.isAbs(e),t="/"===e.substr(-1);return(e=Ue.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Ue.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Ue.normalize(e.join("/"))},join2:(e,r)=>Ue.normalize(e+"/"+r)},Be=e=>(Be=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(y)try{var e=require("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}pe("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),ze={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:lr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Ue.isAbs(n)}return(r?"/":"")+(e=Ue.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ze.resolve(e).substr(1),r=ze.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},He="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ge=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&He)return He.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if(224==(240&i)?i=(15&i)<<12|s<<6|l:(240!=(248&i)&&Tr("Invalid UTF-8 leading byte "+fr(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(7&i)<<18|s<<12|l<<6|63&e[r++]),i<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Ye=[],Ve=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},qe=(e,r,t,n)=>{if(q("string"==typeof e),!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;s>1114111&&Tr("Invalid Unicode code point "+fr(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function Ke(e,r,t){var n=t>0?t:Ve(e)+1,o=new Array(n),a=qe(e,o,0,o.length);return r&&(o.length=a),o}var Xe={ttys:[],init(){},shutdown(){},register(e,r){Xe.ttys[e]={input:[],output:[],ops:r},lr.registerDevice(e,Xe.stream_ops)},stream_ops:{open(e){var r=Xe.ttys[e.node.rdev];if(!r)throw new lr.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new lr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new lr.ErrnoError(29)}if(void 0===s&&0===a)throw new lr.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new lr.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new lr.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Ye.length){var e=null;if(y){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=A.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;Ye=Ke(e,!0)}return Ye.shift()})(),put_char(e,r){null===r||10===r?($(Ge(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&($(Ge(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(I(Ge(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(I(Ge(e.output,0)),e.output=[])}}},Je=e=>{e=((e,r)=>(q(r,"alignment argument is required"),Math.ceil(e/r)*r))(e,65536);var r=jn(65536,e);return r?((e,r)=>(n().fill(0,e,e+r),e))(r,e):0},Ze={ops_table:null,mount:e=>Ze.createNode(null,"/",16895,0),createNode(e,r,t,n){if(lr.isBlkdev(t)||lr.isFIFO(t))throw new lr.ErrnoError(63);Ze.ops_table||(Ze.ops_table={dir:{node:{getattr:Ze.node_ops.getattr,setattr:Ze.node_ops.setattr,lookup:Ze.node_ops.lookup,mknod:Ze.node_ops.mknod,rename:Ze.node_ops.rename,unlink:Ze.node_ops.unlink,rmdir:Ze.node_ops.rmdir,readdir:Ze.node_ops.readdir,symlink:Ze.node_ops.symlink},stream:{llseek:Ze.stream_ops.llseek}},file:{node:{getattr:Ze.node_ops.getattr,setattr:Ze.node_ops.setattr},stream:{llseek:Ze.stream_ops.llseek,read:Ze.stream_ops.read,write:Ze.stream_ops.write,allocate:Ze.stream_ops.allocate,mmap:Ze.stream_ops.mmap,msync:Ze.stream_ops.msync}},link:{node:{getattr:Ze.node_ops.getattr,setattr:Ze.node_ops.setattr,readlink:Ze.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ze.node_ops.getattr,setattr:Ze.node_ops.setattr},stream:lr.chrdev_stream_ops}});var o=lr.createNode(e,r,t,n);return lr.isDir(o.mode)?(o.node_ops=Ze.ops_table.dir.node,o.stream_ops=Ze.ops_table.dir.stream,o.contents={}):lr.isFile(o.mode)?(o.node_ops=Ze.ops_table.file.node,o.stream_ops=Ze.ops_table.file.stream,o.usedBytes=0,o.contents=null):lr.isLink(o.mode)?(o.node_ops=Ze.ops_table.link.node,o.stream_ops=Ze.ops_table.link.stream):lr.isChrdev(o.mode)&&(o.node_ops=Ze.ops_table.chrdev.node,o.stream_ops=Ze.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=lr.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,lr.isDir(e.mode)?r.size=4096:lr.isFile(e.mode)?r.size=e.usedBytes:lr.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Ze.resizeFileStorage(e,r.size)},lookup(e,r){throw lr.genericErrors[44]},mknod:(e,r,t,n)=>Ze.createNode(e,r,t,n),rename(e,r,t){if(lr.isDir(e.mode)){var n;try{n=lr.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new lr.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=lr.lookupNode(e,r);for(var n in t.contents)throw new lr.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=Ze.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!lr.isLink(e.mode))throw new lr.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(q(i>=0),i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,n,o,a,i){if(q(!(r instanceof ArrayBuffer)),r.buffer===t().buffer&&(i=!1),!o)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(i)return q(0===a,"canOwn must imply no weird position inside the file"),s.contents=r.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=r.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(r.subarray(n,n+o),a),o}if(Ze.expandFileStorage(s,a+o),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+o),a);else for(var l=0;l<o;l++)s.contents[a+l]=r[n+l];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&lr.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new lr.ErrnoError(28);return n},allocate(e,r,t){Ze.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,n,o,a){if(!lr.isFile(e.node.mode))throw new lr.ErrnoError(43);var i,s,l=e.node.contents;if(2&a||l.buffer!==t().buffer){if((n>0||n+r<l.length)&&(l=l.subarray?l.subarray(n,n+r):Array.prototype.slice.call(l,n,n+r)),s=!0,!(i=Je(r)))throw new lr.ErrnoError(48);t().set(l,i)}else s=!1,i=l.byteOffset;return{ptr:i,allocated:s}},msync:(e,r,t,n,o)=>(Ze.stream_ops.write(e,r,0,n,t,!1),0)}},Qe=d.preloadPlugins||[],er=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},rr={dbs:{},indexedDB:()=>{if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"==typeof window&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),q(e,"IDBFS used, but indexedDB not supported"),e},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(e){return Ze.mount.apply(null,arguments)},syncfs:(e,r,t)=>{rr.getLocalSet(e,((n,o)=>{if(n)return t(n);rr.getRemoteSet(e,((e,n)=>{if(e)return t(e);var a=r?n:o,i=r?o:n;rr.reconcile(a,i,t)}))}))},quit:()=>{Object.values(rr.dbs).forEach((e=>e.close())),rr.dbs={}},getDB:(e,r)=>{var t,n=rr.dbs[e];if(n)return r(null,n);try{t=rr.indexedDB().open(e,rr.DB_VERSION)}catch(e){return r(e)}if(!t)return r("Unable to connect to IndexedDB");t.onupgradeneeded=e=>{var r,t=e.target.result,n=e.target.transaction;(r=t.objectStoreNames.contains(rr.DB_STORE_NAME)?n.objectStore(rr.DB_STORE_NAME):t.createObjectStore(rr.DB_STORE_NAME)).indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},t.onsuccess=()=>{n=t.result,rr.dbs[e]=n,r(null,n)},t.onerror=e=>{r(e.target.error),e.preventDefault()}},getLocalSet:(e,r)=>{var t={};function n(e){return"."!==e&&".."!==e}function o(e){return r=>Ue.join2(e,r)}for(var a=lr.readdir(e.mountpoint).filter(n).map(o(e.mountpoint));a.length;){var i,s=a.pop();try{i=lr.stat(s)}catch(e){return r(e)}lr.isDir(i.mode)&&a.push.apply(a,lr.readdir(s).filter(n).map(o(s))),t[s]={timestamp:i.mtime}}return r(null,{type:"local",entries:t})},getRemoteSet:(e,r)=>{var t={};rr.getDB(e.mountpoint,((e,n)=>{if(e)return r(e);try{var o=n.transaction([rr.DB_STORE_NAME],"readonly");o.onerror=e=>{r(e.target.error),e.preventDefault()},o.objectStore(rr.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=e=>{var o=e.target.result;if(!o)return r(null,{type:"remote",db:n,entries:t});t[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return r(e)}}))},loadLocalEntry:(e,r)=>{var t,n;try{n=lr.lookupPath(e).node,t=lr.stat(e)}catch(e){return r(e)}return lr.isDir(t.mode)?r(null,{timestamp:t.mtime,mode:t.mode}):lr.isFile(t.mode)?(n.contents=Ze.getFileDataAsTypedArray(n),r(null,{timestamp:t.mtime,mode:t.mode,contents:n.contents})):r(new Error("node type not supported"))},storeLocalEntry:(e,r,t)=>{try{if(lr.isDir(r.mode))lr.mkdirTree(e,r.mode);else{if(!lr.isFile(r.mode))return t(new Error("node type not supported"));lr.writeFile(e,r.contents,{canOwn:!0})}lr.chmod(e,r.mode),lr.utime(e,r.timestamp,r.timestamp)}catch(e){return t(e)}t(null)},removeLocalEntry:(e,r)=>{try{var t=lr.stat(e);lr.isDir(t.mode)?lr.rmdir(e):lr.isFile(t.mode)&&lr.unlink(e)}catch(e){return r(e)}r(null)},loadRemoteEntry:(e,r,t)=>{var n=e.get(r);n.onsuccess=e=>{t(null,e.target.result)},n.onerror=e=>{t(e.target.error),e.preventDefault()}},storeRemoteEntry:(e,r,t,n)=>{try{var o=e.put(t,r)}catch(e){return void n(e)}o.onsuccess=()=>{n(null)},o.onerror=e=>{n(e.target.error),e.preventDefault()}},removeRemoteEntry:(e,r,t)=>{var n=e.delete(r);n.onsuccess=()=>{t(null)},n.onerror=e=>{t(e.target.error),e.preventDefault()}},reconcile:(e,r,t)=>{var n=0,o=[];Object.keys(e.entries).forEach((function(t){var a=e.entries[t],i=r.entries[t];i&&a.timestamp.getTime()==i.timestamp.getTime()||(o.push(t),n++)}));var a=[];if(Object.keys(r.entries).forEach((function(r){e.entries[r]||(a.push(r),n++)})),!n)return t(null);var i=!1,s=("remote"===e.type?e.db:r.db).transaction([rr.DB_STORE_NAME],"readwrite"),l=s.objectStore(rr.DB_STORE_NAME);function c(e){if(e&&!i)return i=!0,t(e)}s.onerror=e=>{c(this.error),e.preventDefault()},s.oncomplete=e=>{i||t(null)},o.sort().forEach((e=>{"local"===r.type?rr.loadRemoteEntry(l,e,((r,t)=>{if(r)return c(r);rr.storeLocalEntry(e,t,c)})):rr.loadLocalEntry(e,((r,t)=>{if(r)return c(r);rr.storeRemoteEntry(l,e,t,c)}))})),a.sort().reverse().forEach((e=>{"local"===r.type?rr.removeLocalEntry(e,c):rr.removeRemoteEntry(l,e,c)}))}},tr={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},nr={},or=e=>{var r=Qn(),t=e();return eo(r),t},ar=(e,r,t)=>(q("number"==typeof t,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),qe(e,n(),r,t)),ir=(e,r)=>(q("number"==typeof e),e?Ge(n(),e,r):""),sr=e=>(sr.recursionGuard=1+(0|sr.recursionGuard),sr.recursionGuard>1?e:or((()=>{try{var r=e;r.startsWith("__Z")&&(r=r.substr(1));var t=(e=>{var r=Ve(e)+1,t=ro(r);return ar(e,t,r),t})(r),n=ro(4),o=ao(t,0,0,n);if(0===i()[n>>2]&&o)return ir(o)}catch(e){}finally{xn(o),sr.recursionGuard<2&&--sr.recursionGuard}return e}))),lr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=ze.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new lr.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=lr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=lr.lookupNode(n,t[a]),o=Ue.join2(o,t[a]),lr.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;lr.isLink(n.mode);){var l=lr.readlink(o);if(o=ze.resolve(Ue.dirname(o),l),n=lr.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new lr.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(lr.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%lr.nameTable.length},hashAddNode(e){var r=lr.hashName(e.parent.id,e.name);e.name_next=lr.nameTable[r],lr.nameTable[r]=e},hashRemoveNode(e){var r=lr.hashName(e.parent.id,e.name);if(lr.nameTable[r]===e)lr.nameTable[r]=e.name_next;else for(var t=lr.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=lr.mayLookup(e);if(t)throw new lr.ErrnoError(t,e);for(var n=lr.hashName(e.id,r),o=lr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return lr.lookup(e,r)},createNode(e,r,t,n){q("object"==typeof e);var o=new lr.FSNode(e,r,t,n);return lr.hashAddNode(o),o},destroyNode(e){lr.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>lr.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=lr.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{lr.lookupNode(e,r);return 20}catch(e){}return lr.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=lr.lookupNode(e,r)}catch(e){return e.errno}var o=lr.nodePermissions(e,"wx");if(o)return o;if(t){if(!lr.isDir(n.mode))return 54;if(lr.isRoot(n)||lr.getPath(n)===lr.cwd())return 10}else if(lr.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?lr.isLink(e.mode)?32:lr.isDir(e.mode)&&("r"!==lr.flagsToPermissionString(r)||512&r)?31:lr.nodePermissions(e,lr.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=lr.MAX_OPEN_FDS;e++)if(!lr.streams[e])return e;throw new lr.ErrnoError(33)},getStreamChecked(e){var r=lr.getStream(e);if(!r)throw new lr.ErrnoError(8);return r},getStream:e=>lr.streams[e],createStream:(e,r=-1)=>(lr.FSStream||(lr.FSStream=function(){this.shared={}},lr.FSStream.prototype={},Object.defineProperties(lr.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new lr.FSStream,e),-1==r&&(r=lr.nextfd()),e.fd=r,lr.streams[r]=e,e),closeStream(e){lr.streams[e]=null},chrdev_stream_ops:{open(e){var r=lr.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new lr.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){lr.devices[e]={stream_ops:r}},getDevice:e=>lr.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),lr.syncFSRequests++,lr.syncFSRequests>1&&I(`warning: ${lr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=lr.getMounts(lr.root.mount),n=0;function o(e){return q(lr.syncFSRequests>0),lr.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){if("string"==typeof e)throw e;var n,o="/"===t,a=!t;if(o&&lr.root)throw new lr.ErrnoError(10);if(!o&&!a){var i=lr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,lr.isMountpoint(n))throw new lr.ErrnoError(10);if(!lr.isDir(n.mode))throw new lr.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?lr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=lr.lookupPath(e,{follow_mount:!1});if(!lr.isMountpoint(r.node))throw new lr.ErrnoError(28);var t=r.node,n=t.mounted,o=lr.getMounts(n);Object.keys(lr.nameTable).forEach((e=>{for(var r=lr.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&lr.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);q(-1!==a),t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=lr.lookupPath(e,{parent:!0}).node,o=Ue.basename(e);if(!o||"."===o||".."===o)throw new lr.ErrnoError(28);var a=lr.mayCreate(n,o);if(a)throw new lr.ErrnoError(a);if(!n.node_ops.mknod)throw new lr.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,lr.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,lr.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{lr.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,lr.mknod(e,r,t)),symlink(e,r){if(!ze.resolve(e))throw new lr.ErrnoError(44);var t=lr.lookupPath(r,{parent:!0}).node;if(!t)throw new lr.ErrnoError(44);var n=Ue.basename(r),o=lr.mayCreate(t,n);if(o)throw new lr.ErrnoError(o);if(!t.node_ops.symlink)throw new lr.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Ue.dirname(e),a=Ue.dirname(r),i=Ue.basename(e),s=Ue.basename(r);if(t=lr.lookupPath(e,{parent:!0}).node,n=lr.lookupPath(r,{parent:!0}).node,!t||!n)throw new lr.ErrnoError(44);if(t.mount!==n.mount)throw new lr.ErrnoError(75);var l,c=lr.lookupNode(t,i),u=ze.relative(e,a);if("."!==u.charAt(0))throw new lr.ErrnoError(28);if("."!==(u=ze.relative(r,o)).charAt(0))throw new lr.ErrnoError(55);try{l=lr.lookupNode(n,s)}catch(e){}if(c!==l){var d=lr.isDir(c.mode),f=lr.mayDelete(t,i,d);if(f)throw new lr.ErrnoError(f);if(f=l?lr.mayDelete(n,s,d):lr.mayCreate(n,s))throw new lr.ErrnoError(f);if(!t.node_ops.rename)throw new lr.ErrnoError(63);if(lr.isMountpoint(c)||l&&lr.isMountpoint(l))throw new lr.ErrnoError(10);if(n!==t&&(f=lr.nodePermissions(t,"w")))throw new lr.ErrnoError(f);lr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{lr.hashAddNode(c)}}},rmdir(e){var r=lr.lookupPath(e,{parent:!0}).node,t=Ue.basename(e),n=lr.lookupNode(r,t),o=lr.mayDelete(r,t,!0);if(o)throw new lr.ErrnoError(o);if(!r.node_ops.rmdir)throw new lr.ErrnoError(63);if(lr.isMountpoint(n))throw new lr.ErrnoError(10);r.node_ops.rmdir(r,t),lr.destroyNode(n)},readdir(e){var r=lr.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new lr.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=lr.lookupPath(e,{parent:!0}).node;if(!r)throw new lr.ErrnoError(44);var t=Ue.basename(e),n=lr.lookupNode(r,t),o=lr.mayDelete(r,t,!1);if(o)throw new lr.ErrnoError(o);if(!r.node_ops.unlink)throw new lr.ErrnoError(63);if(lr.isMountpoint(n))throw new lr.ErrnoError(10);r.node_ops.unlink(r,t),lr.destroyNode(n)},readlink(e){var r=lr.lookupPath(e).node;if(!r)throw new lr.ErrnoError(44);if(!r.node_ops.readlink)throw new lr.ErrnoError(28);return ze.resolve(lr.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=lr.lookupPath(e,{follow:!r}).node;if(!t)throw new lr.ErrnoError(44);if(!t.node_ops.getattr)throw new lr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>lr.stat(e,!0),chmod(e,r,t){var n;"string"==typeof e?n=lr.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new lr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){lr.chmod(e,r,!0)},fchmod(e,r){var t=lr.getStreamChecked(e);lr.chmod(t.node,r)},chown(e,r,t,n){var o;"string"==typeof e?o=lr.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new lr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){lr.chown(e,r,t,!0)},fchown(e,r,t){var n=lr.getStreamChecked(e);lr.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new lr.ErrnoError(28);var t;"string"==typeof e?t=lr.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new lr.ErrnoError(63);if(lr.isDir(t.mode))throw new lr.ErrnoError(31);if(!lr.isFile(t.mode))throw new lr.ErrnoError(28);var n=lr.nodePermissions(t,"w");if(n)throw new lr.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=lr.getStreamChecked(e);if(!(2097155&t.flags))throw new lr.ErrnoError(28);lr.truncate(t.node,r)},utime(e,r,t){var n=lr.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new lr.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=Ue.normalize(e);try{n=lr.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new lr.ErrnoError(20)}else n=lr.mknod(e,t,0),o=!0;if(!n)throw new lr.ErrnoError(44);if(lr.isChrdev(n.mode)&&(r&=-513),65536&r&&!lr.isDir(n.mode))throw new lr.ErrnoError(54);if(!o){var a=lr.mayOpen(n,r);if(a)throw new lr.ErrnoError(a)}512&r&&!o&&lr.truncate(n,0),r&=-131713;var i=lr.createStream({node:n,path:lr.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&r||(lr.readFiles||(lr.readFiles={}),e in lr.readFiles||(lr.readFiles[e]=1)),i},close(e){if(lr.isClosed(e))throw new lr.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{lr.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(lr.isClosed(e))throw new lr.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new lr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new lr.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(q(t>=0),n<0||o<0)throw new lr.ErrnoError(28);if(lr.isClosed(e))throw new lr.ErrnoError(8);if(1==(2097155&e.flags))throw new lr.ErrnoError(8);if(lr.isDir(e.node.mode))throw new lr.ErrnoError(31);if(!e.stream_ops.read)throw new lr.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new lr.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(q(t>=0),n<0||o<0)throw new lr.ErrnoError(28);if(lr.isClosed(e))throw new lr.ErrnoError(8);if(!(2097155&e.flags))throw new lr.ErrnoError(8);if(lr.isDir(e.node.mode))throw new lr.ErrnoError(31);if(!e.stream_ops.write)throw new lr.ErrnoError(28);e.seekable&&1024&e.flags&&lr.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new lr.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(lr.isClosed(e))throw new lr.ErrnoError(8);if(r<0||t<=0)throw new lr.ErrnoError(28);if(!(2097155&e.flags))throw new lr.ErrnoError(8);if(!lr.isFile(e.node.mode)&&!lr.isDir(e.node.mode))throw new lr.ErrnoError(43);if(!e.stream_ops.allocate)throw new lr.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new lr.ErrnoError(2);if(1==(2097155&e.flags))throw new lr.ErrnoError(2);if(!e.stream_ops.mmap)throw new lr.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>(q(t>=0),e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0),munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new lr.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=lr.open(e,r.flags),o=lr.stat(e).size,a=new Uint8Array(o);return lr.read(n,a,0,o,0),"utf8"===r.encoding?t=Ge(a,0):"binary"===r.encoding&&(t=a),lr.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=lr.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Ve(r)+1),a=qe(r,o,0,o.length);lr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");lr.write(n,r,0,r.byteLength,void 0,t.canOwn)}lr.close(n)},cwd:()=>lr.currentPath,chdir(e){var r=lr.lookupPath(e,{follow:!0});if(null===r.node)throw new lr.ErrnoError(44);if(!lr.isDir(r.node.mode))throw new lr.ErrnoError(54);var t=lr.nodePermissions(r.node,"x");if(t)throw new lr.ErrnoError(t);lr.currentPath=r.path},createDefaultDirectories(){lr.mkdir("/tmp"),lr.mkdir("/home"),lr.mkdir("/home/web_user")},createDefaultDevices(){lr.mkdir("/dev"),lr.registerDevice(lr.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),lr.mkdev("/dev/null",lr.makedev(1,3)),Xe.register(lr.makedev(5,0),Xe.default_tty_ops),Xe.register(lr.makedev(6,0),Xe.default_tty1_ops),lr.mkdev("/dev/tty",lr.makedev(5,0)),lr.mkdev("/dev/tty1",lr.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=Be(e).byteLength),e[--r]);lr.createDevice("/dev","random",t),lr.createDevice("/dev","urandom",t),lr.mkdir("/dev/shm"),lr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){lr.mkdir("/proc");var e=lr.mkdir("/proc/self");lr.mkdir("/proc/self/fd"),lr.mount({mount(){var r=lr.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=lr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?lr.createDevice("/dev","stdin",d.stdin):lr.symlink("/dev/tty","/dev/stdin"),d.stdout?lr.createDevice("/dev","stdout",null,d.stdout):lr.symlink("/dev/tty","/dev/stdout"),d.stderr?lr.createDevice("/dev","stderr",null,d.stderr):lr.symlink("/dev/tty1","/dev/stderr");var e=lr.open("/dev/stdin",0),r=lr.open("/dev/stdout",1),t=lr.open("/dev/stderr",1);q(0===e.fd,`invalid handle for stdin (${e.fd})`),q(1===r.fd,`invalid handle for stdout (${r.fd})`),q(2===t.fd,`invalid handle for stderr (${t.fd})`)},ensureErrnoError(){lr.ErrnoError||(lr.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){for(var r in this.errno=e,nr)if(nr[r]===e){this.code=r;break}},this.setErrno(e),this.message=tr[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=this.stack.replace(/\b_Z[\w\d_]+/g,(function(e){var r=sr(e);return e===r?e:r+" ["+e+"]"})))},lr.ErrnoError.prototype=new Error,lr.ErrnoError.prototype.constructor=lr.ErrnoError,[44].forEach((e=>{lr.genericErrors[e]=new lr.ErrnoError(e),lr.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){lr.ensureErrnoError(),lr.nameTable=new Array(4096),lr.mount(Ze,{},"/"),lr.createDefaultDirectories(),lr.createDefaultDevices(),lr.createSpecialDirectories(),lr.filesystems={MEMFS:Ze,IDBFS:rr}},init(e,r,t){q(!lr.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),lr.init.initialized=!0,lr.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=r||d.stdout,d.stderr=t||d.stderr,lr.createStandardStreams()},quit(){lr.init.initialized=!1,Ln(0);for(var e=0;e<lr.streams.length;e++){var r=lr.streams[e];r&&lr.close(r)}},findObject(e,r){var t=lr.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=lr.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=lr.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Ue.basename(e),n=lr.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:lr.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Ue.join2(e,a);try{lr.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=Ue.join2("string"==typeof e?e:lr.getPath(e),r),i=er(n,o);return lr.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:lr.getPath(e),i=r?Ue.join2(e,r):e);var s=er(n,o),l=lr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),u=0,d=t.length;u<d;++u)c[u]=t.charCodeAt(u);t=c}lr.chmod(l,146|s);var f=lr.open(l,577);lr.write(f,t,0,t.length,0,a),lr.close(f),lr.chmod(l,s)}return l},createDevice(e,r,t,n){var o=Ue.join2("string"==typeof e?e:lr.getPath(e),r),a=er(!!t,!!n);lr.createDevice.major||(lr.createDevice.major=64);var i=lr.makedev(lr.createDevice.major++,0);return lr.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new lr.ErrnoError(29)}if(void 0===l&&0===i)throw new lr.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new lr.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),lr.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ke(_(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new lr.ErrnoError(29)}},createLazyFile(e,r,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=t);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,t-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ke(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,$("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:s}}else l={isDevice:!1,url:n};var c=lr.createFile(e,r,l,o,a);l.contents?c.contents=l.contents:l.url&&(c.contents=null,c.url=l.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function d(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(q(i>=0),a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((e=>{var r=c.stream_ops[e];u[e]=function(){return lr.forceLoadFile(c),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(lr.forceLoadFile(c),d(e,r,t,n,o)),u.mmap=(e,r,n,o,a)=>{lr.forceLoadFile(c);var i=Je(r);if(!i)throw new lr.ErrnoError(48);return d(e,t(),i,r,n),{ptr:i,allocated:!0}},c.stream_ops=u,c},absolutePath(){pe("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){pe("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){pe("FS.createLink has been removed; use FS.symlink instead")},joinPath(){pe("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){pe("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){pe("FS.standardizePath has been removed; use PATH.normalize instead")}},cr={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(Ue.isAbs(r))return r;var n;-100===e?n=lr.cwd():n=cr.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new lr.ErrnoError(44);return n}return Ue.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Ue.normalize(r)!==Ue.normalize(lr.getPath(e.node)))return-54;throw e}i()[t>>2]=n.dev,Ne(n.dev),i()[t+4>>2]=n.mode,Ne(n.mode),s()[t+8>>2]=n.nlink,Ne(n.nlink),i()[t+12>>2]=n.uid,Ne(n.uid),i()[t+16>>2]=n.gid,Ne(n.gid),i()[t+20>>2]=n.rdev,Ne(n.rdev),ye=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=ye[0],i()[t+28>>2]=ye[1],Re(n.size),i()[t+32>>2]=4096,Ne(4096),i()[t+36>>2]=n.blocks,Ne(n.blocks);var o=n.atime.getTime(),a=n.mtime.getTime(),l=n.ctime.getTime();return ye=[Math.floor(o/1e3)>>>0,(ve=Math.floor(o/1e3),+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=ye[0],i()[t+44>>2]=ye[1],Re(Math.floor(o/1e3)),s()[t+48>>2]=o%1e3*1e3,Ne(o%1e3*1e3),ye=[Math.floor(a/1e3)>>>0,(ve=Math.floor(a/1e3),+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=ye[0],i()[t+60>>2]=ye[1],Re(Math.floor(a/1e3)),s()[t+64>>2]=a%1e3*1e3,Ne(a%1e3*1e3),ye=[Math.floor(l/1e3)>>>0,(ve=Math.floor(l/1e3),+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=ye[0],i()[t+76>>2]=ye[1],Re(Math.floor(l/1e3)),s()[t+80>>2]=l%1e3*1e3,Ne(l%1e3*1e3),ye=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=ye[0],i()[t+92>>2]=ye[1],Re(n.ino),0},doMsync(e,r,t,o,a){if(!lr.isFile(r.node.mode))throw new lr.ErrnoError(43);if(2&o)return 0;var i=n().slice(e,e+t);lr.msync(r,i,a,t,o)},varargs:void 0,get(){q(null!=cr.varargs);var e=i()[+cr.varargs>>2];return cr.varargs+=4,e},getp:()=>cr.get(),getStr:e=>ir(e),getStreamFromFD:e=>lr.getStreamChecked(e)};function ur(e){if(b)return nn(0,1,e);L=e,oe()||(pr.terminateAllThreads(),d.onExit&&d.onExit(e),V=!0),p(e,new Le(e))}var dr=(e,r)=>{if(L=e,function(){var e=$,r=I,t=!1;$=I=e=>{t=!0};try{Ln(0),["stdout","stderr"].forEach((function(e){var r=lr.analyzePath("/dev/"+e);if(r){var n=r.object.rdev,o=Xe.ttys[n];o&&o.output&&o.output.length&&(t=!0)}}))}catch(e){}$=e,I=r,t&&Tr("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),b)throw q(!r),vr(e),"unwind";if(oe()&&!r){var t=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=${ne}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;u(t),I(t)}ur(e)},fr=e=>(q("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),hr=e=>{if(e instanceof Le||"unwind"==e)return L;Z(),e instanceof WebAssembly.RuntimeError&&to()<=0&&I("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 5242880)"),p(1,e)},pr={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit(){var e=xe;xe=r=>{return e((t=0,te&&void 0!==Wn&&(t=Wn()),"w:"+(d.workerID||0)+",t:"+fr(t)+": "+r));var t}},init(){pr.debugInit(),b?pr.initWorker():pr.initMainThread()},initMainThread(){ie((()=>{fe("loading-workers"),pr.loadWasmModuleToAllWorkers((()=>he("loading-workers")))}))},initWorker(){x=!1},setExitStatus:e=>{L=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of(q(!b,"Internal Error! terminateAllThreads() can only ever be called from main application thread!"),pr.runningWorkers))We(e);for(var e of pr.unusedWorkers)We(e);pr.unusedWorkers=[],pr.runningWorkers=[],pr.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete pr.pthreads[r],pr.unusedWorkers.push(e),pr.runningWorkers.splice(pr.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Yn(r)},receiveObjectTransfer(e){},threadInitTLS(){pr.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:r=>new Promise((t=>{r.onmessage=e=>{var n=e.data,o=n.cmd;if(n.targetThread&&n.targetThread!=Wn()){var a=pr.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):I(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?tn():"spawnThread"===o?(e=>{q(!b,"Internal Error! spawnThread() can only ever be called from main application thread!"),q(e.pthread_ptr,"Internal error, no pthread ptr!");var r=pr.getNewWorker();if(!r)return 6;q(!r.pthread_ptr,"Internal error!"),pr.runningWorkers.push(r),pr.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};y&&r.unref(),r.postMessage(t,e.transferList)})(n):"cleanupThread"===o?je(n.thread):"killThread"===o?(e=>{q(!b,"Internal Error! killThread() can only ever be called from main application thread!"),q(e,"Internal Error! Null pthread_ptr in killThread!");var r=pr.pthreads[e];delete pr.pthreads[e],We(r),Yn(e),pr.runningWorkers.splice(pr.runningWorkers.indexOf(r),1),r.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,q(!b,"Internal Error! cancelThread() can only ever be called from main application thread!"),q(i,"Internal Error! Null pthread_ptr in cancelThread!"),pr.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(r.loaded=!0,t(r)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?r.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&I(`worker sent an unknown command ${o}`)}},r.onerror=e=>{var t="worker sent an error!";throw r.pthread_ptr&&(t=`Pthread ${fr(r.pthread_ptr)} sent an error!`),I(`${t} ${e.filename}:${e.lineno}: ${e.message}`),e},y&&(r.on("message",(e=>r.onmessage({data:e}))),r.on("error",(e=>r.onerror(e)))),q(N instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),q(R instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var n=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&n.push(o);r.workerID=pr.nextWorkerID++,r.postMessage({cmd:"load",handlers:n,urlOrBlob:d.mainScriptUrlOrBlob||e,wasmMemory:N,wasmModule:R,workerID:r.workerID})})),loadWasmModuleToAllWorkers(e){e()},allocateUnusedWorker(){var e,r=k("web_example.worker.js");e=new Worker(r),pr.unusedWorkers.push(e)},getNewWorker:()=>(0==pr.unusedWorkers.length&&(y||I("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),pr.allocateUnusedWorker(),pr.loadWasmModuleToWorker(pr.unusedWorkers[0])),pr.unusedWorkers.pop())};d.PThread=pr;var mr=e=>{for(;e.length>0;)e.shift()(d)};function vr(e){if(b)return nn(1,0,e);dr(e)}d.establishStackSpace=()=>{var e=Wn(),r=s()[e+52>>2],t=r-s()[e+56>>2];q(0!=r),q(0!=t),q(r>t,"stackHigh must be higher then stackLow"),Zn(r,t),br(),eo(r),J()};var yr=e=>(e=>or((()=>{var r=ro(4),t=ro(4);io(e,r,t);var n,o=s()[r>>2],a=s()[t>>2],i=ir(o);return xn(o),a&&(n=ir(a),xn(a)),[i,n]})))(e);d.getExceptionMessage=yr;var gr,_r=[],wr=e=>{var r=_r[e];return r||(e>=_r.length&&(_r.length=e+1),_r[e]=r=gr.get(e)),q(gr.get(e)==r,"JavaScript-side Wasm function table mirror is out of date!"),r};d.invokeEntryPoint=(e,r)=>{var t=wr(e)(r);Z(),function(e){oe()?pr.setExitStatus(e):Vn(e)}(t)};var Er=e=>{pr.tlsInitFunctions.push(e)},br=()=>{var e=zn(),r=Hn();co(e,r)};var Tr=e=>{Tr.shown||(Tr.shown={}),Tr.shown[e]||(Tr.shown[e]=1,y&&(e="warning: "+e),I(e))},kr=[],Sr=0,Pr=0;function Ar(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12|0]=e,$e(e)},this.get_caught=function(){return 0!=t()[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13|0]=e,$e(e)},this.get_rethrown=function(){return 0!=t()[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(lo(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Cr=e=>{var r=Pr&&Pr.excPtr;if(!r)return Xn(0),0;var t=new Ar(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Xn(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(so(a,n,i))return Xn(a),r}return Xn(n),r};function Fr(e,r,t){if(b)return nn(2,1,e,r,t);cr.varargs=t;try{var n=cr.getStreamFromFD(e);switch(r){case 0:if((a=cr.get())<0)return-28;for(;lr.streams[a];)a++;return lr.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=cr.get();return n.flags|=a,0;case 5:a=cr.getp();return o()[a+0>>1]=2,Ie(2),0;case 16:case 8:default:return-28;case 9:return s=28,i()[Rn()>>2]=s,Ne(s),-1}}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Dr(e,r){if(b)return nn(3,1,e,r);try{var t=cr.getStreamFromFD(e);return cr.doStat(lr.stat,t.path,r)}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Or(e,r,n){if(b)return nn(4,1,e,r,n);cr.varargs=n;try{var a=cr.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),l=cr.getp();i()[l>>2]=s.c_iflag||0,Ne(s.c_iflag||0),i()[l+4>>2]=s.c_oflag||0,Ne(s.c_oflag||0),i()[l+8>>2]=s.c_cflag||0,Ne(s.c_cflag||0),i()[l+12>>2]=s.c_lflag||0,Ne(s.c_lflag||0);for(var c=0;c<32;c++)t()[l+c+17|0]=s.c_cc[c]||0,$e(s.c_cc[c]||0);return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){l=cr.getp();var u=i()[l>>2],d=i()[l+4>>2],f=i()[l+8>>2],h=i()[l+12>>2],p=[];for(c=0;c<32;c++)p.push(t()[l+c+17|0]);return a.tty.ops.ioctl_tcsets(a.tty,r,{c_iflag:u,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:if(!a.tty)return-59;l=cr.getp();return i()[l>>2]=0,Ne(0),0;case 21520:return a.tty?-28:-59;case 21531:l=cr.getp();return lr.ioctl(a,r,l);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);l=cr.getp();o()[l>>1]=m[0],Ie(m[0]),o()[l+2>>1]=m[1],Ie(m[1])}return 0;default:return-28}}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Mr(e,r){if(b)return nn(5,1,e,r);try{return e=cr.getStr(e),cr.doStat(lr.lstat,e,r)}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function $r(e,r,t,n){if(b)return nn(6,1,e,r,t,n);try{r=cr.getStr(r);var o=256&n,a=4096&n;return q(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),r=cr.calculateAt(e,r,a),cr.doStat(o?lr.lstat:lr.stat,r,t)}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ir(e,r,t,n){if(b)return nn(7,1,e,r,t,n);cr.varargs=n;try{r=cr.getStr(r),r=cr.calculateAt(e,r);var o=n?cr.get():0;return lr.open(r,t,o).fd}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Nr(e,r){if(b)return nn(8,1,e,r);try{return e=cr.getStr(e),cr.doStat(lr.stat,e,r)}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Rr(e,r,t){if(b)return nn(9,1,e,r,t);try{return r=cr.getStr(r),r=cr.calculateAt(e,r),0===t?lr.unlink(r):512===t?lr.rmdir(r):pe("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}var xr={},Lr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Wr(e){return this.fromWireType(i()[e>>2])}var jr,Ur,Br,zr={},Hr={},Gr={},Yr=e=>{throw new jr(e)},Vr=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Yr("Mismatched type converter count");for(var o=0;o<e.length;++o)Jr(e[o],n[o])}e.forEach((function(e){Gr[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Hr.hasOwnProperty(e)?o[r]=Hr[e]:(a.push(e),zr.hasOwnProperty(e)||(zr[e]=[]),zr[e].push((()=>{o[r]=Hr[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},qr={},Kr=e=>{for(var r="",t=e;n()[t];)r+=Ur[n()[t++]];return r},Xr=e=>{throw new Br(e)};function Jr(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Xr(`type "${n}" must have a positive integer typeid pointer`),Hr.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Xr(`Cannot register type '${n}' twice`)}if(Hr[e]=r,delete Gr[e],zr.hasOwnProperty(e)){var o=zr[e];delete zr[e],o.forEach((e=>e()))}}(e,r,t)}var Zr,Qr=8,et=e=>{Xr(e.$$.ptrType.registeredClass.name+" instance already deleted")},rt=!1,tt=e=>{},nt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},ot=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=ot(e,r,t.baseClass);return null===n?null:t.downcast(n)},at={},it=()=>Object.keys(dt).length,st=()=>{var e=[];for(var r in dt)dt.hasOwnProperty(r)&&e.push(dt[r]);return e},lt=[],ct=()=>{for(;lt.length;){var e=lt.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Zr=e,lt.length&&Zr&&Zr(ct)},dt={},ft=(e,r)=>(r=((e,r)=>{for(void 0===r&&Xr("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),dt[r]),ht=(e,r)=>(r.ptrType&&r.ptr||Yr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Yr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},mt(Object.create(e,{$$:{value:r}})));function pt(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=ft(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?ht(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):ht(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=at[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=ot(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?ht(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):ht(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var mt=e=>"undefined"==typeof FinalizationRegistry?(mt=e=>e,e):(rt=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),nt(e.$$)})),mt=e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r},n=r.ptrType.registeredClass;t.leakWarning=new Error(`Embind found a leaked C++ instance ${n.name} <${fr(r.ptr)}>.\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(t.leakWarning,pt),rt.register(e,t,e)}return e},tt=e=>rt.unregister(e),mt(e));function vt(){}var yt=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e};function gt(e,r){return e=yt(e),{[e]:function(){return r.apply(this,arguments)}}[e]}var _t=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Xr(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},wt=(e,r,t)=>{d.hasOwnProperty(e)?((void 0===t||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[t])&&Xr(`Cannot register public name '${e}' twice`),_t(d,e,e),d.hasOwnProperty(t)&&Xr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[e].overloadTable[t]=r):(d[e]=r,void 0!==t&&(d[e].numArguments=t))};function Et(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var bt=(e,r,t)=>{for(;r!==t;)r.upcast||Xr(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function Tt(e,r){if(null===r)return this.isReference&&Xr(`null is not a valid ${this.name}`),0;r.$$||Xr(`Cannot pass "${Ht(r)}" as a ${this.name}`),r.$$.ptr||Xr(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return bt(r.$$.ptr,t,this.registeredClass)}function kt(e,r){var t;if(null===r)return this.isReference&&Xr(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Xr(`Cannot pass "${Ht(r)}" as a ${this.name}`),r.$$.ptr||Xr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Xr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=bt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Xr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Xr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Ut.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Xr("Unsupporting sharing policy")}return t}function St(e,r){if(null===r)return this.isReference&&Xr(`null is not a valid ${this.name}`),0;r.$$||Xr(`Cannot pass "${Ht(r)}" as a ${this.name}`),r.$$.ptr||Xr(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Xr(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return bt(r.$$.ptr,t,this.registeredClass)}function Pt(e){return this.fromWireType(s()[e>>2])}function At(e,r,t,n,o,a,i,s,l,c,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=c,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=kt:n?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=St,this.destructorFunction=null)}var Ct,Ft=(e,r,t)=>{d.hasOwnProperty(e)||Yr("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==t?d[e].overloadTable[t]=r:(d[e]=r,d[e].argCount=t)},Dt=(e,r,t)=>e.includes("j")?((e,r,t)=>{q("dynCall_"+e in d,`bad function pointer type - dynCall function not found for sig '${e}'`),t&&t.length?q(t.length===e.substring(1).replace(/j/g,"--").length):q(1==e.length);var n=d["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):(q(wr(r),`missing table entry in dynCall: ${r}`),wr(r).apply(null,t)),Ot=(e,r)=>{var t=(e=Kr(e)).includes("j")?((e,r)=>{q(e.includes("j")||e.includes("p"),"getDynCaller should only be called with i64 sigs");var t=[];return function(){return t.length=0,Object.assign(t,arguments),Dt(e,r,t)}})(e,r):wr(r);return"function"!=typeof t&&Xr(`unknown function pointer with signature ${e}: ${r}`),t},Mt=e=>{var r=Un(e),t=Kr(r);return xn(r),t},$t=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Hr[r]||(Gr[r]?Gr[r].forEach(e):(t.push(r),n[r]=!0))})),new Ct(`${e}: `+t.map(Mt).join([", "]))},It=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(s()[r+4*n>>2]);return t};function Nt(e,r,t,n,o,a){var i=r.length;i<2&&Xr("argTypes array size mismatch! Must at least get return value and 'this' types!"),q(!a,"Async bindings are only supported with JSPI.");for(var s=null!==r[1]&&null!==t,l=!1,c=1;c<r.length;++c)if(null!==r[c]&&void 0===r[c].destructorFunction){l=!0;break}var u="void"!==r[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${yt(e)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;l&&(h+="var destructors = [];\n");var p=l?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[Xr,n,o,Lr,r[0],r[1]];s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n");for(c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+r[c+2].name+"\n",m.push("argType"+c),v.push(r[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(u||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<r.length;++c){var y=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==r[c].destructorFunction&&(h+=y+"_dtor("+y+"); // "+r[c].name+"\n",m.push(y+"_dtor"),v.push(r[c].destructorFunction))}return u&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),function(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=gt(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}(Function,m).apply(null,v)}var Rt=(e,r,t)=>(e instanceof Object||Xr(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Xr(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Xr(`cannot call emscripten binding method ${t} on deleted object`),bt(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass));function xt(){this.allocated=[void 0],this.freelist=[]}var Lt=new xt,Wt=e=>{e>=Lt.reserved&&0==--Lt.get(e).refcount&&Lt.free(e)},jt=()=>{for(var e=0,r=Lt.reserved;r<Lt.allocated.length;++r)void 0!==Lt.allocated[r]&&++e;return e},Ut={toValue:e=>(e||Xr("Cannot use deleted val. handle = "+e),Lt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Lt.allocate({refcount:1,value:e})}}},Bt=(e,r,l)=>{switch(r){case 1:return l?function(e){return this.fromWireType(t()[e|0])}:function(e){return this.fromWireType(n()[e|0])};case 2:return l?function(e){return this.fromWireType(o()[e>>1])}:function(e){return this.fromWireType(a()[e>>1])};case 4:return l?function(e){return this.fromWireType(i()[e>>2])}:function(e){return this.fromWireType(s()[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},zt=(e,r)=>{var t=Hr[e];return void 0===t&&Xr(r+" has unknown type "+Mt(e)),t},Ht=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Gt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType((N.buffer!=W.buffer&&K(),G)[e>>2])};case 8:return function(e){return this.fromWireType(l()[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},Yt=(e,r,l)=>{switch(r){case 1:return l?e=>t()[e|0]:e=>n()[e|0];case 2:return l?e=>o()[e>>1]:e=>a()[e>>1];case 4:return l?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Vt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,qt=(e,r)=>{q(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var t=e,i=t>>1,s=i+r/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-e>32&&Vt)return Vt.decode(n().slice(e,t));for(var l="",c=0;!(c>=r/2);++c){var u=o()[e+2*c>>1];if(0==u)break;l+=String.fromCharCode(u)}return l},Kt=(e,r,t)=>{if(q(r%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),q("number"==typeof t,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var s=e.charCodeAt(i);o()[r>>1]=s,Ie(s),r+=2}return o()[r>>1]=0,Ie(0),r-n},Xt=e=>2*e.length,Jt=(e,r)=>{q(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var t=0,n="";!(t>=r/4);){var o=i()[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Zt=(e,r,t)=>{if(q(r%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),q("number"==typeof t,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(i()[r>>2]=s,Ne(s),(r+=4)+4>o)break}return i()[r>>2]=0,Ne(0),r-n},Qt=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},en=e=>{if(V)I("user callback triggered after runtime exited or application aborted. Ignoring.");else try{e(),(()=>{if(!oe())try{b?Vn(L):dr(L)}catch(e){hr(e)}})()}catch(e){hr(e)}},rn=e=>{if("function"==typeof Atomics.waitAsync){var r=Atomics.waitAsync(i(),e>>2,e);q(r.async),r.value.then(tn);var t=e+128;Atomics.store(i(),t>>2,1)}};d.__emscripten_thread_mailbox_await=rn;var tn=()=>{var e=Wn();e&&(rn(e),en((()=>qn())))};d.checkMailbox=tn;var nn=function(e,r){var t=arguments.length-2,n=arguments;return or((()=>{for(var o=t,a=ro(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];l()[i+s]=c}return Gn(e,o,a,r)}))},on=[],an=e=>e%4==0&&(e%100!=0||e%400==0),sn=[0,31,60,91,121,152,182,213,244,274,305,335],ln=[0,31,59,90,120,151,181,212,243,273,304,334],cn=(e,r)=>(q(e==e>>>0||e==(0|e)),q(r===(0|r)),r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN);function un(e,r,t,n,o,a,l,c){if(b)return nn(10,1,e,r,t,n,o,a,l,c);var u=cn(o,a);try{if(isNaN(u))return 61;var d=cr.getStreamFromFD(n),f=lr.mmap(d,e,u,r,t),h=f.ptr;return i()[l>>2]=f.allocated,Ne(f.allocated),s()[c>>2]=h,0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}function dn(e,r,t,n,o,a,i){if(b)return nn(11,1,e,r,t,n,o,a,i);var s=cn(a,i);try{if(isNaN(s))return 61;var l=cr.getStreamFromFD(o);2&t&&cr.doMsync(e,l,r,n,s),lr.munmap(l)}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return-e.errno}}var fn,hn=e=>{var r=Ve(e)+1,t=Nn(r);return t&&ar(e,t,r),t};fn=()=>performance.timeOrigin+performance.now();var pn=e=>{var r=N.buffer,t=(e-r.byteLength+65535)/65536;try{return N.grow(t),K(),1}catch(t){I(`growMemory: Attempted to grow heap from ${r.byteLength} bytes to ${e} bytes, but got error: ${t}`)}},mn={},vn=()=>{if(!vn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"};for(var r in mn)void 0===mn[r]?delete e[r]:e[r]=mn[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);vn.strings=t}return vn.strings},yn=function(e,r){if(b)return nn(12,1,e,r);var n=0;return vn().forEach(((o,a)=>{var i=r+n;s()[e+4*a>>2]=i,Ne(i),((e,r)=>{for(var n=0;n<e.length;++n)q(e.charCodeAt(n)===(255&e.charCodeAt(n))),t()[0|r++]=e.charCodeAt(n),$e(e.charCodeAt(n));t()[0|r]=0,$e(0)})(o,i),n+=o.length+1})),0},gn=function(e,r){if(b)return nn(13,1,e,r);var t=vn();s()[e>>2]=t.length,Ne(t.length);var n=0;return t.forEach((e=>n+=e.length+1)),s()[r>>2]=n,Ne(n),0};function _n(e){if(b)return nn(14,1,e);try{var r=cr.getStreamFromFD(e);return lr.close(r),0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return e.errno}}function wn(e,r,n,o){if(b)return nn(15,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var u=lr.read(e,t(),l,c,o);if(u<0)return-1;if(a+=u,u<c)break;void 0!==o&&(o+=u)}return a})(cr.getStreamFromFD(e),r,n);return s()[o>>2]=a,Ne(a),0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return e.errno}}function En(e,r,t,n,o){if(b)return nn(16,1,e,r,t,n,o);var a=cn(r,t);try{if(isNaN(a))return 61;var s=cr.getStreamFromFD(e);return lr.llseek(s,a,n),ye=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?+Math.floor(ve/4294967296)>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],i()[o>>2]=ye[0],i()[o+4>>2]=ye[1],Re(s.position),s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return e.errno}}function bn(e,r,n,o){if(b)return nn(17,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var u=lr.write(e,t(),l,c,o);if(u<0)return-1;a+=u,void 0!==o&&(o+=u)}return a})(cr.getStreamFromFD(e),r,n);return s()[o>>2]=a,Ne(a),0}catch(e){if(void 0===lr||"ErrnoError"!==e.name)throw e;return e.errno}}var Tn=[31,29,31,30,31,30,31,31,30,31,30,31],kn=[31,28,31,30,31,30,31,31,30,31,30,31],Sn=(e,r,n,o)=>{var a=s()[o+40>>2],l={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?ir(a):""},c=ir(n),u={"%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 d in u)c=c.replace(new RegExp(d,"g"),u[d]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function m(e,r){return p(e,r,"0")}function v(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function y(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 g(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=an(t.getFullYear()),o=t.getMonth(),a=(n?Tn:kn)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=y(t),a=y(n);return v(o,r)<=0?v(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var _={"%a":e=>f[e.tm_wday].substring(0,3),"%A":e=>f[e.tm_wday],"%b":e=>h[e.tm_mon].substring(0,3),"%B":e=>h[e.tm_mon],"%C":e=>m((e.tm_year+1900)/100|0,2),"%d":e=>m(e.tm_mday,2),"%e":e=>p(e.tm_mday,2," "),"%g":e=>g(e).toString().substring(2),"%G":e=>g(e),"%H":e=>m(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),m(r,2)},"%j":e=>m(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(an(e.tm_year+1900)?Tn:kn,e.tm_mon-1),3),"%m":e=>m(e.tm_mon+1,2),"%M":e=>m(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>m(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return m(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&an(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&an(e.tm_year%400-1))&&r++}return m(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return m(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),_)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),_[d](l)));var w,E,b=Ke(c=c.replace(/\0\0/g,"%"),!1);return b.length>r?0:(E=e,q((w=b).length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),t().set(w,E),b.length-1)};pr.init();var Pn,An,Cn,Fn=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=lr.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Dn=365,On=146;Object.defineProperties(Fn.prototype,{read:{get:function(){return(this.mode&Dn)===Dn},set:function(e){e?this.mode|=Dn:this.mode&=-366}},write:{get:function(){return(this.mode&On)===On},set:function(e){e?this.mode|=On:this.mode&=-147}},isFolder:{get:function(){return lr.isDir(this.mode)}},isDevice:{get:function(){return lr.isChrdev(this.mode)}}}),lr.FSNode=Fn,lr.createPreloadedFile=(e,r,t,n,o,a,i,s,l,c)=>{var u=r?ze.resolve(Ue.join2(e,r)):e,d=de(`cp ${u}`);function f(t){function f(t){c&&c(),s||((e,r,t,n,o,a)=>{lr.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a&&a(),he(d)}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Qe.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,u,f,(()=>{i&&i(),he(d)}))||f(t)}fe(d),"string"==typeof t?((e,r,t,n)=>{var o=n?"":de(`al ${e}`);w(e,(t=>{q(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&he(o)}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&fe(o)})(t,(e=>f(e)),i):f(t)},lr.staticInit(),d.FS_createPath=lr.createPath,d.FS_createDataFile=lr.createDataFile,d.FS_createPreloadedFile=lr.createPreloadedFile,d.FS_unlink=lr.unlink,d.FS_createLazyFile=lr.createLazyFile,d.FS_createDevice=lr.createDevice,nr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},jr=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Ur=e})(),Br=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(vt.prototype,{isAliasOf(e){if(!(this instanceof vt))return!1;if(!(e instanceof vt))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||et(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=mt(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 r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||et(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Xr("Object already scheduled for deletion"),tt(this),nt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||et(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Xr("Object already scheduled for deletion"),lt.push(this),1===lt.length&&Zr&&Zr(ct),this.$$.deleteScheduled=!0,this}}),d.getInheritedInstanceCount=it,d.getLiveInheritedInstances=st,d.flushPendingDeletes=ct,d.setDelayFunction=ut,Object.assign(At.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Qr,readValueFromPointer:Pt,deleteObject(e){null!==e&&e.delete()},fromWireType:pt}),Ct=d.UnboundTypeError=(Pn=Error,(Cn=gt(An="UnboundTypeError",(function(e){this.name=An,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(Pn.prototype),Cn.prototype.constructor=Cn,Cn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Cn),Object.assign(xt.prototype,{get(e){return q(void 0!==this.allocated[e],`invalid handle: ${e}`),this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){q(void 0!==this.allocated[e]),this.allocated[e]=void 0,this.freelist.push(e)}}),Lt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Lt.reserved=Lt.allocated.length,d.count_emval_handles=jt;var Mn=[ur,vr,Fr,Dr,Or,Mr,$r,Ir,Nr,Rr,un,dn,yn,gn,_n,wn,En,bn];var $n={__assert_fail:(e,r,t,n)=>{pe(`Assertion failed: ${ir(e)}, at: `+[r?ir(r):"unknown filename",t,n?ir(n):"unknown function"])},__cxa_begin_catch:e=>{var r=new Ar(e);return r.get_caught()||(r.set_caught(!0),Sr--),r.set_rethrown(!1),kr.push(r),oo(r.excPtr),r.get_exception_ptr()},__cxa_end_catch:()=>{Kn(0,0),q(kr.length>0);var e=kr.pop();no(e.excPtr),Pr=0},__cxa_find_matching_catch_2:()=>Cr([]),__cxa_find_matching_catch_3:e=>Cr([e]),__cxa_rethrow:()=>{var e=kr.pop();e||pe("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(kr.push(e),e.set_rethrown(!0),e.set_caught(!1),Sr++),Pr=new Te(r)},__cxa_throw:(e,r,t)=>{throw new Ar(e).init(r,t),Pr=new Te(e),Sr++,Pr},__cxa_uncaught_exceptions:()=>Sr,__emscripten_init_main_thread_js:e=>{Bn(e,!v,1,!m,2097152,!1),pr.threadInitTLS()},__emscripten_thread_cleanup:e=>{b?postMessage({cmd:"cleanupThread",thread:e}):je(e)},__handle_stack_overflow:e=>{var r=zn(),t=Hn();pe(`stack overflow (Attempt to set SP to ${fr(e)}, with stack limits [${fr(t)} - ${fr(r)}]). If you require more stack space build with -sSTACK_SIZE=<bytes>`)},__resumeException:e=>{throw Pr||(Pr=new Te(e)),Pr},__syscall_fcntl64:Fr,__syscall_fstat64:Dr,__syscall_ioctl:Or,__syscall_lstat64:Mr,__syscall_newfstatat:$r,__syscall_openat:Ir,__syscall_stat64:Nr,__syscall_unlinkat:Rr,_embind_finalize_value_array:e=>{var r=xr[e];delete xr[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Vr([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],l=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];l(c,e,s.toWireType(t,r)),Lr(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),l=0;l<n;++l)t[l].write(s,o[l]);return null!==e&&e.push(i,s),s},argPackAdvance:Qr,readValueFromPointer:Wr,destructorFunction:i}]}))},_embind_finalize_value_object:e=>{var r=qr[e];delete qr[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Vr([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,l=r.getterContext,c=e[t+o.length],u=r.setter,d=r.setterContext;a[n]={read:e=>i.fromWireType(s(l,e)),write:(e,r)=>{var t=[];u(d,e,c.toWireType(t,r)),Lr(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:Qr,readValueFromPointer:Wr,destructorFunction:n}]}))},_embind_register_bigint:(e,r,t,n,o)=>{},_embind_register_bool:(e,r,t,o)=>{Jr(e,{name:r=Kr(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:o},argPackAdvance:Qr,readValueFromPointer:function(e){return this.fromWireType(n()[e])},destructorFunction:null})},_embind_register_class:(e,r,t,n,o,a,i,s,l,c,u,d,f)=>{u=Kr(u),a=Ot(o,a),s&&(s=Ot(i,s)),c&&(c=Ot(l,c)),f=Ot(d,f);var h=yt(u);wt(h,(function(){$t(`Cannot construct ${u} due to unbound types`,[n])})),Vr([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:vt.prototype;var i=gt(h,(function(){if(Object.getPrototypeOf(this)!==l)throw new Br("Use 'new' to construct "+u);if(void 0===d.constructor_body)throw new Br(u+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Br(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var d=new Et(u,i,l,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new At(u,d,!0,!1,!1),m=new At(u+"*",d,!1,!1,!1),v=new At(u+" const*",d,!1,!0,!1);return at[e]={pointerType:m,constPointerType:v},Ft(h,i),[p,m,v]}))},_embind_register_class_constructor:(e,r,t,n,o,a)=>{q(r>0);var i=It(r,t);o=Ot(n,o),Vr([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Br(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{$t(`Cannot construct ${e.name} due to unbound types`,i)},Vr([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Nt(t,n,null,o,a),[]))),[]}))},_embind_register_class_function:(e,r,t,n,o,a,i,s,l)=>{var c=It(t,n);r=Kr(r),a=Ot(o,a),Vr([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){$t(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,d=u[r];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(_t(u,r,n),u[r].overloadTable[t-2]=o),Vr([],c,(function(o){var s=Nt(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))},_embind_register_class_property:(e,r,t,n,o,a,i,s,l,c)=>{r=Kr(r),o=Ot(n,o),Vr([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,u={get(){$t(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return u.set=l?()=>$t(`Cannot access ${n} due to unbound types`,[t,i]):e=>Xr(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,u),Vr([],l?[t,i]:[t],(function(t){var i=t[0],u={get(){var r=Rt(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(l){l=Ot(s,l);var d=t[1];u.set=function(r){var t=Rt(this,e,n+" setter"),o=[];l(c,t,d.toWireType(o,r)),Lr(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,u),[]})),[]}))},_embind_register_emval:(e,r)=>{Jr(e,{name:r=Kr(r),fromWireType:e=>{var r=Ut.toValue(e);return Wt(e),r},toWireType:(e,r)=>Ut.toHandle(r),argPackAdvance:Qr,readValueFromPointer:Wr,destructorFunction:null})},_embind_register_enum:(e,r,t,n)=>{function o(){}r=Kr(r),o.values={},Jr(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:Qr,readValueFromPointer:Bt(r,t,n),destructorFunction:null}),wt(r,o)},_embind_register_enum_value:(e,r,t)=>{var n=zt(e,"enum");r=Kr(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:gt(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},_embind_register_float:(e,r,t)=>{Jr(e,{name:r=Kr(r),fromWireType:e=>e,toWireType:(e,r)=>{if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError(`Cannot convert ${Ht(r)} to ${this.name}`);return r},argPackAdvance:Qr,readValueFromPointer:Gt(r,t),destructorFunction:null})},_embind_register_function:(e,r,t,n,o,a,i)=>{var s=It(r,t);e=Kr(e),o=Ot(n,o),wt(e,(function(){$t(`Cannot call ${e} due to unbound types`,s)}),r-1),Vr([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Ft(e,Nt(e,n,null,o,a,i),r-1),[]}))},_embind_register_integer:(e,r,t,n,o)=>{r=Kr(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned"),l=(e,t)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${Ht(e)}" to ${t}`);if(e<n||e>o)throw new TypeError(`Passing a number "${Ht(e)}" from JS side to C/C++ side to an argument of type "${r}", which is outside the valid range [${n}, ${o}]!`)};Jr(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return l(r,this.name),r>>>0}:function(e,r){return l(r,this.name),r},argPackAdvance:Qr,readValueFromPointer:Yt(r,t,0!==n),destructorFunction:null})},_embind_register_memory_view:(e,r,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=s()[e>>2],n=s()[e+4>>2];return new o(t().buffer,n,r)}Jr(e,{name:n=Kr(n),fromWireType:a,argPackAdvance:Qr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:(e,r)=>{var t="std::string"===(r=Kr(r));Jr(e,{name:r,fromWireType(e){var r,o=s()[e>>2],a=e+4;if(t)for(var i=a,l=0;l<=o;++l){var c=a+l;if(l==o||0==n()[c]){var u=ir(i,c-i);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),i=c+1}}else{var d=new Array(o);for(l=0;l<o;++l)d[l]=String.fromCharCode(n()[a+l]);r=d.join("")}return xn(e),r},toWireType(e,r){var o;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Xr("Cannot pass non-string to std::string"),o=t&&a?Ve(r):r.length;var i=Nn(4+o+1),l=i+4;if(s()[i>>2]=o,Ne(o),t&&a)ar(r,l,o+1);else if(a)for(var c=0;c<o;++c){var u=r.charCodeAt(c);u>255&&(xn(l),Xr("String has UTF-16 code units that do not fit in 8 bits")),n()[l+c]=u}else for(c=0;c<o;++c)n()[l+c]=r[c];return null!==e&&e.push(xn,i),i},argPackAdvance:Qr,readValueFromPointer:Pt,destructorFunction(e){xn(e)}})},_embind_register_std_wstring:(e,r,t)=>{var n,o,i,l,c;t=Kr(t),2===r?(n=qt,o=Kt,l=Xt,i=()=>a(),c=1):4===r&&(n=Jt,o=Zt,l=Qt,i=()=>s(),c=2),Jr(e,{name:t,fromWireType:e=>{for(var t,o=s()[e>>2],a=i(),l=e+4,u=0;u<=o;++u){var d=e+4+u*r;if(u==o||0==a[d>>c]){var f=n(l,d-l);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),l=d+r}}return xn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Xr(`Cannot pass non-string to C++ string type ${t}`);var a=l(n),i=Nn(4+a+r);return s()[i>>2]=a>>c,o(n,i+4,a+r),null!==e&&e.push(xn,i),i},argPackAdvance:Qr,readValueFromPointer:Wr,destructorFunction(e){xn(e)}})},_embind_register_value_array:(e,r,t,n,o,a)=>{xr[e]={name:Kr(r),rawConstructor:Ot(t,n),rawDestructor:Ot(o,a),elements:[]}},_embind_register_value_array_element:(e,r,t,n,o,a,i,s,l)=>{xr[e].elements.push({getterReturnType:r,getter:Ot(t,n),getterContext:o,setterArgumentType:a,setter:Ot(i,s),setterContext:l})},_embind_register_value_object:(e,r,t,n,o,a)=>{qr[e]={name:Kr(r),rawConstructor:Ot(t,n),rawDestructor:Ot(o,a),fields:[]}},_embind_register_value_object_field:(e,r,t,n,o,a,i,s,l,c)=>{qr[e].fields.push({fieldName:Kr(r),getterReturnType:t,getter:Ot(n,o),getterContext:a,setterArgumentType:i,setter:Ot(s,l),setterContext:c})},_embind_register_void:(e,r)=>{Jr(e,{isVoid:!0,name:r=Kr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},_emscripten_get_now_is_monotonic:()=>true,_emscripten_notify_mailbox_postmessage:(e,r,t)=>{if(e==r)setTimeout((()=>tn()));else if(b)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=pr.pthreads[e];if(!n)return void I(`Cannot send message to thread with ID ${e}, unknown thread ID!`);n.postMessage({cmd:"checkMailbox"})}},_emscripten_receive_on_main_thread_js:(e,r,t,n)=>{on.length=t;for(var o=n>>3,a=0;a<t;a++)on[a]=l()[o+a];var i=Mn[e];q(i.length==t,"Call args mismatch in _emscripten_receive_on_main_thread_js"),pr.currentProxiedOperationCallerThread=r;var s=i.apply(null,on);return pr.currentProxiedOperationCallerThread=0,s},_emscripten_thread_mailbox_await:rn,_emscripten_thread_set_strongref:e=>{y&&pr.pthreads[e].ref()},_emval_decref:Wt,_emval_incref:e=>{e>4&&(Lt.get(e).refcount+=1)},_emval_take_value:(e,r)=>{var t=(e=zt(e,"_emval_take_value")).readValueFromPointer(r);return Ut.toHandle(t)},_localtime_js:function(e,r,t){var n=cn(e,r),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),Ne(o.getSeconds()),i()[t+4>>2]=o.getMinutes(),Ne(o.getMinutes()),i()[t+8>>2]=o.getHours(),Ne(o.getHours()),i()[t+12>>2]=o.getDate(),Ne(o.getDate()),i()[t+16>>2]=o.getMonth(),Ne(o.getMonth()),i()[t+20>>2]=o.getFullYear()-1900,Ne(o.getFullYear()-1900),i()[t+24>>2]=o.getDay(),Ne(o.getDay());var a=0|(e=>(an(e.getFullYear())?sn:ln)[e.getMonth()]+e.getDate()-1)(o);i()[t+28>>2]=a,Ne(a),i()[t+36>>2]=-60*o.getTimezoneOffset(),Ne(-60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),u=0|(l!=c&&o.getTimezoneOffset()==Math.min(c,l));i()[t+32>>2]=u,Ne(u)},_mmap_js:un,_munmap_js:dn,_tzset_js:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),l=o.getTimezoneOffset(),c=a.getTimezoneOffset(),u=Math.max(l,c);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}s()[e>>2]=60*u,Ne(60*u),i()[r>>2]=Number(l!=c),Ne(Number(l!=c));var f=d(o),h=d(a),p=hn(f),m=hn(h);c<l?(s()[t>>2]=p,Ne(p),s()[t+4>>2]=m,Ne(m)):(s()[t>>2]=m,Ne(m),s()[t+4>>2]=p,Ne(p))},abort:()=>{pe("native code called abort()")},emscripten_check_blocking_allowed:()=>{y||v||Tr("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},emscripten_date_now:()=>Date.now(),emscripten_exit_with_live_runtime:()=>{throw ne+=1,"unwind"},emscripten_get_now:fn,emscripten_resize_heap:e=>{var r=n().length;if((e>>>=0)<=r)return!1;var t=2147483648;if(e>t)return I(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var o,a,i=1;i<=4;i*=2){var s=r*(1+.2/i);s=Math.min(s,e+100663296);var l=Math.min(t,(o=Math.max(e,s))+((a=65536)-o%a)%a),c=fn(),u=pn(l);if(xe(`Heap resize call from ${r} to ${l} took ${fn()-c} msecs. Success: ${!!u}`),u)return!0}return I(`Failed to grow the heap from ${r} bytes to ${l} bytes, not enough memory!`),!1},environ_get:yn,environ_sizes_get:gn,exit:dr,fd_close:_n,fd_read:wn,fd_seek:En,fd_write:bn,invoke_dii:function(e,r,t){var n=Qn();try{return wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_diii:function(e,r,t,n){var o=Qn();try{return wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_fi:function(e,r){var t=Qn();try{return wr(e)(r)}catch(e){if(eo(t),!(e instanceof be))throw e;Kn(1,0)}},invoke_fii:function(e,r,t){var n=Qn();try{return wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_fiii:function(e,r,t,n){var o=Qn();try{return wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_i:function(e){var r=Qn();try{return wr(e)()}catch(e){if(eo(r),!(e instanceof be))throw e;Kn(1,0)}},invoke_idi:function(e,r,t){var n=Qn();try{return wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_ii:function(e,r){var t=Qn();try{return wr(e)(r)}catch(e){if(eo(t),!(e instanceof be))throw e;Kn(1,0)}},invoke_iid:function(e,r,t){var n=Qn();try{return wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_iii:function(e,r,t){var n=Qn();try{return wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiid:function(e,r,t,n){var o=Qn();try{return wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiii:function(e,r,t,n){var o=Qn();try{return wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiii:function(e,r,t,n,o){var a=Qn();try{return wr(e)(r,t,n,o)}catch(e){if(eo(a),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiid:function(e,r,t,n,o,a){var i=Qn();try{return wr(e)(r,t,n,o,a)}catch(e){if(eo(i),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiii:function(e,r,t,n,o,a){var i=Qn();try{return wr(e)(r,t,n,o,a)}catch(e){if(eo(i),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiii:function(e,r,t,n,o,a,i){var s=Qn();try{return wr(e)(r,t,n,o,a,i)}catch(e){if(eo(s),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiiii:function(e,r,t,n,o,a,i,s){var l=Qn();try{return wr(e)(r,t,n,o,a,i,s)}catch(e){if(eo(l),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=Qn();try{return wr(e)(r,t,n,o,a,i,s,l)}catch(e){if(eo(c),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u){var d=Qn();try{return wr(e)(r,t,n,o,a,i,s,l,c,u)}catch(e){if(eo(d),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d){var f=Qn();try{return wr(e)(r,t,n,o,a,i,s,l,c,u,d)}catch(e){if(eo(f),!(e instanceof be))throw e;Kn(1,0)}},invoke_iiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f){var h=Qn();try{return wr(e)(r,t,n,o,a,i,s,l,c,u,d,f)}catch(e){if(eo(h),!(e instanceof be))throw e;Kn(1,0)}},invoke_jiiii:function(e,r,t,n,o){var a=Qn();try{return uo(e,r,t,n,o)}catch(e){if(eo(a),!(e instanceof be))throw e;Kn(1,0)}},invoke_v:function(e){var r=Qn();try{wr(e)()}catch(e){if(eo(r),!(e instanceof be))throw e;Kn(1,0)}},invoke_vi:function(e,r){var t=Qn();try{wr(e)(r)}catch(e){if(eo(t),!(e instanceof be))throw e;Kn(1,0)}},invoke_vid:function(e,r,t){var n=Qn();try{wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_vidddddd:function(e,r,t,n,o,a,i,s){var l=Qn();try{wr(e)(r,t,n,o,a,i,s)}catch(e){if(eo(l),!(e instanceof be))throw e;Kn(1,0)}},invoke_vidi:function(e,r,t,n){var o=Qn();try{wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_vii:function(e,r,t){var n=Qn();try{wr(e)(r,t)}catch(e){if(eo(n),!(e instanceof be))throw e;Kn(1,0)}},invoke_viif:function(e,r,t,n){var o=Qn();try{wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_viii:function(e,r,t,n){var o=Qn();try{wr(e)(r,t,n)}catch(e){if(eo(o),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiii:function(e,r,t,n,o){var a=Qn();try{wr(e)(r,t,n,o)}catch(e){if(eo(a),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiidi:function(e,r,t,n,o,a,i){var s=Qn();try{wr(e)(r,t,n,o,a,i)}catch(e){if(eo(s),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiif:function(e,r,t,n,o,a){var i=Qn();try{wr(e)(r,t,n,o,a)}catch(e){if(eo(i),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiii:function(e,r,t,n,o,a){var i=Qn();try{wr(e)(r,t,n,o,a)}catch(e){if(eo(i),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiii:function(e,r,t,n,o,a,i){var s=Qn();try{wr(e)(r,t,n,o,a,i)}catch(e){if(eo(s),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiii:function(e,r,t,n,o,a,i,s){var l=Qn();try{wr(e)(r,t,n,o,a,i,s)}catch(e){if(eo(l),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=Qn();try{wr(e)(r,t,n,o,a,i,s,l)}catch(e){if(eo(c),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiiiii:function(e,r,t,n,o,a,i,s,l,c){var u=Qn();try{wr(e)(r,t,n,o,a,i,s,l,c)}catch(e){if(eo(u),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u){var d=Qn();try{wr(e)(r,t,n,o,a,i,s,l,c,u)}catch(e){if(eo(d),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f,h){var p=Qn();try{wr(e)(r,t,n,o,a,i,s,l,c,u,d,f,h)}catch(e){if(eo(p),!(e instanceof be))throw e;Kn(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f,h,p,m){var v=Qn();try{wr(e)(r,t,n,o,a,i,s,l,c,u,d,f,h,p,m)}catch(e){if(eo(v),!(e instanceof be))throw e;Kn(1,0)}},llvm_eh_typeid_for:e=>e,memory:N||d.wasmMemory,strftime_l:(e,r,t,n,o)=>Sn(e,r,t,n)},In=function(){var e={env:$n,wasi_snapshot_preview1:$n};function r(e,r){var t;return In=e.exports,Er(In._emscripten_tls_init),q(gr=In.__indirect_function_table,"table not found in wasm exports"),t=In.__wasm_call_ctors,ee.unshift(t),R=r,he("wasm-instantiate"),In}fe("wasm-instantiate");var t,n,o,a,i=d;if(d.instantiateWasm)try{return d.instantiateWasm(e,r)}catch(e){I(`Module.instantiateWasm callback failed with error: ${e}`),u(e)}return(t=M,n=me,o=e,a=function(e){q(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,r(e.instance,e.module)},t||"function"!=typeof WebAssembly.instantiateStreaming||_e(n)||we(n)||y||"function"!=typeof fetch?Se(n,o,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return I(`wasm streaming compile failed: ${e}`),I("falling back to ArrayBuffer instantiation"),Se(n,o,a)}))))).catch(u),{}}(),Nn=(Ee("__wasm_call_ctors"),Ee("__cxa_free_exception"),Ee("malloc")),Rn=Ee("__errno_location"),xn=d._free=Ee("free"),Ln=d._fflush=Ee("fflush"),Wn=(d.__emscripten_tls_init=Ee("_emscripten_tls_init"),d._pthread_self=()=>(Wn=d._pthread_self=In.pthread_self)()),jn=Ee("emscripten_builtin_memalign"),Un=Ee("__getTypeName"),Bn=(d.__embind_initialize_bindings=Ee("_embind_initialize_bindings"),d.__emscripten_thread_init=Ee("_emscripten_thread_init")),zn=(d.__emscripten_thread_crashed=Ee("_emscripten_thread_crashed"),Ee("emscripten_main_thread_process_queued_calls"),Ee("emscripten_main_runtime_thread_id"),()=>(zn=In.emscripten_stack_get_base)()),Hn=()=>(Hn=In.emscripten_stack_get_end)(),Gn=Ee("_emscripten_run_on_main_thread_js"),Yn=Ee("_emscripten_thread_free_data"),Vn=d.__emscripten_thread_exit=Ee("_emscripten_thread_exit"),qn=d.__emscripten_check_mailbox=Ee("_emscripten_check_mailbox"),Kn=Ee("setThrew"),Xn=Ee("setTempRet0"),Jn=()=>(Jn=In.emscripten_stack_init)(),Zn=(e,r)=>(Zn=In.emscripten_stack_set_limits)(e,r),Qn=Ee("stackSave"),eo=Ee("stackRestore"),ro=Ee("stackAlloc"),to=()=>(to=In.emscripten_stack_get_current)(),no=Ee("__cxa_decrement_exception_refcount"),oo=Ee("__cxa_increment_exception_refcount"),ao=Ee("__cxa_demangle"),io=d.___get_exception_message=Ee("__get_exception_message"),so=Ee("__cxa_can_catch"),lo=Ee("__cxa_is_pointer_type"),co=d.___set_stack_limits=Ee("__set_stack_limits"),uo=(d.dynCall_jii=Ee("dynCall_jii"),d.dynCall_viij=Ee("dynCall_viij"),d.dynCall_jiji=Ee("dynCall_jiji"),d.dynCall_viijii=Ee("dynCall_viijii"),d.dynCall_jiiii=Ee("dynCall_jiiii"));d.dynCall_iiiiij=Ee("dynCall_iiiiij"),d.dynCall_iiiiijj=Ee("dynCall_iiiiijj"),d.dynCall_iiiiiijj=Ee("dynCall_iiiiiijj");d.addRunDependency=fe,d.removeRunDependency=he,d.FS_createPath=lr.createPath,d.FS_createLazyFile=lr.createLazyFile,d.FS_createDevice=lr.createDevice,d.keepRuntimeAlive=oe,d.wasmMemory=N,d.ExitStatus=Le,d.FS_createPreloadedFile=lr.createPreloadedFile,d.FS=lr,d.FS_createDataFile=lr.createDataFile,d.FS_unlink=lr.unlink,d.PThread=pr;["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","runtimeKeepalivePop","safeSetTimeout","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","setMainLoop","getSocketFromFD","getSocketAddress","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","registerInheritedInstance","unregisterInheritedInstance","getStringOrSymbol","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_addMethodCaller"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var r="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",t=e;t.startsWith("_")||(t="$"+e),r+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+t+"')",Ae(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Tr(r)}}),Fe(e)}));var fo;function ho(){if(!(se>0)){if(b||(q(!b),Jn(),J()),b)return c(d),ae(),void startWorker(d);!function(){if(q(!b),d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)ie(d.preRun.shift());mr(Q)}(),se>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e(),Z())}function e(){fo||(fo=!0,d.calledRun=!0,V||(ae(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),q(!d._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(Z(),!b){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),re.unshift(e);var e;mr(re)}}()))}}if(["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","FS_createFolder","FS_createLink","FS_readFile","out","err","callMain","abort","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_U8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","setStackLimits","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","getExecutableName","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","wasmTable","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","wget","SYSCALLS","preloadPlugins","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","proxiedJSCallArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","heap32VectorToArray","requireRegisteredType","UnboundTypeError","PureVirtualError","GenericWireTypeSize","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","integerReadValueFromPointer","enumReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","readPointer","runDestructors","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_newers","emval_methodCallers","emval_registeredMethods","IDBFS"].forEach(Fe),ce=function e(){fo||ho(),fo||(ce=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();return ho(),r.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=createCCP4Module:"function"==typeof define&&define.amd&&define([],(()=>createCCP4Module));
package/types/index.d.ts CHANGED
@@ -13,6 +13,7 @@ declare global {
13
13
  }
14
14
  interface Window {
15
15
  CCP4Module: libcootApi.CCP4ModuleType;
16
+ cootModule: libcootApi.CCP4ModuleType;
16
17
  }
17
18
  }
18
19