@hpcc-js/wasm 1.19.1 → 1.20.0

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 (50) hide show
  1. package/bin/sfx-wasm.mjs +14 -6
  2. package/bin/sfx-wasm.mjs.map +1 -1
  3. package/dist/graphviz.es6.js +3 -0
  4. package/dist/graphviz.es6.js.map +1 -1
  5. package/dist/graphviz.js +3 -0
  6. package/dist/graphviz.js.map +1 -1
  7. package/dist/graphvizlib.wasm +0 -0
  8. package/dist/index.es6.js +4 -679
  9. package/dist/index.es6.js.map +1 -1
  10. package/dist/index.js +3 -679
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.min.js +1 -1
  13. package/dist/index.min.js.map +1 -1
  14. package/dist/index.node.es6.mjs +4 -679
  15. package/dist/index.node.es6.mjs.map +1 -1
  16. package/dist/index.node.js +3 -679
  17. package/dist/index.node.js.map +1 -1
  18. package/dist/sfx-graphviz.esm.js +890 -0
  19. package/dist/sfx-graphviz.esm.js.map +1 -0
  20. package/dist/sfx-graphviz.js +904 -0
  21. package/dist/sfx-graphviz.js.map +1 -0
  22. package/dist/sfx-graphviz.min.js +1 -0
  23. package/dist/sfx-graphviz.min.js.map +1 -0
  24. package/package.json +13 -3
  25. package/types/__tests__/browser-tests.d.ts +2 -0
  26. package/types/__tests__/browser-tests.d.ts.map +1 -0
  27. package/types/__tests__/index-common.d.ts +5 -0
  28. package/types/__tests__/index-common.d.ts.map +1 -0
  29. package/types/__tests__/index-node.d.ts +3 -0
  30. package/types/__tests__/index-node.d.ts.map +1 -0
  31. package/types/__tests__/index.d.ts +2 -4
  32. package/types/__tests__/index.d.ts.map +1 -1
  33. package/types/__tests__/node-tests.d.ts +2 -0
  34. package/types/__tests__/node-tests.d.ts.map +1 -0
  35. package/types/__tests__/worker-browser.d.ts +2 -0
  36. package/types/__tests__/worker-browser.d.ts.map +1 -0
  37. package/types/__tests__/worker-node.d.ts +2 -0
  38. package/types/__tests__/worker-node.d.ts.map +1 -0
  39. package/types/extract.d.ts.map +1 -1
  40. package/types/graphviz.d.ts.map +1 -1
  41. package/types/index-common.d.ts +0 -1
  42. package/types/index-common.d.ts.map +1 -1
  43. package/types/sfx-graphviz.d.ts +59 -0
  44. package/types/sfx-graphviz.d.ts.map +1 -0
  45. package/dist/extract.es6.js +0 -680
  46. package/dist/extract.es6.js.map +0 -1
  47. package/dist/extract.js +0 -690
  48. package/dist/extract.js.map +0 -1
  49. package/types/__tests__/worker.d.ts +0 -2
  50. package/types/__tests__/worker.d.ts.map +0 -1
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/wasm"]={})}(this,(function(t){"use strict";const r={doFetch:void 0,scriptDir:void 0};let e=globalThis.__hpcc_wasmFolder||void 0;function n(t){if(!arguments.length)return e;const r=e;return e=t,r}const o={};async function i(t,e,i,a){const s=`${function(t,r){for(;t.charAt(t.length-1)===r;)t=t.substring(0,t.length-1);return t}(i||n()||r.scriptDir||".","/")}/${function(t,r){for(;t.charAt(0)===r;)t=t.substring(1);return t}(`${e}.wasm`,"/")}`;return o[s]||(o[s]=async function(t,e,n){const o=t.default||t;return!n&&r.doFetch&&(n=await r.doFetch(e)),await o({wasmBinary:n,locateFile:(t,r)=>e})}(t,s,a)),o[s]}let a=globalThis.document?.currentScript?.src??"";const s=a.substring(0,a.replace(/[?#].*/,"").lastIndexOf("/")+1)+"../dist";var u=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o=Object.assign({},n);n.print||console.log.bind(console);var i,a,s=n.printErr||console.warn.bind(console);Object.assign(n,o),o=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(i=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var u,c,p=!1,f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,r){return t?function(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&f)return f.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(c,t,r):""}function _(t){u=t,n.HEAP8=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=new Int32Array(t),n.HEAPU8=c=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=new Float64Array(t)}n.INITIAL_MEMORY;var d,m,h=[],y=[],v=[],w=0,g=null;function E(t){n.onAbort&&n.onAbort(t),s(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function b(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){return t.startsWith("file://")}function k(t){try{if(t==d&&i)return new Uint8Array(i);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function A(t){for(;t.length>0;)t.shift()(n)}function C(t){try{return a.grow(t-u.byteLength+65535>>>16),_(a.buffer),1}catch(t){}}b(d="base91lib.wasm")||(m=d,d=n.locateFile?n.locateFile(m,""):""+m);var D={a:function(){E("")},b:function(t){var r,e,n=c.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),C(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1}};!function(){var t={a:D};function r(t,r){var e,o=t.exports;n.asm=o,_((a=n.asm.c).buffer),n.asm.p,e=n.asm.d,y.unshift(e),function(t){if(w--,n.monitorRunDependencies&&n.monitorRunDependencies(w),0==w&&g){var r=g;g=null,r()}}()}function o(t){r(t.instance)}function u(r){return Promise.resolve().then((function(){return k(d)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){s("failed to asynchronously prepare wasm: "+t),E(t)}))}if(w++,n.monitorRunDependencies&&n.monitorRunDependencies(w),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){s("Module.instantiateWasm callback failed with error: "+t),e(t)}(i||"function"!=typeof WebAssembly.instantiateStreaming||b(d)||S(d)||"function"!=typeof fetch?u(o):fetch(d,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(o,(function(t){return s("wasm streaming compile failed: "+t),s("falling back to ArrayBuffer instantiation"),u(o)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.d).apply(null,arguments)};var x,z=n._emscripten_bind_VoidPtr___destroy___0=function(){return(z=n._emscripten_bind_VoidPtr___destroy___0=n.asm.e).apply(null,arguments)},P=n._emscripten_bind_CBasE91_CBasE91_0=function(){return(P=n._emscripten_bind_CBasE91_CBasE91_0=n.asm.f).apply(null,arguments)},F=n._emscripten_bind_CBasE91_malloc_1=function(){return(F=n._emscripten_bind_CBasE91_malloc_1=n.asm.g).apply(null,arguments)},j=n._emscripten_bind_CBasE91_free_1=function(){return(j=n._emscripten_bind_CBasE91_free_1=n.asm.h).apply(null,arguments)},R=n._emscripten_bind_CBasE91_version_0=function(){return(R=n._emscripten_bind_CBasE91_version_0=n.asm.i).apply(null,arguments)},M=n._emscripten_bind_CBasE91_reset_0=function(){return(M=n._emscripten_bind_CBasE91_reset_0=n.asm.j).apply(null,arguments)},B=n._emscripten_bind_CBasE91_encode_3=function(){return(B=n._emscripten_bind_CBasE91_encode_3=n.asm.k).apply(null,arguments)},O=n._emscripten_bind_CBasE91_encode_end_1=function(){return(O=n._emscripten_bind_CBasE91_encode_end_1=n.asm.l).apply(null,arguments)},I=n._emscripten_bind_CBasE91_decode_3=function(){return(I=n._emscripten_bind_CBasE91_decode_3=n.asm.m).apply(null,arguments)},T=n._emscripten_bind_CBasE91_decode_end_1=function(){return(T=n._emscripten_bind_CBasE91_decode_end_1=n.asm.n).apply(null,arguments)},N=n._emscripten_bind_CBasE91___destroy___0=function(){return(N=n._emscripten_bind_CBasE91___destroy___0=n.asm.o).apply(null,arguments)};function L(t){function e(){x||(x=!0,n.calledRun=!0,p||(A(y),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),v.unshift(t);var t;A(v)}()))}w>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),h.unshift(t);var t;A(h)}(),w>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=1416,n.___stop_em_js=1514,g=function t(){x||L(),x||(g=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function U(){}function H(t){return(t||U).__cache__}function W(t,r){var e=H(r),n=e[t];return n||((n=Object.create((r||U).prototype)).ptr=t,e[t]=n)}function G(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Y(){this.ptr=P(),H(Y)[this.ptr]=this}return L(),U.prototype=Object.create(U.prototype),U.prototype.constructor=U,U.prototype.__class__=U,U.__cache__={},n.WrapperObject=U,n.getCache=H,n.wrapPointer=W,n.castObject=function(t,r){return W(t.ptr,r)},n.NULL=W(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete H(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__},G.prototype=Object.create(U.prototype),G.prototype.constructor=G,G.prototype.__class__=G,G.__cache__={},n.VoidPtr=G,G.prototype.__destroy__=G.prototype.__destroy__=function(){var t=this.ptr;z(t)},Y.prototype=Object.create(U.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},n.CBasE91=Y,Y.prototype.malloc=Y.prototype.malloc=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),F(r,t)},Y.prototype.free=Y.prototype.free=function(t){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),j(r,t)},Y.prototype.version=Y.prototype.version=function(){var t=this.ptr;return l(R(t))},Y.prototype.reset=Y.prototype.reset=function(){var t=this.ptr;M(t)},Y.prototype.encode=Y.prototype.encode=function(t,r,e){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),B(n,t,r,e)},Y.prototype.encode_end=Y.prototype.encode_end=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),O(r,t)},Y.prototype.decode=Y.prototype.decode=function(t,r,e){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),I(n,t,r,e)},Y.prototype.decode_end=Y.prototype.decode_end=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),T(r,t)},Y.prototype.__destroy__=Y.prototype.__destroy__=function(){var t=this.ptr;N(t)},t.ready}),c=Object.freeze({__proto__:null,default:u});class p{constructor(t,r){this._module=t,this._exports=r}malloc_heapu8(t){return{ptr:this._exports.malloc(t),size:t}}free_heapu8(t){this._exports.free(t.ptr)}uint8_heapu8(t){const r=this.malloc_heapu8(t.byteLength);return this._module.HEAPU8.set(t,r.ptr),r}heapu8_view(t){return this._module.HEAPU8.subarray(t.ptr,t.ptr+t.size)}heapu8_uint8(t){return new Uint8Array([...this.heapu8_view(t)])}string_heapu8(t){const r=Uint8Array.from(t,(t=>t.charCodeAt(0)));return this.uint8_heapu8(r)}heapu8_string(t){const r=Array.from({length:t.size});return this._module.HEAPU8.subarray(t.ptr,t.ptr+t.size).forEach(((t,e)=>{r[e]=String.fromCharCode(t)})),r.join("")}}let f;class l extends p{constructor(t){super(t,new t.CBasE91)}static load(t){return f||(f=i(c,"base91lib",t?.wasmFolder,t?.wasmBinary).then((t=>new l(t)))),f}version(){return this._exports.version()}encode(t){this._exports.reset();const r=this.uint8_heapu8(t),e=this.malloc_heapu8(r.size+Math.ceil(r.size/4));e.size=this._exports.encode(r.ptr,r.size,e.ptr);let n=this.heapu8_string(e);return e.size=this._exports.encode_end(e.ptr),n+=this.heapu8_string(e),this.free_heapu8(e),this.free_heapu8(r),n}decode(t){this._exports.reset();const r=this.string_heapu8(t),e=this.malloc_heapu8(r.size);e.size=this._exports.decode(r.ptr,r.size,e.ptr);let n=this.heapu8_uint8(e);return e.size=this._exports.decode_end(e.ptr),n=new Uint8Array([...n,...this.heapu8_view(e)]),this.free_heapu8(e),this.free_heapu8(r),n}}var _=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o,i,a=Object.assign({},n),s="./this.program",u=n.print||console.log.bind(console),c=n.printErr||console.warn.bind(console);Object.assign(n,a),a=null,n.arguments&&n.arguments,n.thisProgram&&(s=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(o=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&z("no native wasm support detected");var p=!1;function f(t,r){t||z(r)}var l,_,d,m,h,y,v="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&v)return v.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function g(t,r){return t?w(d,t,r):""}function E(t){l=t,n.HEAP8=_=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=m=new Int32Array(t),n.HEAPU8=d=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=h=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=y=new Float64Array(t)}n.INITIAL_MEMORY;var b,S,k=[],A=[],C=[],D=0,x=null;function z(t){n.onAbort&&n.onAbort(t),c(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function P(t){return t.startsWith("data:application/octet-stream;base64,")}function F(t){return t.startsWith("file://")}function j(t){try{if(t==b&&o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}P(b="expatlib.wasm")||(S=b,b=n.locateFile?n.locateFile(S,""):""+S);var R={11554:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";r.startElement()},11772:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";r.endElement()},11984:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";r.characterData()}};function M(t){for(;t.length>0;)t.shift()(n)}var B=[];function O(t){try{return i.grow(t-l.byteLength+65535>>>16),E(i.buffer),1}catch(t){}}var I={};function T(){if(!T.strings){var t={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",_:s||"./this.program"};for(var r in I)void 0===I[r]?delete t[r]:t[r]=I[r];var e=[];for(var r in t)e.push(r+"="+t[r]);T.strings=e}return T.strings}var N=[null,[],[]];function L(t,r){var e=N[t];0===r||10===r?((1===t?u:c)(w(e,0)),e.length=0):e.push(r)}var U={g:function(t,r,e,n){},c:function(){z("")},a:function(t,r,e){var n=function(t,r){var e;for(B.length=0,r>>=2;e=d[t++];)r+=105!=e&r,B.push(105==e?m[r]:y[r++>>1]),++r;return B}(r,e);return R[t].apply(null,n)},j:function(){return Date.now()},k:function(t,r,e){d.copyWithin(t,r,r+e)},e:function(t){var r,e,n=d.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),O(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1},h:function(t,r){var e=0;return T().forEach((function(n,o){var i=r+e;h[t+4*o>>2]=i,function(t,r,e){for(var n=0;n<t.length;++n)_[r++>>0]=t.charCodeAt(n);e||(_[r>>0]=0)}(n,i),e+=n.length+1})),0},i:function(t,r){var e=T();h[t>>2]=e.length;var n=0;return e.forEach((function(t){n+=t.length+1})),h[r>>2]=n,0},d:function(t){return 52},f:function(t,r,e,n){return 52},l:function(t,r,e,n,o){return 70},b:function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=h[r>>2],s=h[r+4>>2];r+=8;for(var u=0;u<s;u++)L(t,d[a+u]);o+=s}return h[n>>2]=o,0}};!function(){var t={a:U};function r(t,r){var e,o=t.exports;n.asm=o,E((i=n.asm.m).buffer),n.asm.G,e=n.asm.n,A.unshift(e),function(t){if(D--,n.monitorRunDependencies&&n.monitorRunDependencies(D),0==D&&x){var r=x;x=null,r()}}()}function a(t){r(t.instance)}function s(r){return Promise.resolve().then((function(){return j(b)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){c("failed to asynchronously prepare wasm: "+t),z(t)}))}if(D++,n.monitorRunDependencies&&n.monitorRunDependencies(D),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){c("Module.instantiateWasm callback failed with error: "+t),e(t)}(o||"function"!=typeof WebAssembly.instantiateStreaming||P(b)||F(b)||"function"!=typeof fetch?s(a):fetch(b,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(a,(function(t){return c("wasm streaming compile failed: "+t),c("falling back to ArrayBuffer instantiation"),s(a)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.n).apply(null,arguments)};var H,W=n._emscripten_bind_CExpat_CExpat_0=function(){return(W=n._emscripten_bind_CExpat_CExpat_0=n.asm.o).apply(null,arguments)},G=n._emscripten_bind_CExpat_version_0=function(){return(G=n._emscripten_bind_CExpat_version_0=n.asm.p).apply(null,arguments)},Y=n._emscripten_bind_CExpat_create_0=function(){return(Y=n._emscripten_bind_CExpat_create_0=n.asm.q).apply(null,arguments)},V=n._emscripten_bind_CExpat_destroy_0=function(){return(V=n._emscripten_bind_CExpat_destroy_0=n.asm.r).apply(null,arguments)},J=n._emscripten_bind_CExpat_parse_1=function(){return(J=n._emscripten_bind_CExpat_parse_1=n.asm.s).apply(null,arguments)},q=n._emscripten_bind_CExpat_tag_0=function(){return(q=n._emscripten_bind_CExpat_tag_0=n.asm.t).apply(null,arguments)},X=n._emscripten_bind_CExpat_attrs_0=function(){return(X=n._emscripten_bind_CExpat_attrs_0=n.asm.u).apply(null,arguments)},$=n._emscripten_bind_CExpat_content_0=function(){return($=n._emscripten_bind_CExpat_content_0=n.asm.v).apply(null,arguments)},K=n._emscripten_bind_CExpat_startElement_0=function(){return(K=n._emscripten_bind_CExpat_startElement_0=n.asm.w).apply(null,arguments)},Z=n._emscripten_bind_CExpat_endElement_0=function(){return(Z=n._emscripten_bind_CExpat_endElement_0=n.asm.x).apply(null,arguments)},Q=n._emscripten_bind_CExpat_characterData_0=function(){return(Q=n._emscripten_bind_CExpat_characterData_0=n.asm.y).apply(null,arguments)},tt=n._emscripten_bind_CExpat___destroy___0=function(){return(tt=n._emscripten_bind_CExpat___destroy___0=n.asm.z).apply(null,arguments)},rt=n._emscripten_bind_VoidPtr___destroy___0=function(){return(rt=n._emscripten_bind_VoidPtr___destroy___0=n.asm.A).apply(null,arguments)},et=n._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(et=n._emscripten_bind_CExpatJS_CExpatJS_0=n.asm.B).apply(null,arguments)},nt=n._emscripten_bind_CExpatJS_startElement_0=function(){return(nt=n._emscripten_bind_CExpatJS_startElement_0=n.asm.C).apply(null,arguments)},ot=n._emscripten_bind_CExpatJS_endElement_0=function(){return(ot=n._emscripten_bind_CExpatJS_endElement_0=n.asm.D).apply(null,arguments)},it=n._emscripten_bind_CExpatJS_characterData_0=function(){return(it=n._emscripten_bind_CExpatJS_characterData_0=n.asm.E).apply(null,arguments)},at=n._emscripten_bind_CExpatJS___destroy___0=function(){return(at=n._emscripten_bind_CExpatJS___destroy___0=n.asm.F).apply(null,arguments)};function st(t){function e(){H||(H=!0,n.calledRun=!0,p||(M(A),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),C.unshift(t);var t;M(C)}()))}D>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),k.unshift(t);var t;M(k)}(),D>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n._malloc=function(){return(n._malloc=n.asm.H).apply(null,arguments)},n.___start_em_js=11456,n.___stop_em_js=11554,x=function t(){H||st(),H||(x=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function ut(){}function ct(t){return(t||ut).__cache__}function pt(t,r){var e=ct(r),n=e[t];return n||((n=Object.create((r||ut).prototype)).ptr=t,e[t]=n)}st(),ut.prototype=Object.create(ut.prototype),ut.prototype.constructor=ut,ut.prototype.__class__=ut,ut.__cache__={},n.WrapperObject=ut,n.getCache=ct,n.wrapPointer=pt,n.castObject=function(t,r){return pt(t.ptr,r)},n.NULL=pt(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete ct(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__};var ft={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ft.needed){for(var t=0;t<ft.temps.length;t++)n._free(ft.temps[t]);ft.temps.length=0,n._free(ft.buffer),ft.buffer=0,ft.size+=ft.needed,ft.needed=0}ft.buffer||(ft.size+=128,ft.buffer=n._malloc(ft.size),f(ft.buffer)),ft.pos=0},alloc:function(t,r){f(ft.buffer);var e,o=r.BYTES_PER_ELEMENT,i=t.length*o;return i=i+7&-8,ft.pos+i>=ft.size?(f(i>0),ft.needed+=i,e=n._malloc(i),ft.temps.push(e)):(e=ft.buffer+ft.pos,ft.pos+=i),e},copy:function(t,r,e){switch(e>>>=0,r.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<t.length;n++)r[e+n]=t[n]}};function lt(t){if("string"==typeof t){var r=(n=t,a=i>0?i:function(t){for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++e):r+=3}return r}(n)+1,s=new Array(a),u=function(t,r,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(e>=i)break;r[e++]=s}else if(s<=2047){if(e+1>=i)break;r[e++]=192|s>>6,r[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;r[e++]=224|s>>12,r[e++]=128|s>>6&63,r[e++]=128|63&s}else{if(e+3>=i)break;r[e++]=240|s>>18,r[e++]=128|s>>12&63,r[e++]=128|s>>6&63,r[e++]=128|63&s}}return r[e]=0,e-o}(n,s,0,s.length),o&&(s.length=u),s),e=ft.alloc(r,_);return ft.copy(r,_,e),e}var n,o,i,a,s,u;return t}function _t(){this.ptr=W(),ct(_t)[this.ptr]=this}function dt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function mt(){this.ptr=et(),ct(mt)[this.ptr]=this}return _t.prototype=Object.create(ut.prototype),_t.prototype.constructor=_t,_t.prototype.__class__=_t,_t.__cache__={},n.CExpat=_t,_t.prototype.version=_t.prototype.version=function(){var t=this.ptr;return g(G(t))},_t.prototype.create=_t.prototype.create=function(){var t=this.ptr;return!!Y(t)},_t.prototype.destroy=_t.prototype.destroy=function(){var t=this.ptr;V(t)},_t.prototype.parse=_t.prototype.parse=function(t){var r=this.ptr;return ft.prepare(),t=t&&"object"==typeof t?t.ptr:lt(t),!!J(r,t)},_t.prototype.tag=_t.prototype.tag=function(){var t=this.ptr;return g(q(t))},_t.prototype.attrs=_t.prototype.attrs=function(){var t=this.ptr;return g(X(t))},_t.prototype.content=_t.prototype.content=function(){var t=this.ptr;return g($(t))},_t.prototype.startElement=_t.prototype.startElement=function(){var t=this.ptr;K(t)},_t.prototype.endElement=_t.prototype.endElement=function(){var t=this.ptr;Z(t)},_t.prototype.characterData=_t.prototype.characterData=function(){var t=this.ptr;Q(t)},_t.prototype.__destroy__=_t.prototype.__destroy__=function(){var t=this.ptr;tt(t)},dt.prototype=Object.create(ut.prototype),dt.prototype.constructor=dt,dt.prototype.__class__=dt,dt.__cache__={},n.VoidPtr=dt,dt.prototype.__destroy__=dt.prototype.__destroy__=function(){var t=this.ptr;rt(t)},mt.prototype=Object.create(_t.prototype),mt.prototype.constructor=mt,mt.prototype.__class__=mt,mt.__cache__={},n.CExpatJS=mt,mt.prototype.startElement=mt.prototype.startElement=function(){var t=this.ptr;nt(t)},mt.prototype.endElement=mt.prototype.endElement=function(){var t=this.ptr;ot(t)},mt.prototype.characterData=mt.prototype.characterData=function(){var t=this.ptr;it(t)},mt.prototype.__destroy__=mt.prototype.__destroy__=function(){var t=this.ptr;at(t)},t.ready}),d=Object.freeze({__proto__:null,default:_});class m{constructor(t,r){this.tag=t,this.attrs=r,this._content=""}get content(){return this._content}appendContent(t){this._content+=t}}function h(t,r,e,n){return i(d,"expatlib",e,n).then((e=>{const n=new e.CExpatJS;n.startElement=function(){r.startElement(this.tag(),function(t){const r={},e=t,n=`${String.fromCharCode(1)}`,o=`${n}${n}`;return e.split(o).filter((t=>!!t)).forEach((t=>{const e=t.split(n);r[e[0]]=e[1]})),r}(this.attrs()))},n.endElement=function(){r.endElement(this.tag())},n.characterData=function(){r.characterData(this.content())},n.create();const o=n.parse(t);return n.destroy(),e.destroy(n),o}))}var y=ArrayBuffer,v=Uint8Array,w=Uint16Array,g=Int16Array,E=Int32Array,b=function(t,r,e){if(v.prototype.slice)return v.prototype.slice.call(t,r,e);(null==r||r<0)&&(r=0),(null==e||e>t.length)&&(e=t.length);var n=new v(e-r);return n.set(t.subarray(r,e)),n},S=function(t,r,e,n){if(v.prototype.fill)return v.prototype.fill.call(t,r,e,n);for((null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);e<n;++e)t[e]=r;return t},k=function(t,r,e,n){if(v.prototype.copyWithin)return v.prototype.copyWithin.call(t,r,e,n);for((null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);e<n;)t[r++]=t[e++]},A=["invalid zstd data","window size too large (>2046MB)","invalid block type","FSE accuracy too high","match distance too far back","unexpected EOF"],C=function(t,r,e){var n=new Error(r||A[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,C),!e)throw n;return n},D=function(t,r,e){for(var n=0,o=0;n<e;++n)o|=t[r++]<<(n<<3);return o},x=function(t,r){var e,n,o=t[0]|t[1]<<8|t[2]<<16;if(3126568==o&&253==t[3]){var i=t[4],a=i>>5&1,s=i>>2&1,u=3&i,c=i>>6;8&i&&C(0);var p=6-a,f=3==u?4:u,l=D(t,p,f),_=c?1<<c:a,d=D(t,p+=f,_)+(1==c&&256),m=d;if(!a){var h=1<<10+(t[5]>>3);m=h+(h>>3)*(7&t[5])}m>2145386496&&C(1);var y=new v((1==r?d||m:r?0:m)+12);return y[0]=1,y[4]=4,y[8]=8,{b:p+_,y:0,l:0,d:l,w:r&&1!=r?r:y.subarray(12),e:m,o:new E(y.buffer,0,3),u:d,c:s,m:Math.min(131072,m)}}if(25481893==(o>>4|t[3]<<20))return 8+(((e=t)[n=4]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24)>>>0);C(0)},z=function(t){for(var r=0;1<<r<=t;++r);return r-1},P=function(t,r,e){var n=4+(r<<3),o=5+(15&t[r]);o>e&&C(3);for(var i=1<<o,a=i,s=-1,u=-1,c=-1,p=i,f=new y(512+(i<<2)),l=new g(f,0,256),_=new w(f,0,256),d=new w(f,512,i),m=512+(i<<1),h=new v(f,m,i),E=new v(f,m+i);s<255&&a>0;){var b=z(a+1),S=n>>3,k=(1<<b+1)-1,A=(t[S]|t[S+1]<<8|t[S+2]<<16)>>(7&n)&k,D=(1<<b)-1,x=k-a-1,P=A&D;if(P<x?(n+=b,A=P):(n+=b+1,A>D&&(A-=x)),l[++s]=--A,-1==A?(a+=A,h[--p]=s):a-=A,!A)do{var F=n>>3;u=(t[F]|t[F+1]<<8)>>(7&n)&3,n+=2,s+=u}while(3==u)}(s>255||a)&&C(0);for(var j=0,R=(i>>1)+(i>>3)+3,M=i-1,B=0;B<=s;++B){var O=l[B];if(O<1)_[B]=-O;else for(c=0;c<O;++c){h[j]=B;do{j=j+R&M}while(j>=p)}}for(j&&C(0),c=0;c<i;++c){var I=_[h[c]]++,T=E[c]=o-z(I);d[c]=(I<<T)-i}return[n+7>>3,{b:o,s:h,n:E,t:d}]},F=P(new v([81,16,99,140,49,198,24,99,12,33,196,24,99,102,102,134,70,146,4]),0,6)[1],j=P(new v([33,20,196,24,99,140,33,132,16,66,8,33,132,16,66,8,33,68,68,68,68,68,68,68,68,36,9]),0,6)[1],R=P(new v([32,132,16,66,102,70,68,68,68,68,36,73,2]),0,5)[1],M=function(t,r){for(var e=t.length,n=new E(e),o=0;o<e;++o)n[o]=r,r+=1<<t[o];return n},B=new v(new E([0,0,0,0,16843009,50528770,134678020,202050057,269422093]).buffer,0,36),O=M(B,0),I=new v(new E([0,0,0,0,0,0,0,0,16843009,50528770,117769220,185207048,252579084,16]).buffer,0,53),T=M(I,3),N=function(t,r,e){var n=t.length,o=r.length,i=t[n-1],a=(1<<e.b)-1,s=-e.b;i||C(0);for(var u=0,c=e.b,p=(n<<3)-8+z(i)-c,f=-1;p>s&&f<o;){var l=p>>3;u=(u<<c|(t[l]|t[l+1]<<8|t[l+2]<<16)>>(7&p))&a,r[++f]=e.s[u],p-=c=e.n[u]}p==s&&f+1==o||C(0)},L=function(t,r,e){var n=6,o=r.length+3>>2,i=o<<1,a=o+i;N(t.subarray(n,n+=t[0]|t[1]<<8),r.subarray(0,o),e),N(t.subarray(n,n+=t[2]|t[3]<<8),r.subarray(o,i),e),N(t.subarray(n,n+=t[4]|t[5]<<8),r.subarray(i,a),e),N(t.subarray(n),r.subarray(a),e)},U=function(t,r,e){var n,o=r.b,i=t[o],a=i>>1&3;r.l=1&i;var s=i>>3|t[o+1]<<5|t[o+2]<<13,u=(o+=3)+s;if(1==a){if(o>=t.length)return;return r.b=o+1,e?(S(e,t[o],r.y,r.y+=s),e):S(new v(s),t[o])}if(!(u>t.length)){if(0==a)return r.b=u,e?(e.set(t.subarray(o,u),r.y),r.y+=s,e):b(t,o,u);if(2==a){var c=t[o],p=3&c,f=c>>2&3,l=c>>4,_=0,d=0;p<2?1&f?l|=t[++o]<<4|(2&f&&t[++o]<<12):l=c>>3:(d=f,f<2?(l|=(63&t[++o])<<4,_=t[o]>>6|t[++o]<<2):2==f?(l|=t[++o]<<4|(3&t[++o])<<12,_=t[o]>>2|t[++o]<<6):(l|=t[++o]<<4|(63&t[++o])<<12,_=t[o]>>6|t[++o]<<2|t[++o]<<10)),++o;var m=e?e.subarray(r.y,r.y+r.m):new v(r.m),h=m.length-l;if(0==p)m.set(t.subarray(o,o+=l),h);else if(1==p)S(m,t[o++],h);else{var y=r.h;if(2==p){var g=function(t,r){var e=0,n=-1,o=new v(292),i=t[r],a=o.subarray(0,256),s=o.subarray(256,268),u=new w(o.buffer,268);if(i<128){var c=P(t,r+1,6),p=c[0],f=c[1],l=p<<3,_=t[r+=i];_||C(0);for(var d=0,m=0,h=f.b,y=h,g=(++r<<3)-8+z(_);!((g-=h)<l);){var E=g>>3;if(d+=(t[E]|t[E+1]<<8)>>(7&g)&(1<<h)-1,a[++n]=f.s[d],(g-=y)<l)break;m+=(t[E=g>>3]|t[E+1]<<8)>>(7&g)&(1<<y)-1,a[++n]=f.s[m],h=f.n[d],d=f.t[d],y=f.n[m],m=f.t[m]}++n>255&&C(0)}else{for(n=i-127;e<n;e+=2){var b=t[++r];a[e]=b>>4,a[e+1]=15&b}++r}var k=0;for(e=0;e<n;++e)(F=a[e])>11&&C(0),k+=F&&1<<F-1;var A=z(k)+1,D=1<<A,x=D-k;for(x&x-1&&C(0),a[n++]=z(x)+1,e=0;e<n;++e){var F=a[e];++s[a[e]=F&&A+1-F]}var j=new v(D<<1),R=j.subarray(0,D),M=j.subarray(D);for(u[A]=0,e=A;e>0;--e){var B=u[e];S(M,e,B,u[e-1]=B+s[e]*(1<<A-e))}for(u[0]!=D&&C(0),e=0;e<n;++e){var O=a[e];if(O){var I=u[O];S(R,e,I,u[O]=I+(1<<A-O))}}return[r,{n:M,b:A,s:R}]}(t,o);_+=o-(o=g[0]),r.h=y=g[1]}else y||C(0);(d?L:N)(t.subarray(o,o+=_),m.subarray(h),y)}var E=t[o++];if(E){255==E?E=32512+(t[o++]|t[o++]<<8):E>127&&(E=E-128<<8|t[o++]);var k=t[o++];3&k&&C(0);for(var A=[j,R,F],D=2;D>-1;--D){var x=k>>2+(D<<1)&3;if(1==x){var M=new v([0,0,t[o++]]);A[D]={s:M.subarray(2,3),n:M.subarray(0,1),t:new w(M.buffer,0,1),b:0}}else 2==x?(o=(n=P(t,o,9-(1&D)))[0],A[D]=n[1]):3==x&&(r.t||C(0),A[D]=r.t[D])}var U=r.t=A,H=U[0],W=U[1],G=U[2],Y=t[u-1];Y||C(0);var V=(u<<3)-8+z(Y)-G.b,J=V>>3,q=0,X=(t[J]|t[J+1]<<8)>>(7&V)&(1<<G.b)-1,$=(t[J=(V-=W.b)>>3]|t[J+1]<<8)>>(7&V)&(1<<W.b)-1,K=(t[J=(V-=H.b)>>3]|t[J+1]<<8)>>(7&V)&(1<<H.b)-1;for(++E;--E;){var Z=G.s[X],Q=G.n[X],tt=H.s[K],rt=H.n[K],et=W.s[$],nt=W.n[$],ot=1<<et,it=ot+((t[J=(V-=et)>>3]|t[J+1]<<8|t[J+2]<<16|t[J+3]<<24)>>>(7&V)&ot-1);J=(V-=I[tt])>>3;var at=T[tt]+((t[J]|t[J+1]<<8|t[J+2]<<16)>>(7&V)&(1<<I[tt])-1);J=(V-=B[Z])>>3;var st=O[Z]+((t[J]|t[J+1]<<8|t[J+2]<<16)>>(7&V)&(1<<B[Z])-1);if(J=(V-=Q)>>3,X=G.t[X]+((t[J]|t[J+1]<<8)>>(7&V)&(1<<Q)-1),J=(V-=rt)>>3,K=H.t[K]+((t[J]|t[J+1]<<8)>>(7&V)&(1<<rt)-1),J=(V-=nt)>>3,$=W.t[$]+((t[J]|t[J+1]<<8)>>(7&V)&(1<<nt)-1),it>3)r.o[2]=r.o[1],r.o[1]=r.o[0],r.o[0]=it-=3;else{var ut=it-(0!=st);ut?(it=3==ut?r.o[0]-1:r.o[ut],ut>1&&(r.o[2]=r.o[1]),r.o[1]=r.o[0],r.o[0]=it):it=r.o[0]}for(D=0;D<st;++D)m[q+D]=m[h+D];h+=st;var ct=(q+=st)-it;if(ct<0){var pt=-ct,ft=r.e+ct;pt>at&&(pt=at);for(D=0;D<pt;++D)m[q+D]=r.w[ft+D];q+=pt,at-=pt,ct=0}for(D=0;D<at;++D)m[q+D]=m[ct+D];q+=at}if(q!=h)for(;h<m.length;)m[q++]=m[h++];else q=m.length;e?r.y+=q:m=b(m,0,q)}else if(e){if(r.y+=l,h)for(D=0;D<l;++D)m[D]=m[h+D]}else h&&(m=b(m,h));return r.b=u,m}C(2)}};function H(t,r){for(var e=0,n=[],o=+!r,i=0;t.length;){var a=x(t,o||r);if("object"==typeof a){for(o?(r=null,a.w.length==a.u&&(n.push(r=a.w),i+=a.u)):(n.push(r),a.e=0);!a.l;){var s=U(t,a,r);s||C(5),r?a.e=a.y:(n.push(s),i+=s.length,k(a.w,0,s.length),a.w.set(s,a.w.length-s.length))}e=a.b+4*a.c}else e=a;t=t.subarray(e)}return function(t,r){if(1==t.length)return t[0];for(var e=new v(r),n=0,o=0;n<t.length;++n){var i=t[n];e.set(i,o),o+=i.length}return e}(n,i)}var W=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o,i=Object.assign({},n),a="./this.program",s=(t,r)=>{throw r},u=n.print||console.log.bind(console),c=n.printErr||console.warn.bind(console);Object.assign(n,i),i=null,n.arguments&&n.arguments,n.thisProgram&&(a=n.thisProgram),n.quit&&(s=n.quit),n.wasmBinary&&(o=n.wasmBinary);var p,f=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&T("no native wasm support detected");var l=!1;function _(t,r){t||T(r)}var d,m,h,y,v,w,g,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&E)return E.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function S(t,r){return t?b(h,t,r):""}function k(t,r,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(e>=i)break;r[e++]=s}else if(s<=2047){if(e+1>=i)break;r[e++]=192|s>>6,r[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;r[e++]=224|s>>12,r[e++]=128|s>>6&63,r[e++]=128|63&s}else{if(e+3>=i)break;r[e++]=240|s>>18,r[e++]=128|s>>12&63,r[e++]=128|s>>6&63,r[e++]=128|63&s}}return r[e]=0,e-o}function A(t){for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++e):r+=3}return r}function C(t){d=t,n.HEAP8=m=new Int8Array(t),n.HEAP16=y=new Int16Array(t),n.HEAP32=v=new Int32Array(t),n.HEAPU8=h=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=w=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=g=new Float64Array(t)}n.INITIAL_MEMORY;var D,x,z,P,F=[],j=[],R=[],M=0,B=null;function O(t){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function I(t){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&B){var r=B;B=null,r()}}function T(t){n.onAbort&&n.onAbort(t),c(t="Aborted("+t+")"),l=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function N(t){return t.startsWith("data:application/octet-stream;base64,")}function L(t){return t.startsWith("file://")}function U(t){try{if(t==D&&o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){T(t)}}N(D="graphvizlib.wasm")||(x=D,D=n.locateFile?n.locateFile(x,""):""+x);var H={175632:(t,r)=>{var e=S(t),n=S(r);Z.createPath("/",V.dirname(e)),Z.writeFile(V.join("/",e),n)}};function W(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function G(t){for(;t.length>0;)t.shift()(n)}function Y(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){w[this.ptr+4>>2]=t},this.get_type=function(){return w[this.ptr+4>>2]},this.set_destructor=function(t){w[this.ptr+8>>2]=t},this.get_destructor=function(){return w[this.ptr+8>>2]},this.set_refcount=function(t){v[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,m[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=m[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,m[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=m[this.ptr+13>>0]},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=v[this.ptr>>2];v[this.ptr>>2]=t+1},this.release_ref=function(){var t=v[this.ptr>>2];return v[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){w[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return w[this.ptr+16>>2]},this.get_exception_ptr=function(){if(At(this.get_type()))return w[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var V={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,r)=>{for(var e=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),e++):e&&(t.splice(n,1),e--)}if(r)for(;e;e--)t.unshift("..");return t},normalize:t=>{var r=V.isAbs(t),e="/"===t.substr(-1);return(t=V.normalizeArray(t.split("/").filter((t=>!!t)),!r).join("/"))||r||(t="."),t&&e&&(t+="/"),(r?"/":"")+t},dirname:t=>{var r=V.splitPath(t),e=r[0],n=r[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:t=>{if("/"===t)return"/";var r=(t=(t=V.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?t:t.substr(r+1)},join:function(){var t=Array.prototype.slice.call(arguments);return V.normalize(t.join("/"))},join2:(t,r)=>V.normalize(t+"/"+r)},J={resolve:function(){for(var t="",r=!1,e=arguments.length-1;e>=-1&&!r;e--){var n=e>=0?arguments[e]:Z.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,r=V.isAbs(n)}return(r?"/":"")+(t=V.normalizeArray(t.split("/").filter((t=>!!t)),!r).join("/"))||"."},relative:(t,r)=>{function e(t){for(var r=0;r<t.length&&""===t[r];r++);for(var e=t.length-1;e>=0&&""===t[e];e--);return r>e?[]:t.slice(r,e-r+1)}t=J.resolve(t).substr(1),r=J.resolve(r).substr(1);for(var n=e(t.split("/")),o=e(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}};function q(t,r,e){var n=e>0?e:A(t)+1,o=new Array(n),i=k(t,o,0,o.length);return r&&(o.length=i),o}var X={ttys:[],init:function(){},shutdown:function(){},register:function(t,r){X.ttys[t]={input:[],output:[],ops:r},Z.registerDevice(t,X.stream_ops)},stream_ops:{open:function(t){var r=X.ttys[t.node.rdev];if(!r)throw new Z.ErrnoError(43);t.tty=r,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,r,e,n,o){if(!t.tty||!t.tty.ops.get_char)throw new Z.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new Z.ErrnoError(29)}if(void 0===s&&0===i)throw new Z.ErrnoError(6);if(null==s)break;i++,r[e+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,r,e,n,o){if(!t.tty||!t.tty.ops.put_char)throw new Z.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,r[e+i])}catch(t){throw new Z.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;t.input=q(r,!0)}return t.input.shift()},put_char:function(t,r){null===r||10===r?(u(b(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},fsync:function(t){t.output&&t.output.length>0&&(u(b(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,r){null===r||10===r?(c(b(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},fsync:function(t){t.output&&t.output.length>0&&(c(b(t.output,0)),t.output=[])}}};function $(t){t=function(t,r){return Math.ceil(t/r)*r}(t,65536);var r=kt(65536,t);return r?function(t,r){return h.fill(0,t,t+r),t}(r,t):0}var K={ops_table:null,mount:function(t){return K.createNode(null,"/",16895,0)},createNode:function(t,r,e,n){if(Z.isBlkdev(e)||Z.isFIFO(e))throw new Z.ErrnoError(63);K.ops_table||(K.ops_table={dir:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,lookup:K.node_ops.lookup,mknod:K.node_ops.mknod,rename:K.node_ops.rename,unlink:K.node_ops.unlink,rmdir:K.node_ops.rmdir,readdir:K.node_ops.readdir,symlink:K.node_ops.symlink},stream:{llseek:K.stream_ops.llseek}},file:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:{llseek:K.stream_ops.llseek,read:K.stream_ops.read,write:K.stream_ops.write,allocate:K.stream_ops.allocate,mmap:K.stream_ops.mmap,msync:K.stream_ops.msync}},link:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,readlink:K.node_ops.readlink},stream:{}},chrdev:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:Z.chrdev_stream_ops}});var o=Z.createNode(t,r,e,n);return Z.isDir(o.mode)?(o.node_ops=K.ops_table.dir.node,o.stream_ops=K.ops_table.dir.stream,o.contents={}):Z.isFile(o.mode)?(o.node_ops=K.ops_table.file.node,o.stream_ops=K.ops_table.file.stream,o.usedBytes=0,o.contents=null):Z.isLink(o.mode)?(o.node_ops=K.ops_table.link.node,o.stream_ops=K.ops_table.link.stream):Z.isChrdev(o.mode)&&(o.node_ops=K.ops_table.chrdev.node,o.stream_ops=K.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[r]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,r){var e=t.contents?t.contents.length:0;if(!(e>=r)){r=Math.max(r,e*(e<1048576?2:1.125)>>>0),0!=e&&(r=Math.max(r,256));var n=t.contents;t.contents=new Uint8Array(r),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,r){if(t.usedBytes!=r)if(0==r)t.contents=null,t.usedBytes=0;else{var e=t.contents;t.contents=new Uint8Array(r),e&&t.contents.set(e.subarray(0,Math.min(r,t.usedBytes))),t.usedBytes=r}},node_ops:{getattr:function(t){var r={};return r.dev=Z.isChrdev(t.mode)?t.id:1,r.ino=t.id,r.mode=t.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=t.rdev,Z.isDir(t.mode)?r.size=4096:Z.isFile(t.mode)?r.size=t.usedBytes:Z.isLink(t.mode)?r.size=t.link.length:r.size=0,r.atime=new Date(t.timestamp),r.mtime=new Date(t.timestamp),r.ctime=new Date(t.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(t,r){void 0!==r.mode&&(t.mode=r.mode),void 0!==r.timestamp&&(t.timestamp=r.timestamp),void 0!==r.size&&K.resizeFileStorage(t,r.size)},lookup:function(t,r){throw Z.genericErrors[44]},mknod:function(t,r,e,n){return K.createNode(t,r,e,n)},rename:function(t,r,e){if(Z.isDir(t.mode)){var n;try{n=Z.lookupNode(r,e)}catch(t){}if(n)for(var o in n.contents)throw new Z.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=e,r.contents[e]=t,r.timestamp=t.parent.timestamp,t.parent=r},unlink:function(t,r){delete t.contents[r],t.timestamp=Date.now()},rmdir:function(t,r){var e=Z.lookupNode(t,r);for(var n in e.contents)throw new Z.ErrnoError(55);delete t.contents[r],t.timestamp=Date.now()},readdir:function(t){var r=[".",".."];for(var e in t.contents)t.contents.hasOwnProperty(e)&&r.push(e);return r},symlink:function(t,r,e){var n=K.createNode(t,r,41471,0);return n.link=e,n},readlink:function(t){if(!Z.isLink(t.mode))throw new Z.ErrnoError(28);return t.link}},stream_ops:{read:function(t,r,e,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)r.set(i.subarray(o,o+a),e);else for(var s=0;s<a;s++)r[e+s]=i[o+s];return a},write:function(t,r,e,n,o,i){if(r.buffer===m.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=r.subarray(e,e+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=r.slice(e,e+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(e,e+n),o),n}if(K.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(e,e+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=r[e+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,r,e){var n=r;if(1===e?n+=t.position:2===e&&Z.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new Z.ErrnoError(28);return n},allocate:function(t,r,e){K.expandFileStorage(t.node,r+e),t.node.usedBytes=Math.max(t.node.usedBytes,r+e)},mmap:function(t,r,e,n,o){if(!Z.isFile(t.node.mode))throw new Z.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==d){if((e>0||e+r<s.length)&&(s=s.subarray?s.subarray(e,e+r):Array.prototype.slice.call(s,e,e+r)),a=!0,!(i=$(r)))throw new Z.ErrnoError(48);m.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,r,e,n,o){return K.stream_ops.write(t,r,0,n,e,!1),0}}},Z={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,r={})=>{if(!(t=J.resolve(Z.cwd(),t)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new Z.ErrnoError(32);for(var e=V.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=Z.root,o="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&r.parent)break;if(n=Z.lookupNode(n,e[i]),o=V.join2(o,e[i]),Z.isMountpoint(n)&&(!a||a&&r.follow_mount)&&(n=n.mounted.root),!a||r.follow)for(var s=0;Z.isLink(n.mode);){var u=Z.readlink(o);if(o=J.resolve(V.dirname(o),u),n=Z.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Z.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var r;;){if(Z.isRoot(t)){var e=t.mount.mountpoint;return r?"/"!==e[e.length-1]?e+"/"+r:e+r:e}r=r?t.name+"/"+r:t.name,t=t.parent}},hashName:(t,r)=>{for(var e=0,n=0;n<r.length;n++)e=(e<<5)-e+r.charCodeAt(n)|0;return(t+e>>>0)%Z.nameTable.length},hashAddNode:t=>{var r=Z.hashName(t.parent.id,t.name);t.name_next=Z.nameTable[r],Z.nameTable[r]=t},hashRemoveNode:t=>{var r=Z.hashName(t.parent.id,t.name);if(Z.nameTable[r]===t)Z.nameTable[r]=t.name_next;else for(var e=Z.nameTable[r];e;){if(e.name_next===t){e.name_next=t.name_next;break}e=e.name_next}},lookupNode:(t,r)=>{var e=Z.mayLookup(t);if(e)throw new Z.ErrnoError(e,t);for(var n=Z.hashName(t.id,r),o=Z.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===r)return o}return Z.lookup(t,r)},createNode:(t,r,e,n)=>{var o=new Z.FSNode(t,r,e,n);return Z.hashAddNode(o),o},destroyNode:t=>{Z.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var r=Z.flagModes[t];if(void 0===r)throw new Error("Unknown file open mode: "+t);return r},flagsToPermissionString:t=>{var r=["r","w","rw"][3&t];return 512&t&&(r+="w"),r},nodePermissions:(t,r)=>Z.ignorePermissions||(!r.includes("r")||292&t.mode)&&(!r.includes("w")||146&t.mode)&&(!r.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var r=Z.nodePermissions(t,"x");return r||(t.node_ops.lookup?0:2)},mayCreate:(t,r)=>{try{return Z.lookupNode(t,r),20}catch(t){}return Z.nodePermissions(t,"wx")},mayDelete:(t,r,e)=>{var n;try{n=Z.lookupNode(t,r)}catch(t){return t.errno}var o=Z.nodePermissions(t,"wx");if(o)return o;if(e){if(!Z.isDir(n.mode))return 54;if(Z.isRoot(n)||Z.getPath(n)===Z.cwd())return 10}else if(Z.isDir(n.mode))return 31;return 0},mayOpen:(t,r)=>t?Z.isLink(t.mode)?32:Z.isDir(t.mode)&&("r"!==Z.flagsToPermissionString(r)||512&r)?31:Z.nodePermissions(t,Z.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,r=Z.MAX_OPEN_FDS)=>{for(var e=t;e<=r;e++)if(!Z.streams[e])return e;throw new Z.ErrnoError(33)},getStream:t=>Z.streams[t],createStream:(t,r,e)=>{Z.FSStream||(Z.FSStream=function(){this.shared={}},Z.FSStream.prototype={},Object.defineProperties(Z.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Z.FSStream,t);var n=Z.nextfd(r,e);return t.fd=n,Z.streams[n]=t,t},closeStream:t=>{Z.streams[t]=null},chrdev_stream_ops:{open:t=>{var r=Z.getDevice(t.node.rdev);t.stream_ops=r.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new Z.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,r)=>t<<8|r,registerDevice:(t,r)=>{Z.devices[t]={stream_ops:r}},getDevice:t=>Z.devices[t],getMounts:t=>{for(var r=[],e=[t];e.length;){var n=e.pop();r.push(n),e.push.apply(e,n.mounts)}return r},syncfs:(t,r)=>{"function"==typeof t&&(r=t,t=!1),Z.syncFSRequests++,Z.syncFSRequests>1&&c("warning: "+Z.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Z.getMounts(Z.root.mount),n=0;function o(t){return Z.syncFSRequests--,r(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=e.length&&o(null)}e.forEach((r=>{if(!r.type.syncfs)return i(null);r.type.syncfs(r,t,i)}))},mount:(t,r,e)=>{var n,o="/"===e,i=!e;if(o&&Z.root)throw new Z.ErrnoError(10);if(!o&&!i){var a=Z.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,Z.isMountpoint(n))throw new Z.ErrnoError(10);if(!Z.isDir(n.mode))throw new Z.ErrnoError(54)}var s={type:t,opts:r,mountpoint:e,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?Z.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var r=Z.lookupPath(t,{follow_mount:!1});if(!Z.isMountpoint(r.node))throw new Z.ErrnoError(28);var e=r.node,n=e.mounted,o=Z.getMounts(n);Object.keys(Z.nameTable).forEach((t=>{for(var r=Z.nameTable[t];r;){var e=r.name_next;o.includes(r.mount)&&Z.destroyNode(r),r=e}})),e.mounted=null;var i=e.mount.mounts.indexOf(n);e.mount.mounts.splice(i,1)},lookup:(t,r)=>t.node_ops.lookup(t,r),mknod:(t,r,e)=>{var n=Z.lookupPath(t,{parent:!0}).node,o=V.basename(t);if(!o||"."===o||".."===o)throw new Z.ErrnoError(28);var i=Z.mayCreate(n,o);if(i)throw new Z.ErrnoError(i);if(!n.node_ops.mknod)throw new Z.ErrnoError(63);return n.node_ops.mknod(n,o,r,e)},create:(t,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Z.mknod(t,r,0)),mkdir:(t,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Z.mknod(t,r,0)),mkdirTree:(t,r)=>{for(var e=t.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Z.mkdir(n,r)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,r,e)=>(void 0===e&&(e=r,r=438),r|=8192,Z.mknod(t,r,e)),symlink:(t,r)=>{if(!J.resolve(t))throw new Z.ErrnoError(44);var e=Z.lookupPath(r,{parent:!0}).node;if(!e)throw new Z.ErrnoError(44);var n=V.basename(r),o=Z.mayCreate(e,n);if(o)throw new Z.ErrnoError(o);if(!e.node_ops.symlink)throw new Z.ErrnoError(63);return e.node_ops.symlink(e,n,t)},rename:(t,r)=>{var e,n,o=V.dirname(t),i=V.dirname(r),a=V.basename(t),s=V.basename(r);if(e=Z.lookupPath(t,{parent:!0}).node,n=Z.lookupPath(r,{parent:!0}).node,!e||!n)throw new Z.ErrnoError(44);if(e.mount!==n.mount)throw new Z.ErrnoError(75);var u,c=Z.lookupNode(e,a),p=J.relative(t,i);if("."!==p.charAt(0))throw new Z.ErrnoError(28);if("."!==(p=J.relative(r,o)).charAt(0))throw new Z.ErrnoError(55);try{u=Z.lookupNode(n,s)}catch(t){}if(c!==u){var f=Z.isDir(c.mode),l=Z.mayDelete(e,a,f);if(l)throw new Z.ErrnoError(l);if(l=u?Z.mayDelete(n,s,f):Z.mayCreate(n,s))throw new Z.ErrnoError(l);if(!e.node_ops.rename)throw new Z.ErrnoError(63);if(Z.isMountpoint(c)||u&&Z.isMountpoint(u))throw new Z.ErrnoError(10);if(n!==e&&(l=Z.nodePermissions(e,"w")))throw new Z.ErrnoError(l);Z.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(t){throw t}finally{Z.hashAddNode(c)}}},rmdir:t=>{var r=Z.lookupPath(t,{parent:!0}).node,e=V.basename(t),n=Z.lookupNode(r,e),o=Z.mayDelete(r,e,!0);if(o)throw new Z.ErrnoError(o);if(!r.node_ops.rmdir)throw new Z.ErrnoError(63);if(Z.isMountpoint(n))throw new Z.ErrnoError(10);r.node_ops.rmdir(r,e),Z.destroyNode(n)},readdir:t=>{var r=Z.lookupPath(t,{follow:!0}).node;if(!r.node_ops.readdir)throw new Z.ErrnoError(54);return r.node_ops.readdir(r)},unlink:t=>{var r=Z.lookupPath(t,{parent:!0}).node;if(!r)throw new Z.ErrnoError(44);var e=V.basename(t),n=Z.lookupNode(r,e),o=Z.mayDelete(r,e,!1);if(o)throw new Z.ErrnoError(o);if(!r.node_ops.unlink)throw new Z.ErrnoError(63);if(Z.isMountpoint(n))throw new Z.ErrnoError(10);r.node_ops.unlink(r,e),Z.destroyNode(n)},readlink:t=>{var r=Z.lookupPath(t).node;if(!r)throw new Z.ErrnoError(44);if(!r.node_ops.readlink)throw new Z.ErrnoError(28);return J.resolve(Z.getPath(r.parent),r.node_ops.readlink(r))},stat:(t,r)=>{var e=Z.lookupPath(t,{follow:!r}).node;if(!e)throw new Z.ErrnoError(44);if(!e.node_ops.getattr)throw new Z.ErrnoError(63);return e.node_ops.getattr(e)},lstat:t=>Z.stat(t,!0),chmod:(t,r,e)=>{var n;if(!(n="string"==typeof t?Z.lookupPath(t,{follow:!e}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,r)=>{Z.chmod(t,r,!0)},fchmod:(t,r)=>{var e=Z.getStream(t);if(!e)throw new Z.ErrnoError(8);Z.chmod(e.node,r)},chown:(t,r,e,n)=>{var o;if(!(o="string"==typeof t?Z.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,r,e)=>{Z.chown(t,r,e,!0)},fchown:(t,r,e)=>{var n=Z.getStream(t);if(!n)throw new Z.ErrnoError(8);Z.chown(n.node,r,e)},truncate:(t,r)=>{if(r<0)throw new Z.ErrnoError(28);var e;if(!(e="string"==typeof t?Z.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);if(Z.isDir(e.mode))throw new Z.ErrnoError(31);if(!Z.isFile(e.mode))throw new Z.ErrnoError(28);var n=Z.nodePermissions(e,"w");if(n)throw new Z.ErrnoError(n);e.node_ops.setattr(e,{size:r,timestamp:Date.now()})},ftruncate:(t,r)=>{var e=Z.getStream(t);if(!e)throw new Z.ErrnoError(8);if(0==(2097155&e.flags))throw new Z.ErrnoError(28);Z.truncate(e.node,r)},utime:(t,r,e)=>{var n=Z.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,e)})},open:(t,r,e)=>{if(""===t)throw new Z.ErrnoError(44);var o;if(e=void 0===e?438:e,e=64&(r="string"==typeof r?Z.modeStringToFlags(r):r)?4095&e|32768:0,"object"==typeof t)o=t;else{t=V.normalize(t);try{o=Z.lookupPath(t,{follow:!(131072&r)}).node}catch(t){}}var i=!1;if(64&r)if(o){if(128&r)throw new Z.ErrnoError(20)}else o=Z.mknod(t,e,0),i=!0;if(!o)throw new Z.ErrnoError(44);if(Z.isChrdev(o.mode)&&(r&=-513),65536&r&&!Z.isDir(o.mode))throw new Z.ErrnoError(54);if(!i){var a=Z.mayOpen(o,r);if(a)throw new Z.ErrnoError(a)}512&r&&!i&&Z.truncate(o,0),r&=-131713;var s=Z.createStream({node:o,path:Z.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(Z.readFiles||(Z.readFiles={}),t in Z.readFiles||(Z.readFiles[t]=1)),s},close:t=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{Z.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,r,e)=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Z.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Z.ErrnoError(28);return t.position=t.stream_ops.llseek(t,r,e),t.ungotten=[],t.position},read:(t,r,e,n,o)=>{if(n<0||o<0)throw new Z.ErrnoError(28);if(Z.isClosed(t))throw new Z.ErrnoError(8);if(1==(2097155&t.flags))throw new Z.ErrnoError(8);if(Z.isDir(t.node.mode))throw new Z.ErrnoError(31);if(!t.stream_ops.read)throw new Z.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new Z.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,r,e,n,o);return i||(t.position+=a),a},write:(t,r,e,n,o,i)=>{if(n<0||o<0)throw new Z.ErrnoError(28);if(Z.isClosed(t))throw new Z.ErrnoError(8);if(0==(2097155&t.flags))throw new Z.ErrnoError(8);if(Z.isDir(t.node.mode))throw new Z.ErrnoError(31);if(!t.stream_ops.write)throw new Z.ErrnoError(28);t.seekable&&1024&t.flags&&Z.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new Z.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,r,e,n,o,i);return a||(t.position+=s),s},allocate:(t,r,e)=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);if(r<0||e<=0)throw new Z.ErrnoError(28);if(0==(2097155&t.flags))throw new Z.ErrnoError(8);if(!Z.isFile(t.node.mode)&&!Z.isDir(t.node.mode))throw new Z.ErrnoError(43);if(!t.stream_ops.allocate)throw new Z.ErrnoError(138);t.stream_ops.allocate(t,r,e)},mmap:(t,r,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new Z.ErrnoError(2);if(1==(2097155&t.flags))throw new Z.ErrnoError(2);if(!t.stream_ops.mmap)throw new Z.ErrnoError(43);return t.stream_ops.mmap(t,r,e,n,o)},msync:(t,r,e,n,o)=>t.stream_ops.msync?t.stream_ops.msync(t,r,e,n,o):0,munmap:t=>0,ioctl:(t,r,e)=>{if(!t.stream_ops.ioctl)throw new Z.ErrnoError(59);return t.stream_ops.ioctl(t,r,e)},readFile:(t,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 e,n=Z.open(t,r.flags),o=Z.stat(t).size,i=new Uint8Array(o);return Z.read(n,i,0,o,0),"utf8"===r.encoding?e=b(i,0):"binary"===r.encoding&&(e=i),Z.close(n),e},writeFile:(t,r,e={})=>{e.flags=e.flags||577;var n=Z.open(t,e.flags,e.mode);if("string"==typeof r){var o=new Uint8Array(A(r)+1),i=k(r,o,0,o.length);Z.write(n,o,0,i,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Z.write(n,r,0,r.byteLength,void 0,e.canOwn)}Z.close(n)},cwd:()=>Z.currentPath,chdir:t=>{var r=Z.lookupPath(t,{follow:!0});if(null===r.node)throw new Z.ErrnoError(44);if(!Z.isDir(r.node.mode))throw new Z.ErrnoError(54);var e=Z.nodePermissions(r.node,"x");if(e)throw new Z.ErrnoError(e);Z.currentPath=r.path},createDefaultDirectories:()=>{Z.mkdir("/tmp"),Z.mkdir("/home"),Z.mkdir("/home/web_user")},createDefaultDevices:()=>{Z.mkdir("/dev"),Z.registerDevice(Z.makedev(1,3),{read:()=>0,write:(t,r,e,n,o)=>n}),Z.mkdev("/dev/null",Z.makedev(1,3)),X.register(Z.makedev(5,0),X.default_tty_ops),X.register(Z.makedev(6,0),X.default_tty1_ops),Z.mkdev("/dev/tty",Z.makedev(5,0)),Z.mkdev("/dev/tty1",Z.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return()=>(crypto.getRandomValues(t),t[0])}return()=>T("randomDevice")}();Z.createDevice("/dev","random",t),Z.createDevice("/dev","urandom",t),Z.mkdir("/dev/shm"),Z.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Z.mkdir("/proc");var t=Z.mkdir("/proc/self");Z.mkdir("/proc/self/fd"),Z.mount({mount:()=>{var r=Z.createNode(t,"fd",16895,73);return r.node_ops={lookup:(t,r)=>{var e=+r,n=Z.getStream(e);if(!n)throw new Z.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{n.stdin?Z.createDevice("/dev","stdin",n.stdin):Z.symlink("/dev/tty","/dev/stdin"),n.stdout?Z.createDevice("/dev","stdout",null,n.stdout):Z.symlink("/dev/tty","/dev/stdout"),n.stderr?Z.createDevice("/dev","stderr",null,n.stderr):Z.symlink("/dev/tty1","/dev/stderr"),Z.open("/dev/stdin",0),Z.open("/dev/stdout",1),Z.open("/dev/stderr",1)},ensureErrnoError:()=>{Z.ErrnoError||(Z.ErrnoError=function(t,r){this.node=r,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},Z.ErrnoError.prototype=new Error,Z.ErrnoError.prototype.constructor=Z.ErrnoError,[44].forEach((t=>{Z.genericErrors[t]=new Z.ErrnoError(t),Z.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{Z.ensureErrnoError(),Z.nameTable=new Array(4096),Z.mount(K,{},"/"),Z.createDefaultDirectories(),Z.createDefaultDevices(),Z.createSpecialDirectories(),Z.filesystems={MEMFS:K}},init:(t,r,e)=>{Z.init.initialized=!0,Z.ensureErrnoError(),n.stdin=t||n.stdin,n.stdout=r||n.stdout,n.stderr=e||n.stderr,Z.createStandardStreams()},quit:()=>{Z.init.initialized=!1;for(var t=0;t<Z.streams.length;t++){var r=Z.streams[t];r&&Z.close(r)}},getMode:(t,r)=>{var e=0;return t&&(e|=365),r&&(e|=146),e},findObject:(t,r)=>{var e=Z.analyzePath(t,r);return e.exists?e.object:null},analyzePath:(t,r)=>{try{t=(n=Z.lookupPath(t,{follow:!r})).path}catch(t){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Z.lookupPath(t,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=V.basename(t),n=Z.lookupPath(t,{follow:!r}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(t){e.error=t.errno}return e},createPath:(t,r,e,n)=>{t="string"==typeof t?t:Z.getPath(t);for(var o=r.split("/").reverse();o.length;){var i=o.pop();if(i){var a=V.join2(t,i);try{Z.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,r,e,n,o)=>{var i=V.join2("string"==typeof t?t:Z.getPath(t),r),a=Z.getMode(n,o);return Z.create(i,a)},createDataFile:(t,r,e,n,o,i)=>{var a=r;t&&(t="string"==typeof t?t:Z.getPath(t),a=r?V.join2(t,r):t);var s=Z.getMode(n,o),u=Z.create(a,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),p=0,f=e.length;p<f;++p)c[p]=e.charCodeAt(p);e=c}Z.chmod(u,146|s);var l=Z.open(u,577);Z.write(l,e,0,e.length,0,i),Z.close(l),Z.chmod(u,s)}return u},createDevice:(t,r,e,n)=>{var o=V.join2("string"==typeof t?t:Z.getPath(t),r),i=Z.getMode(!!e,!!n);Z.createDevice.major||(Z.createDevice.major=64);var a=Z.makedev(Z.createDevice.major++,0);return Z.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,r,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=e()}catch(t){throw new Z.ErrnoError(29)}if(void 0===u&&0===a)throw new Z.ErrnoError(6);if(null==u)break;a++,r[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,r,e,o,i)=>{for(var a=0;a<o;a++)try{n(r[e+a])}catch(t){throw new Z.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),Z.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;throw"undefined"!=typeof XMLHttpRequest?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."):new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(t,r,e,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var r=t%this.chunkSize,e=t/this.chunkSize|0;return this.getter(e)[r]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",e,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+e+". Status: "+t.status);var r,n=Number(t.getResponseHeader("Content-length")),o=(r=t.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=t.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var r=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,r)=>{if(t>r)throw new Error("invalid range ("+t+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):q(o.responseText||"",!0)})(r,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:e},s=Z.createFile(t,r,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var c={};function p(t,r,e,n,o){var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)r[e+s]=i[o+s];else for(s=0;s<a;s++)r[e+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((t=>{var r=s.stream_ops[t];c[t]=function(){return Z.forceLoadFile(s),r.apply(null,arguments)}})),c.read=(t,r,e,n,o)=>(Z.forceLoadFile(s),p(t,r,e,n,o)),c.mmap=(t,r,e,n,o)=>{Z.forceLoadFile(s);var i=$(r);if(!i)throw new Z.ErrnoError(48);return p(t,m,i,r,e),{ptr:i,allocated:!0}},s.stream_ops=c,s},createPreloadedFile:(t,r,e,n,o,i,a,s,u,c)=>{var p=r?J.resolve(V.join2(t,r)):t;function f(e){function f(e){c&&c(),s||Z.createDataFile(t,r,e,n,o,u),i&&i(),I()}Browser.handledByPreloadPlugin(e,p,f,(()=>{a&&a(),I()}))||f(e)}O(),"string"==typeof e?function(t,r,e,n){var o=n?"":"al "+t;(void 0)(t,(e=>{_(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),r(new Uint8Array(e)),o&&I()}),(r=>{if(!e)throw'Loading data file "'+t+'" failed.';e()})),o&&O()}(e,(t=>f(t)),a):f(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,r,e)=>{r=r||(()=>{}),e=e||(()=>{});var n=Z.indexedDB();try{var o=n.open(Z.DB_NAME(),Z.DB_VERSION)}catch(t){return e(t)}o.onupgradeneeded=()=>{u("creating db"),o.result.createObjectStore(Z.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Z.DB_STORE_NAME],"readwrite"),i=n.objectStore(Z.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?r():e()}t.forEach((t=>{var r=i.put(Z.analyzePath(t).object.contents,t);r.onsuccess=()=>{++a+s==u&&c()},r.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(t,r,e)=>{r=r||(()=>{}),e=e||(()=>{});var n=Z.indexedDB();try{var o=n.open(Z.DB_NAME(),Z.DB_VERSION)}catch(t){return e(t)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Z.DB_STORE_NAME],"readonly")}catch(t){return void e(t)}var a=i.objectStore(Z.DB_STORE_NAME),s=0,u=0,c=t.length;function p(){0==u?r():e()}t.forEach((t=>{var r=a.get(t);r.onsuccess=()=>{Z.analyzePath(t).exists&&Z.unlink(t),Z.createDataFile(V.dirname(t),V.basename(t),r.result,!0,!0,!0),++s+u==c&&p()},r.onerror=()=>{u++,s+u==c&&p()}})),i.onerror=e},o.onerror=e}},Q={DEFAULT_POLLMASK:5,calculateAt:function(t,r,e){if(V.isAbs(r))return r;var n;if(n=-100===t?Z.cwd():Q.getStreamFromFD(t).path,0==r.length){if(!e)throw new Z.ErrnoError(44);return n}return V.join2(n,r)},doStat:function(t,r,e){try{var n=t(r)}catch(t){if(t&&t.node&&V.normalize(r)!==V.normalize(Z.getPath(t.node)))return-54;throw t}return v[e>>2]=n.dev,v[e+8>>2]=n.ino,v[e+12>>2]=n.mode,w[e+16>>2]=n.nlink,v[e+20>>2]=n.uid,v[e+24>>2]=n.gid,v[e+28>>2]=n.rdev,P=[n.size>>>0,(z=n.size,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+40>>2]=P[0],v[e+44>>2]=P[1],v[e+48>>2]=4096,v[e+52>>2]=n.blocks,P=[Math.floor(n.atime.getTime()/1e3)>>>0,(z=Math.floor(n.atime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+56>>2]=P[0],v[e+60>>2]=P[1],w[e+64>>2]=0,P=[Math.floor(n.mtime.getTime()/1e3)>>>0,(z=Math.floor(n.mtime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+72>>2]=P[0],v[e+76>>2]=P[1],w[e+80>>2]=0,P=[Math.floor(n.ctime.getTime()/1e3)>>>0,(z=Math.floor(n.ctime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+88>>2]=P[0],v[e+92>>2]=P[1],w[e+96>>2]=0,P=[n.ino>>>0,(z=n.ino,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+104>>2]=P[0],v[e+108>>2]=P[1],0},doMsync:function(t,r,e,n,o){if(!Z.isFile(r.node.mode))throw new Z.ErrnoError(43);if(2&n)return 0;var i=h.slice(t,t+e);Z.msync(r,i,o,e,n)},varargs:void 0,get:function(){return Q.varargs+=4,v[Q.varargs-4>>2]},getStr:function(t){return S(t)},getStreamFromFD:function(t){var r=Z.getStream(t);if(!r)throw new Z.ErrnoError(8);return r}},tt=[];function rt(t){try{return p.grow(t-d.byteLength+65535>>>16),C(p.buffer),1}catch(t){}}var et={};function nt(){if(!nt.strings){var t={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",_:a||"./this.program"};for(var r in et)void 0===et[r]?delete t[r]:t[r]=et[r];var e=[];for(var r in t)e.push(r+"="+t[r]);nt.strings=e}return nt.strings}function ot(t){f||(n.onExit&&n.onExit(t),l=!0),s(t,new W(t))}var it=function(t,r){ot(t)};function at(t){return t%4==0&&(t%100!=0||t%400==0)}var st=[31,29,31,30,31,30,31,31,30,31,30,31],ut=[31,28,31,30,31,30,31,31,30,31,30,31];function ct(t,r,e,n){var o=v[n+40>>2],i={tm_sec:v[n>>2],tm_min:v[n+4>>2],tm_hour:v[n+8>>2],tm_mday:v[n+12>>2],tm_mon:v[n+16>>2],tm_year:v[n+20>>2],tm_wday:v[n+24>>2],tm_yday:v[n+28>>2],tm_isdst:v[n+32>>2],tm_gmtoff:v[n+36>>2],tm_zone:o?S(o):""},a=S(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(t,r,e){for(var n="number"==typeof t?t.toString():t||"";n.length<r;)n=e[0]+n;return n}function l(t,r){return f(t,r,"0")}function _(t,r){function e(t){return t<0?-1:t>0?1:0}var n;return 0===(n=e(t.getFullYear()-r.getFullYear()))&&0===(n=e(t.getMonth()-r.getMonth()))&&(n=e(t.getDate()-r.getDate())),n}function d(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function h(t){var r=function(t,r){for(var e=new Date(t.getTime());r>0;){var n=at(e.getFullYear()),o=e.getMonth(),i=(n?st:ut)[o];if(!(r>i-e.getDate()))return e.setDate(e.getDate()+r),e;r-=i-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(t.tm_year+1900,0,1),t.tm_yday),e=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=d(e),i=d(n);return _(o,r)<=0?_(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return p[t.tm_mon].substring(0,3)},"%B":function(t){return p[t.tm_mon]},"%C":function(t){return l((t.tm_year+1900)/100|0,2)},"%d":function(t){return l(t.tm_mday,2)},"%e":function(t){return f(t.tm_mday,2," ")},"%g":function(t){return h(t).toString().substring(2)},"%G":function(t){return h(t)},"%H":function(t){return l(t.tm_hour,2)},"%I":function(t){var r=t.tm_hour;return 0==r?r=12:r>12&&(r-=12),l(r,2)},"%j":function(t){return l(t.tm_mday+function(t,r){for(var e=0,n=0;n<=r;e+=t[n++]);return e}(at(t.tm_year+1900)?st:ut,t.tm_mon-1),3)},"%m":function(t){return l(t.tm_mon+1,2)},"%M":function(t){return l(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return l(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var r=t.tm_yday+7-t.tm_wday;return l(Math.floor(r/7),2)},"%V":function(t){var r=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&r++,r){if(53==r){var e=(t.tm_wday+371-t.tm_yday)%7;4==e||3==e&&at(t.tm_year)||(r=1)}}else{r=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&at(t.tm_year%400-1))&&r++}return l(r,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var r=t.tm_yday+7-(t.tm_wday+6)%7;return l(Math.floor(r/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var r=t.tm_gmtoff,e=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(e?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),y)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),y[u](i)));var w=q(a=a.replace(/\0\0/g,"%"),!1);return w.length>r?0:(function(t,r){m.set(t,r)}(w,t),w.length-1)}var pt=function(t,r,e,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Z.nextInode++,this.name=r,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},ft=365,lt=146;Object.defineProperties(pt.prototype,{read:{get:function(){return(this.mode&ft)===ft},set:function(t){t?this.mode|=ft:this.mode&=-366}},write:{get:function(){return(this.mode&lt)===lt},set:function(t){t?this.mode|=lt:this.mode&=-147}},isFolder:{get:function(){return Z.isDir(this.mode)}},isDevice:{get:function(){return Z.isChrdev(this.mode)}}}),Z.FSNode=pt,Z.staticInit();var _t={c:function(t){return bt(t+24)+24},b:function(t,r,e){throw new Y(t).init(r,e),t},m:function(t,r,e,n){try{if(r=Q.getStr(r),r=Q.calculateAt(t,r),-8&e)return-28;var o=Z.lookupPath(r,{follow:!0}).node;if(!o)return-44;var i="";return 4&e&&(i+="r"),2&e&&(i+="w"),1&e&&(i+="x"),i&&Z.nodePermissions(o,i)?-2:0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},j:function(t,r,e){Q.varargs=e;try{var n=Q.getStreamFromFD(t);switch(r){case 0:return(o=Q.get())<0?-28:Z.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Q.get();return n.flags|=o,0;case 5:return o=Q.get(),y[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,v[St()>>2]=i,-1}}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}var i},x:function(t,r){try{var e=Q.getStreamFromFD(t);return Q.doStat(Z.stat,e.path,r)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},y:function(t,r,e){Q.varargs=e;try{var n=Q.getStreamFromFD(t);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Q.get();return v[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Q.get(),Z.ioctl(n,r,o);default:return-28}}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},v:function(t,r,e,n){try{r=Q.getStr(r);var o=256&n,i=4096&n;return n&=-4353,r=Q.calculateAt(t,r,i),Q.doStat(o?Z.lstat:Z.stat,r,e)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},g:function(t,r,e,n){Q.varargs=n;try{r=Q.getStr(r),r=Q.calculateAt(t,r);var o=n?Q.get():0;return Z.open(r,e,o).fd}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},w:function(t,r){try{return t=Q.getStr(t),Q.doStat(Z.stat,t,r)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},q:function(t,r,e){try{return r=Q.getStr(r),r=Q.calculateAt(t,r),0===e?Z.unlink(r):512===e?Z.rmdir(r):T("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},k:function(){return!0},r:function(t,r,e,n,o,i,a){try{var s=Q.getStreamFromFD(n),u=Z.mmap(s,t,o,r,e),c=u.ptr;return v[i>>2]=u.allocated,w[a>>2]=c,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},s:function(t,r,e,n,o,i){try{var a=Q.getStreamFromFD(o);2&e&&Q.doMsync(t,a,r,n,i),Z.munmap(a)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},a:function(){T("")},z:function(t,r,e){var n=function(t,r){var e;for(tt.length=0,r>>=2;e=h[t++];)r+=105!=e&r,tt.push(105==e?v[r]:g[r++>>1]),++r;return tt}(r,e);return H[t].apply(null,n)},f:function(){return Date.now()},l:function(t,r,e){h.copyWithin(t,r,r+e)},p:function(t){var r,e,n=h.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),rt(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1},t:function(t,r){var e=0;return nt().forEach((function(n,o){var i=r+e;w[t+4*o>>2]=i,function(t,r,e){for(var n=0;n<t.length;++n)m[r++>>0]=t.charCodeAt(n);e||(m[r>>0]=0)}(n,i),e+=n.length+1})),0},u:function(t,r){var e=nt();w[t>>2]=e.length;var n=0;return e.forEach((function(t){n+=t.length+1})),w[r>>2]=n,0},d:it,e:function(t){try{var r=Q.getStreamFromFD(t);return Z.close(r),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},h:function(t,r,e,n){try{var o=function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=w[r>>2],s=w[r+4>>2];r+=8;var u=Z.read(t,m,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(Q.getStreamFromFD(t),r,e);return w[n>>2]=o,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},n:function(t,r,e,n,o){try{var i=(u=e)+2097152>>>0<4194305-!!(s=r)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=Q.getStreamFromFD(t);return Z.llseek(a,i,n),P=[a.position>>>0,(z=a.position,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[o>>2]=P[0],v[o+4>>2]=P[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}var s,u},i:function(t,r,e,n){try{var o=function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=w[r>>2],s=w[r+4>>2];r+=8;var u=Z.write(t,m,a,s,n);if(u<0)return-1;o+=u}return o}(Q.getStreamFromFD(t),r,e);return w[n>>2]=o,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},o:function(t,r,e,n,o){return ct(t,r,e,n)}};!function(){var t={a:_t};function r(t,r){var e,o=t.exports;n.asm=o,C((p=n.asm.A).buffer),n.asm.J,e=n.asm.B,j.unshift(e),I()}function i(t){r(t.instance)}function a(r){return Promise.resolve().then((function(){return U(D)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){c("failed to asynchronously prepare wasm: "+t),T(t)}))}if(O(),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){c("Module.instantiateWasm callback failed with error: "+t),e(t)}(o||"function"!=typeof WebAssembly.instantiateStreaming||N(D)||L(D)||"function"!=typeof fetch?a(i):fetch(D,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(i,(function(t){return c("wasm streaming compile failed: "+t),c("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.B).apply(null,arguments)};var dt=n._emscripten_bind_VoidPtr___destroy___0=function(){return(dt=n._emscripten_bind_VoidPtr___destroy___0=n.asm.C).apply(null,arguments)},mt=n._emscripten_bind_Graphviz_Graphviz_2=function(){return(mt=n._emscripten_bind_Graphviz_Graphviz_2=n.asm.D).apply(null,arguments)},ht=n._emscripten_bind_Graphviz_version_0=function(){return(ht=n._emscripten_bind_Graphviz_version_0=n.asm.E).apply(null,arguments)},yt=n._emscripten_bind_Graphviz_lastError_0=function(){return(yt=n._emscripten_bind_Graphviz_lastError_0=n.asm.F).apply(null,arguments)},vt=n._emscripten_bind_Graphviz_layout_3=function(){return(vt=n._emscripten_bind_Graphviz_layout_3=n.asm.G).apply(null,arguments)},wt=n._emscripten_bind_Graphviz_createFile_2=function(){return(wt=n._emscripten_bind_Graphviz_createFile_2=n.asm.H).apply(null,arguments)},gt=n._emscripten_bind_Graphviz___destroy___0=function(){return(gt=n._emscripten_bind_Graphviz___destroy___0=n.asm.I).apply(null,arguments)};n._free=function(){return(n._free=n.asm.K).apply(null,arguments)};var Et,bt=n._malloc=function(){return(bt=n._malloc=n.asm.L).apply(null,arguments)},St=n.___errno_location=function(){return(St=n.___errno_location=n.asm.M).apply(null,arguments)},kt=n._emscripten_builtin_memalign=function(){return(kt=n._emscripten_builtin_memalign=n.asm.N).apply(null,arguments)},At=n.___cxa_is_pointer_type=function(){return(At=n.___cxa_is_pointer_type=n.asm.O).apply(null,arguments)};function Ct(t){function e(){Et||(Et=!0,n.calledRun=!0,l||(n.noFSInit||Z.init.initialized||Z.init(),Z.ignorePermissions=!1,G(j),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),R.unshift(t);var t;G(R)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),F.unshift(t);var t;G(F)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=175796,n.___stop_em_js=175894,B=function t(){Et||Ct(),Et||(B=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Dt(){}function xt(t){return(t||Dt).__cache__}function zt(t,r){var e=xt(r),n=e[t];return n||((n=Object.create((r||Dt).prototype)).ptr=t,e[t]=n)}Ct(),Dt.prototype=Object.create(Dt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.__class__=Dt,Dt.__cache__={},n.WrapperObject=Dt,n.getCache=xt,n.wrapPointer=zt,n.castObject=function(t,r){return zt(t.ptr,r)},n.NULL=zt(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete xt(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__};var Pt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Pt.needed){for(var t=0;t<Pt.temps.length;t++)n._free(Pt.temps[t]);Pt.temps.length=0,n._free(Pt.buffer),Pt.buffer=0,Pt.size+=Pt.needed,Pt.needed=0}Pt.buffer||(Pt.size+=128,Pt.buffer=n._malloc(Pt.size),_(Pt.buffer)),Pt.pos=0},alloc:function(t,r){_(Pt.buffer);var e,o=r.BYTES_PER_ELEMENT,i=t.length*o;return i=i+7&-8,Pt.pos+i>=Pt.size?(_(i>0),Pt.needed+=i,e=n._malloc(i),Pt.temps.push(e)):(e=Pt.buffer+Pt.pos,Pt.pos+=i),e},copy:function(t,r,e){switch(e>>>=0,r.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<t.length;n++)r[e+n]=t[n]}};function Ft(t){if("string"==typeof t){var r=q(t),e=Pt.alloc(r,m);return Pt.copy(r,m,e),e}return t}function jt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Rt(t,r){t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),this.ptr=mt(t,r),xt(Rt)[this.ptr]=this}return jt.prototype=Object.create(Dt.prototype),jt.prototype.constructor=jt,jt.prototype.__class__=jt,jt.__cache__={},n.VoidPtr=jt,jt.prototype.__destroy__=jt.prototype.__destroy__=function(){var t=this.ptr;dt(t)},Rt.prototype=Object.create(Dt.prototype),Rt.prototype.constructor=Rt,Rt.prototype.__class__=Rt,Rt.__cache__={},n.Graphviz=Rt,Rt.prototype.version=Rt.prototype.version=function(){var t=this.ptr;return S(ht(t))},Rt.prototype.lastError=Rt.prototype.lastError=function(){var t=this.ptr;return S(yt(t))},Rt.prototype.layout=Rt.prototype.layout=function(t,r,e){var n=this.ptr;return Pt.prepare(),t=t&&"object"==typeof t?t.ptr:Ft(t),r=r&&"object"==typeof r?r.ptr:Ft(r),e=e&&"object"==typeof e?e.ptr:Ft(e),S(vt(n,t,r,e))},Rt.prototype.createFile=Rt.prototype.createFile=function(t,r){var e=this.ptr;Pt.prepare(),t=t&&"object"==typeof t?t.ptr:Ft(t),r=r&&"object"==typeof r?r.ptr:Ft(r),wt(e,t,r)},Rt.prototype.__destroy__=Rt.prototype.__destroy__=function(){var t=this.ptr;gt(t)},t.ready}),G=Object.freeze({__proto__:null,default:W});function Y(t){return{path:t.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="${t.width}" height="${t.height}"></svg>`}}function V(t,r){const e={images:[],files:[],...r};var n;[...e.files,...(n=e.images,n.map(Y))].forEach((r=>t.createFile(r.path,r.data)))}const J={layout:(t,r="svg",e="dot",n)=>t?i(G,"graphvizlib",n?.wasmFolder,n?.wasmBinary).then((o=>{const i=new o.Graphviz(n?.yInvert?1:0,n?.nop?n?.nop:0);let a,s;V(i,n);try{a=i.layout(t,r,e)}catch(t){s=o.Graphviz.prototype.lastError()}if(o.destroy(i),void 0===a)throw new Error(s);return a})):Promise.resolve(""),circo(t,r="svg",e){return this.layout(t,r,"circo",e)},dot(t,r="svg",e){return this.layout(t,r,"dot",e)},fdp(t,r="svg",e){return this.layout(t,r,"fdp",e)},sfdp(t,r="svg",e){return this.layout(t,r,"sfdp",e)},neato(t,r="svg",e){return this.layout(t,r,"neato",e)},osage(t,r="svg",e){return this.layout(t,r,"osage",e)},patchwork(t,r="svg",e){return this.layout(t,r,"patchwork",e)},twopi(t,r="svg",e){return this.layout(t,r,"twopi",e)}};class q{constructor(t){this._wasm=t}layout(t,r="svg",e="dot",n){if(!t)return"";const o=new this._wasm.Graphviz(n?.yInvert?1:0,n?.nop?n?.nop:0);let i,a;V(o,n);try{i=o.layout(t,r,e)}catch(t){a=this._wasm.Graphviz.prototype.lastError()}if(this._wasm.destroy(o),void 0===i)throw new Error(a);return i}circo(t,r="svg",e){return this.layout(t,r,"circo",e)}dot(t,r="svg",e){return this.layout(t,r,"dot",e)}fdp(t,r="svg",e){return this.layout(t,r,"fdp",e)}sfdp(t,r="svg",e){return this.layout(t,r,"sfdp",e)}neato(t,r="svg",e){return this.layout(t,r,"neato",e)}osage(t,r="svg",e){return this.layout(t,r,"osage",e)}patchwork(t,r="svg",e){return this.layout(t,r,"patchwork",e)}twopi(t,r="svg",e){return this.layout(t,r,"twopi",e)}}var X=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o=Object.assign({},n);n.print||console.log.bind(console);var i,a,s=n.printErr||console.warn.bind(console);Object.assign(n,o),o=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(i=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var u,c,p=!1,f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,r){return t?function(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&f)return f.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(c,t,r):""}function _(t){u=t,n.HEAP8=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=new Int32Array(t),n.HEAPU8=c=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=new Float64Array(t)}n.INITIAL_MEMORY;var d,m,h=[],y=[],v=[],w=0,g=null;function E(t){n.onAbort&&n.onAbort(t),s(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function b(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){return t.startsWith("file://")}function k(t){try{if(t==d&&i)return new Uint8Array(i);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function A(t){for(;t.length>0;)t.shift()(n)}function C(t){try{return a.grow(t-u.byteLength+65535>>>16),_(a.buffer),1}catch(t){}}b(d="zstdlib.wasm")||(m=d,d=n.locateFile?n.locateFile(m,""):""+m);var D={b:function(t,r,e){c.copyWithin(t,r,r+e)},a:function(t){var r,e,n=c.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),C(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1}};!function(){var t={a:D};function r(t,r){var e,o=t.exports;n.asm=o,_((a=n.asm.c).buffer),n.asm.t,e=n.asm.d,y.unshift(e),function(t){if(w--,n.monitorRunDependencies&&n.monitorRunDependencies(w),0==w&&g){var r=g;g=null,r()}}()}function o(t){r(t.instance)}function u(r){return Promise.resolve().then((function(){return k(d)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){s("failed to asynchronously prepare wasm: "+t),E(t)}))}if(w++,n.monitorRunDependencies&&n.monitorRunDependencies(w),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){s("Module.instantiateWasm callback failed with error: "+t),e(t)}(i||"function"!=typeof WebAssembly.instantiateStreaming||b(d)||S(d)||"function"!=typeof fetch?u(o):fetch(d,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(o,(function(t){return s("wasm streaming compile failed: "+t),s("falling back to ArrayBuffer instantiation"),u(o)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.d).apply(null,arguments)};var x,z=n._emscripten_bind_VoidPtr___destroy___0=function(){return(z=n._emscripten_bind_VoidPtr___destroy___0=n.asm.e).apply(null,arguments)},P=n._emscripten_bind_zstd_version_0=function(){return(P=n._emscripten_bind_zstd_version_0=n.asm.f).apply(null,arguments)},F=n._emscripten_bind_zstd_malloc_1=function(){return(F=n._emscripten_bind_zstd_malloc_1=n.asm.g).apply(null,arguments)},j=n._emscripten_bind_zstd_free_1=function(){return(j=n._emscripten_bind_zstd_free_1=n.asm.h).apply(null,arguments)},R=n._emscripten_bind_zstd_compress_5=function(){return(R=n._emscripten_bind_zstd_compress_5=n.asm.i).apply(null,arguments)},M=n._emscripten_bind_zstd_decompress_4=function(){return(M=n._emscripten_bind_zstd_decompress_4=n.asm.j).apply(null,arguments)},B=n._emscripten_bind_zstd_getFrameContentSize_2=function(){return(B=n._emscripten_bind_zstd_getFrameContentSize_2=n.asm.k).apply(null,arguments)},O=n._emscripten_bind_zstd_findFrameCompressedSize_2=function(){return(O=n._emscripten_bind_zstd_findFrameCompressedSize_2=n.asm.l).apply(null,arguments)},I=n._emscripten_bind_zstd_compressBound_1=function(){return(I=n._emscripten_bind_zstd_compressBound_1=n.asm.m).apply(null,arguments)},T=n._emscripten_bind_zstd_isError_1=function(){return(T=n._emscripten_bind_zstd_isError_1=n.asm.n).apply(null,arguments)},N=n._emscripten_bind_zstd_getErrorName_1=function(){return(N=n._emscripten_bind_zstd_getErrorName_1=n.asm.o).apply(null,arguments)},L=n._emscripten_bind_zstd_minCLevel_0=function(){return(L=n._emscripten_bind_zstd_minCLevel_0=n.asm.p).apply(null,arguments)},U=n._emscripten_bind_zstd_maxCLevel_0=function(){return(U=n._emscripten_bind_zstd_maxCLevel_0=n.asm.q).apply(null,arguments)},H=n._emscripten_bind_zstd_defaultCLevel_0=function(){return(H=n._emscripten_bind_zstd_defaultCLevel_0=n.asm.r).apply(null,arguments)},W=n._emscripten_bind_zstd___destroy___0=function(){return(W=n._emscripten_bind_zstd___destroy___0=n.asm.s).apply(null,arguments)};function G(t){function e(){x||(x=!0,n.calledRun=!0,p||(A(y),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),v.unshift(t);var t;A(v)}()))}w>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),h.unshift(t);var t;A(h)}(),w>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=17440,n.___stop_em_js=17538,g=function t(){x||G(),x||(g=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Y(){}function V(t){return(t||Y).__cache__}function J(t,r){var e=V(r),n=e[t];return n||((n=Object.create((r||Y).prototype)).ptr=t,e[t]=n)}function q(){throw"cannot construct a VoidPtr, no constructor in IDL"}function X(){throw"cannot construct a zstd, no constructor in IDL"}return G(),Y.prototype=Object.create(Y.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},n.WrapperObject=Y,n.getCache=V,n.wrapPointer=J,n.castObject=function(t,r){return J(t.ptr,r)},n.NULL=J(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete V(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__},q.prototype=Object.create(Y.prototype),q.prototype.constructor=q,q.prototype.__class__=q,q.__cache__={},n.VoidPtr=q,q.prototype.__destroy__=q.prototype.__destroy__=function(){var t=this.ptr;z(t)},X.prototype=Object.create(Y.prototype),X.prototype.constructor=X,X.prototype.__class__=X,X.__cache__={},n.zstd=X,X.prototype.version=X.prototype.version=function(){var t=this.ptr;return l(P(t))},X.prototype.malloc=X.prototype.malloc=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),F(r,t)},X.prototype.free=X.prototype.free=function(t){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),j(r,t)},X.prototype.compress=X.prototype.compress=function(t,r,e,n,o){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),n&&"object"==typeof n&&(n=n.ptr),o&&"object"==typeof o&&(o=o.ptr),R(i,t,r,e,n,o)},X.prototype.decompress=X.prototype.decompress=function(t,r,e,n){var o=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),n&&"object"==typeof n&&(n=n.ptr),M(o,t,r,e,n)},X.prototype.getFrameContentSize=X.prototype.getFrameContentSize=function(t,r){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),B(e,t,r)},X.prototype.findFrameCompressedSize=X.prototype.findFrameCompressedSize=function(t,r){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),O(e,t,r)},X.prototype.compressBound=X.prototype.compressBound=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),I(r,t)},X.prototype.isError=X.prototype.isError=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),T(r,t)},X.prototype.getErrorName=X.prototype.getErrorName=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),l(N(r,t))},X.prototype.minCLevel=X.prototype.minCLevel=function(){var t=this.ptr;return L(t)},X.prototype.maxCLevel=X.prototype.maxCLevel=function(){var t=this.ptr;return U(t)},X.prototype.defaultCLevel=X.prototype.defaultCLevel=function(){var t=this.ptr;return H(t)},X.prototype.__destroy__=X.prototype.__destroy__=function(){var t=this.ptr;W(t)},t.ready}),$=Object.freeze({__proto__:null,default:X});let K;class Z extends p{constructor(t){super(t,t.zstd.prototype)}static load(t){return K||(K=i($,"zstdlib",t?.wasmFolder,t?.wasmBinary).then((t=>new Z(t)))),K}version(){return this._exports.version()}compress(t,r=this.defaultCLevel()){const e=this.uint8_heapu8(t),n=this._exports.compressBound(t.length),o=this.malloc_heapu8(n);o.size=this._exports.compress(o.ptr,n,e.ptr,e.size,r),this._exports.isError(o.size)&&console.error(this._exports.getErrorName(o.size));const i=this.heapu8_uint8(o);return this.free_heapu8(o),this.free_heapu8(e),i}decompress(t){const r=this.uint8_heapu8(t),e=this._exports.getFrameContentSize(r.ptr,r.size);this._exports.isError(e)&&console.error(this._exports.getErrorName(e));const n=this.malloc_heapu8(e);n.size=this._exports.decompress(n.ptr,e,r.ptr,r.size),this._exports.isError(n.size)&&console.error(this._exports.getErrorName(n.size));const o=this.heapu8_uint8(n);return this.free_heapu8(n),this.free_heapu8(r),o}defaultCLevel(){return this._exports.defaultCLevel()}minCLevel(){return this._exports.minCLevel()}maxCLevel(){return this._exports.maxCLevel()}}r.scriptDir=s,t.Base91=l,t.GraphvizSync=q,t.StackElement=m,t.StackParser=class{constructor(){this._stack=[]}parse(t,r,e){return h(t,this,r,e)}top(){return this._stack[this._stack.length-1]}startElement(t,r){const e=new m(t,r);return this._stack.push(e),e}endElement(t){return this._stack.pop()}characterData(t){this.top().appendContent(t)}},t.Zstd=Z,t.expatVersion=function(t,r){return i(d,"expatlib",t,r).then((t=>t.CExpat.prototype.version()))},t.extract=function(t){const r=function(t){const r=t.length,e=[];let n=0,o=0,i=-1;for(let a=0;a<r;a++){const r='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~"'.indexOf(t[a]);if(-1!==r)if(i<0)i=r;else{i+=91*r,n|=i<<o,o+=(8191&i)>88?13:14;do{e.push(255&n),n>>=8,o-=8}while(o>7);i=-1}}return i>-1&&e.push(255&(n|i<<o)),new Uint8Array(e)}(t);return H(r)},t.graphviz=J,t.graphvizSync=function(t,r){return i(G,"graphvizlib",t,r).then((t=>new q(t)))},t.graphvizVersion=function(t,r){return i(G,"graphvizlib",t,r).then((t=>t.Graphviz.prototype.version()))},t.parse=h,t.wasmFolder=n,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/wasm"]={})}(this,(function(t){"use strict";const r={doFetch:void 0,scriptDir:void 0};let e=globalThis.__hpcc_wasmFolder||void 0;function n(t){if(!arguments.length)return e;const r=e;return e=t,r}const o={};async function i(t,e,i,a){const s=`${function(t,r){for(;t.charAt(t.length-1)===r;)t=t.substring(0,t.length-1);return t}(i||n()||r.scriptDir||".","/")}/${function(t,r){for(;t.charAt(0)===r;)t=t.substring(1);return t}(`${e}.wasm`,"/")}`;return o[s]||(o[s]=async function(t,e,n){const o=t.default||t;return!n&&r.doFetch&&(n=await r.doFetch(e)),await o({wasmBinary:n,locateFile:(t,r)=>e})}(t,s,a)),o[s]}let a=globalThis.document?.currentScript?.src??"";const s=a.substring(0,a.replace(/[?#].*/,"").lastIndexOf("/")+1)+"../dist";var u=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o=Object.assign({},n);n.print||console.log.bind(console);var i,a,s=n.printErr||console.warn.bind(console);Object.assign(n,o),o=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(i=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var u,c,p=!1,f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,r){return t?function(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&f)return f.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(c,t,r):""}function _(t){u=t,n.HEAP8=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=new Int32Array(t),n.HEAPU8=c=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=new Float64Array(t)}n.INITIAL_MEMORY;var d,m,h=[],y=[],v=[],w=0,g=null;function E(t){n.onAbort&&n.onAbort(t),s(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function b(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){return t.startsWith("file://")}function k(t){try{if(t==d&&i)return new Uint8Array(i);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function A(t){for(;t.length>0;)t.shift()(n)}function C(t){try{return a.grow(t-u.byteLength+65535>>>16),_(a.buffer),1}catch(t){}}b(d="base91lib.wasm")||(m=d,d=n.locateFile?n.locateFile(m,""):""+m);var D={a:function(){E("")},b:function(t){var r,e,n=c.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),C(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1}};!function(){var t={a:D};function r(t,r){var e,o=t.exports;n.asm=o,_((a=n.asm.c).buffer),n.asm.p,e=n.asm.d,y.unshift(e),function(t){if(w--,n.monitorRunDependencies&&n.monitorRunDependencies(w),0==w&&g){var r=g;g=null,r()}}()}function o(t){r(t.instance)}function u(r){return Promise.resolve().then((function(){return k(d)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){s("failed to asynchronously prepare wasm: "+t),E(t)}))}if(w++,n.monitorRunDependencies&&n.monitorRunDependencies(w),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){s("Module.instantiateWasm callback failed with error: "+t),e(t)}(i||"function"!=typeof WebAssembly.instantiateStreaming||b(d)||S(d)||"function"!=typeof fetch?u(o):fetch(d,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(o,(function(t){return s("wasm streaming compile failed: "+t),s("falling back to ArrayBuffer instantiation"),u(o)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.d).apply(null,arguments)};var x,z=n._emscripten_bind_VoidPtr___destroy___0=function(){return(z=n._emscripten_bind_VoidPtr___destroy___0=n.asm.e).apply(null,arguments)},P=n._emscripten_bind_CBasE91_CBasE91_0=function(){return(P=n._emscripten_bind_CBasE91_CBasE91_0=n.asm.f).apply(null,arguments)},F=n._emscripten_bind_CBasE91_malloc_1=function(){return(F=n._emscripten_bind_CBasE91_malloc_1=n.asm.g).apply(null,arguments)},R=n._emscripten_bind_CBasE91_free_1=function(){return(R=n._emscripten_bind_CBasE91_free_1=n.asm.h).apply(null,arguments)},j=n._emscripten_bind_CBasE91_version_0=function(){return(j=n._emscripten_bind_CBasE91_version_0=n.asm.i).apply(null,arguments)},M=n._emscripten_bind_CBasE91_reset_0=function(){return(M=n._emscripten_bind_CBasE91_reset_0=n.asm.j).apply(null,arguments)},B=n._emscripten_bind_CBasE91_encode_3=function(){return(B=n._emscripten_bind_CBasE91_encode_3=n.asm.k).apply(null,arguments)},O=n._emscripten_bind_CBasE91_encode_end_1=function(){return(O=n._emscripten_bind_CBasE91_encode_end_1=n.asm.l).apply(null,arguments)},I=n._emscripten_bind_CBasE91_decode_3=function(){return(I=n._emscripten_bind_CBasE91_decode_3=n.asm.m).apply(null,arguments)},T=n._emscripten_bind_CBasE91_decode_end_1=function(){return(T=n._emscripten_bind_CBasE91_decode_end_1=n.asm.n).apply(null,arguments)},N=n._emscripten_bind_CBasE91___destroy___0=function(){return(N=n._emscripten_bind_CBasE91___destroy___0=n.asm.o).apply(null,arguments)};function L(t){function e(){x||(x=!0,n.calledRun=!0,p||(A(y),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),v.unshift(t);var t;A(v)}()))}w>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),h.unshift(t);var t;A(h)}(),w>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=1416,n.___stop_em_js=1514,g=function t(){x||L(),x||(g=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function H(){}function U(t){return(t||H).__cache__}function W(t,r){var e=U(r),n=e[t];return n||((n=Object.create((r||H).prototype)).ptr=t,e[t]=n)}function G(){throw"cannot construct a VoidPtr, no constructor in IDL"}function V(){this.ptr=P(),U(V)[this.ptr]=this}return L(),H.prototype=Object.create(H.prototype),H.prototype.constructor=H,H.prototype.__class__=H,H.__cache__={},n.WrapperObject=H,n.getCache=U,n.wrapPointer=W,n.castObject=function(t,r){return W(t.ptr,r)},n.NULL=W(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete U(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__},G.prototype=Object.create(H.prototype),G.prototype.constructor=G,G.prototype.__class__=G,G.__cache__={},n.VoidPtr=G,G.prototype.__destroy__=G.prototype.__destroy__=function(){var t=this.ptr;z(t)},V.prototype=Object.create(H.prototype),V.prototype.constructor=V,V.prototype.__class__=V,V.__cache__={},n.CBasE91=V,V.prototype.malloc=V.prototype.malloc=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),F(r,t)},V.prototype.free=V.prototype.free=function(t){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),R(r,t)},V.prototype.version=V.prototype.version=function(){var t=this.ptr;return l(j(t))},V.prototype.reset=V.prototype.reset=function(){var t=this.ptr;M(t)},V.prototype.encode=V.prototype.encode=function(t,r,e){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),B(n,t,r,e)},V.prototype.encode_end=V.prototype.encode_end=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),O(r,t)},V.prototype.decode=V.prototype.decode=function(t,r,e){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),I(n,t,r,e)},V.prototype.decode_end=V.prototype.decode_end=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),T(r,t)},V.prototype.__destroy__=V.prototype.__destroy__=function(){var t=this.ptr;N(t)},t.ready}),c=Object.freeze({__proto__:null,default:u});class p{constructor(t,r){this._module=t,this._exports=r}malloc_heapu8(t){return{ptr:this._exports.malloc(t),size:t}}free_heapu8(t){this._exports.free(t.ptr)}uint8_heapu8(t){const r=this.malloc_heapu8(t.byteLength);return this._module.HEAPU8.set(t,r.ptr),r}heapu8_view(t){return this._module.HEAPU8.subarray(t.ptr,t.ptr+t.size)}heapu8_uint8(t){return new Uint8Array([...this.heapu8_view(t)])}string_heapu8(t){const r=Uint8Array.from(t,(t=>t.charCodeAt(0)));return this.uint8_heapu8(r)}heapu8_string(t){const r=Array.from({length:t.size});return this._module.HEAPU8.subarray(t.ptr,t.ptr+t.size).forEach(((t,e)=>{r[e]=String.fromCharCode(t)})),r.join("")}}let f;class l extends p{constructor(t){super(t,new t.CBasE91)}static load(t){return f||(f=i(c,"base91lib",t?.wasmFolder,t?.wasmBinary).then((t=>new l(t)))),f}version(){return this._exports.version()}encode(t){this._exports.reset();const r=this.uint8_heapu8(t),e=this.malloc_heapu8(r.size+Math.ceil(r.size/4));e.size=this._exports.encode(r.ptr,r.size,e.ptr);let n=this.heapu8_string(e);return e.size=this._exports.encode_end(e.ptr),n+=this.heapu8_string(e),this.free_heapu8(e),this.free_heapu8(r),n}decode(t){this._exports.reset();const r=this.string_heapu8(t),e=this.malloc_heapu8(r.size);e.size=this._exports.decode(r.ptr,r.size,e.ptr);let n=this.heapu8_uint8(e);return e.size=this._exports.decode_end(e.ptr),n=new Uint8Array([...n,...this.heapu8_view(e)]),this.free_heapu8(e),this.free_heapu8(r),n}}var _=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o,i,a=Object.assign({},n),s="./this.program",u=n.print||console.log.bind(console),c=n.printErr||console.warn.bind(console);Object.assign(n,a),a=null,n.arguments&&n.arguments,n.thisProgram&&(s=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(o=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&z("no native wasm support detected");var p=!1;function f(t,r){t||z(r)}var l,_,d,m,h,y,v="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&v)return v.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function g(t,r){return t?w(d,t,r):""}function E(t){l=t,n.HEAP8=_=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=m=new Int32Array(t),n.HEAPU8=d=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=h=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=y=new Float64Array(t)}n.INITIAL_MEMORY;var b,S,k=[],A=[],C=[],D=0,x=null;function z(t){n.onAbort&&n.onAbort(t),c(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function P(t){return t.startsWith("data:application/octet-stream;base64,")}function F(t){return t.startsWith("file://")}function R(t){try{if(t==b&&o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}P(b="expatlib.wasm")||(S=b,b=n.locateFile?n.locateFile(S,""):""+S);var j={11554:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";r.startElement()},11772:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";r.endElement()},11984:t=>{var r=n.getCache(n.CExpatJS)[t];if(!r.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";r.characterData()}};function M(t){for(;t.length>0;)t.shift()(n)}var B=[];function O(t){try{return i.grow(t-l.byteLength+65535>>>16),E(i.buffer),1}catch(t){}}var I={};function T(){if(!T.strings){var t={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",_:s||"./this.program"};for(var r in I)void 0===I[r]?delete t[r]:t[r]=I[r];var e=[];for(var r in t)e.push(r+"="+t[r]);T.strings=e}return T.strings}var N=[null,[],[]];function L(t,r){var e=N[t];0===r||10===r?((1===t?u:c)(w(e,0)),e.length=0):e.push(r)}var H={g:function(t,r,e,n){},c:function(){z("")},a:function(t,r,e){var n=function(t,r){var e;for(B.length=0,r>>=2;e=d[t++];)r+=105!=e&r,B.push(105==e?m[r]:y[r++>>1]),++r;return B}(r,e);return j[t].apply(null,n)},j:function(){return Date.now()},k:function(t,r,e){d.copyWithin(t,r,r+e)},e:function(t){var r,e,n=d.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),O(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1},h:function(t,r){var e=0;return T().forEach((function(n,o){var i=r+e;h[t+4*o>>2]=i,function(t,r,e){for(var n=0;n<t.length;++n)_[r++>>0]=t.charCodeAt(n);e||(_[r>>0]=0)}(n,i),e+=n.length+1})),0},i:function(t,r){var e=T();h[t>>2]=e.length;var n=0;return e.forEach((function(t){n+=t.length+1})),h[r>>2]=n,0},d:function(t){return 52},f:function(t,r,e,n){return 52},l:function(t,r,e,n,o){return 70},b:function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=h[r>>2],s=h[r+4>>2];r+=8;for(var u=0;u<s;u++)L(t,d[a+u]);o+=s}return h[n>>2]=o,0}};!function(){var t={a:H};function r(t,r){var e,o=t.exports;n.asm=o,E((i=n.asm.m).buffer),n.asm.G,e=n.asm.n,A.unshift(e),function(t){if(D--,n.monitorRunDependencies&&n.monitorRunDependencies(D),0==D&&x){var r=x;x=null,r()}}()}function a(t){r(t.instance)}function s(r){return Promise.resolve().then((function(){return R(b)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){c("failed to asynchronously prepare wasm: "+t),z(t)}))}if(D++,n.monitorRunDependencies&&n.monitorRunDependencies(D),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){c("Module.instantiateWasm callback failed with error: "+t),e(t)}(o||"function"!=typeof WebAssembly.instantiateStreaming||P(b)||F(b)||"function"!=typeof fetch?s(a):fetch(b,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(a,(function(t){return c("wasm streaming compile failed: "+t),c("falling back to ArrayBuffer instantiation"),s(a)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.n).apply(null,arguments)};var U,W=n._emscripten_bind_CExpat_CExpat_0=function(){return(W=n._emscripten_bind_CExpat_CExpat_0=n.asm.o).apply(null,arguments)},G=n._emscripten_bind_CExpat_version_0=function(){return(G=n._emscripten_bind_CExpat_version_0=n.asm.p).apply(null,arguments)},V=n._emscripten_bind_CExpat_create_0=function(){return(V=n._emscripten_bind_CExpat_create_0=n.asm.q).apply(null,arguments)},Y=n._emscripten_bind_CExpat_destroy_0=function(){return(Y=n._emscripten_bind_CExpat_destroy_0=n.asm.r).apply(null,arguments)},J=n._emscripten_bind_CExpat_parse_1=function(){return(J=n._emscripten_bind_CExpat_parse_1=n.asm.s).apply(null,arguments)},q=n._emscripten_bind_CExpat_tag_0=function(){return(q=n._emscripten_bind_CExpat_tag_0=n.asm.t).apply(null,arguments)},X=n._emscripten_bind_CExpat_attrs_0=function(){return(X=n._emscripten_bind_CExpat_attrs_0=n.asm.u).apply(null,arguments)},$=n._emscripten_bind_CExpat_content_0=function(){return($=n._emscripten_bind_CExpat_content_0=n.asm.v).apply(null,arguments)},K=n._emscripten_bind_CExpat_startElement_0=function(){return(K=n._emscripten_bind_CExpat_startElement_0=n.asm.w).apply(null,arguments)},Z=n._emscripten_bind_CExpat_endElement_0=function(){return(Z=n._emscripten_bind_CExpat_endElement_0=n.asm.x).apply(null,arguments)},Q=n._emscripten_bind_CExpat_characterData_0=function(){return(Q=n._emscripten_bind_CExpat_characterData_0=n.asm.y).apply(null,arguments)},tt=n._emscripten_bind_CExpat___destroy___0=function(){return(tt=n._emscripten_bind_CExpat___destroy___0=n.asm.z).apply(null,arguments)},rt=n._emscripten_bind_VoidPtr___destroy___0=function(){return(rt=n._emscripten_bind_VoidPtr___destroy___0=n.asm.A).apply(null,arguments)},et=n._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(et=n._emscripten_bind_CExpatJS_CExpatJS_0=n.asm.B).apply(null,arguments)},nt=n._emscripten_bind_CExpatJS_startElement_0=function(){return(nt=n._emscripten_bind_CExpatJS_startElement_0=n.asm.C).apply(null,arguments)},ot=n._emscripten_bind_CExpatJS_endElement_0=function(){return(ot=n._emscripten_bind_CExpatJS_endElement_0=n.asm.D).apply(null,arguments)},it=n._emscripten_bind_CExpatJS_characterData_0=function(){return(it=n._emscripten_bind_CExpatJS_characterData_0=n.asm.E).apply(null,arguments)},at=n._emscripten_bind_CExpatJS___destroy___0=function(){return(at=n._emscripten_bind_CExpatJS___destroy___0=n.asm.F).apply(null,arguments)};function st(t){function e(){U||(U=!0,n.calledRun=!0,p||(M(A),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),C.unshift(t);var t;M(C)}()))}D>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),k.unshift(t);var t;M(k)}(),D>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n._malloc=function(){return(n._malloc=n.asm.H).apply(null,arguments)},n.___start_em_js=11456,n.___stop_em_js=11554,x=function t(){U||st(),U||(x=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function ut(){}function ct(t){return(t||ut).__cache__}function pt(t,r){var e=ct(r),n=e[t];return n||((n=Object.create((r||ut).prototype)).ptr=t,e[t]=n)}st(),ut.prototype=Object.create(ut.prototype),ut.prototype.constructor=ut,ut.prototype.__class__=ut,ut.__cache__={},n.WrapperObject=ut,n.getCache=ct,n.wrapPointer=pt,n.castObject=function(t,r){return pt(t.ptr,r)},n.NULL=pt(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete ct(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__};var ft={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ft.needed){for(var t=0;t<ft.temps.length;t++)n._free(ft.temps[t]);ft.temps.length=0,n._free(ft.buffer),ft.buffer=0,ft.size+=ft.needed,ft.needed=0}ft.buffer||(ft.size+=128,ft.buffer=n._malloc(ft.size),f(ft.buffer)),ft.pos=0},alloc:function(t,r){f(ft.buffer);var e,o=r.BYTES_PER_ELEMENT,i=t.length*o;return i=i+7&-8,ft.pos+i>=ft.size?(f(i>0),ft.needed+=i,e=n._malloc(i),ft.temps.push(e)):(e=ft.buffer+ft.pos,ft.pos+=i),e},copy:function(t,r,e){switch(e>>>=0,r.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<t.length;n++)r[e+n]=t[n]}};function lt(t){if("string"==typeof t){var r=(n=t,a=i>0?i:function(t){for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++e):r+=3}return r}(n)+1,s=new Array(a),u=function(t,r,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(e>=i)break;r[e++]=s}else if(s<=2047){if(e+1>=i)break;r[e++]=192|s>>6,r[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;r[e++]=224|s>>12,r[e++]=128|s>>6&63,r[e++]=128|63&s}else{if(e+3>=i)break;r[e++]=240|s>>18,r[e++]=128|s>>12&63,r[e++]=128|s>>6&63,r[e++]=128|63&s}}return r[e]=0,e-o}(n,s,0,s.length),o&&(s.length=u),s),e=ft.alloc(r,_);return ft.copy(r,_,e),e}var n,o,i,a,s,u;return t}function _t(){this.ptr=W(),ct(_t)[this.ptr]=this}function dt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function mt(){this.ptr=et(),ct(mt)[this.ptr]=this}return _t.prototype=Object.create(ut.prototype),_t.prototype.constructor=_t,_t.prototype.__class__=_t,_t.__cache__={},n.CExpat=_t,_t.prototype.version=_t.prototype.version=function(){var t=this.ptr;return g(G(t))},_t.prototype.create=_t.prototype.create=function(){var t=this.ptr;return!!V(t)},_t.prototype.destroy=_t.prototype.destroy=function(){var t=this.ptr;Y(t)},_t.prototype.parse=_t.prototype.parse=function(t){var r=this.ptr;return ft.prepare(),t=t&&"object"==typeof t?t.ptr:lt(t),!!J(r,t)},_t.prototype.tag=_t.prototype.tag=function(){var t=this.ptr;return g(q(t))},_t.prototype.attrs=_t.prototype.attrs=function(){var t=this.ptr;return g(X(t))},_t.prototype.content=_t.prototype.content=function(){var t=this.ptr;return g($(t))},_t.prototype.startElement=_t.prototype.startElement=function(){var t=this.ptr;K(t)},_t.prototype.endElement=_t.prototype.endElement=function(){var t=this.ptr;Z(t)},_t.prototype.characterData=_t.prototype.characterData=function(){var t=this.ptr;Q(t)},_t.prototype.__destroy__=_t.prototype.__destroy__=function(){var t=this.ptr;tt(t)},dt.prototype=Object.create(ut.prototype),dt.prototype.constructor=dt,dt.prototype.__class__=dt,dt.__cache__={},n.VoidPtr=dt,dt.prototype.__destroy__=dt.prototype.__destroy__=function(){var t=this.ptr;rt(t)},mt.prototype=Object.create(_t.prototype),mt.prototype.constructor=mt,mt.prototype.__class__=mt,mt.__cache__={},n.CExpatJS=mt,mt.prototype.startElement=mt.prototype.startElement=function(){var t=this.ptr;nt(t)},mt.prototype.endElement=mt.prototype.endElement=function(){var t=this.ptr;ot(t)},mt.prototype.characterData=mt.prototype.characterData=function(){var t=this.ptr;it(t)},mt.prototype.__destroy__=mt.prototype.__destroy__=function(){var t=this.ptr;at(t)},t.ready}),d=Object.freeze({__proto__:null,default:_});class m{constructor(t,r){this.tag=t,this.attrs=r,this._content=""}get content(){return this._content}appendContent(t){this._content+=t}}function h(t,r,e,n){return i(d,"expatlib",e,n).then((e=>{const n=new e.CExpatJS;n.startElement=function(){r.startElement(this.tag(),function(t){const r={},e=t,n=`${String.fromCharCode(1)}`,o=`${n}${n}`;return e.split(o).filter((t=>!!t)).forEach((t=>{const e=t.split(n);r[e[0]]=e[1]})),r}(this.attrs()))},n.endElement=function(){r.endElement(this.tag())},n.characterData=function(){r.characterData(this.content())},n.create();const o=n.parse(t);return n.destroy(),e.destroy(n),o}))}var y=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o,i=Object.assign({},n),a="./this.program",s=(t,r)=>{throw r},u=n.print||console.log.bind(console),c=n.printErr||console.warn.bind(console);Object.assign(n,i),i=null,n.arguments&&n.arguments,n.thisProgram&&(a=n.thisProgram),n.quit&&(s=n.quit),n.wasmBinary&&(o=n.wasmBinary);var p,f=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&T("no native wasm support detected");var l=!1;function _(t,r){t||T(r)}var d,m,h,y,v,w,g,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&E)return E.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function S(t,r){return t?b(h,t,r):""}function k(t,r,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(e>=i)break;r[e++]=s}else if(s<=2047){if(e+1>=i)break;r[e++]=192|s>>6,r[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;r[e++]=224|s>>12,r[e++]=128|s>>6&63,r[e++]=128|63&s}else{if(e+3>=i)break;r[e++]=240|s>>18,r[e++]=128|s>>12&63,r[e++]=128|s>>6&63,r[e++]=128|63&s}}return r[e]=0,e-o}function A(t){for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++e):r+=3}return r}function C(t){d=t,n.HEAP8=m=new Int8Array(t),n.HEAP16=y=new Int16Array(t),n.HEAP32=v=new Int32Array(t),n.HEAPU8=h=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=w=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=g=new Float64Array(t)}n.INITIAL_MEMORY;var D,x,z,P,F=[],R=[],j=[],M=0,B=null;function O(t){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function I(t){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&B){var r=B;B=null,r()}}function T(t){n.onAbort&&n.onAbort(t),c(t="Aborted("+t+")"),l=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function N(t){return t.startsWith("data:application/octet-stream;base64,")}function L(t){return t.startsWith("file://")}function H(t){try{if(t==D&&o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){T(t)}}N(D="graphvizlib.wasm")||(x=D,D=n.locateFile?n.locateFile(x,""):""+x);var U={175632:(t,r)=>{var e=S(t),n=S(r);Z.createPath("/",Y.dirname(e)),Z.writeFile(Y.join("/",e),n)}};function W(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function G(t){for(;t.length>0;)t.shift()(n)}function V(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){w[this.ptr+4>>2]=t},this.get_type=function(){return w[this.ptr+4>>2]},this.set_destructor=function(t){w[this.ptr+8>>2]=t},this.get_destructor=function(){return w[this.ptr+8>>2]},this.set_refcount=function(t){v[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,m[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=m[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,m[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=m[this.ptr+13>>0]},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=v[this.ptr>>2];v[this.ptr>>2]=t+1},this.release_ref=function(){var t=v[this.ptr>>2];return v[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){w[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return w[this.ptr+16>>2]},this.get_exception_ptr=function(){if(At(this.get_type()))return w[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var Y={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,r)=>{for(var e=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),e++):e&&(t.splice(n,1),e--)}if(r)for(;e;e--)t.unshift("..");return t},normalize:t=>{var r=Y.isAbs(t),e="/"===t.substr(-1);return(t=Y.normalizeArray(t.split("/").filter((t=>!!t)),!r).join("/"))||r||(t="."),t&&e&&(t+="/"),(r?"/":"")+t},dirname:t=>{var r=Y.splitPath(t),e=r[0],n=r[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:t=>{if("/"===t)return"/";var r=(t=(t=Y.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?t:t.substr(r+1)},join:function(){var t=Array.prototype.slice.call(arguments);return Y.normalize(t.join("/"))},join2:(t,r)=>Y.normalize(t+"/"+r)},J={resolve:function(){for(var t="",r=!1,e=arguments.length-1;e>=-1&&!r;e--){var n=e>=0?arguments[e]:Z.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,r=Y.isAbs(n)}return(r?"/":"")+(t=Y.normalizeArray(t.split("/").filter((t=>!!t)),!r).join("/"))||"."},relative:(t,r)=>{function e(t){for(var r=0;r<t.length&&""===t[r];r++);for(var e=t.length-1;e>=0&&""===t[e];e--);return r>e?[]:t.slice(r,e-r+1)}t=J.resolve(t).substr(1),r=J.resolve(r).substr(1);for(var n=e(t.split("/")),o=e(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}};function q(t,r,e){var n=e>0?e:A(t)+1,o=new Array(n),i=k(t,o,0,o.length);return r&&(o.length=i),o}var X={ttys:[],init:function(){},shutdown:function(){},register:function(t,r){X.ttys[t]={input:[],output:[],ops:r},Z.registerDevice(t,X.stream_ops)},stream_ops:{open:function(t){var r=X.ttys[t.node.rdev];if(!r)throw new Z.ErrnoError(43);t.tty=r,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,r,e,n,o){if(!t.tty||!t.tty.ops.get_char)throw new Z.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new Z.ErrnoError(29)}if(void 0===s&&0===i)throw new Z.ErrnoError(6);if(null==s)break;i++,r[e+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,r,e,n,o){if(!t.tty||!t.tty.ops.put_char)throw new Z.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,r[e+i])}catch(t){throw new Z.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;t.input=q(r,!0)}return t.input.shift()},put_char:function(t,r){null===r||10===r?(u(b(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},fsync:function(t){t.output&&t.output.length>0&&(u(b(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,r){null===r||10===r?(c(b(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},fsync:function(t){t.output&&t.output.length>0&&(c(b(t.output,0)),t.output=[])}}};function $(t){t=function(t,r){return Math.ceil(t/r)*r}(t,65536);var r=kt(65536,t);return r?function(t,r){return h.fill(0,t,t+r),t}(r,t):0}var K={ops_table:null,mount:function(t){return K.createNode(null,"/",16895,0)},createNode:function(t,r,e,n){if(Z.isBlkdev(e)||Z.isFIFO(e))throw new Z.ErrnoError(63);K.ops_table||(K.ops_table={dir:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,lookup:K.node_ops.lookup,mknod:K.node_ops.mknod,rename:K.node_ops.rename,unlink:K.node_ops.unlink,rmdir:K.node_ops.rmdir,readdir:K.node_ops.readdir,symlink:K.node_ops.symlink},stream:{llseek:K.stream_ops.llseek}},file:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:{llseek:K.stream_ops.llseek,read:K.stream_ops.read,write:K.stream_ops.write,allocate:K.stream_ops.allocate,mmap:K.stream_ops.mmap,msync:K.stream_ops.msync}},link:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,readlink:K.node_ops.readlink},stream:{}},chrdev:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:Z.chrdev_stream_ops}});var o=Z.createNode(t,r,e,n);return Z.isDir(o.mode)?(o.node_ops=K.ops_table.dir.node,o.stream_ops=K.ops_table.dir.stream,o.contents={}):Z.isFile(o.mode)?(o.node_ops=K.ops_table.file.node,o.stream_ops=K.ops_table.file.stream,o.usedBytes=0,o.contents=null):Z.isLink(o.mode)?(o.node_ops=K.ops_table.link.node,o.stream_ops=K.ops_table.link.stream):Z.isChrdev(o.mode)&&(o.node_ops=K.ops_table.chrdev.node,o.stream_ops=K.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[r]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,r){var e=t.contents?t.contents.length:0;if(!(e>=r)){r=Math.max(r,e*(e<1048576?2:1.125)>>>0),0!=e&&(r=Math.max(r,256));var n=t.contents;t.contents=new Uint8Array(r),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,r){if(t.usedBytes!=r)if(0==r)t.contents=null,t.usedBytes=0;else{var e=t.contents;t.contents=new Uint8Array(r),e&&t.contents.set(e.subarray(0,Math.min(r,t.usedBytes))),t.usedBytes=r}},node_ops:{getattr:function(t){var r={};return r.dev=Z.isChrdev(t.mode)?t.id:1,r.ino=t.id,r.mode=t.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=t.rdev,Z.isDir(t.mode)?r.size=4096:Z.isFile(t.mode)?r.size=t.usedBytes:Z.isLink(t.mode)?r.size=t.link.length:r.size=0,r.atime=new Date(t.timestamp),r.mtime=new Date(t.timestamp),r.ctime=new Date(t.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(t,r){void 0!==r.mode&&(t.mode=r.mode),void 0!==r.timestamp&&(t.timestamp=r.timestamp),void 0!==r.size&&K.resizeFileStorage(t,r.size)},lookup:function(t,r){throw Z.genericErrors[44]},mknod:function(t,r,e,n){return K.createNode(t,r,e,n)},rename:function(t,r,e){if(Z.isDir(t.mode)){var n;try{n=Z.lookupNode(r,e)}catch(t){}if(n)for(var o in n.contents)throw new Z.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=e,r.contents[e]=t,r.timestamp=t.parent.timestamp,t.parent=r},unlink:function(t,r){delete t.contents[r],t.timestamp=Date.now()},rmdir:function(t,r){var e=Z.lookupNode(t,r);for(var n in e.contents)throw new Z.ErrnoError(55);delete t.contents[r],t.timestamp=Date.now()},readdir:function(t){var r=[".",".."];for(var e in t.contents)t.contents.hasOwnProperty(e)&&r.push(e);return r},symlink:function(t,r,e){var n=K.createNode(t,r,41471,0);return n.link=e,n},readlink:function(t){if(!Z.isLink(t.mode))throw new Z.ErrnoError(28);return t.link}},stream_ops:{read:function(t,r,e,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)r.set(i.subarray(o,o+a),e);else for(var s=0;s<a;s++)r[e+s]=i[o+s];return a},write:function(t,r,e,n,o,i){if(r.buffer===m.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=r.subarray(e,e+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=r.slice(e,e+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(e,e+n),o),n}if(K.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(e,e+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=r[e+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,r,e){var n=r;if(1===e?n+=t.position:2===e&&Z.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new Z.ErrnoError(28);return n},allocate:function(t,r,e){K.expandFileStorage(t.node,r+e),t.node.usedBytes=Math.max(t.node.usedBytes,r+e)},mmap:function(t,r,e,n,o){if(!Z.isFile(t.node.mode))throw new Z.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==d){if((e>0||e+r<s.length)&&(s=s.subarray?s.subarray(e,e+r):Array.prototype.slice.call(s,e,e+r)),a=!0,!(i=$(r)))throw new Z.ErrnoError(48);m.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,r,e,n,o){return K.stream_ops.write(t,r,0,n,e,!1),0}}},Z={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,r={})=>{if(!(t=J.resolve(Z.cwd(),t)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new Z.ErrnoError(32);for(var e=Y.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=Z.root,o="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&r.parent)break;if(n=Z.lookupNode(n,e[i]),o=Y.join2(o,e[i]),Z.isMountpoint(n)&&(!a||a&&r.follow_mount)&&(n=n.mounted.root),!a||r.follow)for(var s=0;Z.isLink(n.mode);){var u=Z.readlink(o);if(o=J.resolve(Y.dirname(o),u),n=Z.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Z.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var r;;){if(Z.isRoot(t)){var e=t.mount.mountpoint;return r?"/"!==e[e.length-1]?e+"/"+r:e+r:e}r=r?t.name+"/"+r:t.name,t=t.parent}},hashName:(t,r)=>{for(var e=0,n=0;n<r.length;n++)e=(e<<5)-e+r.charCodeAt(n)|0;return(t+e>>>0)%Z.nameTable.length},hashAddNode:t=>{var r=Z.hashName(t.parent.id,t.name);t.name_next=Z.nameTable[r],Z.nameTable[r]=t},hashRemoveNode:t=>{var r=Z.hashName(t.parent.id,t.name);if(Z.nameTable[r]===t)Z.nameTable[r]=t.name_next;else for(var e=Z.nameTable[r];e;){if(e.name_next===t){e.name_next=t.name_next;break}e=e.name_next}},lookupNode:(t,r)=>{var e=Z.mayLookup(t);if(e)throw new Z.ErrnoError(e,t);for(var n=Z.hashName(t.id,r),o=Z.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===r)return o}return Z.lookup(t,r)},createNode:(t,r,e,n)=>{var o=new Z.FSNode(t,r,e,n);return Z.hashAddNode(o),o},destroyNode:t=>{Z.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var r=Z.flagModes[t];if(void 0===r)throw new Error("Unknown file open mode: "+t);return r},flagsToPermissionString:t=>{var r=["r","w","rw"][3&t];return 512&t&&(r+="w"),r},nodePermissions:(t,r)=>Z.ignorePermissions||(!r.includes("r")||292&t.mode)&&(!r.includes("w")||146&t.mode)&&(!r.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var r=Z.nodePermissions(t,"x");return r||(t.node_ops.lookup?0:2)},mayCreate:(t,r)=>{try{return Z.lookupNode(t,r),20}catch(t){}return Z.nodePermissions(t,"wx")},mayDelete:(t,r,e)=>{var n;try{n=Z.lookupNode(t,r)}catch(t){return t.errno}var o=Z.nodePermissions(t,"wx");if(o)return o;if(e){if(!Z.isDir(n.mode))return 54;if(Z.isRoot(n)||Z.getPath(n)===Z.cwd())return 10}else if(Z.isDir(n.mode))return 31;return 0},mayOpen:(t,r)=>t?Z.isLink(t.mode)?32:Z.isDir(t.mode)&&("r"!==Z.flagsToPermissionString(r)||512&r)?31:Z.nodePermissions(t,Z.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,r=Z.MAX_OPEN_FDS)=>{for(var e=t;e<=r;e++)if(!Z.streams[e])return e;throw new Z.ErrnoError(33)},getStream:t=>Z.streams[t],createStream:(t,r,e)=>{Z.FSStream||(Z.FSStream=function(){this.shared={}},Z.FSStream.prototype={},Object.defineProperties(Z.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Z.FSStream,t);var n=Z.nextfd(r,e);return t.fd=n,Z.streams[n]=t,t},closeStream:t=>{Z.streams[t]=null},chrdev_stream_ops:{open:t=>{var r=Z.getDevice(t.node.rdev);t.stream_ops=r.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new Z.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,r)=>t<<8|r,registerDevice:(t,r)=>{Z.devices[t]={stream_ops:r}},getDevice:t=>Z.devices[t],getMounts:t=>{for(var r=[],e=[t];e.length;){var n=e.pop();r.push(n),e.push.apply(e,n.mounts)}return r},syncfs:(t,r)=>{"function"==typeof t&&(r=t,t=!1),Z.syncFSRequests++,Z.syncFSRequests>1&&c("warning: "+Z.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Z.getMounts(Z.root.mount),n=0;function o(t){return Z.syncFSRequests--,r(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=e.length&&o(null)}e.forEach((r=>{if(!r.type.syncfs)return i(null);r.type.syncfs(r,t,i)}))},mount:(t,r,e)=>{var n,o="/"===e,i=!e;if(o&&Z.root)throw new Z.ErrnoError(10);if(!o&&!i){var a=Z.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,Z.isMountpoint(n))throw new Z.ErrnoError(10);if(!Z.isDir(n.mode))throw new Z.ErrnoError(54)}var s={type:t,opts:r,mountpoint:e,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?Z.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var r=Z.lookupPath(t,{follow_mount:!1});if(!Z.isMountpoint(r.node))throw new Z.ErrnoError(28);var e=r.node,n=e.mounted,o=Z.getMounts(n);Object.keys(Z.nameTable).forEach((t=>{for(var r=Z.nameTable[t];r;){var e=r.name_next;o.includes(r.mount)&&Z.destroyNode(r),r=e}})),e.mounted=null;var i=e.mount.mounts.indexOf(n);e.mount.mounts.splice(i,1)},lookup:(t,r)=>t.node_ops.lookup(t,r),mknod:(t,r,e)=>{var n=Z.lookupPath(t,{parent:!0}).node,o=Y.basename(t);if(!o||"."===o||".."===o)throw new Z.ErrnoError(28);var i=Z.mayCreate(n,o);if(i)throw new Z.ErrnoError(i);if(!n.node_ops.mknod)throw new Z.ErrnoError(63);return n.node_ops.mknod(n,o,r,e)},create:(t,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Z.mknod(t,r,0)),mkdir:(t,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Z.mknod(t,r,0)),mkdirTree:(t,r)=>{for(var e=t.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Z.mkdir(n,r)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,r,e)=>(void 0===e&&(e=r,r=438),r|=8192,Z.mknod(t,r,e)),symlink:(t,r)=>{if(!J.resolve(t))throw new Z.ErrnoError(44);var e=Z.lookupPath(r,{parent:!0}).node;if(!e)throw new Z.ErrnoError(44);var n=Y.basename(r),o=Z.mayCreate(e,n);if(o)throw new Z.ErrnoError(o);if(!e.node_ops.symlink)throw new Z.ErrnoError(63);return e.node_ops.symlink(e,n,t)},rename:(t,r)=>{var e,n,o=Y.dirname(t),i=Y.dirname(r),a=Y.basename(t),s=Y.basename(r);if(e=Z.lookupPath(t,{parent:!0}).node,n=Z.lookupPath(r,{parent:!0}).node,!e||!n)throw new Z.ErrnoError(44);if(e.mount!==n.mount)throw new Z.ErrnoError(75);var u,c=Z.lookupNode(e,a),p=J.relative(t,i);if("."!==p.charAt(0))throw new Z.ErrnoError(28);if("."!==(p=J.relative(r,o)).charAt(0))throw new Z.ErrnoError(55);try{u=Z.lookupNode(n,s)}catch(t){}if(c!==u){var f=Z.isDir(c.mode),l=Z.mayDelete(e,a,f);if(l)throw new Z.ErrnoError(l);if(l=u?Z.mayDelete(n,s,f):Z.mayCreate(n,s))throw new Z.ErrnoError(l);if(!e.node_ops.rename)throw new Z.ErrnoError(63);if(Z.isMountpoint(c)||u&&Z.isMountpoint(u))throw new Z.ErrnoError(10);if(n!==e&&(l=Z.nodePermissions(e,"w")))throw new Z.ErrnoError(l);Z.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(t){throw t}finally{Z.hashAddNode(c)}}},rmdir:t=>{var r=Z.lookupPath(t,{parent:!0}).node,e=Y.basename(t),n=Z.lookupNode(r,e),o=Z.mayDelete(r,e,!0);if(o)throw new Z.ErrnoError(o);if(!r.node_ops.rmdir)throw new Z.ErrnoError(63);if(Z.isMountpoint(n))throw new Z.ErrnoError(10);r.node_ops.rmdir(r,e),Z.destroyNode(n)},readdir:t=>{var r=Z.lookupPath(t,{follow:!0}).node;if(!r.node_ops.readdir)throw new Z.ErrnoError(54);return r.node_ops.readdir(r)},unlink:t=>{var r=Z.lookupPath(t,{parent:!0}).node;if(!r)throw new Z.ErrnoError(44);var e=Y.basename(t),n=Z.lookupNode(r,e),o=Z.mayDelete(r,e,!1);if(o)throw new Z.ErrnoError(o);if(!r.node_ops.unlink)throw new Z.ErrnoError(63);if(Z.isMountpoint(n))throw new Z.ErrnoError(10);r.node_ops.unlink(r,e),Z.destroyNode(n)},readlink:t=>{var r=Z.lookupPath(t).node;if(!r)throw new Z.ErrnoError(44);if(!r.node_ops.readlink)throw new Z.ErrnoError(28);return J.resolve(Z.getPath(r.parent),r.node_ops.readlink(r))},stat:(t,r)=>{var e=Z.lookupPath(t,{follow:!r}).node;if(!e)throw new Z.ErrnoError(44);if(!e.node_ops.getattr)throw new Z.ErrnoError(63);return e.node_ops.getattr(e)},lstat:t=>Z.stat(t,!0),chmod:(t,r,e)=>{var n;if(!(n="string"==typeof t?Z.lookupPath(t,{follow:!e}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,r)=>{Z.chmod(t,r,!0)},fchmod:(t,r)=>{var e=Z.getStream(t);if(!e)throw new Z.ErrnoError(8);Z.chmod(e.node,r)},chown:(t,r,e,n)=>{var o;if(!(o="string"==typeof t?Z.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,r,e)=>{Z.chown(t,r,e,!0)},fchown:(t,r,e)=>{var n=Z.getStream(t);if(!n)throw new Z.ErrnoError(8);Z.chown(n.node,r,e)},truncate:(t,r)=>{if(r<0)throw new Z.ErrnoError(28);var e;if(!(e="string"==typeof t?Z.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new Z.ErrnoError(63);if(Z.isDir(e.mode))throw new Z.ErrnoError(31);if(!Z.isFile(e.mode))throw new Z.ErrnoError(28);var n=Z.nodePermissions(e,"w");if(n)throw new Z.ErrnoError(n);e.node_ops.setattr(e,{size:r,timestamp:Date.now()})},ftruncate:(t,r)=>{var e=Z.getStream(t);if(!e)throw new Z.ErrnoError(8);if(0==(2097155&e.flags))throw new Z.ErrnoError(28);Z.truncate(e.node,r)},utime:(t,r,e)=>{var n=Z.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,e)})},open:(t,r,e)=>{if(""===t)throw new Z.ErrnoError(44);var o;if(e=void 0===e?438:e,e=64&(r="string"==typeof r?Z.modeStringToFlags(r):r)?4095&e|32768:0,"object"==typeof t)o=t;else{t=Y.normalize(t);try{o=Z.lookupPath(t,{follow:!(131072&r)}).node}catch(t){}}var i=!1;if(64&r)if(o){if(128&r)throw new Z.ErrnoError(20)}else o=Z.mknod(t,e,0),i=!0;if(!o)throw new Z.ErrnoError(44);if(Z.isChrdev(o.mode)&&(r&=-513),65536&r&&!Z.isDir(o.mode))throw new Z.ErrnoError(54);if(!i){var a=Z.mayOpen(o,r);if(a)throw new Z.ErrnoError(a)}512&r&&!i&&Z.truncate(o,0),r&=-131713;var s=Z.createStream({node:o,path:Z.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(Z.readFiles||(Z.readFiles={}),t in Z.readFiles||(Z.readFiles[t]=1)),s},close:t=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{Z.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,r,e)=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Z.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Z.ErrnoError(28);return t.position=t.stream_ops.llseek(t,r,e),t.ungotten=[],t.position},read:(t,r,e,n,o)=>{if(n<0||o<0)throw new Z.ErrnoError(28);if(Z.isClosed(t))throw new Z.ErrnoError(8);if(1==(2097155&t.flags))throw new Z.ErrnoError(8);if(Z.isDir(t.node.mode))throw new Z.ErrnoError(31);if(!t.stream_ops.read)throw new Z.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new Z.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,r,e,n,o);return i||(t.position+=a),a},write:(t,r,e,n,o,i)=>{if(n<0||o<0)throw new Z.ErrnoError(28);if(Z.isClosed(t))throw new Z.ErrnoError(8);if(0==(2097155&t.flags))throw new Z.ErrnoError(8);if(Z.isDir(t.node.mode))throw new Z.ErrnoError(31);if(!t.stream_ops.write)throw new Z.ErrnoError(28);t.seekable&&1024&t.flags&&Z.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new Z.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,r,e,n,o,i);return a||(t.position+=s),s},allocate:(t,r,e)=>{if(Z.isClosed(t))throw new Z.ErrnoError(8);if(r<0||e<=0)throw new Z.ErrnoError(28);if(0==(2097155&t.flags))throw new Z.ErrnoError(8);if(!Z.isFile(t.node.mode)&&!Z.isDir(t.node.mode))throw new Z.ErrnoError(43);if(!t.stream_ops.allocate)throw new Z.ErrnoError(138);t.stream_ops.allocate(t,r,e)},mmap:(t,r,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new Z.ErrnoError(2);if(1==(2097155&t.flags))throw new Z.ErrnoError(2);if(!t.stream_ops.mmap)throw new Z.ErrnoError(43);return t.stream_ops.mmap(t,r,e,n,o)},msync:(t,r,e,n,o)=>t.stream_ops.msync?t.stream_ops.msync(t,r,e,n,o):0,munmap:t=>0,ioctl:(t,r,e)=>{if(!t.stream_ops.ioctl)throw new Z.ErrnoError(59);return t.stream_ops.ioctl(t,r,e)},readFile:(t,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 e,n=Z.open(t,r.flags),o=Z.stat(t).size,i=new Uint8Array(o);return Z.read(n,i,0,o,0),"utf8"===r.encoding?e=b(i,0):"binary"===r.encoding&&(e=i),Z.close(n),e},writeFile:(t,r,e={})=>{e.flags=e.flags||577;var n=Z.open(t,e.flags,e.mode);if("string"==typeof r){var o=new Uint8Array(A(r)+1),i=k(r,o,0,o.length);Z.write(n,o,0,i,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Z.write(n,r,0,r.byteLength,void 0,e.canOwn)}Z.close(n)},cwd:()=>Z.currentPath,chdir:t=>{var r=Z.lookupPath(t,{follow:!0});if(null===r.node)throw new Z.ErrnoError(44);if(!Z.isDir(r.node.mode))throw new Z.ErrnoError(54);var e=Z.nodePermissions(r.node,"x");if(e)throw new Z.ErrnoError(e);Z.currentPath=r.path},createDefaultDirectories:()=>{Z.mkdir("/tmp"),Z.mkdir("/home"),Z.mkdir("/home/web_user")},createDefaultDevices:()=>{Z.mkdir("/dev"),Z.registerDevice(Z.makedev(1,3),{read:()=>0,write:(t,r,e,n,o)=>n}),Z.mkdev("/dev/null",Z.makedev(1,3)),X.register(Z.makedev(5,0),X.default_tty_ops),X.register(Z.makedev(6,0),X.default_tty1_ops),Z.mkdev("/dev/tty",Z.makedev(5,0)),Z.mkdev("/dev/tty1",Z.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return()=>(crypto.getRandomValues(t),t[0])}return()=>T("randomDevice")}();Z.createDevice("/dev","random",t),Z.createDevice("/dev","urandom",t),Z.mkdir("/dev/shm"),Z.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Z.mkdir("/proc");var t=Z.mkdir("/proc/self");Z.mkdir("/proc/self/fd"),Z.mount({mount:()=>{var r=Z.createNode(t,"fd",16895,73);return r.node_ops={lookup:(t,r)=>{var e=+r,n=Z.getStream(e);if(!n)throw new Z.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{n.stdin?Z.createDevice("/dev","stdin",n.stdin):Z.symlink("/dev/tty","/dev/stdin"),n.stdout?Z.createDevice("/dev","stdout",null,n.stdout):Z.symlink("/dev/tty","/dev/stdout"),n.stderr?Z.createDevice("/dev","stderr",null,n.stderr):Z.symlink("/dev/tty1","/dev/stderr"),Z.open("/dev/stdin",0),Z.open("/dev/stdout",1),Z.open("/dev/stderr",1)},ensureErrnoError:()=>{Z.ErrnoError||(Z.ErrnoError=function(t,r){this.node=r,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},Z.ErrnoError.prototype=new Error,Z.ErrnoError.prototype.constructor=Z.ErrnoError,[44].forEach((t=>{Z.genericErrors[t]=new Z.ErrnoError(t),Z.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{Z.ensureErrnoError(),Z.nameTable=new Array(4096),Z.mount(K,{},"/"),Z.createDefaultDirectories(),Z.createDefaultDevices(),Z.createSpecialDirectories(),Z.filesystems={MEMFS:K}},init:(t,r,e)=>{Z.init.initialized=!0,Z.ensureErrnoError(),n.stdin=t||n.stdin,n.stdout=r||n.stdout,n.stderr=e||n.stderr,Z.createStandardStreams()},quit:()=>{Z.init.initialized=!1;for(var t=0;t<Z.streams.length;t++){var r=Z.streams[t];r&&Z.close(r)}},getMode:(t,r)=>{var e=0;return t&&(e|=365),r&&(e|=146),e},findObject:(t,r)=>{var e=Z.analyzePath(t,r);return e.exists?e.object:null},analyzePath:(t,r)=>{try{t=(n=Z.lookupPath(t,{follow:!r})).path}catch(t){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Z.lookupPath(t,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=Y.basename(t),n=Z.lookupPath(t,{follow:!r}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(t){e.error=t.errno}return e},createPath:(t,r,e,n)=>{t="string"==typeof t?t:Z.getPath(t);for(var o=r.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Y.join2(t,i);try{Z.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,r,e,n,o)=>{var i=Y.join2("string"==typeof t?t:Z.getPath(t),r),a=Z.getMode(n,o);return Z.create(i,a)},createDataFile:(t,r,e,n,o,i)=>{var a=r;t&&(t="string"==typeof t?t:Z.getPath(t),a=r?Y.join2(t,r):t);var s=Z.getMode(n,o),u=Z.create(a,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),p=0,f=e.length;p<f;++p)c[p]=e.charCodeAt(p);e=c}Z.chmod(u,146|s);var l=Z.open(u,577);Z.write(l,e,0,e.length,0,i),Z.close(l),Z.chmod(u,s)}return u},createDevice:(t,r,e,n)=>{var o=Y.join2("string"==typeof t?t:Z.getPath(t),r),i=Z.getMode(!!e,!!n);Z.createDevice.major||(Z.createDevice.major=64);var a=Z.makedev(Z.createDevice.major++,0);return Z.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,r,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=e()}catch(t){throw new Z.ErrnoError(29)}if(void 0===u&&0===a)throw new Z.ErrnoError(6);if(null==u)break;a++,r[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,r,e,o,i)=>{for(var a=0;a<o;a++)try{n(r[e+a])}catch(t){throw new Z.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),Z.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;throw"undefined"!=typeof XMLHttpRequest?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."):new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(t,r,e,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var r=t%this.chunkSize,e=t/this.chunkSize|0;return this.getter(e)[r]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",e,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+e+". Status: "+t.status);var r,n=Number(t.getResponseHeader("Content-length")),o=(r=t.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=t.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var r=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,r)=>{if(t>r)throw new Error("invalid range ("+t+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):q(o.responseText||"",!0)})(r,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:e},s=Z.createFile(t,r,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var c={};function p(t,r,e,n,o){var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)r[e+s]=i[o+s];else for(s=0;s<a;s++)r[e+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((t=>{var r=s.stream_ops[t];c[t]=function(){return Z.forceLoadFile(s),r.apply(null,arguments)}})),c.read=(t,r,e,n,o)=>(Z.forceLoadFile(s),p(t,r,e,n,o)),c.mmap=(t,r,e,n,o)=>{Z.forceLoadFile(s);var i=$(r);if(!i)throw new Z.ErrnoError(48);return p(t,m,i,r,e),{ptr:i,allocated:!0}},s.stream_ops=c,s},createPreloadedFile:(t,r,e,n,o,i,a,s,u,c)=>{var p=r?J.resolve(Y.join2(t,r)):t;function f(e){function f(e){c&&c(),s||Z.createDataFile(t,r,e,n,o,u),i&&i(),I()}Browser.handledByPreloadPlugin(e,p,f,(()=>{a&&a(),I()}))||f(e)}O(),"string"==typeof e?function(t,r,e,n){var o=n?"":"al "+t;(void 0)(t,(e=>{_(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),r(new Uint8Array(e)),o&&I()}),(r=>{if(!e)throw'Loading data file "'+t+'" failed.';e()})),o&&O()}(e,(t=>f(t)),a):f(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,r,e)=>{r=r||(()=>{}),e=e||(()=>{});var n=Z.indexedDB();try{var o=n.open(Z.DB_NAME(),Z.DB_VERSION)}catch(t){return e(t)}o.onupgradeneeded=()=>{u("creating db"),o.result.createObjectStore(Z.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Z.DB_STORE_NAME],"readwrite"),i=n.objectStore(Z.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?r():e()}t.forEach((t=>{var r=i.put(Z.analyzePath(t).object.contents,t);r.onsuccess=()=>{++a+s==u&&c()},r.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(t,r,e)=>{r=r||(()=>{}),e=e||(()=>{});var n=Z.indexedDB();try{var o=n.open(Z.DB_NAME(),Z.DB_VERSION)}catch(t){return e(t)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Z.DB_STORE_NAME],"readonly")}catch(t){return void e(t)}var a=i.objectStore(Z.DB_STORE_NAME),s=0,u=0,c=t.length;function p(){0==u?r():e()}t.forEach((t=>{var r=a.get(t);r.onsuccess=()=>{Z.analyzePath(t).exists&&Z.unlink(t),Z.createDataFile(Y.dirname(t),Y.basename(t),r.result,!0,!0,!0),++s+u==c&&p()},r.onerror=()=>{u++,s+u==c&&p()}})),i.onerror=e},o.onerror=e}},Q={DEFAULT_POLLMASK:5,calculateAt:function(t,r,e){if(Y.isAbs(r))return r;var n;if(n=-100===t?Z.cwd():Q.getStreamFromFD(t).path,0==r.length){if(!e)throw new Z.ErrnoError(44);return n}return Y.join2(n,r)},doStat:function(t,r,e){try{var n=t(r)}catch(t){if(t&&t.node&&Y.normalize(r)!==Y.normalize(Z.getPath(t.node)))return-54;throw t}return v[e>>2]=n.dev,v[e+8>>2]=n.ino,v[e+12>>2]=n.mode,w[e+16>>2]=n.nlink,v[e+20>>2]=n.uid,v[e+24>>2]=n.gid,v[e+28>>2]=n.rdev,P=[n.size>>>0,(z=n.size,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+40>>2]=P[0],v[e+44>>2]=P[1],v[e+48>>2]=4096,v[e+52>>2]=n.blocks,P=[Math.floor(n.atime.getTime()/1e3)>>>0,(z=Math.floor(n.atime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+56>>2]=P[0],v[e+60>>2]=P[1],w[e+64>>2]=0,P=[Math.floor(n.mtime.getTime()/1e3)>>>0,(z=Math.floor(n.mtime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+72>>2]=P[0],v[e+76>>2]=P[1],w[e+80>>2]=0,P=[Math.floor(n.ctime.getTime()/1e3)>>>0,(z=Math.floor(n.ctime.getTime()/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+88>>2]=P[0],v[e+92>>2]=P[1],w[e+96>>2]=0,P=[n.ino>>>0,(z=n.ino,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[e+104>>2]=P[0],v[e+108>>2]=P[1],0},doMsync:function(t,r,e,n,o){if(!Z.isFile(r.node.mode))throw new Z.ErrnoError(43);if(2&n)return 0;var i=h.slice(t,t+e);Z.msync(r,i,o,e,n)},varargs:void 0,get:function(){return Q.varargs+=4,v[Q.varargs-4>>2]},getStr:function(t){return S(t)},getStreamFromFD:function(t){var r=Z.getStream(t);if(!r)throw new Z.ErrnoError(8);return r}},tt=[];function rt(t){try{return p.grow(t-d.byteLength+65535>>>16),C(p.buffer),1}catch(t){}}var et={};function nt(){if(!nt.strings){var t={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",_:a||"./this.program"};for(var r in et)void 0===et[r]?delete t[r]:t[r]=et[r];var e=[];for(var r in t)e.push(r+"="+t[r]);nt.strings=e}return nt.strings}function ot(t){f||(n.onExit&&n.onExit(t),l=!0),s(t,new W(t))}var it=function(t,r){ot(t)};function at(t){return t%4==0&&(t%100!=0||t%400==0)}var st=[31,29,31,30,31,30,31,31,30,31,30,31],ut=[31,28,31,30,31,30,31,31,30,31,30,31];function ct(t,r,e,n){var o=v[n+40>>2],i={tm_sec:v[n>>2],tm_min:v[n+4>>2],tm_hour:v[n+8>>2],tm_mday:v[n+12>>2],tm_mon:v[n+16>>2],tm_year:v[n+20>>2],tm_wday:v[n+24>>2],tm_yday:v[n+28>>2],tm_isdst:v[n+32>>2],tm_gmtoff:v[n+36>>2],tm_zone:o?S(o):""},a=S(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(t,r,e){for(var n="number"==typeof t?t.toString():t||"";n.length<r;)n=e[0]+n;return n}function l(t,r){return f(t,r,"0")}function _(t,r){function e(t){return t<0?-1:t>0?1:0}var n;return 0===(n=e(t.getFullYear()-r.getFullYear()))&&0===(n=e(t.getMonth()-r.getMonth()))&&(n=e(t.getDate()-r.getDate())),n}function d(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function h(t){var r=function(t,r){for(var e=new Date(t.getTime());r>0;){var n=at(e.getFullYear()),o=e.getMonth(),i=(n?st:ut)[o];if(!(r>i-e.getDate()))return e.setDate(e.getDate()+r),e;r-=i-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(t.tm_year+1900,0,1),t.tm_yday),e=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=d(e),i=d(n);return _(o,r)<=0?_(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return p[t.tm_mon].substring(0,3)},"%B":function(t){return p[t.tm_mon]},"%C":function(t){return l((t.tm_year+1900)/100|0,2)},"%d":function(t){return l(t.tm_mday,2)},"%e":function(t){return f(t.tm_mday,2," ")},"%g":function(t){return h(t).toString().substring(2)},"%G":function(t){return h(t)},"%H":function(t){return l(t.tm_hour,2)},"%I":function(t){var r=t.tm_hour;return 0==r?r=12:r>12&&(r-=12),l(r,2)},"%j":function(t){return l(t.tm_mday+function(t,r){for(var e=0,n=0;n<=r;e+=t[n++]);return e}(at(t.tm_year+1900)?st:ut,t.tm_mon-1),3)},"%m":function(t){return l(t.tm_mon+1,2)},"%M":function(t){return l(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return l(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var r=t.tm_yday+7-t.tm_wday;return l(Math.floor(r/7),2)},"%V":function(t){var r=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&r++,r){if(53==r){var e=(t.tm_wday+371-t.tm_yday)%7;4==e||3==e&&at(t.tm_year)||(r=1)}}else{r=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&at(t.tm_year%400-1))&&r++}return l(r,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var r=t.tm_yday+7-(t.tm_wday+6)%7;return l(Math.floor(r/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var r=t.tm_gmtoff,e=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(e?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),y)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),y[u](i)));var w=q(a=a.replace(/\0\0/g,"%"),!1);return w.length>r?0:(function(t,r){m.set(t,r)}(w,t),w.length-1)}var pt=function(t,r,e,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Z.nextInode++,this.name=r,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},ft=365,lt=146;Object.defineProperties(pt.prototype,{read:{get:function(){return(this.mode&ft)===ft},set:function(t){t?this.mode|=ft:this.mode&=-366}},write:{get:function(){return(this.mode&lt)===lt},set:function(t){t?this.mode|=lt:this.mode&=-147}},isFolder:{get:function(){return Z.isDir(this.mode)}},isDevice:{get:function(){return Z.isChrdev(this.mode)}}}),Z.FSNode=pt,Z.staticInit();var _t={c:function(t){return bt(t+24)+24},b:function(t,r,e){throw new V(t).init(r,e),t},m:function(t,r,e,n){try{if(r=Q.getStr(r),r=Q.calculateAt(t,r),-8&e)return-28;var o=Z.lookupPath(r,{follow:!0}).node;if(!o)return-44;var i="";return 4&e&&(i+="r"),2&e&&(i+="w"),1&e&&(i+="x"),i&&Z.nodePermissions(o,i)?-2:0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},j:function(t,r,e){Q.varargs=e;try{var n=Q.getStreamFromFD(t);switch(r){case 0:return(o=Q.get())<0?-28:Z.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Q.get();return n.flags|=o,0;case 5:return o=Q.get(),y[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,v[St()>>2]=i,-1}}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}var i},x:function(t,r){try{var e=Q.getStreamFromFD(t);return Q.doStat(Z.stat,e.path,r)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},y:function(t,r,e){Q.varargs=e;try{var n=Q.getStreamFromFD(t);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Q.get();return v[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Q.get(),Z.ioctl(n,r,o);default:return-28}}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},v:function(t,r,e,n){try{r=Q.getStr(r);var o=256&n,i=4096&n;return n&=-4353,r=Q.calculateAt(t,r,i),Q.doStat(o?Z.lstat:Z.stat,r,e)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},g:function(t,r,e,n){Q.varargs=n;try{r=Q.getStr(r),r=Q.calculateAt(t,r);var o=n?Q.get():0;return Z.open(r,e,o).fd}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},w:function(t,r){try{return t=Q.getStr(t),Q.doStat(Z.stat,t,r)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},q:function(t,r,e){try{return r=Q.getStr(r),r=Q.calculateAt(t,r),0===e?Z.unlink(r):512===e?Z.rmdir(r):T("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},k:function(){return!0},r:function(t,r,e,n,o,i,a){try{var s=Q.getStreamFromFD(n),u=Z.mmap(s,t,o,r,e),c=u.ptr;return v[i>>2]=u.allocated,w[a>>2]=c,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},s:function(t,r,e,n,o,i){try{var a=Q.getStreamFromFD(o);2&e&&Q.doMsync(t,a,r,n,i),Z.munmap(a)}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return-t.errno}},a:function(){T("")},z:function(t,r,e){var n=function(t,r){var e;for(tt.length=0,r>>=2;e=h[t++];)r+=105!=e&r,tt.push(105==e?v[r]:g[r++>>1]),++r;return tt}(r,e);return U[t].apply(null,n)},f:function(){return Date.now()},l:function(t,r,e){h.copyWithin(t,r,r+e)},p:function(t){var r,e,n=h.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),rt(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1},t:function(t,r){var e=0;return nt().forEach((function(n,o){var i=r+e;w[t+4*o>>2]=i,function(t,r,e){for(var n=0;n<t.length;++n)m[r++>>0]=t.charCodeAt(n);e||(m[r>>0]=0)}(n,i),e+=n.length+1})),0},u:function(t,r){var e=nt();w[t>>2]=e.length;var n=0;return e.forEach((function(t){n+=t.length+1})),w[r>>2]=n,0},d:it,e:function(t){try{var r=Q.getStreamFromFD(t);return Z.close(r),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},h:function(t,r,e,n){try{var o=function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=w[r>>2],s=w[r+4>>2];r+=8;var u=Z.read(t,m,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(Q.getStreamFromFD(t),r,e);return w[n>>2]=o,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},n:function(t,r,e,n,o){try{var i=(u=e)+2097152>>>0<4194305-!!(s=r)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=Q.getStreamFromFD(t);return Z.llseek(a,i,n),P=[a.position>>>0,(z=a.position,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],v[o>>2]=P[0],v[o+4>>2]=P[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}var s,u},i:function(t,r,e,n){try{var o=function(t,r,e,n){for(var o=0,i=0;i<e;i++){var a=w[r>>2],s=w[r+4>>2];r+=8;var u=Z.write(t,m,a,s,n);if(u<0)return-1;o+=u}return o}(Q.getStreamFromFD(t),r,e);return w[n>>2]=o,0}catch(t){if(void 0===Z||!(t instanceof Z.ErrnoError))throw t;return t.errno}},o:function(t,r,e,n,o){return ct(t,r,e,n)}};!function(){var t={a:_t};function r(t,r){var e,o=t.exports;n.asm=o,C((p=n.asm.A).buffer),n.asm.J,e=n.asm.B,R.unshift(e),I()}function i(t){r(t.instance)}function a(r){return Promise.resolve().then((function(){return H(D)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){c("failed to asynchronously prepare wasm: "+t),T(t)}))}if(O(),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){c("Module.instantiateWasm callback failed with error: "+t),e(t)}(o||"function"!=typeof WebAssembly.instantiateStreaming||N(D)||L(D)||"function"!=typeof fetch?a(i):fetch(D,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(i,(function(t){return c("wasm streaming compile failed: "+t),c("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.B).apply(null,arguments)};var dt=n._emscripten_bind_VoidPtr___destroy___0=function(){return(dt=n._emscripten_bind_VoidPtr___destroy___0=n.asm.C).apply(null,arguments)},mt=n._emscripten_bind_Graphviz_Graphviz_2=function(){return(mt=n._emscripten_bind_Graphviz_Graphviz_2=n.asm.D).apply(null,arguments)},ht=n._emscripten_bind_Graphviz_version_0=function(){return(ht=n._emscripten_bind_Graphviz_version_0=n.asm.E).apply(null,arguments)},yt=n._emscripten_bind_Graphviz_lastError_0=function(){return(yt=n._emscripten_bind_Graphviz_lastError_0=n.asm.F).apply(null,arguments)},vt=n._emscripten_bind_Graphviz_layout_3=function(){return(vt=n._emscripten_bind_Graphviz_layout_3=n.asm.G).apply(null,arguments)},wt=n._emscripten_bind_Graphviz_createFile_2=function(){return(wt=n._emscripten_bind_Graphviz_createFile_2=n.asm.H).apply(null,arguments)},gt=n._emscripten_bind_Graphviz___destroy___0=function(){return(gt=n._emscripten_bind_Graphviz___destroy___0=n.asm.I).apply(null,arguments)};n._free=function(){return(n._free=n.asm.K).apply(null,arguments)};var Et,bt=n._malloc=function(){return(bt=n._malloc=n.asm.L).apply(null,arguments)},St=n.___errno_location=function(){return(St=n.___errno_location=n.asm.M).apply(null,arguments)},kt=n._emscripten_builtin_memalign=function(){return(kt=n._emscripten_builtin_memalign=n.asm.N).apply(null,arguments)},At=n.___cxa_is_pointer_type=function(){return(At=n.___cxa_is_pointer_type=n.asm.O).apply(null,arguments)};function Ct(t){function e(){Et||(Et=!0,n.calledRun=!0,l||(n.noFSInit||Z.init.initialized||Z.init(),Z.ignorePermissions=!1,G(R),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),j.unshift(t);var t;G(j)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),F.unshift(t);var t;G(F)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=175796,n.___stop_em_js=175894,B=function t(){Et||Ct(),Et||(B=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Dt(){}function xt(t){return(t||Dt).__cache__}function zt(t,r){var e=xt(r),n=e[t];return n||((n=Object.create((r||Dt).prototype)).ptr=t,e[t]=n)}Ct(),Dt.prototype=Object.create(Dt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.__class__=Dt,Dt.__cache__={},n.WrapperObject=Dt,n.getCache=xt,n.wrapPointer=zt,n.castObject=function(t,r){return zt(t.ptr,r)},n.NULL=zt(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete xt(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__};var Pt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Pt.needed){for(var t=0;t<Pt.temps.length;t++)n._free(Pt.temps[t]);Pt.temps.length=0,n._free(Pt.buffer),Pt.buffer=0,Pt.size+=Pt.needed,Pt.needed=0}Pt.buffer||(Pt.size+=128,Pt.buffer=n._malloc(Pt.size),_(Pt.buffer)),Pt.pos=0},alloc:function(t,r){_(Pt.buffer);var e,o=r.BYTES_PER_ELEMENT,i=t.length*o;return i=i+7&-8,Pt.pos+i>=Pt.size?(_(i>0),Pt.needed+=i,e=n._malloc(i),Pt.temps.push(e)):(e=Pt.buffer+Pt.pos,Pt.pos+=i),e},copy:function(t,r,e){switch(e>>>=0,r.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<t.length;n++)r[e+n]=t[n]}};function Ft(t){if("string"==typeof t){var r=q(t),e=Pt.alloc(r,m);return Pt.copy(r,m,e),e}return t}function Rt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function jt(t,r){t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),this.ptr=mt(t,r),xt(jt)[this.ptr]=this}return Rt.prototype=Object.create(Dt.prototype),Rt.prototype.constructor=Rt,Rt.prototype.__class__=Rt,Rt.__cache__={},n.VoidPtr=Rt,Rt.prototype.__destroy__=Rt.prototype.__destroy__=function(){var t=this.ptr;dt(t)},jt.prototype=Object.create(Dt.prototype),jt.prototype.constructor=jt,jt.prototype.__class__=jt,jt.__cache__={},n.Graphviz=jt,jt.prototype.version=jt.prototype.version=function(){var t=this.ptr;return S(ht(t))},jt.prototype.lastError=jt.prototype.lastError=function(){var t=this.ptr;return S(yt(t))},jt.prototype.layout=jt.prototype.layout=function(t,r,e){var n=this.ptr;return Pt.prepare(),t=t&&"object"==typeof t?t.ptr:Ft(t),r=r&&"object"==typeof r?r.ptr:Ft(r),e=e&&"object"==typeof e?e.ptr:Ft(e),S(vt(n,t,r,e))},jt.prototype.createFile=jt.prototype.createFile=function(t,r){var e=this.ptr;Pt.prepare(),t=t&&"object"==typeof t?t.ptr:Ft(t),r=r&&"object"==typeof r?r.ptr:Ft(r),wt(e,t,r)},jt.prototype.__destroy__=jt.prototype.__destroy__=function(){var t=this.ptr;gt(t)},t.ready}),v=Object.freeze({__proto__:null,default:y});function w(t){return{path:t.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="${t.width}" height="${t.height}"></svg>`}}function g(t,r){const e={images:[],files:[],...r};var n;[...e.files,...(n=e.images,n.map(w))].forEach((r=>t.createFile(r.path,r.data)))}const E={layout:(t,r="svg",e="dot",n)=>(console.warn("Deprecation Warning: 'graphviz' will be replaced with 'Graphviz' in 2.0.0"),t?i(v,"graphvizlib",n?.wasmFolder,n?.wasmBinary).then((o=>{const i=new o.Graphviz(n?.yInvert?1:0,n?.nop?n?.nop:0);let a,s;g(i,n);try{a=i.layout(t,r,e)}catch(t){s=o.Graphviz.prototype.lastError()}if(o.destroy(i),void 0===a)throw new Error(s);return a})):Promise.resolve("")),circo(t,r="svg",e){return this.layout(t,r,"circo",e)},dot(t,r="svg",e){return this.layout(t,r,"dot",e)},fdp(t,r="svg",e){return this.layout(t,r,"fdp",e)},sfdp(t,r="svg",e){return this.layout(t,r,"sfdp",e)},neato(t,r="svg",e){return this.layout(t,r,"neato",e)},osage(t,r="svg",e){return this.layout(t,r,"osage",e)},patchwork(t,r="svg",e){return this.layout(t,r,"patchwork",e)},twopi(t,r="svg",e){return this.layout(t,r,"twopi",e)}};class b{constructor(t){this._wasm=t}layout(t,r="svg",e="dot",n){if(console.warn("Deprecation Warning: 'GraphvizSync' will be replaced with 'Graphviz' in 2.0.0"),!t)return"";const o=new this._wasm.Graphviz(n?.yInvert?1:0,n?.nop?n?.nop:0);let i,a;g(o,n);try{i=o.layout(t,r,e)}catch(t){a=this._wasm.Graphviz.prototype.lastError()}if(this._wasm.destroy(o),void 0===i)throw new Error(a);return i}circo(t,r="svg",e){return this.layout(t,r,"circo",e)}dot(t,r="svg",e){return this.layout(t,r,"dot",e)}fdp(t,r="svg",e){return this.layout(t,r,"fdp",e)}sfdp(t,r="svg",e){return this.layout(t,r,"sfdp",e)}neato(t,r="svg",e){return this.layout(t,r,"neato",e)}osage(t,r="svg",e){return this.layout(t,r,"osage",e)}patchwork(t,r="svg",e){return this.layout(t,r,"patchwork",e)}twopi(t,r="svg",e){return this.layout(t,r,"twopi",e)}}var S=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(t){var r,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,n){r=t,e=n}));var o=Object.assign({},n);n.print||console.log.bind(console);var i,a,s=n.printErr||console.warn.bind(console);Object.assign(n,o),o=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(i=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var u,c,p=!1,f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,r){return t?function(t,r,e){for(var n=r+e,o=r;t[o]&&!(o>=n);)++o;if(o-r>16&&t.buffer&&f)return f.decode(t.subarray(r,o));for(var i="";r<o;){var a=t[r++];if(128&a){var s=63&t[r++];if(192!=(224&a)){var u=63&t[r++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[r++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(c,t,r):""}function _(t){u=t,n.HEAP8=new Int8Array(t),n.HEAP16=new Int16Array(t),n.HEAP32=new Int32Array(t),n.HEAPU8=c=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=new Float32Array(t),n.HEAPF64=new Float64Array(t)}n.INITIAL_MEMORY;var d,m,h=[],y=[],v=[],w=0,g=null;function E(t){n.onAbort&&n.onAbort(t),s(t="Aborted("+t+")"),p=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw e(r),r}function b(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){return t.startsWith("file://")}function k(t){try{if(t==d&&i)return new Uint8Array(i);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function A(t){for(;t.length>0;)t.shift()(n)}function C(t){try{return a.grow(t-u.byteLength+65535>>>16),_(a.buffer),1}catch(t){}}b(d="zstdlib.wasm")||(m=d,d=n.locateFile?n.locateFile(m,""):""+m);var D={b:function(t,r,e){c.copyWithin(t,r,r+e)},a:function(t){var r,e,n=c.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),C(Math.min(o,(r=Math.max(t,a))+((e=65536)-r%e)%e)))return!0}return!1}};!function(){var t={a:D};function r(t,r){var e,o=t.exports;n.asm=o,_((a=n.asm.c).buffer),n.asm.t,e=n.asm.d,y.unshift(e),function(t){if(w--,n.monitorRunDependencies&&n.monitorRunDependencies(w),0==w&&g){var r=g;g=null,r()}}()}function o(t){r(t.instance)}function u(r){return Promise.resolve().then((function(){return k(d)})).then((function(r){return WebAssembly.instantiate(r,t)})).then((function(t){return t})).then(r,(function(t){s("failed to asynchronously prepare wasm: "+t),E(t)}))}if(w++,n.monitorRunDependencies&&n.monitorRunDependencies(w),n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch(t){s("Module.instantiateWasm callback failed with error: "+t),e(t)}(i||"function"!=typeof WebAssembly.instantiateStreaming||b(d)||S(d)||"function"!=typeof fetch?u(o):fetch(d,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,t).then(o,(function(t){return s("wasm streaming compile failed: "+t),s("falling back to ArrayBuffer instantiation"),u(o)}))}))).catch(e)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.d).apply(null,arguments)};var x,z=n._emscripten_bind_VoidPtr___destroy___0=function(){return(z=n._emscripten_bind_VoidPtr___destroy___0=n.asm.e).apply(null,arguments)},P=n._emscripten_bind_zstd_version_0=function(){return(P=n._emscripten_bind_zstd_version_0=n.asm.f).apply(null,arguments)},F=n._emscripten_bind_zstd_malloc_1=function(){return(F=n._emscripten_bind_zstd_malloc_1=n.asm.g).apply(null,arguments)},R=n._emscripten_bind_zstd_free_1=function(){return(R=n._emscripten_bind_zstd_free_1=n.asm.h).apply(null,arguments)},j=n._emscripten_bind_zstd_compress_5=function(){return(j=n._emscripten_bind_zstd_compress_5=n.asm.i).apply(null,arguments)},M=n._emscripten_bind_zstd_decompress_4=function(){return(M=n._emscripten_bind_zstd_decompress_4=n.asm.j).apply(null,arguments)},B=n._emscripten_bind_zstd_getFrameContentSize_2=function(){return(B=n._emscripten_bind_zstd_getFrameContentSize_2=n.asm.k).apply(null,arguments)},O=n._emscripten_bind_zstd_findFrameCompressedSize_2=function(){return(O=n._emscripten_bind_zstd_findFrameCompressedSize_2=n.asm.l).apply(null,arguments)},I=n._emscripten_bind_zstd_compressBound_1=function(){return(I=n._emscripten_bind_zstd_compressBound_1=n.asm.m).apply(null,arguments)},T=n._emscripten_bind_zstd_isError_1=function(){return(T=n._emscripten_bind_zstd_isError_1=n.asm.n).apply(null,arguments)},N=n._emscripten_bind_zstd_getErrorName_1=function(){return(N=n._emscripten_bind_zstd_getErrorName_1=n.asm.o).apply(null,arguments)},L=n._emscripten_bind_zstd_minCLevel_0=function(){return(L=n._emscripten_bind_zstd_minCLevel_0=n.asm.p).apply(null,arguments)},H=n._emscripten_bind_zstd_maxCLevel_0=function(){return(H=n._emscripten_bind_zstd_maxCLevel_0=n.asm.q).apply(null,arguments)},U=n._emscripten_bind_zstd_defaultCLevel_0=function(){return(U=n._emscripten_bind_zstd_defaultCLevel_0=n.asm.r).apply(null,arguments)},W=n._emscripten_bind_zstd___destroy___0=function(){return(W=n._emscripten_bind_zstd___destroy___0=n.asm.s).apply(null,arguments)};function G(t){function e(){x||(x=!0,n.calledRun=!0,p||(A(y),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),v.unshift(t);var t;A(v)}()))}w>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),h.unshift(t);var t;A(h)}(),w>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.___start_em_js=17440,n.___stop_em_js=17538,g=function t(){x||G(),x||(g=t)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function V(){}function Y(t){return(t||V).__cache__}function J(t,r){var e=Y(r),n=e[t];return n||((n=Object.create((r||V).prototype)).ptr=t,e[t]=n)}function q(){throw"cannot construct a VoidPtr, no constructor in IDL"}function X(){throw"cannot construct a zstd, no constructor in IDL"}return G(),V.prototype=Object.create(V.prototype),V.prototype.constructor=V,V.prototype.__class__=V,V.__cache__={},n.WrapperObject=V,n.getCache=Y,n.wrapPointer=J,n.castObject=function(t,r){return J(t.ptr,r)},n.NULL=J(0),n.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Y(t.__class__)[t.ptr]},n.compare=function(t,r){return t.ptr===r.ptr},n.getPointer=function(t){return t.ptr},n.getClass=function(t){return t.__class__},q.prototype=Object.create(V.prototype),q.prototype.constructor=q,q.prototype.__class__=q,q.__cache__={},n.VoidPtr=q,q.prototype.__destroy__=q.prototype.__destroy__=function(){var t=this.ptr;z(t)},X.prototype=Object.create(V.prototype),X.prototype.constructor=X,X.prototype.__class__=X,X.__cache__={},n.zstd=X,X.prototype.version=X.prototype.version=function(){var t=this.ptr;return l(P(t))},X.prototype.malloc=X.prototype.malloc=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),F(r,t)},X.prototype.free=X.prototype.free=function(t){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),R(r,t)},X.prototype.compress=X.prototype.compress=function(t,r,e,n,o){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),n&&"object"==typeof n&&(n=n.ptr),o&&"object"==typeof o&&(o=o.ptr),j(i,t,r,e,n,o)},X.prototype.decompress=X.prototype.decompress=function(t,r,e,n){var o=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),n&&"object"==typeof n&&(n=n.ptr),M(o,t,r,e,n)},X.prototype.getFrameContentSize=X.prototype.getFrameContentSize=function(t,r){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),B(e,t,r)},X.prototype.findFrameCompressedSize=X.prototype.findFrameCompressedSize=function(t,r){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),O(e,t,r)},X.prototype.compressBound=X.prototype.compressBound=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),I(r,t)},X.prototype.isError=X.prototype.isError=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),T(r,t)},X.prototype.getErrorName=X.prototype.getErrorName=function(t){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),l(N(r,t))},X.prototype.minCLevel=X.prototype.minCLevel=function(){var t=this.ptr;return L(t)},X.prototype.maxCLevel=X.prototype.maxCLevel=function(){var t=this.ptr;return H(t)},X.prototype.defaultCLevel=X.prototype.defaultCLevel=function(){var t=this.ptr;return U(t)},X.prototype.__destroy__=X.prototype.__destroy__=function(){var t=this.ptr;W(t)},t.ready}),k=Object.freeze({__proto__:null,default:S});let A;class C extends p{constructor(t){super(t,t.zstd.prototype)}static load(t){return A||(A=i(k,"zstdlib",t?.wasmFolder,t?.wasmBinary).then((t=>new C(t)))),A}version(){return this._exports.version()}compress(t,r=this.defaultCLevel()){const e=this.uint8_heapu8(t),n=this._exports.compressBound(t.length),o=this.malloc_heapu8(n);o.size=this._exports.compress(o.ptr,n,e.ptr,e.size,r),this._exports.isError(o.size)&&console.error(this._exports.getErrorName(o.size));const i=this.heapu8_uint8(o);return this.free_heapu8(o),this.free_heapu8(e),i}decompress(t){const r=this.uint8_heapu8(t),e=this._exports.getFrameContentSize(r.ptr,r.size);this._exports.isError(e)&&console.error(this._exports.getErrorName(e));const n=this.malloc_heapu8(e);n.size=this._exports.decompress(n.ptr,e,r.ptr,r.size),this._exports.isError(n.size)&&console.error(this._exports.getErrorName(n.size));const o=this.heapu8_uint8(n);return this.free_heapu8(n),this.free_heapu8(r),o}defaultCLevel(){return this._exports.defaultCLevel()}minCLevel(){return this._exports.minCLevel()}maxCLevel(){return this._exports.maxCLevel()}}r.scriptDir=s,t.Base91=l,t.GraphvizSync=b,t.StackElement=m,t.StackParser=class{constructor(){this._stack=[]}parse(t,r,e){return h(t,this,r,e)}top(){return this._stack[this._stack.length-1]}startElement(t,r){const e=new m(t,r);return this._stack.push(e),e}endElement(t){return this._stack.pop()}characterData(t){this.top().appendContent(t)}},t.Zstd=C,t.expatVersion=function(t,r){return i(d,"expatlib",t,r).then((t=>t.CExpat.prototype.version()))},t.graphviz=E,t.graphvizSync=function(t,r){return i(v,"graphvizlib",t,r).then((t=>new b(t)))},t.graphvizVersion=function(t,r){return console.warn("Deprecation Warning: 'graphvizVersion' will be refactored into 'Graphviz' in 2.0.0"),i(v,"graphvizlib",t,r).then((t=>t.Graphviz.prototype.version()))},t.parse=h,t.wasmFolder=n,Object.defineProperty(t,"__esModule",{value:!0})}));