scanbot-web-sdk 5.1.0-dev.2 → 5.1.0-dev.3

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 (30) hide show
  1. package/@types/model/configuration/text-data-scanner-configuration.d.ts +18 -0
  2. package/bundle/ScanbotSDK.min.js +1 -1
  3. package/bundle/ScanbotSDK.ui2.min.js +2 -2
  4. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  5. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  6. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  7. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  8. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  9. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  10. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  11. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  12. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  13. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  14. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
  15. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  16. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
  17. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  18. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  19. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  20. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  21. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  22. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  23. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  24. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  25. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  26. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  27. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  28. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  29. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  30. package/package.json +1 -1
@@ -1 +1 @@
1
- !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=t(1);let o;const a={};function i(e){const r=Math.random().toString(36);return a[r]=e,r}function s(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function u(e){const r=s(e);r.delete&&r.delete(),delete a[e]}const c={initialize:async function(e,r,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality:f=80,requestSuffix:d=""}=s||{};u&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const h=t(3),p=t(4),m={locateFile:function(e,t){let o;return o=r?(0,n.isRemote)(r)?r:"":i,e.endsWith(".worker.js")&&p?p.default:new URL(o+e+d,location).href}},y=(0,n.getBuildType)(s),v=y.includes("-threads");m.mainScriptUrlOrBlob=m.locateFile(`ScanbotSDK.Asm${y}.js`);let g;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&v){let e=[2147483648,805306368,536870912],r=134217728;const t=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&t.includes(SCANBOTSDK_FLAVOR)&&(r=n,e.push(4*n));for(let t=0;t<e.length;t++){const n=e[t];try{g=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),g.grow(r/65536);break}catch(r){if(t===e.length-1)throw r}}}return g&&(m.wasmMemory=g),await h(m),o=m,o.initialize(e||"",a,f)}catch(e){throw console.error(e),e}},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(e,r){return d(o.applyFilter(p(e),r),f)},rotateImageCcw:function(e,r){return d(o.rotateImageCcw(p(e),r),f)},cropAndRotateImageCcw:function(e,r,t){const n=function(e){const r=[];for(let t=0;t<e.length;++t)r.push(e[t].x,e[t].y);return r}(r);return d(o.cropAndRotateImageCcw(p(e),n,t),f)},detectDocument:async function(e,r,t){const n=new o.DocumentDetector({acceptedAngleScore:r,acceptedSizeScore:t}),a=n.detect(p(e));return n.delete(),await l(a)},detectAndCropDocument:async function(e){return await l(o.detectAndCropDocument(p(e)))},createDocumentDetector:async function(e){return i(new o.DocumentDetector(e||{}))},documentDetectorDetect:async function(e,r){const t=s(e);return await l(t.detect(p(r)))},createBarcodeRecognizer:async function(e){return i(new o.BarcodeRecognizer(e||{}))},recognizeBarcodes:async function(e,r,t){let n,a=!1;"string"==typeof e?n=s(e):(t=r,r=e,n=new o.BarcodeRecognizer(t),a=!0);try{const e=n.recognize(p(r),t||{});if(!e)return null;let o;return e.length?(o=e.map((e=>({format:e.format,text:e.text,parsedDocument:e.parsedDocument,rawBytes:f(e.rawBytes),quad:e.quad,barcodeImage:f(e.barcodeImage)}))),e.forEach((e=>e.delete()))):o=[],{result:o,originalImage:r}}finally{a&&n.delete()}},beginPdf:async function(e){return i(new o.PdfGenerationContext(e||{}))},addPageToPdf:async function(e,r){d(s(e).addPage(r))},completePdf:async function(e){const r=d(s(e).complete(),f);return u(e),r},beginTiff:async function(e){const r=new o.TiffGenerationContext(e||{});return d(r.begin()),i(r)},addPageToTiff:async function(e,r){const t=s(e);if("string"==typeof r){let e=s(r).nativeImageContainer();const n=d(t.addPageFromContainer(e));return e.delete(),n}return d(t.addPageFromJsImage(p(r)))},completeTiff:async function(e){try{const r=s(e).complete();return d(r,f)}finally{u(e)}},createMRZRecognizer:async function(e){return i(new o.MrzRecognizerContext(e||{}))},recognizeMRZ:async function(e,r){return s(e).recognize(p(r))},releaseObject:async function(e){u(e)},createOcrEngine:async function(e){return i(new o.TLDROcrContext(e||{}))},performOcr:async function(e,r){return s(e).performOcr(p(r))},createGenericTextLineScanner:async function(e){e.languages||(e.languages=["eng"]);return i(new o.GenericTextLineScanner(e))},recognizeTextLine:async function(e,r){return s(e).recognize(p(r))},cleanTextLineRecognitionQueue:async function(e){s(e).cleanRecognitionQueue()},createDocumentQualityAnalyzer:async function(e){return i(new o.DocumentQualityAnalyzer(e||{}))},documentQualityAnalyzerAnalyze:async function(e,r){return s(e).analyze(p(r))},imageProcessorCreate:async function(e){return i(new o.ImageProcessor(p(e)))},imageProcessorCopy:async function(e){return i(s(e).copy())},imageProcessorApplyFilter:async function(e,r){s(e).applyFilter(r)},imageProcessorCrop:async function(e,r){s(e).crop(r)},imageProcessorResize:async function(e,r){s(e).resize(r)},imageProcessorRotate:async function(e,r){s(e).rotate(r)},imageProcessorEncodedProcessedImage:async function(e,r){return d(s(e).encodedProcessedImage(r),f)},__hasModuleFunction:async function(e){return o.hasOwnProperty(e)},__callModuleFunction:async function(e,r=[]){return o[e].apply(r)}};async function l(e){if(!e)return{success:!1,detectionStatus:"Error_License"};const r=m[e.status],t={detectionStatus:r,success:(n=r,"OK"===n.substr(0,2))};var n;return t.original=f(e.originalImageJpegData),t.success&&(t.cropped=f(e.croppedImageJpegData),t.polygon=function(e){if(e.length%2!=0)throw Error("pointCoords size is not even.");const r=[];for(let t=0;t<e.length;t+=2)r.push({x:e[t],y:e[t+1]});return r}(f(e.polygon)),t.horizontalLines=h(f(e.horizontalLines)),t.verticalLines=h(f(e.verticalLines)),t.averageBrightness=e.averageBrightness),e.delete(),t}function f(e){return e&&e.slice()}function d(e,r){try{if(e.errorMessage){throw new Error(e.errorMessage)}return(r||(e=>e))(e.result)}finally{e.delete()}}function h(e){const r=[];if(!e)return r;if(e.length%4!=0)throw Error("lineCoords size invalid.");for(let t=0;t<e.length;t+=4)r.push({p1:{x:e[t],y:e[t+1]},p2:{x:e[t+2],y:e[t+3]}});return r}function p(e){if(!e)throw new Error("null image data or buffer");return"number"==typeof e.width?e:{data:e,width:-1,height:-1}}const m={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(e){const{command:r,args:t,ticket:a}=e.data;o||"initialize"===r?(async()=>await c[r].apply(null,t))().then((e=>{const r=(0,n.gatherTransferables)(e);self.postMessage({ticket:a,result:e},r)})).catch((e=>{const r="number"==typeof e?Error(o.stringFromException(e)):e;console.error(r),self.postMessage({ticket:a,error:r})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(e,r,t){"use strict";(function(e){function t(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.gatherTransferables=function(e,r){const t=[];return function e(n){if(!n)return;if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return t.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=r?n.slice(0):n;if(t.push(e),r)return n}else if(ArrayBuffer.isView(n)){let e;if(r){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(t.push(e.buffer),r)return n}else if(Array.isArray(n))for(let r=0;r<n.length;++r){const t=e(n[r]);t&&(n[r]=t)}else if(n.constructor===Object)for(const r in n)if(n.hasOwnProperty(r)){const t=e(n[r]);t&&(n[r]=t)}}(e),t},r.isRemote=function(e){return e.startsWith("http:")||e.startsWith("https:")},r.areThreadsAvailable=t,r.getBuildType=function(e){const{allowSimd:r=!0,allowThreads:n=!0}=e||{};let o="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){o+="-simd";n&&t()&&(o+="-threads")}return o}}).call(this,t(2))},function(e,r){var t,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var r=c.length;r;){for(u=c,c=[];++f<r;)u&&u[f].run();f=-1,r=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function p(e,r){this.fun=e,this.array=r}function m(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];c.push(new p(e,r)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,t){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var r,t,o=e;o.ready=new Promise(((e,n)=>{r=e,t=n}));var a,i,s,u=Object.assign({},o),c="./this.program",l=(e,r)=>{throw r},f="";f=self.location.href,n&&(f=n),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var d,h=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(d=o.wasmBinary);var m,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&L("no native wasm support detected");var v,g,w,b,_,E,k,T,P,C=!1;function $(){var e=m.buffer;o.HEAP8=v=new Int8Array(e),o.HEAP16=w=new Int16Array(e),o.HEAPU8=g=new Uint8Array(e),o.HEAPU16=b=new Uint16Array(e),o.HEAP32=_=new Int32Array(e),o.HEAPU32=E=new Uint32Array(e),o.HEAPF32=k=new Float32Array(e),o.HEAPF64=T=new Float64Array(e)}var S,A,D,F,j=[],M=[],O=[],W=0,x=null,R=null;function z(e){W++,o.monitorRunDependencies&&o.monitorRunDependencies(W)}function I(e){if(W--,o.monitorRunDependencies&&o.monitorRunDependencies(W),0==W&&(null!==x&&(clearInterval(x),x=null),R)){var r=R;R=null,r()}}function L(e){o.onAbort&&o.onAbort(e),p(e="Aborted("+e+")"),C=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}function B(e){return e.startsWith("data:application/octet-stream;base64,")}function N(e){if(e==S&&d)return new Uint8Array(d);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function H(e,r,t){return function(e){return d||"function"!=typeof fetch?Promise.resolve().then((()=>N(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>N(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),L(e)}))}B(S="ScanbotSDK.Asm.wasm")||(A=S,S=o.locateFile?o.locateFile(A,f):f+A);var U={1109856:e=>yt(function(){return this[me(e)].toString()}.apply((0,eval)("(()=>this)()"))),1109970:e=>{throw new Error("Invalid barcode format: "+me(e))}};function V(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var q=e=>{for(;e.length>0;)e.shift()(o)},Y=[],K=0,G=0;function J(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Wt(this.get_type()))return E[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Q=e=>{var r=G;if(!r)return Ct(0),0;var t=new J(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Ct(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Ot(a,n,i))return Ct(a),r}return Ct(n),r},X=()=>{var e=Y.pop();e||L("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(Y.push(e),e.set_rethrown(!0),e.set_caught(!1),K++),G=r},Z={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Z.isAbs(e),t="/"===e.substr(-1);return(e=Z.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Z.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Z.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Z.normalize(e.join("/"))},join2:(e,r)=>Z.normalize(e+"/"+r)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);L("initRandomDevice")})())(e),re={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Z.isAbs(n)}return(r?"/":"")+(e=Z.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=re.resolve(e).substr(1),r=re.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},te="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ne=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&te)return te.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},oe=[],ae=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ie=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function se(e,r,t){var n=t>0?t:ae(e)+1,o=new Array(n),a=ie(e,o,0,o.length);return r&&(o.length=a),o}var ue={ttys:[],init(){},shutdown(){},register(e,r){ue.ttys[e]={input:[],output:[],ops:r},pe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var r=ue.ttys[e.node.rdev];if(!r)throw new pe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new pe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new pe.ErrnoError(29)}if(void 0===s&&0===a)throw new pe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new pe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new pe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!oe.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;oe=se(e,!0)}return oe.shift()})(),put_char(e,r){null===r||10===r?(h(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(h(ne(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(ne(e.output,0)),e.output=[])}}},ce=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=St(65536,e);return r?((e,r)=>(g.fill(0,e,e+r),e))(r,e):0},le={ops_table:null,mount:e=>le.createNode(null,"/",16895,0),createNode(e,r,t,n){if(pe.isBlkdev(t)||pe.isFIFO(t))throw new pe.ErrnoError(63);le.ops_table||(le.ops_table={dir:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,lookup:le.node_ops.lookup,mknod:le.node_ops.mknod,rename:le.node_ops.rename,unlink:le.node_ops.unlink,rmdir:le.node_ops.rmdir,readdir:le.node_ops.readdir,symlink:le.node_ops.symlink},stream:{llseek:le.stream_ops.llseek}},file:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:{llseek:le.stream_ops.llseek,read:le.stream_ops.read,write:le.stream_ops.write,allocate:le.stream_ops.allocate,mmap:le.stream_ops.mmap,msync:le.stream_ops.msync}},link:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,readlink:le.node_ops.readlink},stream:{}},chrdev:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:pe.chrdev_stream_ops}});var o=pe.createNode(e,r,t,n);return pe.isDir(o.mode)?(o.node_ops=le.ops_table.dir.node,o.stream_ops=le.ops_table.dir.stream,o.contents={}):pe.isFile(o.mode)?(o.node_ops=le.ops_table.file.node,o.stream_ops=le.ops_table.file.stream,o.usedBytes=0,o.contents=null):pe.isLink(o.mode)?(o.node_ops=le.ops_table.link.node,o.stream_ops=le.ops_table.link.stream):pe.isChrdev(o.mode)&&(o.node_ops=le.ops_table.chrdev.node,o.stream_ops=le.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=pe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,pe.isDir(e.mode)?r.size=4096:pe.isFile(e.mode)?r.size=e.usedBytes:pe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&le.resizeFileStorage(e,r.size)},lookup(e,r){throw pe.genericErrors[44]},mknod:(e,r,t,n)=>le.createNode(e,r,t,n),rename(e,r,t){if(pe.isDir(e.mode)){var n;try{n=pe.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new pe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=pe.lookupNode(e,r);for(var n in t.contents)throw new pe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=le.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!pe.isLink(e.mode))throw new pe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(le.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&pe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new pe.ErrnoError(28);return n},allocate(e,r,t){le.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ce(r)))throw new pe.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(le.stream_ops.write(e,r,0,n,t,!1),0)}},fe=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{var n;n=`Loading data file "${e}" failed (no arrayBuffer).`,t||L(n),r(new Uint8Array(t)),o&&I()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&z()},de=o.preloadPlugins||[],he=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=re.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new pe.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=pe.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=pe.lookupNode(n,t[a]),o=Z.join2(o,t[a]),pe.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;pe.isLink(n.mode);){var u=pe.readlink(o);if(o=re.resolve(Z.dirname(o),u),n=pe.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new pe.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(pe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%pe.nameTable.length},hashAddNode(e){var r=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[r],pe.nameTable[r]=e},hashRemoveNode(e){var r=pe.hashName(e.parent.id,e.name);if(pe.nameTable[r]===e)pe.nameTable[r]=e.name_next;else for(var t=pe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=pe.mayLookup(e);if(t)throw new pe.ErrnoError(t,e);for(var n=pe.hashName(e.id,r),o=pe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return pe.lookup(e,r)},createNode(e,r,t,n){var o=new pe.FSNode(e,r,t,n);return pe.hashAddNode(o),o},destroyNode(e){pe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>pe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=pe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return pe.lookupNode(e,r),20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=pe.lookupNode(e,r)}catch(e){return e.errno}var o=pe.nodePermissions(e,"wx");if(o)return o;if(t){if(!pe.isDir(n.mode))return 54;if(pe.isRoot(n)||pe.getPath(n)===pe.cwd())return 10}else if(pe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(r)||512&r)?31:pe.nodePermissions(e,pe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=pe.MAX_OPEN_FDS;e++)if(!pe.streams[e])return e;throw new pe.ErrnoError(33)},getStreamChecked(e){var r=pe.getStream(e);if(!r)throw new pe.ErrnoError(8);return r},getStream:e=>pe.streams[e],createStream:(e,r=-1)=>(pe.FSStream||(pe.FSStream=function(){this.shared={}},pe.FSStream.prototype={},Object.defineProperties(pe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new pe.FSStream,e),-1==r&&(r=pe.nextfd()),e.fd=r,pe.streams[r]=e,e),closeStream(e){pe.streams[e]=null},chrdev_stream_ops:{open(e){var r=pe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new pe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){pe.devices[e]={stream_ops:r}},getDevice:e=>pe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),pe.syncFSRequests++,pe.syncFSRequests>1&&p(`warning: ${pe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=pe.getMounts(pe.root.mount),n=0;function o(e){return pe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&pe.root)throw new pe.ErrnoError(10);if(!o&&!a){var i=pe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,pe.isMountpoint(n))throw new pe.ErrnoError(10);if(!pe.isDir(n.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(r.node))throw new pe.ErrnoError(28);var t=r.node,n=t.mounted,o=pe.getMounts(n);Object.keys(pe.nameTable).forEach((e=>{for(var r=pe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&pe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=pe.lookupPath(e,{parent:!0}).node,o=Z.basename(e);if(!o||"."===o||".."===o)throw new pe.ErrnoError(28);var a=pe.mayCreate(n,o);if(a)throw new pe.ErrnoError(a);if(!n.node_ops.mknod)throw new pe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,pe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,pe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{pe.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,pe.mknod(e,r,t)),symlink(e,r){if(!re.resolve(e))throw new pe.ErrnoError(44);var t=pe.lookupPath(r,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var n=Z.basename(r),o=pe.mayCreate(t,n);if(o)throw new pe.ErrnoError(o);if(!t.node_ops.symlink)throw new pe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Z.dirname(e),a=Z.dirname(r),i=Z.basename(e),s=Z.basename(r);if(t=pe.lookupPath(e,{parent:!0}).node,n=pe.lookupPath(r,{parent:!0}).node,!t||!n)throw new pe.ErrnoError(44);if(t.mount!==n.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(t,i),l=re.relative(e,a);if("."!==l.charAt(0))throw new pe.ErrnoError(28);if("."!==(l=re.relative(r,o)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(n,s)}catch(e){}if(c!==u){var f=pe.isDir(c.mode),d=pe.mayDelete(t,i,f);if(d)throw new pe.ErrnoError(d);if(d=u?pe.mayDelete(n,s,f):pe.mayCreate(n,s))throw new pe.ErrnoError(d);if(!t.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(n!==t&&(d=pe.nodePermissions(t,"w")))throw new pe.ErrnoError(d);pe.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir(e){var r=pe.lookupPath(e,{parent:!0}).node,t=Z.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!0);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.rmdir(r,t),pe.destroyNode(n)},readdir(e){var r=pe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new pe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=pe.lookupPath(e,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var t=Z.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!1);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.unlink(r,t),pe.destroyNode(n)},readlink(e){var r=pe.lookupPath(e).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.readlink)throw new pe.ErrnoError(28);return re.resolve(pe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=pe.lookupPath(e,{follow:!r}).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.getattr)throw new pe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>pe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?pe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){pe.chmod(e,r,!0)},fchmod(e,r){var t=pe.getStreamChecked(e);pe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?pe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){pe.chown(e,r,t,!0)},fchown(e,r,t){var n=pe.getStreamChecked(e);pe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new pe.ErrnoError(28);var t;if(!(t="string"==typeof e?pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(t.mode))throw new pe.ErrnoError(31);if(!pe.isFile(t.mode))throw new pe.ErrnoError(28);var n=pe.nodePermissions(t,"w");if(n)throw new pe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=pe.getStreamChecked(e);if(0==(2097155&t.flags))throw new pe.ErrnoError(28);pe.truncate(t.node,r)},utime(e,r,t){var n=pe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new pe.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=Z.normalize(e);try{n=pe.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new pe.ErrnoError(20)}else n=pe.mknod(e,t,0),a=!0;if(!n)throw new pe.ErrnoError(44);if(pe.isChrdev(n.mode)&&(r&=-513),65536&r&&!pe.isDir(n.mode))throw new pe.ErrnoError(54);if(!a){var i=pe.mayOpen(n,r);if(i)throw new pe.ErrnoError(i)}512&r&&!a&&pe.truncate(n,0),r&=-131713;var s=pe.createStream({node:n,path:pe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(pe.readFiles||(pe.readFiles={}),e in pe.readFiles||(pe.readFiles[e]=1)),s},close(e){if(pe.isClosed(e))throw new pe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{pe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new pe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(1==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.read)throw new pe.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.write)throw new pe.ErrnoError(28);e.seekable&&1024&e.flags&&pe.llseek(e,0,2);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(r<0||t<=0)throw new pe.ErrnoError(28);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(!pe.isFile(e.node.mode)&&!pe.isDir(e.node.mode))throw new pe.ErrnoError(43);if(!e.stream_ops.allocate)throw new pe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new pe.ErrnoError(2);if(1==(2097155&e.flags))throw new pe.ErrnoError(2);if(!e.stream_ops.mmap)throw new pe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new pe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=pe.open(e,r.flags),o=pe.stat(e).size,a=new Uint8Array(o);return pe.read(n,a,0,o,0),"utf8"===r.encoding?t=ne(a,0):"binary"===r.encoding&&(t=a),pe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=pe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ae(r)+1),a=ie(r,o,0,o.length);pe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");pe.write(n,r,0,r.byteLength,void 0,t.canOwn)}pe.close(n)},cwd:()=>pe.currentPath,chdir(e){var r=pe.lookupPath(e,{follow:!0});if(null===r.node)throw new pe.ErrnoError(44);if(!pe.isDir(r.node.mode))throw new pe.ErrnoError(54);var t=pe.nodePermissions(r.node,"x");if(t)throw new pe.ErrnoError(t);pe.currentPath=r.path},createDefaultDirectories(){pe.mkdir("/tmp"),pe.mkdir("/home"),pe.mkdir("/home/web_user")},createDefaultDevices(){pe.mkdir("/dev"),pe.registerDevice(pe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),pe.mkdev("/dev/null",pe.makedev(1,3)),ue.register(pe.makedev(5,0),ue.default_tty_ops),ue.register(pe.makedev(6,0),ue.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ee(e).byteLength),e[--r]);pe.createDevice("/dev","random",t),pe.createDevice("/dev","urandom",t),pe.mkdir("/dev/shm"),pe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){pe.mkdir("/proc");var e=pe.mkdir("/proc/self");pe.mkdir("/proc/self/fd"),pe.mount({mount(){var r=pe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=pe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?pe.createDevice("/dev","stdin",o.stdin):pe.symlink("/dev/tty","/dev/stdin"),o.stdout?pe.createDevice("/dev","stdout",null,o.stdout):pe.symlink("/dev/tty","/dev/stdout"),o.stderr?pe.createDevice("/dev","stderr",null,o.stderr):pe.symlink("/dev/tty1","/dev/stderr"),pe.open("/dev/stdin",0),pe.open("/dev/stdout",1),pe.open("/dev/stderr",1)},ensureErrnoError(){pe.ErrnoError||(pe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},pe.ErrnoError.prototype=new Error,pe.ErrnoError.prototype.constructor=pe.ErrnoError,[44].forEach((e=>{pe.genericErrors[e]=new pe.ErrnoError(e),pe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){pe.ensureErrnoError(),pe.nameTable=new Array(4096),pe.mount(le,{},"/"),pe.createDefaultDirectories(),pe.createDefaultDevices(),pe.createSpecialDirectories(),pe.filesystems={MEMFS:le}},init(e,r,t){pe.init.initialized=!0,pe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,pe.createStandardStreams()},quit(){pe.init.initialized=!1;for(var e=0;e<pe.streams.length;e++){var r=pe.streams[e];r&&pe.close(r)}},findObject(e,r){var t=pe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=pe.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=pe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Z.basename(e),n=pe.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:pe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Z.join2(e,a);try{pe.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=Z.join2("string"==typeof e?e:pe.getPath(e),r),i=he(n,o);return pe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:pe.getPath(e),i=r?Z.join2(e,r):e);var s=he(n,o),u=pe.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}pe.chmod(u,146|s);var d=pe.open(u,577);pe.write(d,t,0,t.length,0,a),pe.close(d),pe.chmod(u,s)}return u},createDevice(e,r,t,n){var o=Z.join2("string"==typeof e?e:pe.getPath(e),r),a=he(!!t,!!n);pe.createDevice.major||(pe.createDevice.major=64);var i=pe.makedev(pe.createDevice.major++,0);return pe.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new pe.ErrnoError(29)}if(void 0===u&&0===i)throw new pe.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new pe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),pe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):se(o.responseText||"",!0)})(r,o)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=pe.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((e=>{var r=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),r.apply(null,arguments)}})),c.read=(e,r,t,n,o)=>(pe.forceLoadFile(u),l(e,r,t,n,o)),c.mmap=(e,r,t,n,o)=>{pe.forceLoadFile(u);var a=ce(r);if(!a)throw new pe.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},u.stream_ops=c,u}},me=(e,r)=>e?ne(g,e,r):"",ye={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(Z.isAbs(r))return r;var n;if(n=-100===e?pe.cwd():ye.getStreamFromFD(e).path,0==r.length){if(!t)throw new pe.ErrnoError(44);return n}return Z.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Z.normalize(r)!==Z.normalize(pe.getPath(e.node)))return-54;throw e}_[t>>2]=n.dev,_[t+4>>2]=n.mode,E[t+8>>2]=n.nlink,_[t+12>>2]=n.uid,_[t+16>>2]=n.gid,_[t+20>>2]=n.rdev,F=[n.size>>>0,(D=n.size,+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[t+24>>2]=F[0],_[t+28>>2]=F[1],_[t+32>>2]=4096,_[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return F=[Math.floor(o/1e3)>>>0,(D=Math.floor(o/1e3),+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[t+40>>2]=F[0],_[t+44>>2]=F[1],E[t+48>>2]=o%1e3*1e3,F=[Math.floor(a/1e3)>>>0,(D=Math.floor(a/1e3),+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[t+56>>2]=F[0],_[t+60>>2]=F[1],E[t+64>>2]=a%1e3*1e3,F=[Math.floor(i/1e3)>>>0,(D=Math.floor(i/1e3),+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[t+72>>2]=F[0],_[t+76>>2]=F[1],E[t+80>>2]=i%1e3*1e3,F=[n.ino>>>0,(D=n.ino,+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[t+88>>2]=F[0],_[t+92>>2]=F[1],0},doMsync(e,r,t,n,o){if(!pe.isFile(r.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);pe.msync(r,a,o,t,n)},varargs:void 0,get(){var e=_[ye.varargs>>2];return ye.varargs+=4,e},getp:()=>ye.get(),getStr:e=>me(e),getStreamFromFD:e=>pe.getStreamChecked(e)},ve={},ge=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function we(e){return this.fromWireType(_[e>>2])}var be={},_e={},Ee={},ke=void 0,Te=e=>{throw new ke(e)},Pe=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Te("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){Ee[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{_e.hasOwnProperty(e)?o[r]=_e[e]:(a.push(e),be.hasOwnProperty(e)||(be[e]=[]),be[e].push((()=>{o[r]=_e[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Ce={},$e=void 0,Se=e=>{for(var r="",t=e;g[t];)r+=$e[g[t++]];return r},Ae=void 0,De=e=>{throw new Ae(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||De(`type "${n}" must have a positive integer typeid pointer`),_e.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;De(`Cannot register type '${n}' twice`)}if(_e[e]=r,delete Ee[e],be.hasOwnProperty(e)){var o=be[e];delete be[e],o.forEach((e=>e()))}}(e,r,t)}var je=8;function Me(e){if(!(this instanceof rr))return!1;if(!(e instanceof rr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}var Oe=e=>{De(e.$$.ptrType.registeredClass.name+" instance already deleted")},We=!1,xe=e=>{},Re=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},ze=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=ze(e,r,t.baseClass);return null===n?null:t.downcast(n)},Ie={},Le=()=>Object.keys(qe).length,Be=()=>{var e=[];for(var r in qe)qe.hasOwnProperty(r)&&e.push(qe[r]);return e},Ne=[],He=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},Ue=void 0,Ve=e=>{Ue=e,Ne.length&&Ue&&Ue(He)},qe={},Ye=(e,r)=>(r=((e,r)=>{for(void 0===r&&De("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),qe[r]),Ke=(e,r)=>(r.ptrType&&r.ptr||Te("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&Te("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Je(Object.create(e,{$$:{value:r}})));function Ge(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=Ye(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ke(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Ke(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Ie[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=ze(r,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ke(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):Ke(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Je=e=>"undefined"==typeof FinalizationRegistry?(Je=e=>e,e):(We=new FinalizationRegistry((e=>{Re(e.$$)})),Je=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};We.register(e,t,e)}return e},xe=e=>We.unregister(e),Je(e));function Qe(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=Je(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function Xe(){this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&De("Object already scheduled for deletion"),xe(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ze(){return!this.$$.ptr}function er(){return this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&De("Object already scheduled for deletion"),Ne.push(this),1===Ne.length&&Ue&&Ue(He),this.$$.deleteScheduled=!0,this}function rr(){}var tr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e};function nr(e,r){return{[e=tr(e)]:function(){return r.apply(this,arguments)}}[e]}var or=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||De(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ar=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&De(`Cannot register public name '${e}' twice`),or(o,e,e),o.hasOwnProperty(t)&&De(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))};function ir(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var sr=(e,r,t)=>{for(;r!==t;)r.upcast||De(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function ur(e,r){if(null===r)return this.isReference&&De(`null is not a valid ${this.name}`),0;r.$$||De(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||De(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function cr(e,r){var t;if(null===r)return this.isReference&&De(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||De(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||De(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&De(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=sr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&De("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:De(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Mr.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:De("Unsupporting sharing policy")}return t}function lr(e,r){if(null===r)return this.isReference&&De(`null is not a valid ${this.name}`),0;r.$$||De(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||De(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&De(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function fr(e){return this.fromWireType(E[e>>2])}function dr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function hr(e){this.rawDestructor&&this.rawDestructor(e)}var pr=e=>{null!==e&&e.delete()};function mr(e,r,t,n,o,a,i,s,u,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==r.baseClass?this.toWireType=cr:n?(this.toWireType=ur,this.destructorFunction=null):(this.toWireType=lr,this.destructorFunction=null)}var yr=(e,r,t)=>{o.hasOwnProperty(e)||Te("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},vr=[],gr=e=>{var r=vr[e];return r||(e>=vr.length&&(vr.length=e+1),vr[e]=r=P.get(e)),r},wr=(e,r,t)=>e.includes("j")?((e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):gr(r).apply(null,t),br=(e,r)=>{var t,n,o,a=(e=Se(e)).includes("j")?(t=e,n=r,o=[],function(){return o.length=0,Object.assign(o,arguments),wr(t,n,o)}):gr(r);return"function"!=typeof a&&De(`unknown function pointer with signature ${e}: ${r}`),a},_r=void 0,Er=e=>{var r=$t(e),t=Se(r);return Tt(r),t},kr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||_e[r]||(Ee[r]?Ee[r].forEach(e):(t.push(r),n[r]=!0))})),new _r(`${e}: `+t.map(Er).join([", "]))},Tr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(E[r+4*n>>2]);return t};function Pr(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=nr(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Cr(e,r,t,n,o,a){var i=r.length;i<2&&De("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,c=1;c<r.length;++c)if(null!==r[c]&&void 0===r[c].destructorFunction){u=!0;break}var l="void"!==r[0].name,f="",d="";for(c=0;c<i-2;++c)f+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tr(e)}(${f}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[De,n,o,ge,r[0],r[1]];for(s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+r[c+2].name+"\n",m.push("argType"+c),y.push(r[c+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),h+=(l||a?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<r.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==r[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+r[c].name+"\n",m.push(v+"_dtor"),y.push(r[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),Pr(Function,m).apply(null,y)}var $r=(e,r,t)=>(e instanceof Object||De(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||De(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||De(`cannot call emscripten binding method ${t} on deleted object`),sr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass));function Sr(){this.allocated=[void 0],this.freelist=[]}var Ar,Dr=new Sr,Fr=e=>{e>=Dr.reserved&&0==--Dr.get(e).refcount&&Dr.free(e)},jr=()=>{for(var e=0,r=Dr.reserved;r<Dr.allocated.length;++r)void 0!==Dr.allocated[r]&&++e;return e},Mr={toValue:e=>(e||De("Cannot use deleted val. handle = "+e),Dr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Dr.allocate({refcount:1,value:e})}}},Or=(e,r,t)=>{switch(r){case 1:return t?function(e){return this.fromWireType(v[e>>0])}:function(e){return this.fromWireType(g[e>>0])};case 2:return t?function(e){return this.fromWireType(w[e>>1])}:function(e){return this.fromWireType(b[e>>1])};case 4:return t?function(e){return this.fromWireType(_[e>>2])}:function(e){return this.fromWireType(E[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Wr=(e,r)=>{var t=_e[e];return void 0===t&&De(r+" has unknown type "+Er(e)),t},xr=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Rr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(k[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},zr=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>g[e>>0];case 2:return t?e=>w[e>>1]:e=>b[e>>1];case 4:return t?e=>_[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Ir=(e,r,t)=>ie(e,g,r,t),Lr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Br=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&b[n];)++n;if((t=n<<1)-e>32&&Lr)return Lr.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Nr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Hr=e=>2*e.length,Ur=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=_[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Vr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),_[r>>2]=i,(r+=4)+4>o)break}return _[r>>2]=0,r-n},qr=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Yr={},Kr=e=>{var r=Yr[e];return void 0===r?Se(e):r},Gr=[],Jr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Qr=[],Xr=e=>e%4==0&&(e%100!=0||e%400==0),Zr=[0,31,60,91,121,152,182,213,244,274,305,335],et=[0,31,59,90,120,151,181,212,243,273,304,334],rt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,tt=e=>{var r=ae(e)+1,t=kt(r);return t&&Ir(e,t,r),t},nt=[],ot=(e,r,t)=>{var n=((e,r)=>{var t;for(nt.length=0;t=g[e++];)r+=105!=t&&r%8?4:0,nt.push(105==t?_[r>>2]:T[r>>3]),r+=105==t?4:8;return nt})(r,t);return U[e].apply(null,n)};Ar=()=>performance.now();var at,it,st,ut=e=>{var r=(e-m.buffer.byteLength+65535)/65536;try{return m.grow(r),$(),1}catch(e){}},ct={},lt=()=>{if(!lt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var r in ct)void 0===ct[r]?delete e[r]:e[r]=ct[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);lt.strings=t}return lt.strings},ft=e=>{y||(o.onExit&&o.onExit(e),C=!0),l(e,new V(e))},dt=(e,r)=>{ft(e)},ht=[31,29,31,30,31,30,31,31,30,31,30,31],pt=[31,28,31,30,31,30,31,31,30,31,30,31],mt=(e,r,t,n)=>{var o=E[n+40>>2],a={tm_sec:_[n>>2],tm_min:_[n+4>>2],tm_hour:_[n+8>>2],tm_mday:_[n+12>>2],tm_mon:_[n+16>>2],tm_year:_[n+20>>2],tm_wday:_[n+24>>2],tm_yday:_[n+28>>2],tm_isdst:_[n+32>>2],tm_gmtoff:_[n+36>>2],tm_zone:o?me(o):""},i=me(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return f(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Xr(t.getFullYear()),o=t.getMonth(),a=(n?ht:pt)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>l[e.tm_mon].substring(0,3),"%B":e=>l[e.tm_mon],"%C":e=>d((e.tm_year+1900)/100|0,2),"%d":e=>d(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>m(e).toString().substring(2),"%G":e=>m(e),"%H":e=>d(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":e=>d(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(Xr(e.tm_year+1900)?ht:pt,e.tm_mon-1),3),"%m":e=>d(e.tm_mon+1,2),"%M":e=>d(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>d(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Xr(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Xr(e.tm_year%400-1))&&r++}return d(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var g,w,b=se(i=i.replace(/\0\0/g,"%"),!1);return b.length>r?0:(g=b,w=e,v.set(g,w),b.length-1)},yt=tt,vt=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},gt=365,wt=146;Object.defineProperties(vt.prototype,{read:{get:function(){return(this.mode&gt)===gt},set:function(e){e?this.mode|=gt:this.mode&=-366}},write:{get:function(){return(this.mode&wt)===wt},set:function(e){e?this.mode|=wt:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=vt,pe.createPreloadedFile=(e,r,t,n,o,a,i,s,u,c)=>{var l=r?re.resolve(Z.join2(e,r)):e;function f(t){function f(t){c&&c(),s||pe.createDataFile(e,r,t,n,o,u),a&&a(),I()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return de.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,l,f,(()=>{i&&i(),I()}))||f(t)}z(),"string"==typeof t?fe(t,(e=>f(e)),i):f(t)},pe.staticInit(),ke=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);$e=e})(),Ae=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},rr.prototype.isAliasOf=Me,rr.prototype.clone=Qe,rr.prototype.delete=Xe,rr.prototype.isDeleted=Ze,rr.prototype.deleteLater=er,o.getInheritedInstanceCount=Le,o.getLiveInheritedInstances=Be,o.flushPendingDeletes=He,o.setDelayFunction=Ve,mr.prototype.getPointee=dr,mr.prototype.destructor=hr,mr.prototype.argPackAdvance=je,mr.prototype.readValueFromPointer=fr,mr.prototype.deleteObject=pr,mr.prototype.fromWireType=Ge,_r=o.UnboundTypeError=(at=Error,(st=nr(it="UnboundTypeError",(function(e){this.name=it,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(at.prototype),st.prototype.constructor=st,st.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},st),Object.assign(Sr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Dr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Dr.reserved=Dr.allocated.length,o.count_emval_handles=jr;var bt,_t={t:e=>{var r=new J(e);return r.get_caught()||(r.set_caught(!0),K--),r.set_rethrown(!1),Y.push(r),Mt(r.excPtr),r.get_exception_ptr()},zb:()=>{if(!Y.length)return 0;var e=Y[Y.length-1];return Mt(e.excPtr),e.excPtr},y:()=>{At(0,0);var e=Y.pop();jt(e.excPtr),G=0},a:()=>Q([]),g:e=>Q([e]),F:(e,r)=>Q([e,r]),Ca:X,yb:e=>{if(e){var r=new J(e);Y.push(r),r.set_rethrown(!0),X()}},o:(e,r,t)=>{throw new J(e).init(r,t),K++,G=e},Ab:()=>K,d:e=>{throw G||(G=e),G},Fb:function(e,r,t,n,o){try{for(var a=0,i=r?_[r>>2]:0,s=r?_[r+4>>2]:0,u=t?_[t>>2]:0,c=t?_[t+4>>2]:0,l=n?_[n>>2]:0,f=n?_[n+4>>2]:0,d=0,h=0,p=0,m=0,y=0,v=0,g=(r?_[r>>2]:0)|(t?_[t>>2]:0)|(n?_[n>>2]:0),w=(r?_[r+4>>2]:0)|(t?_[t+4>>2]:0)|(n?_[n+4>>2]:0),b=function(e,r,t,n){return e<32?r&n:t&n},E=0;E<e;E++){var k=1<<E%32;if(b(E,g,w,k)){var T=ye.getStreamFromFD(E),P=ye.DEFAULT_POLLMASK;if(T.stream_ops.poll){var C=-1;o&&(C=1e3*((r?_[o>>2]:0)+(r?_[o+8>>2]:0)/1e6)),P=T.stream_ops.poll(T,C)}1&P&&b(E,i,s,k)&&(E<32?d|=k:h|=k,a++),4&P&&b(E,u,c,k)&&(E<32?p|=k:m|=k,a++),2&P&&b(E,l,f,k)&&(E<32?y|=k:v|=k,a++)}}return r&&(_[r>>2]=d,_[r+4>>2]=h),t&&(_[t>>2]=p,_[t+4>>2]=m),n&&(_[n>>2]=y,_[n+4>>2]=v),a}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ma:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 0:if((o=ye.get())<0)return-28;for(;pe.streams[o];)o++;return pe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return o=ye.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,_[Pt()>>2]=a,-1}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}var a},Mb:function(e,r){try{var t=ye.getStreamFromFD(e);return ye.doStat(pe.stat,t.path,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Nb:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=ye.getp();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=ye.getp();var s=_[a>>2],u=_[a+4>>2],c=_[a+8>>2],l=_[a+12>>2],f=[];for(i=0;i<32;i++)f.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:f})}return 0;case 21519:return n.tty?(a=ye.getp(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=ye.getp(),pe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=ye.getp(),w[a>>1]=d[0],w[a+2>>1]=d[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Kb:function(e,r,t,n){try{r=ye.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=ye.calculateAt(e,r,a),ye.doStat(o?pe.lstat:pe.stat,r,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Na:function(e,r,t,n){ye.varargs=n;try{r=ye.getStr(r),r=ye.calculateAt(e,r);var o=n?ye.get():0;return pe.open(r,t,o).fd}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Gb:function(e){try{return e=ye.getStr(e),pe.rmdir(e),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Lb:function(e,r){try{return e=ye.getStr(e),ye.doStat(pe.stat,e,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Hb:function(e,r,t){try{return r=ye.getStr(r),r=ye.calculateAt(e,r),0===t?pe.unlink(r):512===t?pe.rmdir(r):L("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},jb:e=>{var r=ve[e];delete ve[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Pe([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],u=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];u(c,e,s.toWireType(t,r)),ge(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==e&&e.push(i,s),s},argPackAdvance:je,readValueFromPointer:we,destructorFunction:i}]}))},ib:e=>{var r=Ce[e];delete Ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Pe([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],l=r.setter,f=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];l(f,e,c.toWireType(t,r)),ge(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:je,readValueFromPointer:we,destructorFunction:n}]}))},tb:(e,r,t,n,o)=>{},Rb:(e,r,t,n)=>{Fe(e,{name:r=Se(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:je,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},T:(e,r,t,n,o,a,i,s,u,c,l,f,d)=>{l=Se(l),a=br(o,a),s&&(s=br(i,s)),c&&(c=br(u,c)),d=br(f,d);var h=tr(l);ar(h,(function(){kr(`Cannot construct ${l} due to unbound types`,[n])})),Pe([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:rr.prototype;var i=nr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new Ae("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Ae(l+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new Ae(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(f.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var f=new ir(l,i,u,d,t,a,s,c);f.baseClass&&(void 0===f.baseClass.__derivedClasses&&(f.baseClass.__derivedClasses=[]),f.baseClass.__derivedClasses.push(f));var p=new mr(l,f,!0,!1,!1),m=new mr(l+"*",f,!1,!1,!1),y=new mr(l+" const*",f,!1,!0,!1);return Ie[e]={pointerType:m,constPointerType:y},yr(h,i),[p,m,y]}))},Ia:(e,r,t,n,o,a)=>{var i=Tr(r,t);o=br(n,o),Pe([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Ae(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{kr(`Cannot construct ${e.name} due to unbound types`,i)},Pe([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Cr(t,n,null,o,a),[]))),[]}))},Ha:(e,r,t,n,o,a,i,s,u)=>{var c=Tr(t,n);r=Se(r),a=br(o,a),Pe([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){kr(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var l=e.registeredClass.instancePrototype,f=l[r];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===t-2?(o.argCount=t-2,o.className=e.name,l[r]=o):(or(l,r,n),l[r].overloadTable[t-2]=o),Pe([],c,(function(o){var s=Cr(n,o,e,a,i,u);return void 0===l[r].overloadTable?(s.argCount=t-2,l[r]=s):l[r].overloadTable[t-2]=s,[]})),[]}))},H:(e,r,t,n,o,a,i,s,u,c)=>{r=Se(r),o=br(n,o),Pe([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,l={get(){kr(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>kr(`Cannot access ${n} due to unbound types`,[t,i]):e=>De(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,l),Pe([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var r=$r(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(u){u=br(s,u);var f=t[1];l.set=function(r){var t=$r(this,e,n+" setter"),o=[];u(c,t,f.toWireType(o,r)),ge(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,l),[]})),[]}))},Qb:(e,r)=>{Fe(e,{name:r=Se(r),fromWireType:e=>{var r=Mr.toValue(e);return Fr(e),r},toWireType:(e,r)=>Mr.toHandle(r),argPackAdvance:je,readValueFromPointer:we,destructorFunction:null})},kb:(e,r,t,n)=>{function o(){}r=Se(r),o.values={},Fe(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:je,readValueFromPointer:Or(r,t,n),destructorFunction:null}),ar(r,o)},V:(e,r,t)=>{var n=Wr(e,"enum");r=Se(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:nr(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},Pa:(e,r,t)=>{Fe(e,{name:r=Se(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:je,readValueFromPointer:Rr(r,t),destructorFunction:null})},ka:(e,r,t,n,o,a,i)=>{var s=Tr(r,t);e=Se(e),o=br(n,o),ar(e,(function(){kr(`Cannot call ${e} due to unbound types`,s)}),r-1),Pe([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return yr(e,Cr(e,n,null,o,a,i),r-1),[]}))},P:(e,r,t,n,o)=>{r=Se(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:je,readValueFromPointer:zr(r,t,0!==n),destructorFunction:null})},E:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=E[e>>2],t=E[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=Se(t),fromWireType:o,argPackAdvance:je,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Oa:(e,r)=>{var t="std::string"===(r=Se(r));Fe(e,{name:r,fromWireType:e=>{var r,n=E[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==g[s]){var u=me(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(g[o+i]);r=c.join("")}return Tt(e),r},toWireType:(e,r)=>{var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||De("Cannot pass non-string to std::string"),n=t&&o?ae(r):r.length;var a=kt(4+n+1),i=a+4;if(E[a>>2]=n,t&&o)Ir(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(Tt(i),De("String has UTF-16 code units that do not fit in 8 bits")),g[i+s]=u}else for(s=0;s<n;++s)g[i+s]=r[s];return null!==e&&e.push(Tt,a),a},argPackAdvance:je,readValueFromPointer:fr,destructorFunction:e=>Tt(e)})},wa:(e,r,t)=>{var n,o,a,i,s;t=Se(t),2===r?(n=Br,o=Nr,i=Hr,a=()=>b,s=1):4===r&&(n=Ur,o=Vr,i=qr,a=()=>E,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=E[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var l=e+4+c*r;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=l+r}}return Tt(e),t},toWireType:(e,n)=>{"string"!=typeof n&&De(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=kt(4+a+r);return E[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(Tt,u),u},argPackAdvance:je,readValueFromPointer:we,destructorFunction:e=>Tt(e)})},Ga:(e,r,t,n,o,a)=>{ve[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),elements:[]}},Fa:(e,r,t,n,o,a,i,s,u)=>{ve[e].elements.push({getterReturnType:r,getter:br(t,n),getterContext:o,setterArgumentType:a,setter:br(i,s),setterContext:u})},Q:(e,r,t,n,o,a)=>{Ce[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),fields:[]}},D:(e,r,t,n,o,a,i,s,u,c)=>{Ce[e].fields.push({fieldName:Se(r),getterReturnType:t,getter:br(n,o),getterContext:a,setterArgumentType:i,setter:br(s,u),setterContext:c})},Sb:(e,r)=>{Fe(e,{isVoid:!0,name:r=Se(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Ob:()=>!0,Bb:()=>{throw 1/0},M:(e,r,t)=>{e=Mr.toValue(e),r=Wr(r,"emval::as");var n=[],o=Mr.toHandle(n);return E[t>>2]=o,r.toWireType(n,e)},Da:(e,r,t,n,o)=>(e=Gr[e])(r=Mr.toValue(r),t=Kr(t),(e=>{var r=[];return E[e>>2]=Mr.toHandle(r),r})(n),o),sa:(e,r,t,n)=>{(e=Gr[e])(r=Mr.toValue(r),t=Kr(t),null,n)},lb:Fr,qa:e=>0===e?Mr.toHandle(Jr()):(e=Kr(e),Mr.toHandle(Jr()[e])),ba:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Wr(E[r+4*n>>2],"parameter "+n);return t})(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Qr[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(t[1+c]);var l="return function "+tr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)t[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var d,h,p=Pr(Function,i).apply(null,s);return d=p,h=Gr.length,Gr.push(d),a=h,Qr[o]=a,a},gb:(e,r)=>(e=Mr.toValue(e),r=Mr.toValue(r),Mr.toHandle(e[r])),ha:e=>{e>4&&(Dr.get(e).refcount+=1)},ab:(e,r)=>(e=Mr.toValue(e))instanceof(r=Mr.toValue(r)),bb:e=>"string"==typeof(e=Mr.toValue(e)),ga:()=>Mr.toHandle([]),eb:e=>{e=Mr.toValue(e);for(var r=new Array(e.length),t=0;t<e.length;t++)r[t]=e[t];return Mr.toHandle(r)},ra:e=>Mr.toHandle(Kr(e)),hb:e=>{var r=Mr.toValue(e);ge(r),Fr(e)},K:(e,r)=>{var t=(e=Wr(e,"_emval_take_value")).readValueFromPointer(r);return Mr.toHandle(t)},rb:function(e,r,t){var n=rt(e,r),o=new Date(1e3*n);_[t>>2]=o.getSeconds(),_[t+4>>2]=o.getMinutes(),_[t+8>>2]=o.getHours(),_[t+12>>2]=o.getDate(),_[t+16>>2]=o.getMonth(),_[t+20>>2]=o.getFullYear()-1900,_[t+24>>2]=o.getDay();var a=0|(e=>(Xr(e.getFullYear())?Zr:et)[e.getMonth()]+e.getDate()-1)(o);_[t+28>>2]=a,_[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=i.getTimezoneOffset(),c=0|(s!=u&&o.getTimezoneOffset()==Math.min(u,s));_[t+32>>2]=c},qb:function(e,r,t,n,o,a,i){var s=rt(a,i);try{if(isNaN(s))return 61;var u=ye.getStreamFromFD(o);2&t&&ye.doMsync(e,u,r,n,s),pe.munmap(u)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Db:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}E[e>>2]=60*u,_[r>>2]=Number(i!=s);var l=c(o),f=c(a),d=tt(l),h=tt(f);s<i?(E[t>>2]=d,E[t+4>>2]=h):(E[t>>2]=h,E[t+4>>2]=d)},w:()=>{L("")},Ea:(e,r,t)=>ot(e,r,t),ua:()=>Date.now(),Eb:()=>2147483648,ca:Ar,Pb:(e,r,t)=>g.copyWithin(e,r,r+t),Cb:e=>{var r=g.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(ut(s))return!0}return!1},Ib:(e,r)=>{var t=0;return lt().forEach(((n,o)=>{var a=r+t;E[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0})(n,a),t+=n.length+1})),0},Jb:(e,r)=>{var t=lt();E[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),E[r>>2]=n,0},Tb:dt,va:function(e){try{var r=ye.getStreamFromFD(e);return pe.close(r),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},La:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=pe.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return E[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},sb:function(e,r,t,n,o){var a=rt(r,t);try{if(isNaN(a))return 61;var i=ye.getStreamFromFD(e);return pe.llseek(i,a,n),F=[i.position>>>0,(D=i.position,+Math.abs(D)>=1?D>0?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)],_[o>>2]=F[0],_[o+4>>2]=F[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},ta:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=pe.write(e,v,i,s,n);if(u<0)return-1;o+=u,"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return E[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},db:function(){return yt(location.toString())},cb:function(){return yt((e=Ut,self[e(245,"e@PJ")][e(234,"#GCi")]()));var e},Ta:function(e,r){var t=Dt();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;At(1,0)}},Va:function(e,r,t,n,o,a){var i=Dt();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},z:function(e,r,t,n){var o=Dt();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},Wb:function(e,r,t,n,o,a,i,s){var u=Dt();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},p:function(e,r){var t=Dt();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;At(1,0)}},v:function(e,r,t){var n=Dt();try{return gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},L:function(e,r,t,n){var o=Dt();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},ea:function(e,r,t,n,o){var a=Dt();try{return gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},u:function(e){var r=Dt();try{return gr(e)()}catch(e){if(Ft(r),e!==e+0)throw e;At(1,0)}},h:function(e,r){var t=Dt();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;At(1,0)}},b:function(e,r,t){var n=Dt();try{return gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},f:function(e,r,t,n){var o=Dt();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},k:function(e,r,t,n,o){var a=Dt();try{return gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},Ka:function(e,r,t,n,o,a){var i=Dt();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},Za:function(e,r,t,n,o,a){var i=Dt();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},n:function(e,r,t,n,o,a){var i=Dt();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},x:function(e,r,t,n,o,a,i){var s=Dt();try{return gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},Ja:function(e,r,t,n,o,a,i,s){var u=Dt();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},na:function(e,r,t,n,o,a,i,s,u){var c=Dt();try{return gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;At(1,0)}},Ub:function(e,r,t,n,o,a,i,s,u,c){var l=Dt();try{return gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;At(1,0)}},ja:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=Dt();try{return gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;At(1,0)}},nb:function(e,r,t,n,o,a,i){var s=Dt();try{return Bt(e,r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},vb:function(e,r,t,n){var o=Dt();try{return zt(e,r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},pb:function(e){var r=Dt();try{return It(e)}catch(e){if(Ft(r),e!==e+0)throw e;At(1,0)}},wb:function(e,r){var t=Dt();try{return xt(e,r)}catch(e){if(Ft(t),e!==e+0)throw e;At(1,0)}},ob:function(e,r,t){var n=Dt();try{return Lt(e,r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},mb:function(e,r,t,n,o){var a=Dt();try{return Nt(e,r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},l:function(e){var r=Dt();try{gr(e)()}catch(e){if(Ft(r),e!==e+0)throw e;At(1,0)}},i:function(e,r){var t=Dt();try{gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;At(1,0)}},fb:function(e,r,t){var n=Dt();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},fa:function(e,r,t){var n=Dt();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},c:function(e,r,t){var n=Dt();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;At(1,0)}},X:function(e,r,t,n){var o=Dt();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},Xa:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},Sa:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},ma:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},$:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},pa:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},J:function(e,r,t,n){var o=Dt();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},Y:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},za:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},oa:function(e,r,t,n,o,a){var i=Dt();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},Aa:function(e,r,t,n,o,a,i,s,u){var c=Dt();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;At(1,0)}},e:function(e,r,t,n){var o=Dt();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},A:function(e,r,t,n,o,a){var i=Dt();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},Xb:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},I:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},B:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},_:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},Ra:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},S:function(e,r,t,n,o,a){var i=Dt();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},Ya:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},ya:function(e,r,t,n,o,a,i,s,u,c){var l=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;At(1,0)}},Wa:function(e,r,t,n,o,a,i,s,u,c,l){var f=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;At(1,0)}},j:function(e,r,t,n,o){var a=Dt();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;At(1,0)}},Ba:function(e,r,t,n,o,a,i,s,u){var c=Dt();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;At(1,0)}},C:function(e,r,t,n,o,a){var i=Dt();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},U:function(e,r,t,n,o,a,i,s,u,c){var l=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;At(1,0)}},da:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},m:function(e,r,t,n,o,a){var i=Dt();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;At(1,0)}},_a:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},s:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},W:function(e,r,t,n,o,a,i,s,u,c,l){var f=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;At(1,0)}},R:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},q:function(e,r,t,n,o,a,i){var s=Dt();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;At(1,0)}},la:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},Qa:function(e,r,t,n,o,a,i,s,u,c,l){var f=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;At(1,0)}},Vb:function(e,r,t,n,o,a,i,s,u){var c=Dt();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;At(1,0)}},r:function(e,r,t,n,o,a,i,s){var u=Dt();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;At(1,0)}},G:function(e,r,t,n,o,a,i,s,u){var c=Dt();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;At(1,0)}},xa:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;At(1,0)}},N:function(e,r,t,n,o,a,i,s,u,c){var l=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;At(1,0)}},Z:function(e,r,t,n,o,a,i,s,u,c,l){var f=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;At(1,0)}},Ua:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;At(1,0)}},aa:function(e,r,t,n,o,a,i,s,u,c,l,f,d,h){var p=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f,d,h)}catch(e){if(Ft(p),e!==e+0)throw e;At(1,0)}},ia:function(e,r,t,n,o,a,i,s,u,c,l,f,d,h,p,m){var y=Dt();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(e){if(Ft(y),e!==e+0)throw e;At(1,0)}},ub:function(e,r,t,n){var o=Dt();try{Rt(e,r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;At(1,0)}},O:e=>e,$a:mt,xb:(e,r,t,n,o)=>mt(e,r,t,n)},Et=function(){var e,r,n,a,i={a:_t};function s(e,r){var t,n=e.exports;return m=(Et=n).Yb,$(),P=Et.$b,t=Et.Zb,M.unshift(t),I(),n}if(z(),o.instantiateWasm)try{return o.instantiateWasm(i,s)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return(e=d,r=S,n=i,a=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||B(r)||"function"!=typeof fetch?H(r,n,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,n).then(a,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),H(r,n,a)}))))).catch(t),{}}(),kt=o._malloc=e=>(kt=o._malloc=Et._b)(e),Tt=o._free=e=>(Tt=o._free=Et.ac)(e),Pt=()=>(Pt=Et.bc)(),Ct=e=>(Ct=Et.cc)(e),$t=e=>($t=Et.dc)(e),St=(o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=Et.ec)(),(e,r)=>(St=Et.fc)(e,r)),At=(e,r)=>(At=Et.gc)(e,r),Dt=()=>(Dt=Et.hc)(),Ft=e=>(Ft=Et.ic)(e),jt=e=>(jt=Et.jc)(e),Mt=e=>(Mt=Et.kc)(e),Ot=(e,r,t)=>(Ot=Et.lc)(e,r,t),Wt=e=>(Wt=Et.mc)(e),xt=o.dynCall_ji=(e,r)=>(xt=o.dynCall_ji=Et.nc)(e,r),Rt=o.dynCall_vij=(e,r,t,n)=>(Rt=o.dynCall_vij=Et.oc)(e,r,t,n),zt=o.dynCall_iij=(e,r,t,n)=>(zt=o.dynCall_iij=Et.pc)(e,r,t,n),It=(o.dynCall_viijii=(e,r,t,n,a,i,s)=>(o.dynCall_viijii=Et.qc)(e,r,t,n,a,i,s),o.dynCall_jjj=(e,r,t,n,a)=>(o.dynCall_jjj=Et.rc)(e,r,t,n,a),o.dynCall_iiiijj=(e,r,t,n,a,i,s,u)=>(o.dynCall_iiiijj=Et.sc)(e,r,t,n,a,i,s,u),o.dynCall_viijj=(e,r,t,n,a,i,s)=>(o.dynCall_viijj=Et.tc)(e,r,t,n,a,i,s),o.dynCall_viiijjj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_viiijjj=Et.uc)(e,r,t,n,a,i,s,u,c,l),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=Et.vc)(e,r,t,n,a),o.dynCall_j=e=>(It=o.dynCall_j=Et.wc)(e)),Lt=o.dynCall_jii=(e,r,t)=>(Lt=o.dynCall_jii=Et.xc)(e,r,t),Bt=o.dynCall_iiiiij=(e,r,t,n,a,i,s)=>(Bt=o.dynCall_iiiiij=Et.yc)(e,r,t,n,a,i,s),Nt=o.dynCall_jiiii=(e,r,t,n,a)=>(Nt=o.dynCall_jiiii=Et.zc)(e,r,t,n,a);function Ht(){function e(){bt||(bt=!0,o.calledRun=!0,C||(o.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,ue.init(),q(M),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),O.unshift(e);var e;q(O)}()))}W>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),j.unshift(e);var e;q(j)}(),W>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiijj=(e,r,t,n,a,i,s,u,c)=>(o.dynCall_iiiiijj=Et.Ac)(e,r,t,n,a,i,s,u,c),o.dynCall_iiiiiijj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_iiiiiijj=Et.Bc)(e,r,t,n,a,i,s,u,c,l),o.___start_em_js=1109748,o.___stop_em_js=1109856,o.UTF8ToString=me,o.stringToUTF8=Ir,o.lengthBytesUTF8=ae,o.allocateUTF8=yt,R=function e(){bt||Ht(),bt||(R=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ut(e,r){var t=Vt();return Ut=function(r,n){var o=t[r-=227];if(void 0===Ut.SBkdTJ){var a=function(e){for(var r,t,n="",o="",a=0,i=0;t=e.charAt(i++);~t&&(r=a%4?64*r+t:t,a++%4)?n+=String.fromCharCode(255&r>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(e,r){var t,n,o=[],i=0,s="";for(e=a(e),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+r.charCodeAt(n%r.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<e.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(e.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Ut.LHEObZ=i,e=arguments,Ut.SBkdTJ=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Ut.cebVMN&&(Ut.cebVMN=!0),o=Ut.LHEObZ(o,n),e[u]=o),o},Ut(e,r)}function Vt(){var e=["W6jyvW3cNSoEFmooWP8Uh37cGq","gfP1dSo+q1bZWOriWO7cP8oT","W4f4W6RdNv/dM8kPwwmjjmk4lW","W6JcJmkMW5vewfFcGa","WOJcUev8WQhcRr4J","qNq5ld7dKM0h","W6lcImobWOCflJBcGSk+oCoBpSob","umoAWRDkW5tcKSkKWRy","WOL4WPtdPefWWO7dUa","W5XnWPpdJCkqW6KAW6tdTSoUWR0wiq","WRVcQHhcPSk/W7xdHSk4Aa7cVCov","fLzTWQFdLxddUxJdKdlcNSoVWRq","E8k0naKdrSk+W5VcS8kzWOhcMSo+","afPIW7tcPeNdKWv6jeb4WQu","p8ojW7CrW5tdTI0TW4VdPIq2WPi","CSkZmqapqSk6W4ZcTCkzWQhcK8o/","CKnRsLPWbW4","fSkeCI0xFmk2W7q","WOXekw5RW45teW","xCoqh1HvW51aW4O","W6VcJSkJW5fmFeZcGq","nrz6wvf5swFcR0RdTmkzWPy","hSk5jmk9FdvfW7TFWPT5WRVdPq","omkBhd55AcxcUHpdM8koWQC"];return(Vt=function(){return e})()}Ht(),function(e,r){for(var t=Ut,n=e();;)try{if(994274==parseInt(t(250,"Jw6u"))/1+-parseInt(t(243,"DMKd"))/2+-parseInt(t(227,"(ufM"))/3+parseInt(t(230,"vyr!"))/4*(parseInt(t(249,"4YQq"))/5)+parseInt(t(239,"(]u$"))/6*(-parseInt(t(246,"2[9v"))/7)+parseInt(t(242,"oqqi"))/8*(-parseInt(t(232,"4YQq"))/9)+parseInt(t(236,"cf#v"))/10*(parseInt(t(235,"4YQq"))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vt);var ighnua,qt=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Yt=qt(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yt)};return e()}));return Yt(),e.ready});e.exports=o},function(e,r){}]);
1
+ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=t(1);let o;const a={};function i(e){const r=Math.random().toString(36);return a[r]=e,r}function s(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function u(e){const r=s(e);r.delete&&r.delete(),delete a[e]}const c={initialize:async function(e,r,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality:f=80,requestSuffix:d=""}=s||{};u&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const h=t(3),p=t(4),m={locateFile:function(e,t){let o;return o=r?(0,n.isRemote)(r)?r:"":i,e.endsWith(".worker.js")&&p?p.default:new URL(o+e+d,location).href}},y=(0,n.getBuildType)(s),v=y.includes("-threads");m.mainScriptUrlOrBlob=m.locateFile(`ScanbotSDK.Asm${y}.js`);let g;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&v){let e=[2147483648,805306368,536870912],r=134217728;const t=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&t.includes(SCANBOTSDK_FLAVOR)&&(r=n,e.push(4*n));for(let t=0;t<e.length;t++){const n=e[t];try{g=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),g.grow(r/65536);break}catch(r){if(t===e.length-1)throw r}}}return g&&(m.wasmMemory=g),await h(m),o=m,o.initialize(e||"",a,f)}catch(e){throw console.error(e),e}},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(e,r){return d(o.applyFilter(p(e),r),f)},rotateImageCcw:function(e,r){return d(o.rotateImageCcw(p(e),r),f)},cropAndRotateImageCcw:function(e,r,t){const n=function(e){const r=[];for(let t=0;t<e.length;++t)r.push(e[t].x,e[t].y);return r}(r);return d(o.cropAndRotateImageCcw(p(e),n,t),f)},detectDocument:async function(e,r,t){const n=new o.DocumentDetector({acceptedAngleScore:r,acceptedSizeScore:t}),a=n.detect(p(e));return n.delete(),await l(a)},detectAndCropDocument:async function(e){return await l(o.detectAndCropDocument(p(e)))},createDocumentDetector:async function(e){return i(new o.DocumentDetector(e||{}))},documentDetectorDetect:async function(e,r){const t=s(e);return await l(t.detect(p(r)))},createBarcodeRecognizer:async function(e){return i(new o.BarcodeRecognizer(e||{}))},recognizeBarcodes:async function(e,r,t){let n,a=!1;"string"==typeof e?n=s(e):(t=r,r=e,n=new o.BarcodeRecognizer(t),a=!0);try{const e=n.recognize(p(r),t||{});if(!e)return null;let o;return e.length?(o=e.map((e=>({format:e.format,text:e.text,parsedDocument:e.parsedDocument,rawBytes:f(e.rawBytes),quad:e.quad,barcodeImage:f(e.barcodeImage)}))),e.forEach((e=>e.delete()))):o=[],{result:o,originalImage:r}}finally{a&&n.delete()}},beginPdf:async function(e){return i(new o.PdfGenerationContext(e||{}))},addPageToPdf:async function(e,r){d(s(e).addPage(r))},completePdf:async function(e){const r=d(s(e).complete(),f);return u(e),r},beginTiff:async function(e){const r=new o.TiffGenerationContext(e||{});return d(r.begin()),i(r)},addPageToTiff:async function(e,r){const t=s(e);if("string"==typeof r){let e=s(r).nativeImageContainer();const n=d(t.addPageFromContainer(e));return e.delete(),n}return d(t.addPageFromJsImage(p(r)))},completeTiff:async function(e){try{const r=s(e).complete();return d(r,f)}finally{u(e)}},createMRZRecognizer:async function(e){return i(new o.MrzRecognizerContext(e||{}))},recognizeMRZ:async function(e,r){return s(e).recognize(p(r))},releaseObject:async function(e){u(e)},createOcrEngine:async function(e){return i(new o.TLDROcrContext(e||{}))},performOcr:async function(e,r){return s(e).performOcr(p(r))},createGenericTextLineScanner:async function(e){e.languages||(e.languages=["eng"]);return i(new o.GenericTextLineScanner(e))},recognizeTextLine:async function(e,r){return s(e).recognize(p(r))},cleanTextLineRecognitionQueue:async function(e){s(e).cleanRecognitionQueue()},createDocumentQualityAnalyzer:async function(e){return i(new o.DocumentQualityAnalyzer(e||{}))},documentQualityAnalyzerAnalyze:async function(e,r){return s(e).analyze(p(r))},imageProcessorCreate:async function(e){return i(new o.ImageProcessor(p(e)))},imageProcessorCopy:async function(e){return i(s(e).copy())},imageProcessorApplyFilter:async function(e,r){s(e).applyFilter(r)},imageProcessorCrop:async function(e,r){s(e).crop(r)},imageProcessorResize:async function(e,r){s(e).resize(r)},imageProcessorRotate:async function(e,r){s(e).rotate(r)},imageProcessorEncodedProcessedImage:async function(e,r){return d(s(e).encodedProcessedImage(r),f)},__hasModuleFunction:async function(e){return o.hasOwnProperty(e)},__callModuleFunction:async function(e,r=[]){return o[e].apply(r)}};async function l(e){if(!e)return{success:!1,detectionStatus:"Error_License"};const r=m[e.status],t={detectionStatus:r,success:(n=r,"OK"===n.substr(0,2))};var n;return t.original=f(e.originalImageJpegData),t.success&&(t.cropped=f(e.croppedImageJpegData),t.polygon=function(e){if(e.length%2!=0)throw Error("pointCoords size is not even.");const r=[];for(let t=0;t<e.length;t+=2)r.push({x:e[t],y:e[t+1]});return r}(f(e.polygon)),t.horizontalLines=h(f(e.horizontalLines)),t.verticalLines=h(f(e.verticalLines)),t.averageBrightness=e.averageBrightness),e.delete(),t}function f(e){return e&&e.slice()}function d(e,r){try{if(e.errorMessage){throw new Error(e.errorMessage)}return(r||(e=>e))(e.result)}finally{e.delete()}}function h(e){const r=[];if(!e)return r;if(e.length%4!=0)throw Error("lineCoords size invalid.");for(let t=0;t<e.length;t+=4)r.push({p1:{x:e[t],y:e[t+1]},p2:{x:e[t+2],y:e[t+3]}});return r}function p(e){if(!e)throw new Error("null image data or buffer");return"number"==typeof e.width?e:{data:e,width:-1,height:-1}}const m={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(e){const{command:r,args:t,ticket:a}=e.data;o||"initialize"===r?(async()=>await c[r].apply(null,t))().then((e=>{const r=(0,n.gatherTransferables)(e);self.postMessage({ticket:a,result:e},r)})).catch((e=>{const r="number"==typeof e?Error(o.stringFromException(e)):e;console.error(r),self.postMessage({ticket:a,error:r})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(e,r,t){"use strict";(function(e){function t(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.gatherTransferables=function(e,r){const t=[];return function e(n){if(!n)return;if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return t.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=r?n.slice(0):n;if(t.push(e),r)return n}else if(ArrayBuffer.isView(n)){let e;if(r){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(t.push(e.buffer),r)return n}else if(Array.isArray(n))for(let r=0;r<n.length;++r){const t=e(n[r]);t&&(n[r]=t)}else if(n.constructor===Object)for(const r in n)if(n.hasOwnProperty(r)){const t=e(n[r]);t&&(n[r]=t)}}(e),t},r.isRemote=function(e){return e.startsWith("http:")||e.startsWith("https:")},r.areThreadsAvailable=t,r.getBuildType=function(e){const{allowSimd:r=!0,allowThreads:n=!0}=e||{};let o="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){o+="-simd";n&&t()&&(o+="-threads")}return o}}).call(this,t(2))},function(e,r){var t,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var r=c.length;r;){for(u=c,c=[];++f<r;)u&&u[f].run();f=-1,r=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function p(e,r){this.fun=e,this.array=r}function m(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];c.push(new p(e,r)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,t){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var r,t,o=e;o.ready=new Promise(((e,n)=>{r=e,t=n}));var a,i,s,u=Object.assign({},o),c="./this.program",l=(e,r)=>{throw r},f="";f=self.location.href,n&&(f=n),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var d,h=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(d=o.wasmBinary);var m,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&I("no native wasm support detected");var v,g,w,b,_,E,k,T,C,P=!1;function $(){var e=m.buffer;o.HEAP8=v=new Int8Array(e),o.HEAP16=w=new Int16Array(e),o.HEAPU8=g=new Uint8Array(e),o.HEAPU16=b=new Uint16Array(e),o.HEAP32=_=new Int32Array(e),o.HEAPU32=E=new Uint32Array(e),o.HEAPF32=k=new Float32Array(e),o.HEAPF64=T=new Float64Array(e)}var S,D,A,F,j=[],O=[],W=[],M=0,x=null,R=null;function z(e){M++,o.monitorRunDependencies&&o.monitorRunDependencies(M)}function L(e){if(M--,o.monitorRunDependencies&&o.monitorRunDependencies(M),0==M&&(null!==x&&(clearInterval(x),x=null),R)){var r=R;R=null,r()}}function I(e){o.onAbort&&o.onAbort(e),p(e="Aborted("+e+")"),P=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}function B(e){return e.startsWith("data:application/octet-stream;base64,")}function N(e){if(e==S&&d)return new Uint8Array(d);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function H(e,r,t){return function(e){return d||"function"!=typeof fetch?Promise.resolve().then((()=>N(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>N(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),I(e)}))}B(S="ScanbotSDK.Asm.wasm")||(D=S,S=o.locateFile?o.locateFile(D,f):f+D);var U={1109856:e=>yt(function(){return this[me(e)].toString()}.apply((0,eval)("(()=>this)()"))),1109970:e=>{throw new Error("Invalid barcode format: "+me(e))}};function V(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var q=e=>{for(;e.length>0;)e.shift()(o)},Y=[],G=0,K=0;function Q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Mt(this.get_type()))return E[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var X=e=>{var r=K;if(!r)return Pt(0),0;var t=new Q(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Pt(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Wt(a,n,i))return Pt(a),r}return Pt(n),r},Z=()=>{var e=Y.pop();e||I("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(Y.push(e),e.set_rethrown(!0),e.set_caught(!1),G++),K=r},J={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=J.isAbs(e),t="/"===e.substr(-1);return(e=J.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=J.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=J.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return J.normalize(e.join("/"))},join2:(e,r)=>J.normalize(e+"/"+r)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);I("initRandomDevice")})())(e),re={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=J.isAbs(n)}return(r?"/":"")+(e=J.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=re.resolve(e).substr(1),r=re.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},te="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ne=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&te)return te.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},oe=[],ae=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ie=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function se(e,r,t){var n=t>0?t:ae(e)+1,o=new Array(n),a=ie(e,o,0,o.length);return r&&(o.length=a),o}var ue={ttys:[],init(){},shutdown(){},register(e,r){ue.ttys[e]={input:[],output:[],ops:r},pe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var r=ue.ttys[e.node.rdev];if(!r)throw new pe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new pe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new pe.ErrnoError(29)}if(void 0===s&&0===a)throw new pe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new pe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new pe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!oe.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;oe=se(e,!0)}return oe.shift()})(),put_char(e,r){null===r||10===r?(h(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(h(ne(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(ne(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(ne(e.output,0)),e.output=[])}}},ce=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=St(65536,e);return r?((e,r)=>(g.fill(0,e,e+r),e))(r,e):0},le={ops_table:null,mount:e=>le.createNode(null,"/",16895,0),createNode(e,r,t,n){if(pe.isBlkdev(t)||pe.isFIFO(t))throw new pe.ErrnoError(63);le.ops_table||(le.ops_table={dir:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,lookup:le.node_ops.lookup,mknod:le.node_ops.mknod,rename:le.node_ops.rename,unlink:le.node_ops.unlink,rmdir:le.node_ops.rmdir,readdir:le.node_ops.readdir,symlink:le.node_ops.symlink},stream:{llseek:le.stream_ops.llseek}},file:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:{llseek:le.stream_ops.llseek,read:le.stream_ops.read,write:le.stream_ops.write,allocate:le.stream_ops.allocate,mmap:le.stream_ops.mmap,msync:le.stream_ops.msync}},link:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,readlink:le.node_ops.readlink},stream:{}},chrdev:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:pe.chrdev_stream_ops}});var o=pe.createNode(e,r,t,n);return pe.isDir(o.mode)?(o.node_ops=le.ops_table.dir.node,o.stream_ops=le.ops_table.dir.stream,o.contents={}):pe.isFile(o.mode)?(o.node_ops=le.ops_table.file.node,o.stream_ops=le.ops_table.file.stream,o.usedBytes=0,o.contents=null):pe.isLink(o.mode)?(o.node_ops=le.ops_table.link.node,o.stream_ops=le.ops_table.link.stream):pe.isChrdev(o.mode)&&(o.node_ops=le.ops_table.chrdev.node,o.stream_ops=le.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=pe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,pe.isDir(e.mode)?r.size=4096:pe.isFile(e.mode)?r.size=e.usedBytes:pe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&le.resizeFileStorage(e,r.size)},lookup(e,r){throw pe.genericErrors[44]},mknod:(e,r,t,n)=>le.createNode(e,r,t,n),rename(e,r,t){if(pe.isDir(e.mode)){var n;try{n=pe.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new pe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=pe.lookupNode(e,r);for(var n in t.contents)throw new pe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=le.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!pe.isLink(e.mode))throw new pe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(le.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&pe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new pe.ErrnoError(28);return n},allocate(e,r,t){le.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ce(r)))throw new pe.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(le.stream_ops.write(e,r,0,n,t,!1),0)}},fe=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{var n;n=`Loading data file "${e}" failed (no arrayBuffer).`,t||I(n),r(new Uint8Array(t)),o&&L()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&z()},de=o.preloadPlugins||[],he=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=re.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new pe.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=pe.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=pe.lookupNode(n,t[a]),o=J.join2(o,t[a]),pe.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;pe.isLink(n.mode);){var u=pe.readlink(o);if(o=re.resolve(J.dirname(o),u),n=pe.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new pe.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(pe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%pe.nameTable.length},hashAddNode(e){var r=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[r],pe.nameTable[r]=e},hashRemoveNode(e){var r=pe.hashName(e.parent.id,e.name);if(pe.nameTable[r]===e)pe.nameTable[r]=e.name_next;else for(var t=pe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=pe.mayLookup(e);if(t)throw new pe.ErrnoError(t,e);for(var n=pe.hashName(e.id,r),o=pe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return pe.lookup(e,r)},createNode(e,r,t,n){var o=new pe.FSNode(e,r,t,n);return pe.hashAddNode(o),o},destroyNode(e){pe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>pe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=pe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return pe.lookupNode(e,r),20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=pe.lookupNode(e,r)}catch(e){return e.errno}var o=pe.nodePermissions(e,"wx");if(o)return o;if(t){if(!pe.isDir(n.mode))return 54;if(pe.isRoot(n)||pe.getPath(n)===pe.cwd())return 10}else if(pe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(r)||512&r)?31:pe.nodePermissions(e,pe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=pe.MAX_OPEN_FDS;e++)if(!pe.streams[e])return e;throw new pe.ErrnoError(33)},getStreamChecked(e){var r=pe.getStream(e);if(!r)throw new pe.ErrnoError(8);return r},getStream:e=>pe.streams[e],createStream:(e,r=-1)=>(pe.FSStream||(pe.FSStream=function(){this.shared={}},pe.FSStream.prototype={},Object.defineProperties(pe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new pe.FSStream,e),-1==r&&(r=pe.nextfd()),e.fd=r,pe.streams[r]=e,e),closeStream(e){pe.streams[e]=null},chrdev_stream_ops:{open(e){var r=pe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new pe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){pe.devices[e]={stream_ops:r}},getDevice:e=>pe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),pe.syncFSRequests++,pe.syncFSRequests>1&&p(`warning: ${pe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=pe.getMounts(pe.root.mount),n=0;function o(e){return pe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&pe.root)throw new pe.ErrnoError(10);if(!o&&!a){var i=pe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,pe.isMountpoint(n))throw new pe.ErrnoError(10);if(!pe.isDir(n.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(r.node))throw new pe.ErrnoError(28);var t=r.node,n=t.mounted,o=pe.getMounts(n);Object.keys(pe.nameTable).forEach((e=>{for(var r=pe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&pe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=pe.lookupPath(e,{parent:!0}).node,o=J.basename(e);if(!o||"."===o||".."===o)throw new pe.ErrnoError(28);var a=pe.mayCreate(n,o);if(a)throw new pe.ErrnoError(a);if(!n.node_ops.mknod)throw new pe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,pe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,pe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{pe.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,pe.mknod(e,r,t)),symlink(e,r){if(!re.resolve(e))throw new pe.ErrnoError(44);var t=pe.lookupPath(r,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var n=J.basename(r),o=pe.mayCreate(t,n);if(o)throw new pe.ErrnoError(o);if(!t.node_ops.symlink)throw new pe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=J.dirname(e),a=J.dirname(r),i=J.basename(e),s=J.basename(r);if(t=pe.lookupPath(e,{parent:!0}).node,n=pe.lookupPath(r,{parent:!0}).node,!t||!n)throw new pe.ErrnoError(44);if(t.mount!==n.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(t,i),l=re.relative(e,a);if("."!==l.charAt(0))throw new pe.ErrnoError(28);if("."!==(l=re.relative(r,o)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(n,s)}catch(e){}if(c!==u){var f=pe.isDir(c.mode),d=pe.mayDelete(t,i,f);if(d)throw new pe.ErrnoError(d);if(d=u?pe.mayDelete(n,s,f):pe.mayCreate(n,s))throw new pe.ErrnoError(d);if(!t.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(n!==t&&(d=pe.nodePermissions(t,"w")))throw new pe.ErrnoError(d);pe.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir(e){var r=pe.lookupPath(e,{parent:!0}).node,t=J.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!0);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.rmdir(r,t),pe.destroyNode(n)},readdir(e){var r=pe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new pe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=pe.lookupPath(e,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var t=J.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!1);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.unlink(r,t),pe.destroyNode(n)},readlink(e){var r=pe.lookupPath(e).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.readlink)throw new pe.ErrnoError(28);return re.resolve(pe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=pe.lookupPath(e,{follow:!r}).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.getattr)throw new pe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>pe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?pe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){pe.chmod(e,r,!0)},fchmod(e,r){var t=pe.getStreamChecked(e);pe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?pe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){pe.chown(e,r,t,!0)},fchown(e,r,t){var n=pe.getStreamChecked(e);pe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new pe.ErrnoError(28);var t;if(!(t="string"==typeof e?pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(t.mode))throw new pe.ErrnoError(31);if(!pe.isFile(t.mode))throw new pe.ErrnoError(28);var n=pe.nodePermissions(t,"w");if(n)throw new pe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=pe.getStreamChecked(e);if(0==(2097155&t.flags))throw new pe.ErrnoError(28);pe.truncate(t.node,r)},utime(e,r,t){var n=pe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new pe.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=J.normalize(e);try{n=pe.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new pe.ErrnoError(20)}else n=pe.mknod(e,t,0),a=!0;if(!n)throw new pe.ErrnoError(44);if(pe.isChrdev(n.mode)&&(r&=-513),65536&r&&!pe.isDir(n.mode))throw new pe.ErrnoError(54);if(!a){var i=pe.mayOpen(n,r);if(i)throw new pe.ErrnoError(i)}512&r&&!a&&pe.truncate(n,0),r&=-131713;var s=pe.createStream({node:n,path:pe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(pe.readFiles||(pe.readFiles={}),e in pe.readFiles||(pe.readFiles[e]=1)),s},close(e){if(pe.isClosed(e))throw new pe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{pe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new pe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(1==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.read)throw new pe.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.write)throw new pe.ErrnoError(28);e.seekable&&1024&e.flags&&pe.llseek(e,0,2);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new pe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(pe.isClosed(e))throw new pe.ErrnoError(8);if(r<0||t<=0)throw new pe.ErrnoError(28);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(!pe.isFile(e.node.mode)&&!pe.isDir(e.node.mode))throw new pe.ErrnoError(43);if(!e.stream_ops.allocate)throw new pe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new pe.ErrnoError(2);if(1==(2097155&e.flags))throw new pe.ErrnoError(2);if(!e.stream_ops.mmap)throw new pe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new pe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=pe.open(e,r.flags),o=pe.stat(e).size,a=new Uint8Array(o);return pe.read(n,a,0,o,0),"utf8"===r.encoding?t=ne(a,0):"binary"===r.encoding&&(t=a),pe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=pe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ae(r)+1),a=ie(r,o,0,o.length);pe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");pe.write(n,r,0,r.byteLength,void 0,t.canOwn)}pe.close(n)},cwd:()=>pe.currentPath,chdir(e){var r=pe.lookupPath(e,{follow:!0});if(null===r.node)throw new pe.ErrnoError(44);if(!pe.isDir(r.node.mode))throw new pe.ErrnoError(54);var t=pe.nodePermissions(r.node,"x");if(t)throw new pe.ErrnoError(t);pe.currentPath=r.path},createDefaultDirectories(){pe.mkdir("/tmp"),pe.mkdir("/home"),pe.mkdir("/home/web_user")},createDefaultDevices(){pe.mkdir("/dev"),pe.registerDevice(pe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),pe.mkdev("/dev/null",pe.makedev(1,3)),ue.register(pe.makedev(5,0),ue.default_tty_ops),ue.register(pe.makedev(6,0),ue.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ee(e).byteLength),e[--r]);pe.createDevice("/dev","random",t),pe.createDevice("/dev","urandom",t),pe.mkdir("/dev/shm"),pe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){pe.mkdir("/proc");var e=pe.mkdir("/proc/self");pe.mkdir("/proc/self/fd"),pe.mount({mount(){var r=pe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=pe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?pe.createDevice("/dev","stdin",o.stdin):pe.symlink("/dev/tty","/dev/stdin"),o.stdout?pe.createDevice("/dev","stdout",null,o.stdout):pe.symlink("/dev/tty","/dev/stdout"),o.stderr?pe.createDevice("/dev","stderr",null,o.stderr):pe.symlink("/dev/tty1","/dev/stderr"),pe.open("/dev/stdin",0),pe.open("/dev/stdout",1),pe.open("/dev/stderr",1)},ensureErrnoError(){pe.ErrnoError||(pe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},pe.ErrnoError.prototype=new Error,pe.ErrnoError.prototype.constructor=pe.ErrnoError,[44].forEach((e=>{pe.genericErrors[e]=new pe.ErrnoError(e),pe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){pe.ensureErrnoError(),pe.nameTable=new Array(4096),pe.mount(le,{},"/"),pe.createDefaultDirectories(),pe.createDefaultDevices(),pe.createSpecialDirectories(),pe.filesystems={MEMFS:le}},init(e,r,t){pe.init.initialized=!0,pe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,pe.createStandardStreams()},quit(){pe.init.initialized=!1;for(var e=0;e<pe.streams.length;e++){var r=pe.streams[e];r&&pe.close(r)}},findObject(e,r){var t=pe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=pe.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=pe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=J.basename(e),n=pe.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:pe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=J.join2(e,a);try{pe.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=J.join2("string"==typeof e?e:pe.getPath(e),r),i=he(n,o);return pe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:pe.getPath(e),i=r?J.join2(e,r):e);var s=he(n,o),u=pe.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}pe.chmod(u,146|s);var d=pe.open(u,577);pe.write(d,t,0,t.length,0,a),pe.close(d),pe.chmod(u,s)}return u},createDevice(e,r,t,n){var o=J.join2("string"==typeof e?e:pe.getPath(e),r),a=he(!!t,!!n);pe.createDevice.major||(pe.createDevice.major=64);var i=pe.makedev(pe.createDevice.major++,0);return pe.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new pe.ErrnoError(29)}if(void 0===u&&0===i)throw new pe.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new pe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),pe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):se(o.responseText||"",!0)})(r,o)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=pe.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((e=>{var r=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),r.apply(null,arguments)}})),c.read=(e,r,t,n,o)=>(pe.forceLoadFile(u),l(e,r,t,n,o)),c.mmap=(e,r,t,n,o)=>{pe.forceLoadFile(u);var a=ce(r);if(!a)throw new pe.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},u.stream_ops=c,u}},me=(e,r)=>e?ne(g,e,r):"",ye={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(J.isAbs(r))return r;var n;if(n=-100===e?pe.cwd():ye.getStreamFromFD(e).path,0==r.length){if(!t)throw new pe.ErrnoError(44);return n}return J.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&J.normalize(r)!==J.normalize(pe.getPath(e.node)))return-54;throw e}_[t>>2]=n.dev,_[t+4>>2]=n.mode,E[t+8>>2]=n.nlink,_[t+12>>2]=n.uid,_[t+16>>2]=n.gid,_[t+20>>2]=n.rdev,F=[n.size>>>0,(A=n.size,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[t+24>>2]=F[0],_[t+28>>2]=F[1],_[t+32>>2]=4096,_[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return F=[Math.floor(o/1e3)>>>0,(A=Math.floor(o/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[t+40>>2]=F[0],_[t+44>>2]=F[1],E[t+48>>2]=o%1e3*1e3,F=[Math.floor(a/1e3)>>>0,(A=Math.floor(a/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[t+56>>2]=F[0],_[t+60>>2]=F[1],E[t+64>>2]=a%1e3*1e3,F=[Math.floor(i/1e3)>>>0,(A=Math.floor(i/1e3),+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[t+72>>2]=F[0],_[t+76>>2]=F[1],E[t+80>>2]=i%1e3*1e3,F=[n.ino>>>0,(A=n.ino,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[t+88>>2]=F[0],_[t+92>>2]=F[1],0},doMsync(e,r,t,n,o){if(!pe.isFile(r.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);pe.msync(r,a,o,t,n)},varargs:void 0,get(){var e=_[ye.varargs>>2];return ye.varargs+=4,e},getp:()=>ye.get(),getStr:e=>me(e),getStreamFromFD:e=>pe.getStreamChecked(e)},ve={},ge=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function we(e){return this.fromWireType(_[e>>2])}var be={},_e={},Ee={},ke=void 0,Te=e=>{throw new ke(e)},Ce=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Te("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){Ee[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{_e.hasOwnProperty(e)?o[r]=_e[e]:(a.push(e),be.hasOwnProperty(e)||(be[e]=[]),be[e].push((()=>{o[r]=_e[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Pe={},$e=void 0,Se=e=>{for(var r="",t=e;g[t];)r+=$e[g[t++]];return r},De=void 0,Ae=e=>{throw new De(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Ae(`type "${n}" must have a positive integer typeid pointer`),_e.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${n}' twice`)}if(_e[e]=r,delete Ee[e],be.hasOwnProperty(e)){var o=be[e];delete be[e],o.forEach((e=>e()))}}(e,r,t)}var je=8;function Oe(e){if(!(this instanceof rr))return!1;if(!(e instanceof rr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}var We=e=>{Ae(e.$$.ptrType.registeredClass.name+" instance already deleted")},Me=!1,xe=e=>{},Re=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},ze=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=ze(e,r,t.baseClass);return null===n?null:t.downcast(n)},Le={},Ie=()=>Object.keys(qe).length,Be=()=>{var e=[];for(var r in qe)qe.hasOwnProperty(r)&&e.push(qe[r]);return e},Ne=[],He=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},Ue=void 0,Ve=e=>{Ue=e,Ne.length&&Ue&&Ue(He)},qe={},Ye=(e,r)=>(r=((e,r)=>{for(void 0===r&&Ae("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),qe[r]),Ge=(e,r)=>(r.ptrType&&r.ptr||Te("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&Te("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Qe(Object.create(e,{$$:{value:r}})));function Ke(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=Ye(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ge(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Ge(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Le[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=ze(r,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ge(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):Ge(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Qe=e=>"undefined"==typeof FinalizationRegistry?(Qe=e=>e,e):(Me=new FinalizationRegistry((e=>{Re(e.$$)})),Qe=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};Me.register(e,t,e)}return e},xe=e=>Me.unregister(e),Qe(e));function Xe(){if(this.$$.ptr||We(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=Qe(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function Ze(){this.$$.ptr||We(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),xe(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Je(){return!this.$$.ptr}function er(){return this.$$.ptr||We(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Ne.push(this),1===Ne.length&&Ue&&Ue(He),this.$$.deleteScheduled=!0,this}function rr(){}var tr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e};function nr(e,r){return{[e=tr(e)]:function(){return r.apply(this,arguments)}}[e]}var or=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ae(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ar=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ae(`Cannot register public name '${e}' twice`),or(o,e,e),o.hasOwnProperty(t)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))};function ir(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var sr=(e,r,t)=>{for(;r!==t;)r.upcast||Ae(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function ur(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function cr(e,r){var t;if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=sr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Or.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ae("Unsupporting sharing policy")}return t}function lr(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${xr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return sr(r.$$.ptr,t,this.registeredClass)}function fr(e){return this.fromWireType(E[e>>2])}function dr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function hr(e){this.rawDestructor&&this.rawDestructor(e)}var pr=e=>{null!==e&&e.delete()};function mr(e,r,t,n,o,a,i,s,u,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==r.baseClass?this.toWireType=cr:n?(this.toWireType=ur,this.destructorFunction=null):(this.toWireType=lr,this.destructorFunction=null)}var yr=(e,r,t)=>{o.hasOwnProperty(e)||Te("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},vr=[],gr=e=>{var r=vr[e];return r||(e>=vr.length&&(vr.length=e+1),vr[e]=r=C.get(e)),r},wr=(e,r,t)=>e.includes("j")?((e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):gr(r).apply(null,t),br=(e,r)=>{var t,n,o,a=(e=Se(e)).includes("j")?(t=e,n=r,o=[],function(){return o.length=0,Object.assign(o,arguments),wr(t,n,o)}):gr(r);return"function"!=typeof a&&Ae(`unknown function pointer with signature ${e}: ${r}`),a},_r=void 0,Er=e=>{var r=$t(e),t=Se(r);return Tt(r),t},kr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||_e[r]||(Ee[r]?Ee[r].forEach(e):(t.push(r),n[r]=!0))})),new _r(`${e}: `+t.map(Er).join([", "]))},Tr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(E[r+4*n>>2]);return t};function Cr(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=nr(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Pr(e,r,t,n,o,a){var i=r.length;i<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,c=1;c<r.length;++c)if(null!==r[c]&&void 0===r[c].destructorFunction){u=!0;break}var l="void"!==r[0].name,f="",d="";for(c=0;c<i-2;++c)f+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tr(e)}(${f}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Ae,n,o,ge,r[0],r[1]];for(s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+r[c+2].name+"\n",m.push("argType"+c),y.push(r[c+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),h+=(l||a?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<r.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==r[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+r[c].name+"\n",m.push(v+"_dtor"),y.push(r[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),Cr(Function,m).apply(null,y)}var $r=(e,r,t)=>(e instanceof Object||Ae(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Ae(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Ae(`cannot call emscripten binding method ${t} on deleted object`),sr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass));function Sr(){this.allocated=[void 0],this.freelist=[]}var Dr,Ar=new Sr,Fr=e=>{e>=Ar.reserved&&0==--Ar.get(e).refcount&&Ar.free(e)},jr=()=>{for(var e=0,r=Ar.reserved;r<Ar.allocated.length;++r)void 0!==Ar.allocated[r]&&++e;return e},Or={toValue:e=>(e||Ae("Cannot use deleted val. handle = "+e),Ar.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ar.allocate({refcount:1,value:e})}}},Wr=(e,r,t)=>{switch(r){case 1:return t?function(e){return this.fromWireType(v[e>>0])}:function(e){return this.fromWireType(g[e>>0])};case 2:return t?function(e){return this.fromWireType(w[e>>1])}:function(e){return this.fromWireType(b[e>>1])};case 4:return t?function(e){return this.fromWireType(_[e>>2])}:function(e){return this.fromWireType(E[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Mr=(e,r)=>{var t=_e[e];return void 0===t&&Ae(r+" has unknown type "+Er(e)),t},xr=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Rr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(k[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},zr=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>g[e>>0];case 2:return t?e=>w[e>>1]:e=>b[e>>1];case 4:return t?e=>_[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Lr=(e,r,t)=>ie(e,g,r,t),Ir="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Br=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&b[n];)++n;if((t=n<<1)-e>32&&Ir)return Ir.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Nr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Hr=e=>2*e.length,Ur=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=_[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Vr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),_[r>>2]=i,(r+=4)+4>o)break}return _[r>>2]=0,r-n},qr=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Yr={},Gr=e=>{var r=Yr[e];return void 0===r?Se(e):r},Kr=[],Qr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Xr=[],Zr=e=>e%4==0&&(e%100!=0||e%400==0),Jr=[0,31,60,91,121,152,182,213,244,274,305,335],et=[0,31,59,90,120,151,181,212,243,273,304,334],rt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,tt=e=>{var r=ae(e)+1,t=kt(r);return t&&Lr(e,t,r),t},nt=[],ot=(e,r,t)=>{var n=((e,r)=>{var t;for(nt.length=0;t=g[e++];)r+=105!=t&&r%8?4:0,nt.push(105==t?_[r>>2]:T[r>>3]),r+=105==t?4:8;return nt})(r,t);return U[e].apply(null,n)};Dr=()=>performance.now();var at,it,st,ut=e=>{var r=(e-m.buffer.byteLength+65535)/65536;try{return m.grow(r),$(),1}catch(e){}},ct={},lt=()=>{if(!lt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var r in ct)void 0===ct[r]?delete e[r]:e[r]=ct[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);lt.strings=t}return lt.strings},ft=e=>{y||(o.onExit&&o.onExit(e),P=!0),l(e,new V(e))},dt=(e,r)=>{ft(e)},ht=[31,29,31,30,31,30,31,31,30,31,30,31],pt=[31,28,31,30,31,30,31,31,30,31,30,31],mt=(e,r,t,n)=>{var o=E[n+40>>2],a={tm_sec:_[n>>2],tm_min:_[n+4>>2],tm_hour:_[n+8>>2],tm_mday:_[n+12>>2],tm_mon:_[n+16>>2],tm_year:_[n+20>>2],tm_wday:_[n+24>>2],tm_yday:_[n+28>>2],tm_isdst:_[n+32>>2],tm_gmtoff:_[n+36>>2],tm_zone:o?me(o):""},i=me(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return f(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Zr(t.getFullYear()),o=t.getMonth(),a=(n?ht:pt)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>l[e.tm_mon].substring(0,3),"%B":e=>l[e.tm_mon],"%C":e=>d((e.tm_year+1900)/100|0,2),"%d":e=>d(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>m(e).toString().substring(2),"%G":e=>m(e),"%H":e=>d(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":e=>d(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(Zr(e.tm_year+1900)?ht:pt,e.tm_mon-1),3),"%m":e=>d(e.tm_mon+1,2),"%M":e=>d(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>d(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Zr(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Zr(e.tm_year%400-1))&&r++}return d(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var g,w,b=se(i=i.replace(/\0\0/g,"%"),!1);return b.length>r?0:(g=b,w=e,v.set(g,w),b.length-1)},yt=tt,vt=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},gt=365,wt=146;Object.defineProperties(vt.prototype,{read:{get:function(){return(this.mode&gt)===gt},set:function(e){e?this.mode|=gt:this.mode&=-366}},write:{get:function(){return(this.mode&wt)===wt},set:function(e){e?this.mode|=wt:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=vt,pe.createPreloadedFile=(e,r,t,n,o,a,i,s,u,c)=>{var l=r?re.resolve(J.join2(e,r)):e;function f(t){function f(t){c&&c(),s||pe.createDataFile(e,r,t,n,o,u),a&&a(),L()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return de.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,l,f,(()=>{i&&i(),L()}))||f(t)}z(),"string"==typeof t?fe(t,(e=>f(e)),i):f(t)},pe.staticInit(),ke=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);$e=e})(),De=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},rr.prototype.isAliasOf=Oe,rr.prototype.clone=Xe,rr.prototype.delete=Ze,rr.prototype.isDeleted=Je,rr.prototype.deleteLater=er,o.getInheritedInstanceCount=Ie,o.getLiveInheritedInstances=Be,o.flushPendingDeletes=He,o.setDelayFunction=Ve,mr.prototype.getPointee=dr,mr.prototype.destructor=hr,mr.prototype.argPackAdvance=je,mr.prototype.readValueFromPointer=fr,mr.prototype.deleteObject=pr,mr.prototype.fromWireType=Ke,_r=o.UnboundTypeError=(at=Error,(st=nr(it="UnboundTypeError",(function(e){this.name=it,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(at.prototype),st.prototype.constructor=st,st.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},st),Object.assign(Sr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Ar.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Ar.reserved=Ar.allocated.length,o.count_emval_handles=jr;var bt,_t={t:e=>{var r=new Q(e);return r.get_caught()||(r.set_caught(!0),G--),r.set_rethrown(!1),Y.push(r),Ot(r.excPtr),r.get_exception_ptr()},zb:()=>{if(!Y.length)return 0;var e=Y[Y.length-1];return Ot(e.excPtr),e.excPtr},y:()=>{Dt(0,0);var e=Y.pop();jt(e.excPtr),K=0},a:()=>X([]),g:e=>X([e]),F:(e,r)=>X([e,r]),Ca:Z,yb:e=>{if(e){var r=new Q(e);Y.push(r),r.set_rethrown(!0),Z()}},o:(e,r,t)=>{throw new Q(e).init(r,t),G++,K=e},Ab:()=>G,d:e=>{throw K||(K=e),K},Fb:function(e,r,t,n,o){try{for(var a=0,i=r?_[r>>2]:0,s=r?_[r+4>>2]:0,u=t?_[t>>2]:0,c=t?_[t+4>>2]:0,l=n?_[n>>2]:0,f=n?_[n+4>>2]:0,d=0,h=0,p=0,m=0,y=0,v=0,g=(r?_[r>>2]:0)|(t?_[t>>2]:0)|(n?_[n>>2]:0),w=(r?_[r+4>>2]:0)|(t?_[t+4>>2]:0)|(n?_[n+4>>2]:0),b=function(e,r,t,n){return e<32?r&n:t&n},E=0;E<e;E++){var k=1<<E%32;if(b(E,g,w,k)){var T=ye.getStreamFromFD(E),C=ye.DEFAULT_POLLMASK;if(T.stream_ops.poll){var P=-1;o&&(P=1e3*((r?_[o>>2]:0)+(r?_[o+8>>2]:0)/1e6)),C=T.stream_ops.poll(T,P)}1&C&&b(E,i,s,k)&&(E<32?d|=k:h|=k,a++),4&C&&b(E,u,c,k)&&(E<32?p|=k:m|=k,a++),2&C&&b(E,l,f,k)&&(E<32?y|=k:v|=k,a++)}}return r&&(_[r>>2]=d,_[r+4>>2]=h),t&&(_[t>>2]=p,_[t+4>>2]=m),n&&(_[n>>2]=y,_[n+4>>2]=v),a}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ma:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 0:if((o=ye.get())<0)return-28;for(;pe.streams[o];)o++;return pe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return o=ye.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,_[Ct()>>2]=a,-1}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}var a},Mb:function(e,r){try{var t=ye.getStreamFromFD(e);return ye.doStat(pe.stat,t.path,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Nb:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=ye.getp();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=ye.getp();var s=_[a>>2],u=_[a+4>>2],c=_[a+8>>2],l=_[a+12>>2],f=[];for(i=0;i<32;i++)f.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:f})}return 0;case 21519:return n.tty?(a=ye.getp(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=ye.getp(),pe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=ye.getp(),w[a>>1]=d[0],w[a+2>>1]=d[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Kb:function(e,r,t,n){try{r=ye.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=ye.calculateAt(e,r,a),ye.doStat(o?pe.lstat:pe.stat,r,t)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Na:function(e,r,t,n){ye.varargs=n;try{r=ye.getStr(r),r=ye.calculateAt(e,r);var o=n?ye.get():0;return pe.open(r,t,o).fd}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Gb:function(e){try{return e=ye.getStr(e),pe.rmdir(e),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Lb:function(e,r){try{return e=ye.getStr(e),ye.doStat(pe.stat,e,r)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Hb:function(e,r,t){try{return r=ye.getStr(r),r=ye.calculateAt(e,r),0===t?pe.unlink(r):512===t?pe.rmdir(r):I("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},jb:e=>{var r=ve[e];delete ve[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Ce([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],u=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];u(c,e,s.toWireType(t,r)),ge(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==e&&e.push(i,s),s},argPackAdvance:je,readValueFromPointer:we,destructorFunction:i}]}))},ib:e=>{var r=Pe[e];delete Pe[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Ce([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],l=r.setter,f=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];l(f,e,c.toWireType(t,r)),ge(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:je,readValueFromPointer:we,destructorFunction:n}]}))},tb:(e,r,t,n,o)=>{},Rb:(e,r,t,n)=>{Fe(e,{name:r=Se(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:je,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},T:(e,r,t,n,o,a,i,s,u,c,l,f,d)=>{l=Se(l),a=br(o,a),s&&(s=br(i,s)),c&&(c=br(u,c)),d=br(f,d);var h=tr(l);ar(h,(function(){kr(`Cannot construct ${l} due to unbound types`,[n])})),Ce([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:rr.prototype;var i=nr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new De("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new De(l+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new De(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(f.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var f=new ir(l,i,u,d,t,a,s,c);f.baseClass&&(void 0===f.baseClass.__derivedClasses&&(f.baseClass.__derivedClasses=[]),f.baseClass.__derivedClasses.push(f));var p=new mr(l,f,!0,!1,!1),m=new mr(l+"*",f,!1,!1,!1),y=new mr(l+" const*",f,!1,!0,!1);return Le[e]={pointerType:m,constPointerType:y},yr(h,i),[p,m,y]}))},Ia:(e,r,t,n,o,a)=>{var i=Tr(r,t);o=br(n,o),Ce([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new De(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{kr(`Cannot construct ${e.name} due to unbound types`,i)},Ce([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Pr(t,n,null,o,a),[]))),[]}))},Ha:(e,r,t,n,o,a,i,s,u)=>{var c=Tr(t,n);r=Se(r),a=br(o,a),Ce([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){kr(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var l=e.registeredClass.instancePrototype,f=l[r];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===t-2?(o.argCount=t-2,o.className=e.name,l[r]=o):(or(l,r,n),l[r].overloadTable[t-2]=o),Ce([],c,(function(o){var s=Pr(n,o,e,a,i,u);return void 0===l[r].overloadTable?(s.argCount=t-2,l[r]=s):l[r].overloadTable[t-2]=s,[]})),[]}))},H:(e,r,t,n,o,a,i,s,u,c)=>{r=Se(r),o=br(n,o),Ce([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,l={get(){kr(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>kr(`Cannot access ${n} due to unbound types`,[t,i]):e=>Ae(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,l),Ce([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var r=$r(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(u){u=br(s,u);var f=t[1];l.set=function(r){var t=$r(this,e,n+" setter"),o=[];u(c,t,f.toWireType(o,r)),ge(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,l),[]})),[]}))},Qb:(e,r)=>{Fe(e,{name:r=Se(r),fromWireType:e=>{var r=Or.toValue(e);return Fr(e),r},toWireType:(e,r)=>Or.toHandle(r),argPackAdvance:je,readValueFromPointer:we,destructorFunction:null})},kb:(e,r,t,n)=>{function o(){}r=Se(r),o.values={},Fe(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:je,readValueFromPointer:Wr(r,t,n),destructorFunction:null}),ar(r,o)},V:(e,r,t)=>{var n=Mr(e,"enum");r=Se(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:nr(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},Pa:(e,r,t)=>{Fe(e,{name:r=Se(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:je,readValueFromPointer:Rr(r,t),destructorFunction:null})},ka:(e,r,t,n,o,a,i)=>{var s=Tr(r,t);e=Se(e),o=br(n,o),ar(e,(function(){kr(`Cannot call ${e} due to unbound types`,s)}),r-1),Ce([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return yr(e,Pr(e,n,null,o,a,i),r-1),[]}))},P:(e,r,t,n,o)=>{r=Se(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:je,readValueFromPointer:zr(r,t,0!==n),destructorFunction:null})},E:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=E[e>>2],t=E[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=Se(t),fromWireType:o,argPackAdvance:je,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Oa:(e,r)=>{var t="std::string"===(r=Se(r));Fe(e,{name:r,fromWireType:e=>{var r,n=E[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==g[s]){var u=me(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(g[o+i]);r=c.join("")}return Tt(e),r},toWireType:(e,r)=>{var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Ae("Cannot pass non-string to std::string"),n=t&&o?ae(r):r.length;var a=kt(4+n+1),i=a+4;if(E[a>>2]=n,t&&o)Lr(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(Tt(i),Ae("String has UTF-16 code units that do not fit in 8 bits")),g[i+s]=u}else for(s=0;s<n;++s)g[i+s]=r[s];return null!==e&&e.push(Tt,a),a},argPackAdvance:je,readValueFromPointer:fr,destructorFunction:e=>Tt(e)})},wa:(e,r,t)=>{var n,o,a,i,s;t=Se(t),2===r?(n=Br,o=Nr,i=Hr,a=()=>b,s=1):4===r&&(n=Ur,o=Vr,i=qr,a=()=>E,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=E[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var l=e+4+c*r;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=l+r}}return Tt(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ae(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=kt(4+a+r);return E[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(Tt,u),u},argPackAdvance:je,readValueFromPointer:we,destructorFunction:e=>Tt(e)})},Ga:(e,r,t,n,o,a)=>{ve[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),elements:[]}},Fa:(e,r,t,n,o,a,i,s,u)=>{ve[e].elements.push({getterReturnType:r,getter:br(t,n),getterContext:o,setterArgumentType:a,setter:br(i,s),setterContext:u})},Q:(e,r,t,n,o,a)=>{Pe[e]={name:Se(r),rawConstructor:br(t,n),rawDestructor:br(o,a),fields:[]}},D:(e,r,t,n,o,a,i,s,u,c)=>{Pe[e].fields.push({fieldName:Se(r),getterReturnType:t,getter:br(n,o),getterContext:a,setterArgumentType:i,setter:br(s,u),setterContext:c})},Sb:(e,r)=>{Fe(e,{isVoid:!0,name:r=Se(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Ob:()=>!0,Bb:()=>{throw 1/0},M:(e,r,t)=>{e=Or.toValue(e),r=Mr(r,"emval::as");var n=[],o=Or.toHandle(n);return E[t>>2]=o,r.toWireType(n,e)},Da:(e,r,t,n,o)=>(e=Kr[e])(r=Or.toValue(r),t=Gr(t),(e=>{var r=[];return E[e>>2]=Or.toHandle(r),r})(n),o),sa:(e,r,t,n)=>{(e=Kr[e])(r=Or.toValue(r),t=Gr(t),null,n)},lb:Fr,qa:e=>0===e?Or.toHandle(Qr()):(e=Gr(e),Or.toHandle(Qr()[e])),ba:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Mr(E[r+4*n>>2],"parameter "+n);return t})(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Xr[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(t[1+c]);var l="return function "+tr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)t[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var d,h,p=Cr(Function,i).apply(null,s);return d=p,h=Kr.length,Kr.push(d),a=h,Xr[o]=a,a},gb:(e,r)=>(e=Or.toValue(e),r=Or.toValue(r),Or.toHandle(e[r])),ha:e=>{e>4&&(Ar.get(e).refcount+=1)},ab:(e,r)=>(e=Or.toValue(e))instanceof(r=Or.toValue(r)),bb:e=>"string"==typeof(e=Or.toValue(e)),ga:()=>Or.toHandle([]),eb:e=>{e=Or.toValue(e);for(var r=new Array(e.length),t=0;t<e.length;t++)r[t]=e[t];return Or.toHandle(r)},ra:e=>Or.toHandle(Gr(e)),hb:e=>{var r=Or.toValue(e);ge(r),Fr(e)},K:(e,r)=>{var t=(e=Mr(e,"_emval_take_value")).readValueFromPointer(r);return Or.toHandle(t)},rb:function(e,r,t){var n=rt(e,r),o=new Date(1e3*n);_[t>>2]=o.getSeconds(),_[t+4>>2]=o.getMinutes(),_[t+8>>2]=o.getHours(),_[t+12>>2]=o.getDate(),_[t+16>>2]=o.getMonth(),_[t+20>>2]=o.getFullYear()-1900,_[t+24>>2]=o.getDay();var a=0|(e=>(Zr(e.getFullYear())?Jr:et)[e.getMonth()]+e.getDate()-1)(o);_[t+28>>2]=a,_[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=i.getTimezoneOffset(),c=0|(s!=u&&o.getTimezoneOffset()==Math.min(u,s));_[t+32>>2]=c},qb:function(e,r,t,n,o,a,i){var s=rt(a,i);try{if(isNaN(s))return 61;var u=ye.getStreamFromFD(o);2&t&&ye.doMsync(e,u,r,n,s),pe.munmap(u)}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return-e.errno}},Db:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}E[e>>2]=60*u,_[r>>2]=Number(i!=s);var l=c(o),f=c(a),d=tt(l),h=tt(f);s<i?(E[t>>2]=d,E[t+4>>2]=h):(E[t>>2]=h,E[t+4>>2]=d)},w:()=>{I("")},Ea:(e,r,t)=>ot(e,r,t),ua:()=>Date.now(),Eb:()=>2147483648,ca:Dr,Pb:(e,r,t)=>g.copyWithin(e,r,r+t),Cb:e=>{var r=g.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(ut(s))return!0}return!1},Ib:(e,r)=>{var t=0;return lt().forEach(((n,o)=>{var a=r+t;E[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0})(n,a),t+=n.length+1})),0},Jb:(e,r)=>{var t=lt();E[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),E[r>>2]=n,0},Tb:dt,va:function(e){try{var r=ye.getStreamFromFD(e);return pe.close(r),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},La:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=pe.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return E[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},sb:function(e,r,t,n,o){var a=rt(r,t);try{if(isNaN(a))return 61;var i=ye.getStreamFromFD(e);return pe.llseek(i,a,n),F=[i.position>>>0,(A=i.position,+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0)],_[o>>2]=F[0],_[o+4>>2]=F[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},ta:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=pe.write(e,v,i,s,n);if(u<0)return-1;o+=u,"undefined"!=typeof n&&(n+=u)}return o})(ye.getStreamFromFD(e),r,t);return E[n>>2]=o,0}catch(e){if("undefined"==typeof pe||"ErrnoError"!==e.name)throw e;return e.errno}},db:function(){return yt(location.toString())},cb:function(){return yt((e=Ut,self[e(341,"3%y#")][e(340,"!jYC")]()));var e},Ta:function(e,r){var t=At();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;Dt(1,0)}},Va:function(e,r,t,n,o,a){var i=At();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},z:function(e,r,t,n){var o=At();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},Wb:function(e,r,t,n,o,a,i,s){var u=At();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},p:function(e,r){var t=At();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;Dt(1,0)}},v:function(e,r,t){var n=At();try{return gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},L:function(e,r,t,n){var o=At();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},ea:function(e,r,t,n,o){var a=At();try{return gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},u:function(e){var r=At();try{return gr(e)()}catch(e){if(Ft(r),e!==e+0)throw e;Dt(1,0)}},h:function(e,r){var t=At();try{return gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;Dt(1,0)}},b:function(e,r,t){var n=At();try{return gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},f:function(e,r,t,n){var o=At();try{return gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},k:function(e,r,t,n,o){var a=At();try{return gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},Ka:function(e,r,t,n,o,a){var i=At();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},Za:function(e,r,t,n,o,a){var i=At();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},n:function(e,r,t,n,o,a){var i=At();try{return gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},x:function(e,r,t,n,o,a,i){var s=At();try{return gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},Ja:function(e,r,t,n,o,a,i,s){var u=At();try{return gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},na:function(e,r,t,n,o,a,i,s,u){var c=At();try{return gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;Dt(1,0)}},Ub:function(e,r,t,n,o,a,i,s,u,c){var l=At();try{return gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;Dt(1,0)}},ja:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=At();try{return gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;Dt(1,0)}},nb:function(e,r,t,n,o,a,i){var s=At();try{return Bt(e,r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},vb:function(e,r,t,n){var o=At();try{return zt(e,r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},pb:function(e){var r=At();try{return Lt(e)}catch(e){if(Ft(r),e!==e+0)throw e;Dt(1,0)}},wb:function(e,r){var t=At();try{return xt(e,r)}catch(e){if(Ft(t),e!==e+0)throw e;Dt(1,0)}},ob:function(e,r,t){var n=At();try{return It(e,r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},mb:function(e,r,t,n,o){var a=At();try{return Nt(e,r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},l:function(e){var r=At();try{gr(e)()}catch(e){if(Ft(r),e!==e+0)throw e;Dt(1,0)}},i:function(e,r){var t=At();try{gr(e)(r)}catch(e){if(Ft(t),e!==e+0)throw e;Dt(1,0)}},fb:function(e,r,t){var n=At();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},fa:function(e,r,t){var n=At();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},c:function(e,r,t){var n=At();try{gr(e)(r,t)}catch(e){if(Ft(n),e!==e+0)throw e;Dt(1,0)}},X:function(e,r,t,n){var o=At();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},Xa:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},Sa:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},ma:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},$:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},pa:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},J:function(e,r,t,n){var o=At();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},Y:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},za:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},oa:function(e,r,t,n,o,a){var i=At();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},Aa:function(e,r,t,n,o,a,i,s,u){var c=At();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;Dt(1,0)}},e:function(e,r,t,n){var o=At();try{gr(e)(r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},A:function(e,r,t,n,o,a){var i=At();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},Xb:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},I:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},B:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},_:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},Ra:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},S:function(e,r,t,n,o,a){var i=At();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},Ya:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},ya:function(e,r,t,n,o,a,i,s,u,c){var l=At();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;Dt(1,0)}},Wa:function(e,r,t,n,o,a,i,s,u,c,l){var f=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;Dt(1,0)}},j:function(e,r,t,n,o){var a=At();try{gr(e)(r,t,n,o)}catch(e){if(Ft(a),e!==e+0)throw e;Dt(1,0)}},Ba:function(e,r,t,n,o,a,i,s,u){var c=At();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;Dt(1,0)}},C:function(e,r,t,n,o,a){var i=At();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},U:function(e,r,t,n,o,a,i,s,u,c){var l=At();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;Dt(1,0)}},da:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},m:function(e,r,t,n,o,a){var i=At();try{gr(e)(r,t,n,o,a)}catch(e){if(Ft(i),e!==e+0)throw e;Dt(1,0)}},_a:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},s:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},W:function(e,r,t,n,o,a,i,s,u,c,l){var f=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;Dt(1,0)}},R:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},q:function(e,r,t,n,o,a,i){var s=At();try{gr(e)(r,t,n,o,a,i)}catch(e){if(Ft(s),e!==e+0)throw e;Dt(1,0)}},la:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},Qa:function(e,r,t,n,o,a,i,s,u,c,l){var f=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;Dt(1,0)}},Vb:function(e,r,t,n,o,a,i,s,u){var c=At();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;Dt(1,0)}},r:function(e,r,t,n,o,a,i,s){var u=At();try{gr(e)(r,t,n,o,a,i,s)}catch(e){if(Ft(u),e!==e+0)throw e;Dt(1,0)}},G:function(e,r,t,n,o,a,i,s,u){var c=At();try{gr(e)(r,t,n,o,a,i,s,u)}catch(e){if(Ft(c),e!==e+0)throw e;Dt(1,0)}},xa:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;Dt(1,0)}},N:function(e,r,t,n,o,a,i,s,u,c){var l=At();try{gr(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Ft(l),e!==e+0)throw e;Dt(1,0)}},Z:function(e,r,t,n,o,a,i,s,u,c,l){var f=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Ft(f),e!==e+0)throw e;Dt(1,0)}},Ua:function(e,r,t,n,o,a,i,s,u,c,l,f){var d=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f)}catch(e){if(Ft(d),e!==e+0)throw e;Dt(1,0)}},aa:function(e,r,t,n,o,a,i,s,u,c,l,f,d,h){var p=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f,d,h)}catch(e){if(Ft(p),e!==e+0)throw e;Dt(1,0)}},ia:function(e,r,t,n,o,a,i,s,u,c,l,f,d,h,p,m){var y=At();try{gr(e)(r,t,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(e){if(Ft(y),e!==e+0)throw e;Dt(1,0)}},ub:function(e,r,t,n){var o=At();try{Rt(e,r,t,n)}catch(e){if(Ft(o),e!==e+0)throw e;Dt(1,0)}},O:e=>e,$a:mt,xb:(e,r,t,n,o)=>mt(e,r,t,n)},Et=function(){var e,r,n,a,i={a:_t};function s(e,r){var t,n=e.exports;return m=(Et=n).Yb,$(),C=Et.$b,t=Et.Zb,O.unshift(t),L(),n}if(z(),o.instantiateWasm)try{return o.instantiateWasm(i,s)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return(e=d,r=S,n=i,a=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||B(r)||"function"!=typeof fetch?H(r,n,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,n).then(a,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),H(r,n,a)}))))).catch(t),{}}(),kt=o._malloc=e=>(kt=o._malloc=Et._b)(e),Tt=o._free=e=>(Tt=o._free=Et.ac)(e),Ct=()=>(Ct=Et.bc)(),Pt=e=>(Pt=Et.cc)(e),$t=e=>($t=Et.dc)(e),St=(o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=Et.ec)(),(e,r)=>(St=Et.fc)(e,r)),Dt=(e,r)=>(Dt=Et.gc)(e,r),At=()=>(At=Et.hc)(),Ft=e=>(Ft=Et.ic)(e),jt=e=>(jt=Et.jc)(e),Ot=e=>(Ot=Et.kc)(e),Wt=(e,r,t)=>(Wt=Et.lc)(e,r,t),Mt=e=>(Mt=Et.mc)(e),xt=o.dynCall_ji=(e,r)=>(xt=o.dynCall_ji=Et.nc)(e,r),Rt=o.dynCall_vij=(e,r,t,n)=>(Rt=o.dynCall_vij=Et.oc)(e,r,t,n),zt=o.dynCall_iij=(e,r,t,n)=>(zt=o.dynCall_iij=Et.pc)(e,r,t,n),Lt=(o.dynCall_viijii=(e,r,t,n,a,i,s)=>(o.dynCall_viijii=Et.qc)(e,r,t,n,a,i,s),o.dynCall_jjj=(e,r,t,n,a)=>(o.dynCall_jjj=Et.rc)(e,r,t,n,a),o.dynCall_iiiijj=(e,r,t,n,a,i,s,u)=>(o.dynCall_iiiijj=Et.sc)(e,r,t,n,a,i,s,u),o.dynCall_viijj=(e,r,t,n,a,i,s)=>(o.dynCall_viijj=Et.tc)(e,r,t,n,a,i,s),o.dynCall_viiijjj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_viiijjj=Et.uc)(e,r,t,n,a,i,s,u,c,l),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=Et.vc)(e,r,t,n,a),o.dynCall_j=e=>(Lt=o.dynCall_j=Et.wc)(e)),It=o.dynCall_jii=(e,r,t)=>(It=o.dynCall_jii=Et.xc)(e,r,t),Bt=o.dynCall_iiiiij=(e,r,t,n,a,i,s)=>(Bt=o.dynCall_iiiiij=Et.yc)(e,r,t,n,a,i,s),Nt=o.dynCall_jiiii=(e,r,t,n,a)=>(Nt=o.dynCall_jiiii=Et.zc)(e,r,t,n,a);function Ht(){function e(){bt||(bt=!0,o.calledRun=!0,P||(o.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,ue.init(),q(O),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),W.unshift(e);var e;q(W)}()))}M>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),j.unshift(e);var e;q(j)}(),M>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiijj=(e,r,t,n,a,i,s,u,c)=>(o.dynCall_iiiiijj=Et.Ac)(e,r,t,n,a,i,s,u,c),o.dynCall_iiiiiijj=(e,r,t,n,a,i,s,u,c,l)=>(o.dynCall_iiiiiijj=Et.Bc)(e,r,t,n,a,i,s,u,c,l),o.___start_em_js=1109748,o.___stop_em_js=1109856,o.UTF8ToString=me,o.stringToUTF8=Lr,o.lengthBytesUTF8=ae,o.allocateUTF8=yt,R=function e(){bt||Ht(),bt||(R=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ut(e,r){var t=Vt();return Ut=function(r,n){var o=t[r-=340];if(void 0===Ut.tdakdn){var a=function(e){for(var r,t,n="",o="",a=0,i=0;t=e.charAt(i++);~t&&(r=a%4?64*r+t:t,a++%4)?n+=String.fromCharCode(255&r>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(e,r){var t,n,o=[],i=0,s="";for(e=a(e),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+r.charCodeAt(n%r.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<e.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(e.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Ut.eihQbt=i,e=arguments,Ut.tdakdn=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Ut.zADzRl&&(Ut.zADzRl=!0),o=Ut.eihQbt(o,n),e[u]=o),o},Ut(e,r)}function Vt(){var e=["W702WQOnwaWlWPFcTSkEW4aF","WPZcUImTW4DCWOvm","cftcGb/dPNpcKxO","WQSVW6fyBZyiWQ0","tmk/W4VdU8osW6BdTmoWWR3cUmkeWOri","WRuSotjJs8kIEa","dmodW73cLmkWCcXrg3RcVWa","hmo1W7BcVmkRWR/dH2ZcGG","WOKVWQG0Amo5WRe","WPZdQMBcG13dV19lWRH0WRLn","DCkKWOOzWRlcVsZdHcrcn8oL","W6/cVdKnW7TLW4/cPey","h8o1W7pdG8oiW63cUx/cNerRbrq","yr7dQSk7u0BcQa7cHXZdQ8k0","W6RdTSk+bmoaW5VcH386tSkTW48","cSohW73cKSk7DWn2eeZcLGu","WPRcV1TnWRC4WQzOWP3dLCothq","W7S/WQKibxmTWO3cHCkq","BaVdUWS0BHW","WRuUrvqvkSodz0hcLHBcVtS","WRaLqvviv8kKrKhcLW","WPDHwCoMgvtdR8kUw3pdM3ZcGG"];return(Vt=function(){return e})()}Ht(),function(e,r){for(var t=Ut,n=e();;)try{if(183724==parseInt(t(353,"r$aA"))/1+-parseInt(t(347,"nHCg"))/2+-parseInt(t(344,"r$aA"))/3+-parseInt(t(360,"Du#Z"))/4*(-parseInt(t(361,"L$Q6"))/5)+parseInt(t(355,"Du#Z"))/6*(-parseInt(t(345,"E8oA"))/7)+-parseInt(t(359,"^f7F"))/8*(parseInt(t(356,"xBSF"))/9)+parseInt(t(342,"bw&D"))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vt);var ighnua,qt=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Yt=qt(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yt)};return e()}));return Yt(),e.ready});e.exports=o},function(e,r){}]);