scanbot-web-sdk 6.0.0-dev.2 → 6.0.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.
- package/@types/consume-type.d.ts +2 -1
- package/@types/core/bridge/common.d.ts +1 -1
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +5 -3
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -6
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +4 -2
- package/@types/core/bridge/worker-bridge.d.ts +584 -26
- package/@types/core/worker/ScanbotSDK.Core.d.ts +18 -7
- package/@types/core-types.d.ts +3 -1
- package/@types/document-scanner-view.d.ts +3 -1
- package/@types/index.d.ts +39 -4
- package/@types/model/barcode/barcode-result.d.ts +12 -2
- package/@types/model/barcode/barcode.d.ts +2 -1
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +6 -3
- package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
- package/@types/model/configuration/document-scanner-configuration.d.ts +2 -8
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
- package/@types/model/configuration/initialization-options.d.ts +8 -0
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
- package/@types/model/configuration/scanner-configuration.d.ts +7 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/scanbot-sdk.d.ts +355 -52
- package/@types/service/generic-document-recognizer.d.ts +3 -1
- package/@types/service/simple-mrz-recognizer.d.ts +3 -1
- package/@types/service/text-data-recognizer.d.ts +3 -1
- package/@types/ui2/common.d.ts +8 -0
- package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
- package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +51 -51
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
- package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
- package/@types/ui2/configuration/Common.d.ts +190 -190
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
- package/@types/ui2/configuration.d.ts +2 -1
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
- package/@types/ui2/model/counted-barcodes.d.ts +12 -19
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/scanbot-ui-library.d.ts +3 -2
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
- package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +4 -16
- package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
- package/@types/ui2/utils/styled-badge.d.ts +1 -1
- package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
- package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
- package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
- package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
- package/@types/ui2/views/barcode-scanner.d.ts +5 -5
- package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
- package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
- package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
- package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
- package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/video-stream.d.ts +3 -3
- package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
- package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
- package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/worker/worker-bridge.d.ts +587 -30
- package/bundle/ScanbotSDK.min.js +4 -4
- package/bundle/ScanbotSDK.ui2.min.js +16 -16
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +2 -2
- package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
- package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
- package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
- package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
- package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
- package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
- package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
- package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
- package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
- package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
- package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
- package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
- package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
- package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
- package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
- package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
- package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
- package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
- package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
- package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
- package/@types/ui2/configuration/utils.d.ts +0 -6
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function n(e,t=!1){const r=[];return function e(n){if(n){if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return r.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=t?n.slice(0):n;if(r.push(e),t)return n}else if(ArrayBuffer.isView(n)){let e;if(t){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(r.push(e.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const r=e(n[t]);r&&(n[t]=r)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const r=e(n[t]);r&&(n[t]=r)}}}(e),r}function i(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:n=!0}=t||{};let i="";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}}()){i+="-simd";n&&function(){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}}()&&(i+="-threads")}return i}r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,d=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n,i=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return F.buffer!=S.buffer&&L(),S}function r(){return F.buffer!=S.buffer&&L(),k}function i(){return F.buffer!=S.buffer&&L(),A}function o(){return F.buffer!=S.buffer&&L(),P}function a(){return F.buffer!=S.buffer&&L(),R}function s(){return F.buffer!=S.buffer&&L(),M}function u(){return F.buffer!=S.buffer&&L(),O}var c,l,d=e;d.ready=new Promise(((e,t)=>{c=e,l=t}));var h,m,f,p=Object.assign({},d),g="./this.program",v=(e,t)=>{throw t},y=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function b(e){return d.locateFile?d.locateFile(e,w):w+e}w=self.location.href,n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var _,C=d.print||console.log.bind(console),E=d.printErr||console.error.bind(console);Object.assign(d,p),p=null,d.arguments&&d.arguments,d.thisProgram&&(g=d.thisProgram),d.quit&&(v=d.quit),d.wasmBinary&&(_=d.wasmBinary);var F,x,T=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&re("no native wasm support detected");var D,S,k,A,P,R,M,W,O,Z=!1;function I(e,t){e||re(t)}function L(){var e=F.buffer;d.HEAP8=S=new Int8Array(e),d.HEAP16=A=new Int16Array(e),d.HEAPU8=k=new Uint8Array(e),d.HEAPU16=P=new Uint16Array(e),d.HEAP32=R=new Int32Array(e),d.HEAPU32=M=new Uint32Array(e),d.HEAPF32=W=new Float32Array(e),d.HEAPF64=O=new Float64Array(e)}var z,$=d.INITIAL_MEMORY||134217728;if(I($>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+$+"! (STACK_SIZE=4194304)"),y)F=d.wasmMemory;else if(d.wasmMemory)F=d.wasmMemory;else if(!((F=new WebAssembly.Memory({initial:$/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),Error("bad memory");L(),$=F.buffer.byteLength;var N=[],j=[],V=[],H=0;function B(){return T||H>0}function U(){y||(d.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,be.init(),Re(j))}function G(e){N.unshift(e)}var Q,X,Y,J=0,q=null,K=null;function ee(e){J++,d.monitorRunDependencies&&d.monitorRunDependencies(J)}function te(e){if(J--,d.monitorRunDependencies&&d.monitorRunDependencies(J),0==J&&(null!==q&&(clearInterval(q),q=null),K)){var t=K;K=null,t()}}function re(e){d.onAbort&&d.onAbort(e),E(e="Aborted("+e+")"),Z=!0,D=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function ne(e){return e.startsWith("data:application/octet-stream;base64,")}function ie(e){if(e==Q&&_)return new Uint8Array(_);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function oe(e,t,r){return function(e){return _||"function"!=typeof fetch?Promise.resolve().then((()=>ie(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>ie(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),re(e)}))}ne(Q="ScanbotSDK.Asm-simd-threads.wasm")||(Q=b(Q));var ae={8928580:e=>nn(function(){return this[Te(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var t=Pe.pthreads[e];I(t),Pe.returnWorkerToPool(t)},le=e=>{var t=Pe.getNewWorker();if(!t)return 6;Pe.runningWorkers.push(t),Pe.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(r,e.transferList),0},de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=de.isAbs(e),r="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=de.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return de.normalize(e.join("/"))},join2:(e,t)=>de.normalize(e+"/"+t)},he=e=>(he=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);re("initRandomDevice")})())(e),me={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=de.isAbs(n)}return(t?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=me.resolve(e).substr(1),t=me.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),a=o,s=0;s<o;s++)if(n[s]!==i[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(a))).join("/")}},fe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,pe=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&fe)return fe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,i):e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ge=[],ve=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ye=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i};function we(e,t,r){var n=r>0?r:ve(e)+1,i=new Array(n),o=ye(e,i,0,i.length);return t&&(i.length=o),i}var be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new xe.ErrnoError(29)}if(void 0===s&&0===o)throw new xe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new xe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new xe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ge.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;ge=we(e,!0)}return ge.shift()})(),put_char(e,t){null===t||10===t?(C(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(C(pe(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,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(E(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(pe(e.output,0)),e.output=[])}}},_e=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=bn(65536,e);return t?((e,t)=>(r().fill(0,e,e+t),e))(t,e):0},Ce={ops_table:null,mount:e=>Ce.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);Ce.ops_table||(Ce.ops_table={dir:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,lookup:Ce.node_ops.lookup,mknod:Ce.node_ops.mknod,rename:Ce.node_ops.rename,unlink:Ce.node_ops.unlink,rmdir:Ce.node_ops.rmdir,readdir:Ce.node_ops.readdir,symlink:Ce.node_ops.symlink},stream:{llseek:Ce.stream_ops.llseek}},file:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:{llseek:Ce.stream_ops.llseek,read:Ce.stream_ops.read,write:Ce.stream_ops.write,allocate:Ce.stream_ops.allocate,mmap:Ce.stream_ops.mmap,msync:Ce.stream_ops.msync}},link:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,readlink:Ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=Ce.ops_table.dir.node,i.stream_ops=Ce.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=Ce.ops_table.file.node,i.stream_ops=Ce.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=Ce.ops_table.link.node,i.stream_ops=Ce.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=Ce.ops_table.chrdev.node,i.stream_ops=Ce.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ce.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>Ce.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=Ce.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,n);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),r);else for(var s=0;s<a;s++)t[r+s]=o[i+s];return a},write(e,r,n,i,o,a){if(r.buffer===t().buffer&&(a=!1),!i)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=r.subarray(n,n+i),s.usedBytes=i,i;if(0===s.usedBytes&&0===o)return s.contents=r.slice(n,n+i),s.usedBytes=i,i;if(o+i<=s.usedBytes)return s.contents.set(r.subarray(n,n+i),o),i}if(Ce.expandFileStorage(s,o+i),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+i),o);else for(var u=0;u<i;u++)s.contents[o+u]=r[n+u];return s.usedBytes=Math.max(s.usedBytes,o+i),i},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&xe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new xe.ErrnoError(28);return n},allocate(e,t,r){Ce.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,r,n,i,o){if(!xe.isFile(e.node.mode))throw new xe.ErrnoError(43);var a,s,u=e.node.contents;if(2&o||u.buffer!==t().buffer){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=_e(r)))throw new xe.ErrnoError(48);t().set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:(e,t,r,n,i)=>(Ce.stream_ops.write(e,t,0,n,r,!1),0)}},Ee=d.preloadPlugins||[],Fe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=me.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(n=xe.lookupNode(n,r[o]),i=de.join2(i,r[o]),xe.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;xe.isLink(n.mode);){var u=xe.readlink(i);if(i=me.resolve(de.dirname(i),u),n=xe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.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 t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return xe.lookupNode(e,t),20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream:(e,t=-1)=>(xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.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 xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e),closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&E(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var n,i="/"===r,o=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!o){var a=xe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,i?xe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=de.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var o=xe.mayCreate(n,i);if(o)throw new xe.ErrnoError(o);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{xe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!me.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=de.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=de.dirname(e),o=de.dirname(t),a=de.basename(e),s=de.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var u,c=xe.lookupNode(r,a),l=me.relative(e,o);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=me.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{u=xe.lookupNode(n,s)}catch(e){}if(c!==u){var d=xe.isDir(c.mode),h=xe.mayDelete(r,a,d);if(h)throw new xe.ErrnoError(h);if(h=u?xe.mayDelete(n,s,d):xe.mayCreate(n,s))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(c)||u&&xe.isMountpoint(u))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{xe.hashAddNode(c)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=de.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=de.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return me.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?xe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?xe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;if(!(r="string"==typeof e?xe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),i=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!i){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!i&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!d.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var o="undefined"!=typeof i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=a),a},write(e,t,r,n,i,o){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var a="undefined"!=typeof i;if(a){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,o);return a||(e.position+=s),s},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,o=new Uint8Array(i);return xe.read(n,o,0,i,0),"utf8"===t.encoding?r=pe(o,0):"binary"===t.encoding&&(r=o),xe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(ve(t)+1),o=ye(t,i,0,i.length);xe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),be.register(xe.makedev(5,0),be.default_tty_ops),be.register(xe.makedev(6,0),be.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?xe.createDevice("/dev","stdin",d.stdin):xe.symlink("/dev/tty","/dev/stdin"),d.stdout?xe.createDevice("/dev","stdout",null,d.stdout):xe.symlink("/dev/tty","/dev/stdout"),d.stderr?xe.createDevice("/dev","stderr",null,d.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(Ce,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:Ce}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=t||d.stdout,d.stderr=r||d.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;e<xe.streams.length;e++){var t=xe.streams[e];t&&xe.close(t)}},findObject(e,t){var r=xe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=xe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=xe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=de.basename(e),n=xe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:xe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var a=de.join2(e,o);try{xe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,i){var o=de.join2("string"==typeof e?e:xe.getPath(e),t),a=Fe(n,i);return xe.create(o,a)},createDataFile(e,t,r,n,i,o){var a=t;e&&(e="string"==typeof e?e:xe.getPath(e),a=t?de.join2(e,t):e);var s=Fe(n,i),u=xe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,d=r.length;l<d;++l)c[l]=r.charCodeAt(l);r=c}xe.chmod(u,146|s);var h=xe.open(u,577);xe.write(h,r,0,r.length,0,o),xe.close(h),xe.chmod(u,s)}return u},createDevice(e,t,r,n){var i=de.join2("string"==typeof e?e:xe.getPath(e),t),o=Fe(!!r,!!n);xe.createDevice.major||(xe.createDevice.major=64);var a=xe.makedev(xe.createDevice.major++,0);return xe.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var a=0,s=0;s<i;s++){var u;try{u=r()}catch(e){throw new xe.ErrnoError(29)}if(void 0===u&&0===a)throw new xe.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i,o){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new xe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),a}}),xe.mkdev(i,o,a)},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(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=we(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new xe.ErrnoError(29)}},createLazyFile(e,r,n,i,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):we(i.responseText||"",!0)})(t,i)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,C("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=xe.createFile(e,r,u,i,o);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[i+s];else for(s=0;s<a;s++)t[r+s]=o.get(i+s);return a}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];l[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),d(e,t,r,n,i)),l.mmap=(e,r,n,i,o)=>{xe.forceLoadFile(c);var a=_e(r);if(!a)throw new xe.ErrnoError(48);return d(e,t(),a,r,n),{ptr:a,allocated:!0}},c.stream_ops=l,c}},Te=(e,t)=>e?pe(r(),e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(de.isAbs(t))return t;var n;if(n=-100===e?xe.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return de.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&de.normalize(t)!==de.normalize(xe.getPath(e.node)))return-54;throw e}a()[r>>2]=n.dev,a()[r+4>>2]=n.mode,s()[r+8>>2]=n.nlink,a()[r+12>>2]=n.uid,a()[r+16>>2]=n.gid,a()[r+20>>2]=n.rdev,Y=[n.size>>>0,(X=n.size,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+24>>2]=Y[0],a()[r+28>>2]=Y[1],a()[r+32>>2]=4096,a()[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),u=n.ctime.getTime();return Y=[Math.floor(i/1e3)>>>0,(X=Math.floor(i/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+40>>2]=Y[0],a()[r+44>>2]=Y[1],s()[r+48>>2]=i%1e3*1e3,Y=[Math.floor(o/1e3)>>>0,(X=Math.floor(o/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+56>>2]=Y[0],a()[r+60>>2]=Y[1],s()[r+64>>2]=o%1e3*1e3,Y=[Math.floor(u/1e3)>>>0,(X=Math.floor(u/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+72>>2]=Y[0],a()[r+76>>2]=Y[1],s()[r+80>>2]=u%1e3*1e3,Y=[n.ino>>>0,(X=n.ino,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+88>>2]=Y[0],a()[r+92>>2]=Y[1],0},doMsync(e,t,n,i,o){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&i)return 0;var a=r().slice(e,e+n);xe.msync(t,a,o,n,i)},varargs:void 0,get(){var e=a()[De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Te(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Se(e){if(y)return Tr(0,1,e);D=e,B()||(Pe.terminateAllThreads(),d.onExit&&d.onExit(e),Z=!0),v(e,new se(e))}var ke=(e,t)=>{if(D=e,y)throw Me(e),"unwind";Se(e)},Ae=e=>{if(e instanceof se||"unwind"==e)return D;v(1,e)},Pe={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){y?Pe.initWorker():Pe.initMainThread()},initMainThread(){for(var e=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));e--;)Pe.allocateUnusedWorker();G((()=>{ee(),Pe.loadWasmModuleToAllWorkers((()=>te()))}))},initWorker(){T=!1},setExitStatus:e=>{D=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Pe.runningWorkers)ue(e);for(var e of Pe.unusedWorkers)ue(e);Pe.unusedWorkers=[],Pe.runningWorkers=[],Pe.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Pe.pthreads[t],Pe.unusedWorkers.push(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Fn(t)},receiveObjectTransfer(e){},threadInitTLS(){Pe.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,i=n.cmd;if(n.targetThread&&n.targetThread!=yn()){var o=Pe.pthreads[n.targetThread];o?o.postMessage(n,n.transferList):E(`Internal error! Worker sent a message "${i}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var a;"checkMailbox"===i?Fr():"spawnThread"===i?le(n):"cleanupThread"===i?ce(n.thread):"killThread"===i?(e=>{var t=Pe.pthreads[e];delete Pe.pthreads[e],ue(t),Fn(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(t),1),t.pthread_ptr=0})(n.thread):"cancelThread"===i?(a=n.thread,Pe.pthreads[a].postMessage({cmd:"cancel"})):"loaded"===i?(e.loaded=!0,t(e)):"alert"===i?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===i?d[n.handler](...n.args):i&&E(`worker sent an unknown command ${i}`)}},e.onerror=e=>{throw E(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r=[];for(var i of["onExit","onAbort","print","printErr"])d.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:d.mainScriptUrlOrBlob||n,wasmMemory:F,wasmModule:x})})),loadWasmModuleToAllWorkers(e){if(y)return e();Promise.all(Pe.unusedWorkers.map(Pe.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e,t=b("ScanbotSDK.Asm-simd-threads.worker.js");e=new Worker(t),Pe.unusedWorkers.push(e)},getNewWorker:()=>(0==Pe.unusedWorkers.length&&(Pe.allocateUnusedWorker(),Pe.loadWasmModuleToWorker(Pe.unusedWorkers[0])),Pe.unusedWorkers.pop())};d.PThread=Pe;var Re=e=>{for(;e.length>0;)e.shift()(d)};function Me(e){if(y)return Tr(1,0,e);ke(e)}d.establishStackSpace=()=>{var e=yn(),t=a()[e+52>>2],r=a()[e+56>>2];Sn(t,t-r),An(t)};var We=e=>z.get(e);d.invokeEntryPoint=(e,t)=>{!function(e){B()?Pe.setExitStatus(e):xn(e)}(We(e)(t))};var Oe=e=>{Pe.tlsInitFunctions.push(e)},Ze=[],Ie=0,Le=0;function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(On(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var $e=e=>{var t=Le;if(!t)return wn(0),0;var r=new ze(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return wn(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var a=r.ptr+16;if(Wn(o,n,a))return wn(o),t}return wn(n),t},Ne=()=>{var e=Ze.pop();e||re("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ze.push(e),e.set_rethrown(!0),e.set_caught(!1),Ie++),Le=t};function je(e,t,r,n){return y?Tr(2,1,e,t,r,n):Ve(e,t,r,n)}var Ve=(e,t,r,n)=>{if("undefined"==typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var i=[];if(y&&0===i.length)return je(e,t,r,n);var o={startRoutine:r,pthread_ptr:e,arg:n,transferList:i};return y?(o.cmd="spawnThread",postMessage(o,i),0):le(o)};function He(e,t,r,n,i){if(y)return Tr(3,1,e,t,r,n,i);try{for(var o=0,s=t?a()[t>>2]:0,u=t?a()[t+4>>2]:0,c=r?a()[r>>2]:0,l=r?a()[r+4>>2]:0,d=n?a()[n>>2]:0,h=n?a()[n+4>>2]:0,m=0,f=0,p=0,g=0,v=0,w=0,b=(t?a()[t>>2]:0)|(r?a()[r>>2]:0)|(n?a()[n>>2]:0),_=(t?a()[t+4>>2]:0)|(r?a()[r+4>>2]:0)|(n?a()[n+4>>2]:0),C=function(e,t,r,n){return e<32?t&n:r&n},E=0;E<e;E++){var F=1<<E%32;if(C(E,b,_,F)){var x=De.getStreamFromFD(E),T=De.DEFAULT_POLLMASK;if(x.stream_ops.poll){var D=-1;i&&(D=1e3*((t?a()[i>>2]:0)+(t?a()[i+8>>2]:0)/1e6)),T=x.stream_ops.poll(x,D)}1&T&&C(E,s,u,F)&&(E<32?m|=F:f|=F,o++),4&T&&C(E,c,l,F)&&(E<32?p|=F:g|=F,o++),2&T&&C(E,d,h,F)&&(E<32?v|=F:w|=F,o++)}}return t&&(a()[t>>2]=m,a()[t+4>>2]=f),r&&(a()[r>>2]=p,a()[r+4>>2]=g),n&&(a()[n>>2]=v,a()[n+4>>2]=w),o}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Be(e,t,r){if(y)return Tr(4,1,e,t,r);De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((o=De.get())<0)return-28;for(;xe.streams[o];)o++;return xe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:return o=De.getp(),i()[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,a()[vn()>>2]=s,-1}}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Ue(e,t){if(y)return Tr(5,1,e,t);try{var r=De.getStreamFromFD(e);return De.doStat(xe.stat,r.path,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ge(e,r,n){if(y)return Tr(6,1,e,r,n);De.varargs=n;try{var o=De.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return o.tty?0:-59;case 21505:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var s=o.tty.ops.ioctl_tcgets(o),u=De.getp();a()[u>>2]=s.c_iflag||0,a()[u+4>>2]=s.c_oflag||0,a()[u+8>>2]=s.c_cflag||0,a()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)t()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){u=De.getp();var l=a()[u>>2],d=a()[u+4>>2],h=a()[u+8>>2],m=a()[u+12>>2],f=[];for(c=0;c<32;c++)f.push(t()[u+c+17>>0]);return o.tty.ops.ioctl_tcsets(o.tty,r,{c_iflag:l,c_oflag:d,c_cflag:h,c_lflag:m,c_cc:f})}return 0;case 21519:return o.tty?(u=De.getp(),a()[u>>2]=0,0):-59;case 21520:return o.tty?-28:-59;case 21531:return u=De.getp(),xe.ioctl(o,r,u);case 21523:if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var p=o.tty.ops.ioctl_tiocgwinsz(o.tty);u=De.getp(),i()[u>>1]=p[0],i()[u+2>>1]=p[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Qe(e,t,r,n){if(y)return Tr(8,1,e,t,r,n);try{t=De.getStr(t);var i=256&n,o=4096&n;return n&=-6401,t=De.calculateAt(e,t,o),De.doStat(i?xe.lstat:xe.stat,t,r)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Xe(e,t,r,n){if(y)return Tr(9,1,e,t,r,n);De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return xe.open(t,r,i).fd}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e){if(y)return Tr(10,1,e);try{return e=De.getStr(e),xe.rmdir(e),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e,t){if(y)return Tr(11,1,e,t);try{return e=De.getStr(e),De.doStat(xe.stat,e,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function qe(e,t,r){if(y)return Tr(12,1,e,t,r);try{return t=De.getStr(t),t=De.calculateAt(e,t),0===r?xe.unlink(t):512===r?xe.rmdir(t):re("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ke={},et=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function tt(e){return this.fromWireType(a()[e>>2])}var rt={},nt={},it={},ot=void 0,at=e=>{throw new ot(e)},st=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&at("Mismatched type converter count");for(var i=0;i<e.length;++i)ht(e[i],n[i])}e.forEach((function(e){it[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{nt.hasOwnProperty(e)?i[t]=nt[e]:(o.push(e),rt.hasOwnProperty(e)||(rt[e]=[]),rt[e].push((()=>{i[t]=nt[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},ut=void 0,ct=e=>{for(var t="",n=e;r()[n];)t+=ut[r()[n++]];return t},lt=void 0,dt=e=>{throw new lt(e)};function ht(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||dt(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;dt(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete it[e],rt.hasOwnProperty(e)){var i=rt[e];delete rt[e],i.forEach((e=>e()))}}(e,t,r)}var mt=8;function ft(e){if(!(this instanceof Zt))return!1;if(!(e instanceof Zt))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}var pt=e=>{dt(e.$$.ptrType.registeredClass.name+" instance already deleted")},gt=!1,vt=e=>{},yt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},wt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=wt(e,t,r.baseClass);return null===n?null:r.downcast(n)},bt={},_t=()=>Object.keys(Dt).length,Ct=()=>{var e=[];for(var t in Dt)Dt.hasOwnProperty(t)&&e.push(Dt[t]);return e},Et=[],Ft=()=>{for(;Et.length;){var e=Et.pop();e.$$.deleteScheduled=!1,e.delete()}},xt=void 0,Tt=e=>{xt=e,Et.length&&xt&&xt(Ft)},Dt={},St=(e,t)=>(t=((e,t)=>{for(void 0===t&&dt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Dt[t]),kt=(e,t)=>(t.ptrType&&t.ptr||at("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t}})));function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=St(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=bt[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=wt(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Pt=e=>"undefined"==typeof FinalizationRegistry?(Pt=e=>e,e):(gt=new FinalizationRegistry((e=>{yt(e.$$)})),Pt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};gt.register(e,r,e)}return e},vt=e=>gt.unregister(e),Pt(e));function Rt(){if(this.$$.ptr||pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Mt(){this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),vt(this),yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Wt(){return!this.$$.ptr}function Ot(){return this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),Et.push(this),1===Et.length&&xt&&xt(Ft),this.$$.deleteScheduled=!0,this}function Zt(){}var It=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function Lt(e,t){return{[e=It(e)]:function(){return t.apply(this,arguments)}}[e]}var zt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||dt(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},$t=(e,t,r)=>{d.hasOwnProperty(e)?((void 0===r||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[r])&&dt(`Cannot register public name '${e}' twice`),zt(d,e,e),d.hasOwnProperty(r)&&dt(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),d[e].overloadTable[r]=t):(d[e]=t,void 0!==r&&(d[e].numArguments=r))};function Nt(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var jt=(e,t,r)=>{for(;t!==r;)t.upcast||dt(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Vt(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return jt(t.$$.ptr,r,this.registeredClass)}function Ht(e,t){var r;if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=jt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&dt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,lr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:dt("Unsupporting sharing policy")}return r}function Bt(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return jt(t.$$.ptr,r,this.registeredClass)}function Ut(e){return this.fromWireType(s()[e>>2])}function Gt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Qt(e){this.rawDestructor&&this.rawDestructor(e)}var Xt=e=>{null!==e&&e.delete()};function Yt(e,t,r,n,i,o,a,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Ht:n?(this.toWireType=Vt,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}var Jt=(e,t,r)=>{d.hasOwnProperty(e)||at("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==r?d[e].overloadTable[r]=t:(d[e]=t,d[e].argCount=r)},qt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var n=d["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)})(e,t,r):We(t).apply(null,r),Kt=(e,t)=>{var r,n,i,o=(e=ct(e)).includes("j")?(r=e,n=t,i=[],function(){return i.length=0,Object.assign(i,arguments),qt(r,n,i)}):We(t);return"function"!=typeof o&&dt(`unknown function pointer with signature ${e}: ${t}`),o},er=void 0,tr=e=>{var t=_n(e),r=ct(t);return gn(t),r},rr=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||nt[t]||(it[t]?it[t].forEach(e):(r.push(t),n[t]=!0))})),new er(`${e}: `+r.map(tr).join([", "]))},nr=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(s()[t+4*n>>2]);return r};function ir(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Lt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function or(e,t,r,n,i,o){var a=t.length;a<2&&dt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var l="void"!==t[0].name,d="",h="";for(c=0;c<a-2;++c)d+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${It(e)}(${d}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[dt,n,i,et,t[0],t[1]];for(s&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)m+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(l||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(m+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return l&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),ir(Function,p).apply(null,g)}function ar(){this.allocated=[void 0],this.freelist=[]}var sr=new ar,ur=e=>{e>=sr.reserved&&0==--sr.get(e).refcount&&sr.free(e)},cr=()=>{for(var e=0,t=sr.reserved;t<sr.allocated.length;++t)void 0!==sr.allocated[t]&&++e;return e},lr={toValue:e=>(e||dt("Cannot use deleted val. handle = "+e),sr.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 sr.allocate({refcount:1,value:e})}}},dr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},hr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType((F.buffer!=S.buffer&&L(),W)[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},mr=(e,n,u)=>{switch(n){case 1:return u?e=>t()[e>>0]:e=>r()[e>>0];case 2:return u?e=>i()[e>>1]:e=>o()[e>>1];case 4:return u?e=>a()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},fr=(e,t,n)=>ye(e,r(),t,n),pr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,gr=(e,t)=>{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&o()[a];)++a;if((n=a<<1)-e>32&&pr)return pr.decode(r().slice(e,n));for(var u="",c=0;!(c>=t/2);++c){var l=i()[e+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,a=0;a<o;++a){var s=e.charCodeAt(a);i()[t>>1]=s,t+=2}return i()[t>>1]=0,t-n},yr=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=a()[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),a()[t>>2]=s,(t+=4)+4>i)break}return a()[t>>2]=0,t-n},_r=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Cr=e=>{if(!Z)try{e(),(()=>{if(!B())try{y?xn(D):ke(D)}catch(e){Ae(e)}})()}catch(e){Ae(e)}},Er=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(a(),e>>2,e).value.then(Fr);var t=e+128;Atomics.store(a(),t>>2,1)}};d.__emscripten_thread_mailbox_await=Er;var Fr=()=>{var e=yn();e&&(Er(e),Cr((()=>Tn())))};d.checkMailbox=Fr;var xr=e=>{var t=kn(),r=e();return An(t),r},Tr=function(e,t){var r=arguments.length-2,n=arguments;return xr((()=>{for(var i=r,o=Pn(8*i),a=o>>3,s=0;s<r;s++){var c=n[2+s];u()[a+s]=c}return En(e,i,o,t)}))},Dr=[],Sr=(e,t)=>{var r=nt[e];return void 0===r&&dt(t+" has unknown type "+tr(e)),r},kr={},Ar=e=>{var t=kr[e];return void 0===t?ct(e):t},Pr=[],Rr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Mr=[],Wr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Or=e=>e%4==0&&(e%100!=0||e%400==0),Zr=[0,31,60,91,121,152,182,213,244,274,305,335],Ir=[0,31,59,90,120,151,181,212,243,273,304,334];function Lr(e,t,r,n,i,o,u,c){if(y)return Tr(13,1,e,t,r,n,i,o,u,c);var l=Wr(i,o);try{if(isNaN(l))return 61;var d=De.getStreamFromFD(n),h=xe.mmap(d,e,l,t,r),m=h.ptr;return a()[u>>2]=h.allocated,s()[c>>2]=m,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function zr(e,t,r,n,i,o,a){if(y)return Tr(14,1,e,t,r,n,i,o,a);var s=Wr(o,a);try{if(isNaN(s))return 61;var u=De.getStreamFromFD(i);2&r&&De.doMsync(e,u,t,n,s),xe.munmap(u)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var $r,Nr=e=>{var t=ve(e)+1,r=pn(t);return r&&fr(e,r,t),r},jr=[],Vr=(e,t,n)=>{var i=((e,t)=>{var n;for(jr.length=0;n=r()[e++];)t+=105!=n&&t%8?4:0,jr.push(105==n?a()[t>>2]:u()[t>>3]),t+=105==n?4:8;return jr})(t,n);return ae[e].apply(null,i)};$r=()=>performance.timeOrigin+performance.now();var Hr=e=>{var t=(e-F.buffer.byteLength+65535)/65536;try{return F.grow(t),L(),1}catch(e){}},Br={},Ur=()=>{if(!Ur.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",_:g||"./this.program"};for(var t in Br)void 0===Br[t]?delete e[t]:e[t]=Br[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Ur.strings=r}return Ur.strings},Gr=function(e,r){if(y)return Tr(15,1,e,r);var n=0;return Ur().forEach(((i,o)=>{var a=r+n;s()[e+4*o>>2]=a,((e,r)=>{for(var n=0;n<e.length;++n)t()[r++>>0]=e.charCodeAt(n);t()[r>>0]=0})(i,a),n+=i.length+1})),0},Qr=function(e,t){if(y)return Tr(16,1,e,t);var r=Ur();s()[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),s()[t>>2]=n,0};function Xr(e){if(y)return Tr(17,1,e);try{var t=De.getStreamFromFD(e);return xe.close(t),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Yr(e,r){if(y)return Tr(18,1,e,r);try{var n=De.getStreamFromFD(e),o=n.tty?2:xe.isDir(n.mode)?3:xe.isLink(n.mode)?7:4;return t()[r>>0]=o,i()[r+2>>1]=0,Y=[0,(X=0,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+8>>2]=Y[0],a()[r+12>>2]=Y[1],Y=[0,(X=0,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[r+16>>2]=Y[0],a()[r+20>>2]=Y[1],0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Jr(e,r,n,i){if(y)return Tr(19,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=xe.read(e,t(),u,c,i);if(l<0)return-1;if(o+=l,l<c)break;"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function qr(e,t,r,n,i){if(y)return Tr(20,1,e,t,r,n,i);var o=Wr(t,r);try{if(isNaN(o))return 61;var s=De.getStreamFromFD(e);return xe.llseek(s,o,n),Y=[s.position>>>0,(X=s.position,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],a()[i>>2]=Y[0],a()[i+4>>2]=Y[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,r,n,i){if(y)return Tr(21,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=xe.write(e,t(),u,c,i);if(l<0)return-1;o+=l,"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}var en=[31,29,31,30,31,30,31,31,30,31,30,31],tn=[31,28,31,30,31,30,31,31,30,31,30,31],rn=(e,r,n,i)=>{var o=s()[i+40>>2],u={tm_sec:a()[i>>2],tm_min:a()[i+4>>2],tm_hour:a()[i+8>>2],tm_mday:a()[i+12>>2],tm_mon:a()[i+16>>2],tm_year:a()[i+20>>2],tm_wday:a()[i+24>>2],tm_yday:a()[i+28>>2],tm_isdst:a()[i+32>>2],tm_gmtoff:a()[i+36>>2],tm_zone:o?Te(o):""},c=Te(n),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var d in l)c=c.replace(new RegExp(d,"g"),l[d]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return f(e,t,"0")}function g(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function v(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 y(e){var t=((e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Or(r.getFullYear()),i=r.getMonth(),o=(n?en:tn)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r})(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=v(r),o=v(n);return g(i,t)<=0?g(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":e=>h[e.tm_wday].substring(0,3),"%A":e=>h[e.tm_wday],"%b":e=>m[e.tm_mon].substring(0,3),"%B":e=>m[e.tm_mon],"%C":e=>p((e.tm_year+1900)/100|0,2),"%d":e=>p(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":e=>y(e),"%H":e=>p(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":e=>p(e.tm_mday+((e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r})(Or(e.tm_year+1900)?en:tn,e.tm_mon-1),3),"%m":e=>p(e.tm_mon+1,2),"%M":e=>p(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>p(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return p(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Or(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Or(e.tm_year%400-1))&&t++}return p(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return p(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),w)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),w[d](u)));var b,_,C=we(c=c.replace(/\0\0/g,"%"),!1);return C.length>r?0:(b=C,_=e,t().set(b,_),C.length-1)},nn=Nr;Pe.init();var on,an,sn,un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},cn=365,ln=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=-366}},write:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=-147}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=(e,t,r,n,i,o,a,s,u,c)=>{var l=t?me.resolve(de.join2(e,t)):e;function d(r){function d(r){c&&c(),s||xe.createDataFile(e,t,r,n,i,u),o&&o(),te()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ee.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,l,d,(()=>{a&&a(),te()}))||d(r)}ee(),"string"==typeof r?((e,t,r,n)=>{var i=n?"":`al ${e}`;m(e,(r=>{I(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&te()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&ee()})(r,(e=>d(e)),a):d(r)},xe.staticInit(),ot=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ut=e})(),lt=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Zt.prototype.isAliasOf=ft,Zt.prototype.clone=Rt,Zt.prototype.delete=Mt,Zt.prototype.isDeleted=Wt,Zt.prototype.deleteLater=Ot,d.getInheritedInstanceCount=_t,d.getLiveInheritedInstances=Ct,d.flushPendingDeletes=Ft,d.setDelayFunction=Tt,Yt.prototype.getPointee=Gt,Yt.prototype.destructor=Qt,Yt.prototype.argPackAdvance=mt,Yt.prototype.readValueFromPointer=Ut,Yt.prototype.deleteObject=Xt,Yt.prototype.fromWireType=At,er=d.UnboundTypeError=(on=Error,(sn=Lt(an="UnboundTypeError",(function(e){this.name=an,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(on.prototype),sn.prototype.constructor=sn,sn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},sn),Object.assign(ar.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),sr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),sr.reserved=sr.allocated.length,d.count_emval_handles=cr;var dn,hn=[Se,Me,je,He,Be,Ue,Ge,function(e,t){if(y)return Tr(7,1,e,t);try{return e=De.getStr(e),De.doStat(xe.lstat,e,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}},Qe,Xe,Ye,Je,qe,Lr,zr,Gr,Qr,Xr,Yr,Jr,qr,Kr],mn={p:(e,t,r,n)=>{re(`Assertion failed: ${Te(e)}, at: `+[t?Te(t):"unknown filename",r,n?Te(n):"unknown function"])},v:e=>{var t=new ze(e);return t.get_caught()||(t.set_caught(!0),Ie--),t.set_rethrown(!1),Ze.push(t),Mn(t.excPtr),t.get_exception_ptr()},Zb:()=>{if(!Ze.length)return 0;var e=Ze[Ze.length-1];return Mn(e.excPtr),e.excPtr},B:()=>{Dn(0,0);var e=Ze.pop();Rn(e.excPtr),Le=0},b:()=>$e([]),i:e=>$e([e]),x:(e,t)=>$e([e,t]),Za:Ne,Yb:e=>{if(e){var t=new ze(e);Ze.push(t),t.set_rethrown(!0),Ne()}},r:(e,t,r)=>{throw new ze(e).init(t,r),Ie++,Le=e},_b:()=>Ie,kc:e=>{Cn(e,!1,1,!0,4194304,!1),Pe.threadInitTLS()},$a:e=>{y?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},hc:Ve,d:e=>{throw Le||(Le=e),Le},ec:He,cb:Be,qc:Ue,rc:Ge,oc:Qe,db:Xe,fc:Ye,pc:Je,gc:qe,Db:e=>{var t=Ke[e];delete Ke[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType)));st([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],l=t.setter,d=t.setterContext;o[n]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];l(d,e,c.toWireType(r,t)),et(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var i in o)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:n}]}))},Pb:(e,t,r,n,i)=>{},wc:(e,t,n,i)=>{ht(e,{name:t=ct(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:mt,readValueFromPointer:function(e){return this.fromWireType(r()[e])},destructorFunction:null})},ba:(e,t,r,n,i,o,a,s,u,c,l,d,h)=>{l=ct(l),o=Kt(i,o),s&&(s=Kt(a,s)),c&&(c=Kt(u,c)),h=Kt(d,h);var m=It(l);$t(m,(function(){rr(`Cannot construct ${l} due to unbound types`,[n])})),st([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:Zt.prototype;var a=Lt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new lt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new lt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new lt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var d=new Nt(l,a,u,h,r,o,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var f=new Yt(l,d,!0,!1,!1),p=new Yt(l+"*",d,!1,!1,!1),g=new Yt(l+" const*",d,!1,!0,!1);return bt[e]={pointerType:p,constPointerType:g},Jt(m,a),[f,p,g]}))},aa:(e,t,r,n,i,o)=>{var a=nr(t,r);i=Kt(n,i),st([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new lt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{rr(`Cannot construct ${e.name} due to unbound types`,a)},st([],a,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=or(r,n,null,i,o),[]))),[]}))},V:(e,t,r,n,i,o,a,s,u)=>{var c=nr(r,n);t=ct(t),o=Kt(i,o),st([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){rr(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(zt(l,t,n),l[t].overloadTable[r-2]=i),st([],c,(function(i){var s=or(n,i,e,o,a,u);return void 0===l[t].overloadTable?(s.argCount=r-2,l[t]=s):l[t].overloadTable[r-2]=s,[]})),[]}))},vc:(e,t)=>{ht(e,{name:t=ct(t),fromWireType:e=>{var t=lr.toValue(e);return ur(e),t},toWireType:(e,t)=>lr.toHandle(t),argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:null})},fb:(e,t,r)=>{ht(e,{name:t=ct(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:mt,readValueFromPointer:hr(t,r),destructorFunction:null})},Z:(e,t,r,n,i,o,a)=>{var s=nr(t,r);e=ct(e),i=Kt(n,i),$t(e,(function(){rr(`Cannot call ${e} due to unbound types`,s)}),t-1),st([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return Jt(e,or(e,n,null,i,o,a),t-1),[]}))},ca:(e,t,r,n,i)=>{t=ct(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ht(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:mt,readValueFromPointer:mr(t,r,0!==n),destructorFunction:null})},P:(e,r,n)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=s()[e>>2],n=s()[e+4>>2];return new i(t().buffer,n,r)}ht(e,{name:n=ct(n),fromWireType:o,argPackAdvance:mt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},eb:(e,t)=>{var n="std::string"===(t=ct(t));ht(e,{name:t,fromWireType:e=>{var t,i=s()[e>>2],o=e+4;if(n)for(var a=o,u=0;u<=i;++u){var c=o+u;if(u==i||0==r()[c]){var l=Te(a,c-a);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),a=c+1}}else{var d=new Array(i);for(u=0;u<i;++u)d[u]=String.fromCharCode(r()[o+u]);t=d.join("")}return gn(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||dt("Cannot pass non-string to std::string"),i=n&&o?ve(t):t.length;var a=pn(4+i+1),u=a+4;if(s()[a>>2]=i,n&&o)fr(t,u,i+1);else if(o)for(var c=0;c<i;++c){var l=t.charCodeAt(c);l>255&&(gn(u),dt("String has UTF-16 code units that do not fit in 8 bits")),r()[u+c]=l}else for(c=0;c<i;++c)r()[u+c]=t[c];return null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:Ut,destructorFunction:e=>gn(e)})},Pa:(e,t,r)=>{var n,i,a,u,c;r=ct(r),2===t?(n=gr,i=vr,u=yr,a=()=>o(),c=1):4===t&&(n=wr,i=br,u=_r,a=()=>s(),c=2),ht(e,{name:r,fromWireType:e=>{for(var r,i=s()[e>>2],o=a(),u=e+4,l=0;l<=i;++l){var d=e+4+l*t;if(l==i||0==o[d>>c]){var h=n(u,d-u);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),u=d+t}}return gn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&dt(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),a=pn(4+o+t);return s()[a>>2]=o>>c,i(n,a+4,o+t),null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:e=>gn(e)})},Eb:(e,t,r,n,i,o)=>{Ke[e]={name:ct(t),rawConstructor:Kt(r,n),rawDestructor:Kt(i,o),fields:[]}},Cb:(e,t,r,n,i,o,a,s,u,c)=>{Ke[e].fields.push({fieldName:ct(t),getterReturnType:r,getter:Kt(n,i),getterContext:o,setterArgumentType:a,setter:Kt(s,u),setterContext:c})},xc:(e,t)=>{ht(e,{isVoid:!0,name:t=ct(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},uc:()=>!0,cc:(e,t,r)=>{if(e==t)setTimeout((()=>Fr()));else if(y)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Pe.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},ic:(e,t,r,n)=>{Dr.length=r;for(var i=n>>3,o=0;o<r;o++)Dr[o]=u()[i+o];var a=e<0?ae[-e-1]:hn[e];Pe.currentProxiedOperationCallerThread=t;var s=a.apply(null,Dr);return Pe.currentProxiedOperationCallerThread=0,s},jc:Er,tc:e=>{},$b:()=>{throw 1/0},la:(e,t,r)=>{e=lr.toValue(e),t=Sr(t,"emval::as");var n=[],i=lr.toHandle(n);return s()[r>>2]=i,t.toWireType(n,e)},Ma:(e,t,r,n,i)=>(e=Pr[e])(t=lr.toValue(t),r=Ar(r),(e=>{var t=[];return s()[e>>2]=lr.toHandle(t),t})(n),i),La:(e,t,r,n)=>{(e=Pr[e])(t=lr.toValue(t),r=Ar(r),null,n)},yc:ur,yb:e=>0===e?lr.toHandle(Rr()):(e=Ar(e),lr.toHandle(Rr()[e])),ka:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Sr(s()[t+4*n>>2],"parameter "+n);return r})(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Mr[i];if(void 0!==o)return o;for(var a=["retType"],u=[n],c="",l=0;l<e-1;++l)c+=(0!==l?", ":"")+"arg"+l,a.push("argType"+l),u.push(r[1+l]);var d="return function "+It("methodCaller_"+i)+"(handle, name, destructors, args) {\n",h=0;for(l=0;l<e-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(h?"+"+h:"")+");\n",h+=r[l+1].argPackAdvance;for(d+=" var rv = handle[name]("+c+");\n",l=0;l<e-1;++l)r[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var m,f,p=ir(Function,a).apply(null,u);return m=p,f=Pr.length,Pr.push(m),o=f,Mr[i]=o,o},Tb:(e,t)=>(e=lr.toValue(e),t=lr.toValue(t),lr.toHandle(e[t])),s:e=>{e>4&&(sr.get(e).refcount+=1)},L:()=>lr.toHandle([]),da:e=>lr.toHandle(Ar(e)),y:()=>lr.toHandle({}),Fb:e=>{var t=lr.toValue(e);et(t),ur(e)},Fc:(e,t,r)=>{e=lr.toValue(e),t=lr.toValue(t),r=lr.toValue(r),e[t]=r},$:(e,t)=>{var r=(e=Sr(e,"_emval_take_value")).readValueFromPointer(t);return lr.toHandle(r)},Mb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getUTCSeconds(),a()[r+4>>2]=i.getUTCMinutes(),a()[r+8>>2]=i.getUTCHours(),a()[r+12>>2]=i.getUTCDate(),a()[r+16>>2]=i.getUTCMonth(),a()[r+20>>2]=i.getUTCFullYear()-1900,a()[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),s=(i.getTime()-o)/864e5|0;a()[r+28>>2]=s},Nb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getSeconds(),a()[r+4>>2]=i.getMinutes(),a()[r+8>>2]=i.getHours(),a()[r+12>>2]=i.getDate(),a()[r+16>>2]=i.getMonth(),a()[r+20>>2]=i.getFullYear()-1900,a()[r+24>>2]=i.getDay();var o=0|(e=>(Or(e.getFullYear())?Zr:Ir)[e.getMonth()]+e.getDate()-1)(i);a()[r+28>>2]=o,a()[r+36>>2]=-60*i.getTimezoneOffset();var s=new Date(i.getFullYear(),0,1),u=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&i.getTimezoneOffset()==Math.min(c,u));a()[r+32>>2]=l},Kb:Lr,Lb:zr,bc:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),u=i.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(u,c);function d(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[e>>2]=60*l,a()[t>>2]=Number(u!=c);var h=d(i),m=d(o),f=Nr(h),p=Nr(m);c<u?(s()[r>>2]=f,s()[r+4>>2]=p):(s()[r>>2]=p,s()[r+4>>2]=f)},F:()=>{re("")},zb:(e,t,r)=>Vr(e,t,r),ab:()=>{},ra:()=>Date.now(),sc:()=>{throw H+=1,"unwind"},dc:()=>2147483648,Y:$r,hb:()=>navigator.hardwareConcurrency,ac:e=>{var t=r().length;if((e>>>=0)<=t)return!1;var n=2147483648;if(e>n)return!1;for(var i,o,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var u=Math.min(n,(i=Math.max(e,s))+((o=65536)-i%o)%o);if(Hr(u))return!0}return!1},mc:Gr,nc:Qr,gb:ke,Oa:Xr,lc:Yr,bb:Jr,Ob:qr,Na:Kr,Bb:function(){return nn(location.toString())},Wb:(e,t)=>(he(r().subarray(e,e+t)),0),Ab:function(){return nn((e=Un,self[e(268,"R8YN")][e(261,"qY8s")]()));var e},_:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Ec:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},ob:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},U:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},G:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Sa:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},ub:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Hc:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},t:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Ca:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},E:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},na:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},X:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},pa:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},w:function(e){var t=kn();try{return We(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},j:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},pb:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},ib:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},wa:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Ic:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Kc:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Jc:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Oc:function(e,t,r,n,i,o,a,s,u){var c=kn();try{return We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},c:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Ua:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Gc:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},h:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},ga:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ya:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},l:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},_a:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},kb:function(e,t,r,n,i,o,a){var s=kn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},o:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},C:function(e,t,r,n,i,o,a){var s=kn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},mb:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},ua:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},K:function(e,t,r,n,i,o,a,s,u){var c=kn();try{return We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},ha:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{return We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},Ka:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{return We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},Ea:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=kn();try{return We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},Hb:function(e,t,r,n,i,o,a){var s=kn();try{return Vn(e,t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},Ub:function(e,t,r,n){var i=kn();try{return Ln(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Jb:function(e){var t=kn();try{return Nn(e)}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},Vb:function(e,t){var r=kn();try{return Zn(e,t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Ib:function(e,t,r){var n=kn();try{return jn(e,t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Sb:function(e,t,r,n){var i=kn();try{return zn(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Gb:function(e,t,r,n,i){var o=kn();try{return Hn(e,t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},n:function(e){var t=kn();try{We(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},e:function(e,t){var r=kn();try{We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Fa:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Ga:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},ma:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},qa:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Ya:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},f:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},I:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Ba:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Qa:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},Lc:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},xa:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},S:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ha:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Ac:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},N:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},ja:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Nc:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},Aa:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ea:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},Va:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Xa:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},g:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},nb:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},z:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},vb:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},Mc:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},A:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},sa:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},H:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ta:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},va:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},qb:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},W:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},rb:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},Wa:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},wb:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},k:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Ra:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},zc:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ja:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},J:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},fa:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},sb:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},m:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},Pc:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},D:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},tb:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},T:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},q:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},jb:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},Ia:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Dc:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},za:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},u:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Cc:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},Bc:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},O:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},Ta:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},oa:function(e,t,r,n,i,o,a,s,u,c,l,d,h){var m=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h)}catch(e){if(An(m),e!==e+0)throw e;Dn(1,0)}},R:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},Q:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},xb:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},ia:function(e,t,r,n,i,o,a,s,u,c,l,d,h,m){var f=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h,m)}catch(e){if(An(f),e!==e+0)throw e;Dn(1,0)}},Da:function(e,t,r,n,i,o,a,s,u,c,l,d,h,m,f,p){var g=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h,m,f,p)}catch(e){if(An(g),e!==e+0)throw e;Dn(1,0)}},Qb:function(e,t,r,n,i,o,a){var s=kn();try{In(e,t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},Rb:function(e,t,r,n){var i=kn();try{$n(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},M:e=>e,a:F||d.wasmMemory,lb:rn,Xb:(e,t,r,n,i)=>rn(e,t,r,n)},fn=function(){var e,t,r,n,i={a:mn};function o(e,t){var r,n=e.exports;return Oe((fn=n).Xc),z=fn.Sc,r=fn.Qc,j.unshift(r),x=t,te(),n}if(ee(),d.instantiateWasm)try{return d.instantiateWasm(i,o)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),l(e)}return(e=_,t=Q,r=i,n=function(e){o(e.instance,e.module)},e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||"function"!=typeof fetch?oe(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),oe(t,r,n)}))))).catch(l),{}}(),pn=d._malloc=e=>(pn=d._malloc=fn.Rc)(e),gn=d._free=e=>(gn=d._free=fn.Tc)(e),vn=()=>(vn=fn.Uc)(),yn=d._pthread_self=()=>(yn=d._pthread_self=fn.Vc)(),wn=e=>(wn=fn.Wc)(e),bn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=fn.Xc)(),(e,t)=>(bn=fn.Yc)(e,t)),_n=e=>(_n=fn.Zc)(e),Cn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=fn._c)(),d.__emscripten_thread_init=(e,t,r,n,i,o)=>(Cn=d.__emscripten_thread_init=fn.$c)(e,t,r,n,i,o)),En=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=fn.ad)(),(e,t,r,n)=>(En=fn.bd)(e,t,r,n)),Fn=e=>(Fn=fn.cd)(e),xn=d.__emscripten_thread_exit=e=>(xn=d.__emscripten_thread_exit=fn.dd)(e),Tn=d.__emscripten_check_mailbox=()=>(Tn=d.__emscripten_check_mailbox=fn.ed)(),Dn=(e,t)=>(Dn=fn.fd)(e,t),Sn=(e,t)=>(Sn=fn.gd)(e,t),kn=()=>(kn=fn.hd)(),An=e=>(An=fn.id)(e),Pn=e=>(Pn=fn.jd)(e),Rn=e=>(Rn=fn.kd)(e),Mn=e=>(Mn=fn.ld)(e),Wn=(e,t,r)=>(Wn=fn.md)(e,t,r),On=e=>(On=fn.nd)(e),Zn=d.dynCall_ji=(e,t)=>(Zn=d.dynCall_ji=fn.od)(e,t),In=d.dynCall_viijii=(e,t,r,n,i,o,a)=>(In=d.dynCall_viijii=fn.pd)(e,t,r,n,i,o,a),Ln=d.dynCall_iij=(e,t,r,n)=>(Ln=d.dynCall_iij=fn.qd)(e,t,r,n),zn=d.dynCall_jiii=(e,t,r,n)=>(zn=d.dynCall_jiii=fn.rd)(e,t,r,n),$n=d.dynCall_vij=(e,t,r,n)=>($n=d.dynCall_vij=fn.sd)(e,t,r,n),Nn=(d.dynCall_jiji=(e,t,r,n,i)=>(d.dynCall_jiji=fn.td)(e,t,r,n,i),d.dynCall_viij=(e,t,r,n,i)=>(d.dynCall_viij=fn.ud)(e,t,r,n,i),d.dynCall_jjj=(e,t,r,n,i)=>(d.dynCall_jjj=fn.vd)(e,t,r,n,i),d.dynCall_iiiijj=(e,t,r,n,i,o,a,s)=>(d.dynCall_iiiijj=fn.wd)(e,t,r,n,i,o,a,s),d.dynCall_viijj=(e,t,r,n,i,o,a)=>(d.dynCall_viijj=fn.xd)(e,t,r,n,i,o,a),d.dynCall_viiijjj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_viiijjj=fn.yd)(e,t,r,n,i,o,a,s,u,c),d.dynCall_j=e=>(Nn=d.dynCall_j=fn.zd)(e)),jn=d.dynCall_jii=(e,t,r)=>(jn=d.dynCall_jii=fn.Ad)(e,t,r),Vn=d.dynCall_iiiiij=(e,t,r,n,i,o,a)=>(Vn=d.dynCall_iiiiij=fn.Bd)(e,t,r,n,i,o,a),Hn=d.dynCall_jiiii=(e,t,r,n,i)=>(Hn=d.dynCall_jiiii=fn.Cd)(e,t,r,n,i);function Bn(){if(!(J>0)){if(y)return c(d),U(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)G(d.preRun.shift());Re(N)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e())}function e(){dn||(dn=!0,d.calledRun=!0,Z||(U(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!y){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),V.unshift(e);var e;Re(V)}}()))}}if(d.dynCall_iiiiijj=(e,t,r,n,i,o,a,s,u)=>(d.dynCall_iiiiijj=fn.Dd)(e,t,r,n,i,o,a,s,u),d.dynCall_iiiiiijj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_iiiiiijj=fn.Ed)(e,t,r,n,i,o,a,s,u,c),d.___start_em_js=8928472,d.___stop_em_js=8928580,d.keepRuntimeAlive=B,d.wasmMemory=F,d.UTF8ToString=Te,d.stringToUTF8=fr,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=nn,d.PThread=Pe,K=function e(){dn||Bn(),dn||(K=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Un(e,t){var r=Gn();return Un=function(t,n){var i=r[t-=261];if(void 0===Un.FHrFcA){var o=function(e){for(var t,r,n="",i="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=n.length;s<u;s++)i+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(i)},a=function(e,t){var r,n,i=[],a=0,s="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)a=(a+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[a],i[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+i[n=(n+1)%256])%256,r=i[n],i[n]=i[a],i[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[a])%256]);return s};Un.cCCMXb=a,e=arguments,Un.FHrFcA=!0}var s=r[0],u=t+s,c=e[u];return c?i=c:(void 0===Un.BsJLIT&&(Un.BsJLIT=!0),i=Un.cCCMXb(i,n),e[u]=i),i},Un(e,t)}function Gn(){var e=["aN0WWQy3WQFdRghdO1mSWQO","wSkqluCJsmo+WQvqASkTW74","sCooW68eCW3dNwCQW6yjqW","tu8TWOtcSgT4W7JdTmkuemk0","W4RcSHRcISkKbfb7","ih9FWOZcTSk5WQJcMSo2CCorD8kn","dComWOddT1RcRSknB8ktWPddUqy","W7lcPHicW7BcTYyuW5RcKa","WOmFWPz0v8oziYhdNSob","dh81WQK7WQtcSKddThCwWQ0e","WQmIW6SxWOXHuSkZANy","amooEX5Ie8o9WR4","WQpdQbmyfCohWPiVWOpcIW","WOddQqxcGxRdNLtcHqCcW6RcVW","z8oYlmoSg8kang5MxqVcMr8","aSoiWORdT1hcOmkAuSkmWRhdUq8","ddVcONnFxY1tWO1BE8oC","W4ddTSo7xCojnbNdR3xcH8ksWPRcIa"];return(Gn=function(){return e})()}Bn(),function(e,t){for(var r=Un,n=e();;)try{if(499007==parseInt(r(263,"T00J"))/1+parseInt(r(272,"T00J"))/2+parseInt(r(270,"5$U2"))/3+parseInt(r(276,"R8YN"))/4+parseInt(r(269,"F5rr"))/5*(parseInt(r(264,"tuZN"))/6)+-parseInt(r(271,"UoMR"))/7+-parseInt(r(262,"Qbj%"))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gn);var ighnua,Qn=(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}),Xn=Qn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Xn)};return e()}));return Xn(),e.ready});e.exports=i},function(e,t,r){"use strict";r.r(t),t.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Ce})),r.d(t,"commands",(function(){return De}));var n,i,o,a,s,u,c,l,d,h=r(0);class m{_marker(){}}class f extends m{constructor(e={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class p extends m{constructor(e={}){super(),this.attributes=new f({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new f(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class g extends m{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class v extends m{constructor(e={}){super(),this.accumulatedResultsVerifierConfig=new g({}),void 0!==e.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new g(e.accumulatedResultsVerifierConfig))}}class y extends m{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class w extends m{constructor(e={}){super(),this.qualityThresholds=[new y({symbolQuality:.5,symbolRatio:.5}),new y({symbolQuality:.7,symbolRatio:.3}),new y({symbolQuality:.85,symbolRatio:.3}),new y({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new y(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new b(e);case"CustomBinarizationFilter":return new _(e);case"ColorDocumentFilter":return new C(e);case"BrightnessFilter":return new E(e);case"ContrastFilter":return new F(e);case"GrayscaleFilter":return new x(e);case"LegacyFilter":return new T(e);case"WhiteBlackPointFilter":return new D(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class b extends m{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class _ extends m{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class C extends m{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class E extends m{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class F extends m{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class x extends m{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class T extends m{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class D extends m{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class S extends m{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class k extends m{constructor(e={}){super(),this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.requiredAspectRatios=[],this.rectangleOfInterest={x:0,y:0,width:0,height:0},void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.requiredAspectRatios&&(this.requiredAspectRatios=e.requiredAspectRatios.map((e=>new S(e)))),void 0!==e.rectangleOfInterest&&(this.rectangleOfInterest={x:e.rectangleOfInterest.x,y:e.rectangleOfInterest.y,width:e.rectangleOfInterest.width,height:e.rectangleOfInterest.height})}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new A(e);case"PresetContentValidator":return new P(e);case"PatternContentValidator":return new R(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class A extends m{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class P extends m{constructor(e={}){if(super(),this._type="PresetContentValidator",void 0===e.preset)throw new Error("preset must be present in constructor argument");this.preset=e.preset}}class R extends m{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class M extends m{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new A({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=i.From(e.validator))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new W(e);case"Code11Config":return new O(e);case"Code39Config":return new Z(e);case"Code93Config":return new I(e);case"Code128Config":return new L(e);case"Code2Of5Config":return new z(e);case"DataBarConfig":return new $(e);case"DataBarExpandedConfig":return new N(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new V(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new B(e);case"PharmaCodeConfig":return new U(e);case"AztecConfig":return new G(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new Y(e);case"DataMatrixConfig":return new J(e);case"MaxiCodeConfig":return new q(e);case"AustraliaPostConfig":return new K(e);case"JapanPostConfig":return new ee(e);case"RoyalMailConfig":return new te(e);case"RoyalTNTPostConfig":return new re(e);case"USPSIntelligentMailConfig":return new ne(e);case"PharmaCodeTwoTrackConfig":return new ie(e);case"GS1CompositeConfig":return new oe(e);case"GroupOneDConfig":return new ae(e);case"GroupTwoDConfig":return new se(e);case"GroupFourStateConfig":return new ue(e);case"GroupCommonConfig":return new ce(e);default:throw`Unknown child class name: ${t}`}}}(o||(o={})),function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new W(e);case"Code11Config":return new O(e);case"Code39Config":return new Z(e);case"Code93Config":return new I(e);case"Code128Config":return new L(e);case"Code2Of5Config":return new z(e);case"DataBarConfig":return new $(e);case"DataBarExpandedConfig":return new N(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new V(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new B(e);case"PharmaCodeConfig":return new U(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class W extends m{constructor(e={}){super(),this._type="CodabarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class O extends m{constructor(e={}){super(),this._type="Code11Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class Z extends m{constructor(e={}){super(),this._type="Code39Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class I extends m{constructor(e={}){super(),this._type="Code93Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class L extends m{constructor(e={}){super(),this._type="Code128Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class z extends m{constructor(e={}){super(),this._type="Code2Of5Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class $ extends m{constructor(e={}){super(),this._type="DataBarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class N extends m{constructor(e={}){super(),this._type="DataBarExpandedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class j extends m{constructor(e={}){super(),this._type="DataBarLimitedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class V extends m{constructor(e={}){super(),this._type="ITFConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class H extends m{constructor(e={}){super(),this._type="MSIPlesseyConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class B extends m{constructor(e={}){super(),this._type="UpcEanConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class U extends m{constructor(e={}){super(),this._type="PharmaCodeConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AztecConfig":return new G(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new Y(e);case"DataMatrixConfig":return new J(e);case"MaxiCodeConfig":return new q(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class G extends m{constructor(e={}){super(),this._type="AztecConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Q extends m{constructor(e={}){super(),this._type="QRCodeConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class X extends m{constructor(e={}){super(),this._type="PDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class Y extends m{constructor(e={}){super(),this._type="MicroPDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class J extends m{constructor(e={}){super(),this._type="DataMatrixConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class q extends m{constructor(e={}){super(),this._type="MaxiCodeConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AustraliaPostConfig":return new K(e);case"JapanPostConfig":return new ee(e);case"RoyalMailConfig":return new te(e);case"RoyalTNTPostConfig":return new re(e);case"USPSIntelligentMailConfig":return new ne(e);case"PharmaCodeTwoTrackConfig":return new ie(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class K extends m{constructor(e={}){super(),this._type="AustraliaPostConfig",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class ee extends m{constructor(e={}){super(),this._type="JapanPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class te extends m{constructor(e={}){super(),this._type="RoyalMailConfig",this.regexFilter="",this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class re extends m{constructor(e={}){super(),this._type="RoyalTNTPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ne extends m{constructor(e={}){super(),this._type="USPSIntelligentMailConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends m{constructor(e={}){super(),this._type="PharmaCodeTwoTrackConfig",this.regexFilter="",this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class oe extends m{constructor(e={}){super(),this._type="GS1CompositeConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class ae extends m{constructor(e={}){super(),this._type="GroupOneDConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class se extends m{constructor(e={}){super(),this._type="GroupTwoDConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends m{constructor(e={}){super(),this._type="GroupFourStateConfig",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ce extends m{constructor(e={}){super(),this._type="GroupCommonConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class le extends m{constructor(e={}){super()}}(c=le||(le={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],c.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};class de extends m{constructor(e={}){super(),this.configurators=[new ce({})],this.engineMode="NEXT_GEN",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==e.configurators&&(this.configurators=e.configurators.map((e=>o.From(e)))),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage)}}class he extends m{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class me extends m{constructor(e={}){super(),this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class fe extends m{constructor(e={}){super(),this.resultAccumulationConfig=new me({}),this.fieldExcludeList=[],this.acceptedDocumentTypes=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new me(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0!==e.acceptedDocumentTypes&&(this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e)))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new pe(e);case"UserFieldStringValue":return new ge(e);case"UserFieldIntValue":return new ve(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class pe extends m{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ge extends m{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ve extends m{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class ye extends m{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=l.From(e.value)}}class we extends m{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new ye(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(d=we||(we={})).defaultCompression="LZW",d.binaryDocumentOptimizedCompression="CCITTFAX4";var be=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};let _e;class Ce{constructor(e){this.id=e}}const Ee={};function Fe(e){const t=Math.random().toString(36);return Ee[t]=e,new Ce(t)}function xe(e){if(!Ee.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return Ee[e.id]}function Te(e){const t=xe(e);t.delete&&t.delete(),delete Ee[e.id]}const De={initialize:function(e,t,n,i,o){return be(this,void 0,void 0,(function*(){try{const{captureConsole:a,jpegQuality:s=80,requestSuffix:u=""}=o||{};a&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),l=r(3),d={locateFile:function(e,r){let n;return n=t?Object(h.c)(t)?t:"":i,e.endsWith(".worker.js")&&l?l.default:new URL(n+e+u,location.href).href}},m=Object(h.b)(o),f=m.includes("-threads");d.mainScriptUrlOrBlob=d.locateFile(`ScanbotSDK.Asm${m}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=n,e.push(4*n));for(let r=0;r<e.length;r++){const n=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(d.wasmMemory=p),yield c(d),_e=d,_e.initialize(e||"",n,s)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return be(this,void 0,void 0,(function*(){return _e.getLicenseInfo()}))},encodeJpeg:function(e){return be(this,void 0,void 0,(function*(){const t=ke(e);return Se(_e.encodeJpeg(t))}))},detectDocument:function(e,t){return be(this,void 0,void 0,(function*(){const r=new _e.DocumentDetector(new k(t)),n=r.detect(ke(e));return r.delete(),Se(n)}))},detectAndCropDocument:function(e){return be(this,void 0,void 0,(function*(){let t=Se(_e.detectAndCropDocument(ke(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.DocumentDetector(new k(e)))}))},documentDetectorDetect:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).detect(ke(t)))}))},parseBarcodeDocument:function(e,t){return be(this,void 0,void 0,(function*(){return Se(_e.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.BarcodeRecognizer(new de(e)))}))},recognizeBarcodes:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).recognize(ke(t)))}))},beginPdf:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.PdfGenerationContext(new p(e)))}))},addPageToPdf:function(e,t){return be(this,void 0,void 0,(function*(){Se(xe(e).addPage(ke(t)))}))},completePdf:function(e){return be(this,void 0,void 0,(function*(){try{const t=xe(e);return Se(t.complete())}finally{Te(e)}}))},beginTiff:function(e){return be(this,void 0,void 0,(function*(){const t=new _e.TiffGenerationContext(new we(e));return Se(t.begin()),Fe(t)}))},addPageToTiff:function(e,t,r){return be(this,void 0,void 0,(function*(){return Se(xe(e).addPage(ke(t),r))}))},completeTiff:function(e){return be(this,void 0,void 0,(function*(){try{const t=xe(e);return Se(t.complete())}finally{Te(e)}}))},createMRZRecognizer:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.MrzRecognizerContext(new v(e)))}))},recognizeMRZ:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).recognize(ke(t)))}))},releaseObject:function(e){return be(this,void 0,void 0,(function*(){Te(e)}))},createOcrEngine:function(){return be(this,void 0,void 0,(function*(){return Fe(new _e.TLDROcrContext)}))},performOcr:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).performOcr(ke(t)))}))},createGenericTextLineScanner:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.GenericTextLineScanner(new M(e)))}))},recognizeTextLine:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).recognize(ke(t)))}))},cleanTextLineRecognitionQueue:function(e){return be(this,void 0,void 0,(function*(){xe(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.DocumentQualityAnalyzer(new w(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return be(this,void 0,void 0,(function*(){return Se(xe(e).analyze(ke(t)))}))},imageApplyFilter:function(e,t){return be(this,void 0,void 0,(function*(){return Se(_e.imageApplyFilter(ke(e),n.From(t)))}))},imageCrop:function(e,t){return be(this,void 0,void 0,(function*(){return Se(_e.imageCrop(ke(e),t))}))},imageResize:function(e,t){return be(this,void 0,void 0,(function*(){return Se(_e.imageResize(ke(e),t))}))},imageRotate:function(e,t){return be(this,void 0,void 0,(function*(){return Se(_e.imageRotate(ke(e),t))}))},genericDocumentRecognizerCreate:function(e){return be(this,void 0,void 0,(function*(){return Fe(new _e.GenericDocumentRecognizer(new fe(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return be(this,void 0,void 0,(function*(){return Se(xe(e).recognize(ke(t),new he(r)))}))},__hasModuleFunction:function(e){return be(this,void 0,void 0,(function*(){return _e.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return be(this,void 0,void 0,(function*(){return _e[e].apply(t)}))}};function Se(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function ke(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;_e||"initialize"===t?(()=>be(this,void 0,void 0,(function*(){return yield De[t].apply(null,r)})))().then((e=>{const t=Object(h.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{const t="number"==typeof e?Error(_e.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,error:t})})):self.postMessage({ticket:n,error:new Error("WASM module not loaded yet.")})}}]);
|
|
1
|
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function n(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function i(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:n=!0}=t||{};let i="";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}}()){i+="-simd";n&&function(){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}}()&&(i+="-threads")}return i}r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,d=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n,i=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return x.buffer!=S.buffer&&z(),S}function r(){return x.buffer!=S.buffer&&z(),k}function i(){return x.buffer!=S.buffer&&z(),A}function o(){return x.buffer!=S.buffer&&z(),P}function a(){return x.buffer!=S.buffer&&z(),R}function s(){return x.buffer!=S.buffer&&z(),M}function u(){return x.buffer!=S.buffer&&z(),O}var c,l,d=e;d.ready=new Promise(((e,t)=>{c=e,l=t}));var h,m,f,p=Object.assign({},d),g="./this.program",v=(e,t)=>{throw t},y=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function b(e){return d.locateFile?d.locateFile(e,w):w+e}w=self.location.href,n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var _,C=d.print||console.log.bind(console),E=d.printErr||console.error.bind(console);Object.assign(d,p),p=null,d.arguments&&d.arguments,d.thisProgram&&(g=d.thisProgram),d.quit&&(v=d.quit),d.wasmBinary&&(_=d.wasmBinary);var x,F,T=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&re("no native wasm support detected");var D,S,k,A,P,R,M,W,O,I=!1;function Z(e,t){e||re(t)}function z(){var e=x.buffer;d.HEAP8=S=new Int8Array(e),d.HEAP16=A=new Int16Array(e),d.HEAPU8=k=new Uint8Array(e),d.HEAPU16=P=new Uint16Array(e),d.HEAP32=R=new Int32Array(e),d.HEAPU32=M=new Uint32Array(e),d.HEAPF32=W=new Float32Array(e),d.HEAPF64=O=new Float64Array(e)}var L,$=d.INITIAL_MEMORY||134217728;if(Z($>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+$+"! (STACK_SIZE=4194304)"),y)x=d.wasmMemory;else if(d.wasmMemory)x=d.wasmMemory;else if(!((x=new WebAssembly.Memory({initial:$/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),Error("bad memory");z(),$=x.buffer.byteLength;var N=[],V=[],j=[],H=0;function B(){return T||H>0}function U(){y||(d.noFSInit||Fe.init.initialized||Fe.init(),Fe.ignorePermissions=!1,be.init(),Re(V))}function G(e){N.unshift(e)}var Y,Q,X,J=0,K=null,q=null;function ee(e){J++,d.monitorRunDependencies&&d.monitorRunDependencies(J)}function te(e){if(J--,d.monitorRunDependencies&&d.monitorRunDependencies(J),0==J&&(null!==K&&(clearInterval(K),K=null),q)){var t=q;q=null,t()}}function re(e){d.onAbort&&d.onAbort(e),E(e="Aborted("+e+")"),I=!0,D=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function ne(e){return e.startsWith("data:application/octet-stream;base64,")}function ie(e){if(e==Y&&_)return new Uint8Array(_);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function oe(e,t,r){return function(e){return _||"function"!=typeof fetch?Promise.resolve().then((()=>ie(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>ie(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),re(e)}))}ne(Y="ScanbotSDK.Asm-simd-threads.wasm")||(Y=b(Y));var ae={8793380:e=>cn(function(){return this[Te(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var t=Pe.pthreads[e];Z(t),Pe.returnWorkerToPool(t)},le=e=>{var t=Pe.getNewWorker();if(!t)return 6;Pe.runningWorkers.push(t),Pe.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(r,e.transferList),0},de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=de.isAbs(e),r="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=de.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return de.normalize(e.join("/"))},join2:(e,t)=>de.normalize(e+"/"+t)},he=e=>(he=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);re("initRandomDevice")})())(e),me={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=de.isAbs(n)}return(t?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=me.resolve(e).substr(1),t=me.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),a=o,s=0;s<o;s++)if(n[s]!==i[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(a))).join("/")}},fe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,pe=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&fe)return fe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,i):e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ge=[],ve=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ye=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i};function we(e,t,r){var n=r>0?r:ve(e)+1,i=new Array(n),o=ye(e,i,0,i.length);return t&&(i.length=o),i}var be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},Fe.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new Fe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new Fe.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Fe.ErrnoError(29)}if(void 0===s&&0===o)throw new Fe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new Fe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new Fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ge.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;ge=we(e,!0)}return ge.shift()})(),put_char(e,t){null===t||10===t?(C(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(C(pe(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,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(E(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(pe(e.output,0)),e.output=[])}}},_e=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=Fn(65536,e);return t?((e,t)=>(r().fill(0,e,e+t),e))(t,e):0},Ce={ops_table:null,mount:e=>Ce.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Fe.isBlkdev(r)||Fe.isFIFO(r))throw new Fe.ErrnoError(63);Ce.ops_table||(Ce.ops_table={dir:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,lookup:Ce.node_ops.lookup,mknod:Ce.node_ops.mknod,rename:Ce.node_ops.rename,unlink:Ce.node_ops.unlink,rmdir:Ce.node_ops.rmdir,readdir:Ce.node_ops.readdir,symlink:Ce.node_ops.symlink},stream:{llseek:Ce.stream_ops.llseek}},file:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:{llseek:Ce.stream_ops.llseek,read:Ce.stream_ops.read,write:Ce.stream_ops.write,allocate:Ce.stream_ops.allocate,mmap:Ce.stream_ops.mmap,msync:Ce.stream_ops.msync}},link:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,readlink:Ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:Fe.chrdev_stream_ops}});var i=Fe.createNode(e,t,r,n);return Fe.isDir(i.mode)?(i.node_ops=Ce.ops_table.dir.node,i.stream_ops=Ce.ops_table.dir.stream,i.contents={}):Fe.isFile(i.mode)?(i.node_ops=Ce.ops_table.file.node,i.stream_ops=Ce.ops_table.file.stream,i.usedBytes=0,i.contents=null):Fe.isLink(i.mode)?(i.node_ops=Ce.ops_table.link.node,i.stream_ops=Ce.ops_table.link.stream):Fe.isChrdev(i.mode)&&(i.node_ops=Ce.ops_table.chrdev.node,i.stream_ops=Ce.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Fe.isDir(e.mode)?t.size=4096:Fe.isFile(e.mode)?t.size=e.usedBytes:Fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ce.resizeFileStorage(e,t.size)},lookup(e,t){throw Fe.genericErrors[44]},mknod:(e,t,r,n)=>Ce.createNode(e,t,r,n),rename(e,t,r){if(Fe.isDir(e.mode)){var n;try{n=Fe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new Fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Fe.lookupNode(e,t);for(var n in r.contents)throw new Fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=Ce.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Fe.isLink(e.mode))throw new Fe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,n);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),r);else for(var s=0;s<a;s++)t[r+s]=o[i+s];return a},write(e,r,n,i,o,a){if(r.buffer===t().buffer&&(a=!1),!i)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=r.subarray(n,n+i),s.usedBytes=i,i;if(0===s.usedBytes&&0===o)return s.contents=r.slice(n,n+i),s.usedBytes=i,i;if(o+i<=s.usedBytes)return s.contents.set(r.subarray(n,n+i),o),i}if(Ce.expandFileStorage(s,o+i),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+i),o);else for(var u=0;u<i;u++)s.contents[o+u]=r[n+u];return s.usedBytes=Math.max(s.usedBytes,o+i),i},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&Fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Fe.ErrnoError(28);return n},allocate(e,t,r){Ce.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,r,n,i,o){if(!Fe.isFile(e.node.mode))throw new Fe.ErrnoError(43);var a,s,u=e.node.contents;if(2&o||u.buffer!==t().buffer){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=_e(r)))throw new Fe.ErrnoError(48);t().set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:(e,t,r,n,i)=>(Ce.stream_ops.write(e,t,0,n,r,!1),0)}},Ee=d.preloadPlugins||[],xe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=me.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Fe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Fe.root,i="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(n=Fe.lookupNode(n,r[o]),i=de.join2(i,r[o]),Fe.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;Fe.isLink(n.mode);){var u=Fe.readlink(i);if(i=me.resolve(de.dirname(i),u),n=Fe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Fe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(Fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Fe.nameTable.length},hashAddNode(e){var t=Fe.hashName(e.parent.id,e.name);e.name_next=Fe.nameTable[t],Fe.nameTable[t]=e},hashRemoveNode(e){var t=Fe.hashName(e.parent.id,e.name);if(Fe.nameTable[t]===e)Fe.nameTable[t]=e.name_next;else for(var r=Fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Fe.mayLookup(e);if(r)throw new Fe.ErrnoError(r,e);for(var n=Fe.hashName(e.id,t),i=Fe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return Fe.lookup(e,t)},createNode(e,t,r,n){var i=new Fe.FSNode(e,t,r,n);return Fe.hashAddNode(i),i},destroyNode(e){Fe.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 t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Fe.lookupNode(e,t),20}catch(e){}return Fe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Fe.lookupNode(e,t)}catch(e){return e.errno}var i=Fe.nodePermissions(e,"wx");if(i)return i;if(r){if(!Fe.isDir(n.mode))return 54;if(Fe.isRoot(n)||Fe.getPath(n)===Fe.cwd())return 10}else if(Fe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Fe.isLink(e.mode)?32:Fe.isDir(e.mode)&&("r"!==Fe.flagsToPermissionString(t)||512&t)?31:Fe.nodePermissions(e,Fe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Fe.MAX_OPEN_FDS;e++)if(!Fe.streams[e])return e;throw new Fe.ErrnoError(33)},getStreamChecked(e){var t=Fe.getStream(e);if(!t)throw new Fe.ErrnoError(8);return t},getStream:e=>Fe.streams[e],createStream:(e,t=-1)=>(Fe.FSStream||(Fe.FSStream=function(){this.shared={}},Fe.FSStream.prototype={},Object.defineProperties(Fe.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 Fe.FSStream,e),-1==t&&(t=Fe.nextfd()),e.fd=t,Fe.streams[t]=e,e),closeStream(e){Fe.streams[e]=null},chrdev_stream_ops:{open(e){var t=Fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Fe.devices[e]={stream_ops:t}},getDevice:e=>Fe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Fe.syncFSRequests++,Fe.syncFSRequests>1&&E(`warning: ${Fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Fe.getMounts(Fe.root.mount),n=0;function i(e){return Fe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var n,i="/"===r,o=!r;if(i&&Fe.root)throw new Fe.ErrnoError(10);if(!i&&!o){var a=Fe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Fe.isMountpoint(n))throw new Fe.ErrnoError(10);if(!Fe.isDir(n.mode))throw new Fe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,i?Fe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=Fe.lookupPath(e,{follow_mount:!1});if(!Fe.isMountpoint(t.node))throw new Fe.ErrnoError(28);var r=t.node,n=r.mounted,i=Fe.getMounts(n);Object.keys(Fe.nameTable).forEach((e=>{for(var t=Fe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&Fe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Fe.lookupPath(e,{parent:!0}).node,i=de.basename(e);if(!i||"."===i||".."===i)throw new Fe.ErrnoError(28);var o=Fe.mayCreate(n,i);if(o)throw new Fe.ErrnoError(o);if(!n.node_ops.mknod)throw new Fe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Fe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Fe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{Fe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,Fe.mknod(e,t,r)),symlink(e,t){if(!me.resolve(e))throw new Fe.ErrnoError(44);var r=Fe.lookupPath(t,{parent:!0}).node;if(!r)throw new Fe.ErrnoError(44);var n=de.basename(t),i=Fe.mayCreate(r,n);if(i)throw new Fe.ErrnoError(i);if(!r.node_ops.symlink)throw new Fe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=de.dirname(e),o=de.dirname(t),a=de.basename(e),s=de.basename(t);if(r=Fe.lookupPath(e,{parent:!0}).node,n=Fe.lookupPath(t,{parent:!0}).node,!r||!n)throw new Fe.ErrnoError(44);if(r.mount!==n.mount)throw new Fe.ErrnoError(75);var u,c=Fe.lookupNode(r,a),l=me.relative(e,o);if("."!==l.charAt(0))throw new Fe.ErrnoError(28);if("."!==(l=me.relative(t,i)).charAt(0))throw new Fe.ErrnoError(55);try{u=Fe.lookupNode(n,s)}catch(e){}if(c!==u){var d=Fe.isDir(c.mode),h=Fe.mayDelete(r,a,d);if(h)throw new Fe.ErrnoError(h);if(h=u?Fe.mayDelete(n,s,d):Fe.mayCreate(n,s))throw new Fe.ErrnoError(h);if(!r.node_ops.rename)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(c)||u&&Fe.isMountpoint(u))throw new Fe.ErrnoError(10);if(n!==r&&(h=Fe.nodePermissions(r,"w")))throw new Fe.ErrnoError(h);Fe.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{Fe.hashAddNode(c)}}},rmdir(e){var t=Fe.lookupPath(e,{parent:!0}).node,r=de.basename(e),n=Fe.lookupNode(t,r),i=Fe.mayDelete(t,r,!0);if(i)throw new Fe.ErrnoError(i);if(!t.node_ops.rmdir)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);t.node_ops.rmdir(t,r),Fe.destroyNode(n)},readdir(e){var t=Fe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Fe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Fe.lookupPath(e,{parent:!0}).node;if(!t)throw new Fe.ErrnoError(44);var r=de.basename(e),n=Fe.lookupNode(t,r),i=Fe.mayDelete(t,r,!1);if(i)throw new Fe.ErrnoError(i);if(!t.node_ops.unlink)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);t.node_ops.unlink(t,r),Fe.destroyNode(n)},readlink(e){var t=Fe.lookupPath(e).node;if(!t)throw new Fe.ErrnoError(44);if(!t.node_ops.readlink)throw new Fe.ErrnoError(28);return me.resolve(Fe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Fe.lookupPath(e,{follow:!t}).node;if(!r)throw new Fe.ErrnoError(44);if(!r.node_ops.getattr)throw new Fe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Fe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Fe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Fe.chmod(e,t,!0)},fchmod(e,t){var r=Fe.getStreamChecked(e);Fe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?Fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){Fe.chown(e,t,r,!0)},fchown(e,t,r){var n=Fe.getStreamChecked(e);Fe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Fe.ErrnoError(28);var r;if(!(r="string"==typeof e?Fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);if(Fe.isDir(r.mode))throw new Fe.ErrnoError(31);if(!Fe.isFile(r.mode))throw new Fe.ErrnoError(28);var n=Fe.nodePermissions(r,"w");if(n)throw new Fe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Fe.getStreamChecked(e);if(0==(2097155&r.flags))throw new Fe.ErrnoError(28);Fe.truncate(r.node,t)},utime(e,t,r){var n=Fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Fe.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=Fe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new Fe.ErrnoError(20)}else n=Fe.mknod(e,r,0),i=!0;if(!n)throw new Fe.ErrnoError(44);if(Fe.isChrdev(n.mode)&&(t&=-513),65536&t&&!Fe.isDir(n.mode))throw new Fe.ErrnoError(54);if(!i){var o=Fe.mayOpen(n,t);if(o)throw new Fe.ErrnoError(o)}512&t&&!i&&Fe.truncate(n,0),t&=-131713;var a=Fe.createStream({node:n,path:Fe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!d.logReadFiles||1&t||(Fe.readFiles||(Fe.readFiles={}),e in Fe.readFiles||(Fe.readFiles[e]=1)),a},close(e){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Fe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(1==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.read)throw new Fe.ErrnoError(28);var o="undefined"!=typeof i;if(o){if(!e.seekable)throw new Fe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=a),a},write(e,t,r,n,i,o){if(n<0||i<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.write)throw new Fe.ErrnoError(28);e.seekable&&1024&e.flags&&Fe.llseek(e,0,2);var a="undefined"!=typeof i;if(a){if(!e.seekable)throw new Fe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,o);return a||(e.position+=s),s},allocate(e,t,r){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(t<0||r<=0)throw new Fe.ErrnoError(28);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(!Fe.isFile(e.node.mode)&&!Fe.isDir(e.node.mode))throw new Fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Fe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new Fe.ErrnoError(2);if(1==(2097155&e.flags))throw new Fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Fe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Fe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Fe.open(e,t.flags),i=Fe.stat(e).size,o=new Uint8Array(i);return Fe.read(n,o,0,i,0),"utf8"===t.encoding?r=pe(o,0):"binary"===t.encoding&&(r=o),Fe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=Fe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(ve(t)+1),o=ye(t,i,0,i.length);Fe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Fe.write(n,t,0,t.byteLength,void 0,r.canOwn)}Fe.close(n)},cwd:()=>Fe.currentPath,chdir(e){var t=Fe.lookupPath(e,{follow:!0});if(null===t.node)throw new Fe.ErrnoError(44);if(!Fe.isDir(t.node.mode))throw new Fe.ErrnoError(54);var r=Fe.nodePermissions(t.node,"x");if(r)throw new Fe.ErrnoError(r);Fe.currentPath=t.path},createDefaultDirectories(){Fe.mkdir("/tmp"),Fe.mkdir("/home"),Fe.mkdir("/home/web_user")},createDefaultDevices(){Fe.mkdir("/dev"),Fe.registerDevice(Fe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),Fe.mkdev("/dev/null",Fe.makedev(1,3)),be.register(Fe.makedev(5,0),be.default_tty_ops),be.register(Fe.makedev(6,0),be.default_tty1_ops),Fe.mkdev("/dev/tty",Fe.makedev(5,0)),Fe.mkdev("/dev/tty1",Fe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);Fe.createDevice("/dev","random",r),Fe.createDevice("/dev","urandom",r),Fe.mkdir("/dev/shm"),Fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Fe.mkdir("/proc");var e=Fe.mkdir("/proc/self");Fe.mkdir("/proc/self/fd"),Fe.mount({mount(){var t=Fe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Fe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?Fe.createDevice("/dev","stdin",d.stdin):Fe.symlink("/dev/tty","/dev/stdin"),d.stdout?Fe.createDevice("/dev","stdout",null,d.stdout):Fe.symlink("/dev/tty","/dev/stdout"),d.stderr?Fe.createDevice("/dev","stderr",null,d.stderr):Fe.symlink("/dev/tty1","/dev/stderr"),Fe.open("/dev/stdin",0),Fe.open("/dev/stdout",1),Fe.open("/dev/stderr",1)},ensureErrnoError(){Fe.ErrnoError||(Fe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Fe.ErrnoError.prototype=new Error,Fe.ErrnoError.prototype.constructor=Fe.ErrnoError,[44].forEach((e=>{Fe.genericErrors[e]=new Fe.ErrnoError(e),Fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Fe.ensureErrnoError(),Fe.nameTable=new Array(4096),Fe.mount(Ce,{},"/"),Fe.createDefaultDirectories(),Fe.createDefaultDevices(),Fe.createSpecialDirectories(),Fe.filesystems={MEMFS:Ce}},init(e,t,r){Fe.init.initialized=!0,Fe.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=t||d.stdout,d.stderr=r||d.stderr,Fe.createStandardStreams()},quit(){Fe.init.initialized=!1;for(var e=0;e<Fe.streams.length;e++){var t=Fe.streams[e];t&&Fe.close(t)}},findObject(e,t){var r=Fe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=Fe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Fe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=de.basename(e),n=Fe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:Fe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var a=de.join2(e,o);try{Fe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,i){var o=de.join2("string"==typeof e?e:Fe.getPath(e),t),a=xe(n,i);return Fe.create(o,a)},createDataFile(e,t,r,n,i,o){var a=t;e&&(e="string"==typeof e?e:Fe.getPath(e),a=t?de.join2(e,t):e);var s=xe(n,i),u=Fe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,d=r.length;l<d;++l)c[l]=r.charCodeAt(l);r=c}Fe.chmod(u,146|s);var h=Fe.open(u,577);Fe.write(h,r,0,r.length,0,o),Fe.close(h),Fe.chmod(u,s)}return u},createDevice(e,t,r,n){var i=de.join2("string"==typeof e?e:Fe.getPath(e),t),o=xe(!!r,!!n);Fe.createDevice.major||(Fe.createDevice.major=64);var a=Fe.makedev(Fe.createDevice.major++,0);return Fe.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var a=0,s=0;s<i;s++){var u;try{u=r()}catch(e){throw new Fe.ErrnoError(29)}if(void 0===u&&0===a)throw new Fe.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i,o){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new Fe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),a}}),Fe.mkdev(i,o,a)},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(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=we(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Fe.ErrnoError(29)}},createLazyFile(e,r,n,i,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):we(i.responseText||"",!0)})(t,i)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,C("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=Fe.createFile(e,r,u,i,o);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[i+s];else for(s=0;s<a;s++)t[r+s]=o.get(i+s);return a}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];l[e]=function(){return Fe.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(e,t,r,n,i)=>(Fe.forceLoadFile(c),d(e,t,r,n,i)),l.mmap=(e,r,n,i,o)=>{Fe.forceLoadFile(c);var a=_e(r);if(!a)throw new Fe.ErrnoError(48);return d(e,t(),a,r,n),{ptr:a,allocated:!0}},c.stream_ops=l,c}},Te=(e,t)=>e?pe(r(),e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(de.isAbs(t))return t;var n;if(n=-100===e?Fe.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new Fe.ErrnoError(44);return n}return de.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&de.normalize(t)!==de.normalize(Fe.getPath(e.node)))return-54;throw e}a()[r>>2]=n.dev,a()[r+4>>2]=n.mode,s()[r+8>>2]=n.nlink,a()[r+12>>2]=n.uid,a()[r+16>>2]=n.gid,a()[r+20>>2]=n.rdev,X=[n.size>>>0,(Q=n.size,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+24>>2]=X[0],a()[r+28>>2]=X[1],a()[r+32>>2]=4096,a()[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),u=n.ctime.getTime();return X=[Math.floor(i/1e3)>>>0,(Q=Math.floor(i/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+40>>2]=X[0],a()[r+44>>2]=X[1],s()[r+48>>2]=i%1e3*1e3,X=[Math.floor(o/1e3)>>>0,(Q=Math.floor(o/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+56>>2]=X[0],a()[r+60>>2]=X[1],s()[r+64>>2]=o%1e3*1e3,X=[Math.floor(u/1e3)>>>0,(Q=Math.floor(u/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+72>>2]=X[0],a()[r+76>>2]=X[1],s()[r+80>>2]=u%1e3*1e3,X=[n.ino>>>0,(Q=n.ino,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+88>>2]=X[0],a()[r+92>>2]=X[1],0},doMsync(e,t,n,i,o){if(!Fe.isFile(t.node.mode))throw new Fe.ErrnoError(43);if(2&i)return 0;var a=r().slice(e,e+n);Fe.msync(t,a,o,n,i)},varargs:void 0,get(){var e=a()[De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Te(e),getStreamFromFD:e=>Fe.getStreamChecked(e)};function Se(e){if(y)return Tr(0,1,e);D=e,B()||(Pe.terminateAllThreads(),d.onExit&&d.onExit(e),I=!0),v(e,new se(e))}var ke=(e,t)=>{if(D=e,y)throw Me(e),"unwind";Se(e)},Ae=e=>{if(e instanceof se||"unwind"==e)return D;v(1,e)},Pe={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){y?Pe.initWorker():Pe.initMainThread()},initMainThread(){for(var e=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));e--;)Pe.allocateUnusedWorker();G((()=>{ee(),Pe.loadWasmModuleToAllWorkers((()=>te()))}))},initWorker(){T=!1},setExitStatus:e=>{D=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Pe.runningWorkers)ue(e);for(var e of Pe.unusedWorkers)ue(e);Pe.unusedWorkers=[],Pe.runningWorkers=[],Pe.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Pe.pthreads[t],Pe.unusedWorkers.push(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(e),1),e.pthread_ptr=0,kn(t)},receiveObjectTransfer(e){},threadInitTLS(){Pe.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,i=n.cmd;if(n.targetThread&&n.targetThread!=En()){var o=Pe.pthreads[n.targetThread];o?o.postMessage(n,n.transferList):E(`Internal error! Worker sent a message "${i}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var a;"checkMailbox"===i?xr():"spawnThread"===i?le(n):"cleanupThread"===i?ce(n.thread):"killThread"===i?(e=>{var t=Pe.pthreads[e];delete Pe.pthreads[e],ue(t),kn(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(t),1),t.pthread_ptr=0})(n.thread):"cancelThread"===i?(a=n.thread,Pe.pthreads[a].postMessage({cmd:"cancel"})):"loaded"===i?(e.loaded=!0,t(e)):"alert"===i?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===i?d[n.handler](...n.args):i&&E(`worker sent an unknown command ${i}`)}},e.onerror=e=>{throw E(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r=[];for(var i of["onExit","onAbort","print","printErr"])d.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:d.mainScriptUrlOrBlob||n,wasmMemory:x,wasmModule:F})})),loadWasmModuleToAllWorkers(e){if(y)return e();Promise.all(Pe.unusedWorkers.map(Pe.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e,t=b("ScanbotSDK.Asm-simd-threads.worker.js");e=new Worker(t),Pe.unusedWorkers.push(e)},getNewWorker:()=>(0==Pe.unusedWorkers.length&&(Pe.allocateUnusedWorker(),Pe.loadWasmModuleToWorker(Pe.unusedWorkers[0])),Pe.unusedWorkers.pop())};d.PThread=Pe;var Re=e=>{for(;e.length>0;)e.shift()(d)};function Me(e){if(y)return Tr(1,0,e);ke(e)}d.establishStackSpace=()=>{var e=En(),t=a()[e+52>>2],r=a()[e+56>>2];Mn(t,t-r),On(t)};var We=e=>L.get(e);d.invokeEntryPoint=(e,t)=>{!function(e){B()?Pe.setExitStatus(e):An(e)}(We(e)(t))};var Oe=e=>{Pe.tlsInitFunctions.push(e)},Ie=[],Ze=0,ze=0;function Le(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if($n(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var $e=e=>{var t=ze;if(!t)return xn(0),0;var r=new Le(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return xn(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var a=r.ptr+16;if(Ln(o,n,a))return xn(o),t}return xn(n),t},Ne=()=>{var e=Ie.pop();e||re("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ie.push(e),e.set_rethrown(!0),e.set_caught(!1),Ze++),ze=t};function Ve(e,t,r,n){return y?Tr(2,1,e,t,r,n):je(e,t,r,n)}var je=(e,t,r,n)=>{if("undefined"==typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var i=[];if(y&&0===i.length)return Ve(e,t,r,n);var o={startRoutine:r,pthread_ptr:e,arg:n,transferList:i};return y?(o.cmd="spawnThread",postMessage(o,i),0):le(o)};function He(e,t,r,n,i){if(y)return Tr(3,1,e,t,r,n,i);try{for(var o=0,s=t?a()[t>>2]:0,u=t?a()[t+4>>2]:0,c=r?a()[r>>2]:0,l=r?a()[r+4>>2]:0,d=n?a()[n>>2]:0,h=n?a()[n+4>>2]:0,m=0,f=0,p=0,g=0,v=0,w=0,b=(t?a()[t>>2]:0)|(r?a()[r>>2]:0)|(n?a()[n>>2]:0),_=(t?a()[t+4>>2]:0)|(r?a()[r+4>>2]:0)|(n?a()[n+4>>2]:0),C=function(e,t,r,n){return e<32?t&n:r&n},E=0;E<e;E++){var x=1<<E%32;if(C(E,b,_,x)){var F=De.getStreamFromFD(E),T=De.DEFAULT_POLLMASK;if(F.stream_ops.poll){var D=-1;i&&(D=1e3*((t?a()[i>>2]:0)+(t?a()[i+8>>2]:0)/1e6)),T=F.stream_ops.poll(F,D)}1&T&&C(E,s,u,x)&&(E<32?m|=x:f|=x,o++),4&T&&C(E,c,l,x)&&(E<32?p|=x:g|=x,o++),2&T&&C(E,d,h,x)&&(E<32?v|=x:w|=x,o++)}}return t&&(a()[t>>2]=m,a()[t+4>>2]=f),r&&(a()[r>>2]=p,a()[r+4>>2]=g),n&&(a()[n>>2]=v,a()[n+4>>2]=w),o}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Be(e,t,r){if(y)return Tr(4,1,e,t,r);De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((o=De.get())<0)return-28;for(;Fe.streams[o];)o++;return Fe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:return o=De.getp(),i()[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,a()[Cn()>>2]=s,-1}}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Ue(e,t){if(y)return Tr(5,1,e,t);try{var r=De.getStreamFromFD(e);return De.doStat(Fe.stat,r.path,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ge(e,r,n){if(y)return Tr(6,1,e,r,n);De.varargs=n;try{var o=De.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return o.tty?0:-59;case 21505:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var s=o.tty.ops.ioctl_tcgets(o),u=De.getp();a()[u>>2]=s.c_iflag||0,a()[u+4>>2]=s.c_oflag||0,a()[u+8>>2]=s.c_cflag||0,a()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)t()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){u=De.getp();var l=a()[u>>2],d=a()[u+4>>2],h=a()[u+8>>2],m=a()[u+12>>2],f=[];for(c=0;c<32;c++)f.push(t()[u+c+17>>0]);return o.tty.ops.ioctl_tcsets(o.tty,r,{c_iflag:l,c_oflag:d,c_cflag:h,c_lflag:m,c_cc:f})}return 0;case 21519:return o.tty?(u=De.getp(),a()[u>>2]=0,0):-59;case 21520:return o.tty?-28:-59;case 21531:return u=De.getp(),Fe.ioctl(o,r,u);case 21523:if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var p=o.tty.ops.ioctl_tiocgwinsz(o.tty);u=De.getp(),i()[u>>1]=p[0],i()[u+2>>1]=p[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e,t,r,n){if(y)return Tr(8,1,e,t,r,n);try{t=De.getStr(t);var i=256&n,o=4096&n;return n&=-6401,t=De.calculateAt(e,t,o),De.doStat(i?Fe.lstat:Fe.stat,t,r)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Qe(e,t,r,n){if(y)return Tr(9,1,e,t,r,n);De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return Fe.open(t,r,i).fd}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Xe(e){if(y)return Tr(10,1,e);try{return e=De.getStr(e),Fe.rmdir(e),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e,t){if(y)return Tr(11,1,e,t);try{return e=De.getStr(e),De.doStat(Fe.stat,e,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ke(e,t,r){if(y)return Tr(12,1,e,t,r);try{return t=De.getStr(t),t=De.calculateAt(e,t),0===r?Fe.unlink(t):512===r?Fe.rmdir(t):re("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}var qe={},et=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function tt(e){return this.fromWireType(a()[e>>2])}var rt={},nt={},it={},ot=void 0,at=e=>{throw new ot(e)},st=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&at("Mismatched type converter count");for(var i=0;i<e.length;++i)ht(e[i],n[i])}e.forEach((function(e){it[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{nt.hasOwnProperty(e)?i[t]=nt[e]:(o.push(e),rt.hasOwnProperty(e)||(rt[e]=[]),rt[e].push((()=>{i[t]=nt[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},ut=void 0,ct=e=>{for(var t="",n=e;r()[n];)t+=ut[r()[n++]];return t},lt=void 0,dt=e=>{throw new lt(e)};function ht(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||dt(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;dt(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete it[e],rt.hasOwnProperty(e)){var i=rt[e];delete rt[e],i.forEach((e=>e()))}}(e,t,r)}var mt=8;function ft(e){if(!(this instanceof It))return!1;if(!(e instanceof It))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}var pt=e=>{dt(e.$$.ptrType.registeredClass.name+" instance already deleted")},gt=!1,vt=e=>{},yt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},wt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=wt(e,t,r.baseClass);return null===n?null:r.downcast(n)},bt={},_t=()=>Object.keys(Dt).length,Ct=()=>{var e=[];for(var t in Dt)Dt.hasOwnProperty(t)&&e.push(Dt[t]);return e},Et=[],xt=()=>{for(;Et.length;){var e=Et.pop();e.$$.deleteScheduled=!1,e.delete()}},Ft=void 0,Tt=e=>{Ft=e,Et.length&&Ft&&Ft(xt)},Dt={},St=(e,t)=>(t=((e,t)=>{for(void 0===t&&dt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Dt[t]),kt=(e,t)=>(t.ptrType&&t.ptr||at("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t}})));function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=St(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=bt[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=wt(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Pt=e=>"undefined"==typeof FinalizationRegistry?(Pt=e=>e,e):(gt=new FinalizationRegistry((e=>{yt(e.$$)})),Pt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};gt.register(e,r,e)}return e},vt=e=>gt.unregister(e),Pt(e));function Rt(){if(this.$$.ptr||pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Mt(){this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),vt(this),yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Wt(){return!this.$$.ptr}function Ot(){return this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),Et.push(this),1===Et.length&&Ft&&Ft(xt),this.$$.deleteScheduled=!0,this}function It(){}var Zt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function zt(e,t){return{[e=Zt(e)]:function(){return t.apply(this,arguments)}}[e]}var Lt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||dt(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},$t=(e,t,r)=>{d.hasOwnProperty(e)?((void 0===r||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[r])&&dt(`Cannot register public name '${e}' twice`),Lt(d,e,e),d.hasOwnProperty(r)&&dt(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),d[e].overloadTable[r]=t):(d[e]=t,void 0!==r&&(d[e].numArguments=r))};function Nt(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var Vt=(e,t,r)=>{for(;t!==r;)t.upcast||dt(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function jt(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function Ht(e,t){var r;if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Vt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&dt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,lr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:dt("Unsupporting sharing policy")}return r}function Bt(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function Ut(e){return this.fromWireType(s()[e>>2])}function Gt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Yt(e){this.rawDestructor&&this.rawDestructor(e)}var Qt=e=>{null!==e&&e.delete()};function Xt(e,t,r,n,i,o,a,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Ht:n?(this.toWireType=jt,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}var Jt=(e,t,r)=>{d.hasOwnProperty(e)||at("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==r?d[e].overloadTable[r]=t:(d[e]=t,d[e].argCount=r)},Kt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var n=d["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)})(e,t,r):We(t).apply(null,r),qt=(e,t)=>{var r,n,i,o=(e=ct(e)).includes("j")?(r=e,n=t,i=[],function(){return i.length=0,Object.assign(i,arguments),Kt(r,n,i)}):We(t);return"function"!=typeof o&&dt(`unknown function pointer with signature ${e}: ${t}`),o},er=void 0,tr=e=>{var t=Tn(e),r=ct(t);return _n(t),r},rr=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||nt[t]||(it[t]?it[t].forEach(e):(r.push(t),n[t]=!0))})),new er(`${e}: `+r.map(tr).join([", "]))},nr=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(s()[t+4*n>>2]);return r};function ir(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=zt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function or(e,t,r,n,i,o){var a=t.length;a<2&&dt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var l="void"!==t[0].name,d="",h="";for(c=0;c<a-2;++c)d+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${Zt(e)}(${d}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[dt,n,i,et,t[0],t[1]];for(s&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)m+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(l||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(m+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return l&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),ir(Function,p).apply(null,g)}function ar(){this.allocated=[void 0],this.freelist=[]}var sr=new ar,ur=e=>{e>=sr.reserved&&0==--sr.get(e).refcount&&sr.free(e)},cr=()=>{for(var e=0,t=sr.reserved;t<sr.allocated.length;++t)void 0!==sr.allocated[t]&&++e;return e},lr={toValue:e=>(e||dt("Cannot use deleted val. handle = "+e),sr.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 sr.allocate({refcount:1,value:e})}}},dr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},hr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType((x.buffer!=S.buffer&&z(),W)[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},mr=(e,n,u)=>{switch(n){case 1:return u?e=>t()[e>>0]:e=>r()[e>>0];case 2:return u?e=>i()[e>>1]:e=>o()[e>>1];case 4:return u?e=>a()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},fr=(e,t,n)=>ye(e,r(),t,n),pr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,gr=(e,t)=>{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&o()[a];)++a;if((n=a<<1)-e>32&&pr)return pr.decode(r().slice(e,n));for(var u="",c=0;!(c>=t/2);++c){var l=i()[e+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,a=0;a<o;++a){var s=e.charCodeAt(a);i()[t>>1]=s,t+=2}return i()[t>>1]=0,t-n},yr=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=a()[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),a()[t>>2]=s,(t+=4)+4>i)break}return a()[t>>2]=0,t-n},_r=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Cr=e=>{if(!I)try{e(),(()=>{if(!B())try{y?An(D):ke(D)}catch(e){Ae(e)}})()}catch(e){Ae(e)}},Er=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(a(),e>>2,e).value.then(xr);var t=e+128;Atomics.store(a(),t>>2,1)}};d.__emscripten_thread_mailbox_await=Er;var xr=()=>{var e=En();e&&(Er(e),Cr((()=>Pn())))};d.checkMailbox=xr;var Fr=e=>{var t=Wn(),r=e();return On(t),r},Tr=function(e,t){var r=arguments.length-2,n=arguments;return Fr((()=>{for(var i=r,o=In(8*i),a=o>>3,s=0;s<r;s++){var c=n[2+s];u()[a+s]=c}return Sn(e,i,o,t)}))},Dr=[],Sr=(e,t)=>{var r=nt[e];return void 0===r&&dt(t+" has unknown type "+tr(e)),r},kr={},Ar=e=>{var t=kr[e];return void 0===t?ct(e):t},Pr=[],Rr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Mr=[],Wr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Or=e=>e%4==0&&(e%100!=0||e%400==0),Ir=[0,31,60,91,121,152,182,213,244,274,305,335],Zr=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Or(e.getFullYear())?Ir:Zr)[e.getMonth()]+e.getDate()-1;function Lr(e,t,r,n,i,o,u,c){if(y)return Tr(13,1,e,t,r,n,i,o,u,c);var l=Wr(i,o);try{if(isNaN(l))return 61;var d=De.getStreamFromFD(n),h=Fe.mmap(d,e,l,t,r),m=h.ptr;return a()[u>>2]=h.allocated,s()[c>>2]=m,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function $r(e,t,r,n,i,o,a){if(y)return Tr(14,1,e,t,r,n,i,o,a);var s=Wr(o,a);try{if(isNaN(s))return 61;var u=De.getStreamFromFD(i);2&r&&De.doMsync(e,u,t,n,s),Fe.munmap(u)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Nr,Vr=e=>{var t=ve(e)+1,r=bn(t);return r&&fr(e,r,t),r},jr=[],Hr=(e,t,n)=>{var i=((e,t)=>{var n;for(jr.length=0;n=r()[e++];)t+=105!=n&&t%8?4:0,jr.push(105==n?a()[t>>2]:u()[t>>3]),t+=105==n?4:8;return jr})(t,n);return ae[e].apply(null,i)};Nr=()=>performance.timeOrigin+performance.now();var Br=e=>{re("OOM")},Ur=e=>{var t=(e-x.buffer.byteLength+65535)/65536;try{return x.grow(t),z(),1}catch(e){}},Gr={},Yr=()=>{if(!Yr.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",_:g||"./this.program"};for(var t in Gr)void 0===Gr[t]?delete e[t]:e[t]=Gr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Yr.strings=r}return Yr.strings},Qr=function(e,r){if(y)return Tr(15,1,e,r);var n=0;return Yr().forEach(((i,o)=>{var a=r+n;s()[e+4*o>>2]=a,((e,r)=>{for(var n=0;n<e.length;++n)t()[r++>>0]=e.charCodeAt(n);t()[r>>0]=0})(i,a),n+=i.length+1})),0},Xr=function(e,t){if(y)return Tr(16,1,e,t);var r=Yr();s()[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),s()[t>>2]=n,0};function Jr(e){if(y)return Tr(17,1,e);try{var t=De.getStreamFromFD(e);return Fe.close(t),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,r){if(y)return Tr(18,1,e,r);try{var n=De.getStreamFromFD(e),o=n.tty?2:Fe.isDir(n.mode)?3:Fe.isLink(n.mode)?7:4;return t()[r>>0]=o,i()[r+2>>1]=0,X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+8>>2]=X[0],a()[r+12>>2]=X[1],X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+16>>2]=X[0],a()[r+20>>2]=X[1],0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function qr(e,r,n,i){if(y)return Tr(19,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=Fe.read(e,t(),u,c,i);if(l<0)return-1;if(o+=l,l<c)break;"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function en(e,t,r,n,i){if(y)return Tr(20,1,e,t,r,n,i);var o=Wr(t,r);try{if(isNaN(o))return 61;var s=De.getStreamFromFD(e);return Fe.llseek(s,o,n),X=[s.position>>>0,(Q=s.position,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[i>>2]=X[0],a()[i+4>>2]=X[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function tn(e,r,n,i){if(y)return Tr(21,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=Fe.write(e,t(),u,c,i);if(l<0)return-1;o+=l,"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}var rn=(e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r},nn=[31,29,31,30,31,30,31,31,30,31,30,31],on=[31,28,31,30,31,30,31,31,30,31,30,31],an=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Or(r.getFullYear()),i=r.getMonth(),o=(n?nn:on)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},sn=(e,r,n,i)=>{var o=s()[i+40>>2],u={tm_sec:a()[i>>2],tm_min:a()[i+4>>2],tm_hour:a()[i+8>>2],tm_mday:a()[i+12>>2],tm_mon:a()[i+16>>2],tm_year:a()[i+20>>2],tm_wday:a()[i+24>>2],tm_yday:a()[i+28>>2],tm_isdst:a()[i+32>>2],tm_gmtoff:a()[i+36>>2],tm_zone:o?Te(o):""},c=Te(n),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var d in l)c=c.replace(new RegExp(d,"g"),l[d]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return f(e,t,"0")}function g(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function v(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 y(e){var t=an(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=v(r),o=v(n);return g(i,t)<=0?g(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":e=>h[e.tm_wday].substring(0,3),"%A":e=>h[e.tm_wday],"%b":e=>m[e.tm_mon].substring(0,3),"%B":e=>m[e.tm_mon],"%C":e=>p((e.tm_year+1900)/100|0,2),"%d":e=>p(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":e=>y(e),"%H":e=>p(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":e=>p(e.tm_mday+rn(Or(e.tm_year+1900)?nn:on,e.tm_mon-1),3),"%m":e=>p(e.tm_mon+1,2),"%M":e=>p(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>p(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return p(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Or(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Or(e.tm_year%400-1))&&t++}return p(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return p(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),w)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),w[d](u)));var b,_,C=we(c=c.replace(/\0\0/g,"%"),!1);return C.length>r?0:(b=C,_=e,t().set(b,_),C.length-1)},un=e=>parseInt(e),cn=Vr;Pe.init();var ln,dn,hn,mn=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},fn=365,pn=146;Object.defineProperties(mn.prototype,{read:{get:function(){return(this.mode&fn)===fn},set:function(e){e?this.mode|=fn:this.mode&=-366}},write:{get:function(){return(this.mode&pn)===pn},set:function(e){e?this.mode|=pn:this.mode&=-147}},isFolder:{get:function(){return Fe.isDir(this.mode)}},isDevice:{get:function(){return Fe.isChrdev(this.mode)}}}),Fe.FSNode=mn,Fe.createPreloadedFile=(e,t,r,n,i,o,a,s,u,c)=>{var l=t?me.resolve(de.join2(e,t)):e;function d(r){function d(r){c&&c(),s||Fe.createDataFile(e,t,r,n,i,u),o&&o(),te()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ee.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,l,d,(()=>{a&&a(),te()}))||d(r)}ee(),"string"==typeof r?((e,t,r,n)=>{var i=n?"":`al ${e}`;m(e,(r=>{Z(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&te()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&ee()})(r,(e=>d(e)),a):d(r)},Fe.staticInit(),ot=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ut=e})(),lt=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},It.prototype.isAliasOf=ft,It.prototype.clone=Rt,It.prototype.delete=Mt,It.prototype.isDeleted=Wt,It.prototype.deleteLater=Ot,d.getInheritedInstanceCount=_t,d.getLiveInheritedInstances=Ct,d.flushPendingDeletes=xt,d.setDelayFunction=Tt,Xt.prototype.getPointee=Gt,Xt.prototype.destructor=Yt,Xt.prototype.argPackAdvance=mt,Xt.prototype.readValueFromPointer=Ut,Xt.prototype.deleteObject=Qt,Xt.prototype.fromWireType=At,er=d.UnboundTypeError=(ln=Error,(hn=zt(dn="UnboundTypeError",(function(e){this.name=dn,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(ln.prototype),hn.prototype.constructor=hn,hn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},hn),Object.assign(ar.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),sr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),sr.reserved=sr.allocated.length,d.count_emval_handles=cr;var gn,vn=[Se,Me,Ve,He,Be,Ue,Ge,function(e,t){if(y)return Tr(7,1,e,t);try{return e=De.getStr(e),De.doStat(Fe.lstat,e,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ye,Qe,Xe,Je,Ke,Lr,$r,Qr,Xr,Jr,Kr,qr,en,tn],yn={p:(e,t,r,n)=>{re(`Assertion failed: ${Te(e)}, at: `+[t?Te(t):"unknown filename",r,n?Te(n):"unknown function"])},v:e=>{var t=new Le(e);return t.get_caught()||(t.set_caught(!0),Ze--),t.set_rethrown(!1),Ie.push(t),zn(t.excPtr),t.get_exception_ptr()},Yb:()=>{if(!Ie.length)return 0;var e=Ie[Ie.length-1];return zn(e.excPtr),e.excPtr},I:()=>{Rn(0,0);var e=Ie.pop();Zn(e.excPtr),ze=0},b:()=>$e([]),i:e=>$e([e]),x:(e,t)=>$e([e,t]),_a:Ne,Xb:e=>{if(e){var t=new Le(e);Ie.push(t),t.set_rethrown(!0),Ne()}},r:(e,t,r)=>{throw new Le(e).init(t,r),Ze++,ze=e},Zb:()=>Ze,jc:e=>{Dn(e,!1,1,!0,4194304,!1),Pe.threadInitTLS()},ab:e=>{y?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},gc:je,e:e=>{throw ze||(ze=e),ze},dc:He,db:Be,pc:Ue,qc:Ge,nc:Ye,eb:Qe,ec:Xe,oc:Je,fc:Ke,Cb:e=>{var t=qe[e];delete qe[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType)));st([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],l=t.setter,d=t.setterContext;o[n]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];l(d,e,c.toWireType(r,t)),et(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var i in o)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:n}]}))},Pb:(e,t,r,n,i)=>{},vc:(e,t,n,i)=>{ht(e,{name:t=ct(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:mt,readValueFromPointer:function(e){return this.fromWireType(r()[e])},destructorFunction:null})},da:(e,t,r,n,i,o,a,s,u,c,l,d,h)=>{l=ct(l),o=qt(i,o),s&&(s=qt(a,s)),c&&(c=qt(u,c)),h=qt(d,h);var m=Zt(l);$t(m,(function(){rr(`Cannot construct ${l} due to unbound types`,[n])})),st([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:It.prototype;var a=zt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new lt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new lt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new lt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var d=new Nt(l,a,u,h,r,o,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var f=new Xt(l,d,!0,!1,!1),p=new Xt(l+"*",d,!1,!1,!1),g=new Xt(l+" const*",d,!1,!0,!1);return bt[e]={pointerType:p,constPointerType:g},Jt(m,a),[f,p,g]}))},ca:(e,t,r,n,i,o)=>{var a=nr(t,r);i=qt(n,i),st([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new lt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{rr(`Cannot construct ${e.name} due to unbound types`,a)},st([],a,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=or(r,n,null,i,o),[]))),[]}))},W:(e,t,r,n,i,o,a,s,u)=>{var c=nr(r,n);t=ct(t),o=qt(i,o),st([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){rr(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(Lt(l,t,n),l[t].overloadTable[r-2]=i),st([],c,(function(i){var s=or(n,i,e,o,a,u);return void 0===l[t].overloadTable?(s.argCount=r-2,l[t]=s):l[t].overloadTable[r-2]=s,[]})),[]}))},uc:(e,t)=>{ht(e,{name:t=ct(t),fromWireType:e=>{var t=lr.toValue(e);return ur(e),t},toWireType:(e,t)=>lr.toHandle(t),argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:null})},gb:(e,t,r)=>{ht(e,{name:t=ct(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:mt,readValueFromPointer:hr(t,r),destructorFunction:null})},_:(e,t,r,n,i,o,a)=>{var s=nr(t,r);e=ct(e),i=qt(n,i),$t(e,(function(){rr(`Cannot call ${e} due to unbound types`,s)}),t-1),st([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return Jt(e,or(e,n,null,i,o,a),t-1),[]}))},ea:(e,t,r,n,i)=>{t=ct(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ht(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:mt,readValueFromPointer:mr(t,r,0!==n),destructorFunction:null})},O:(e,r,n)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=s()[e>>2],n=s()[e+4>>2];return new i(t().buffer,n,r)}ht(e,{name:n=ct(n),fromWireType:o,argPackAdvance:mt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},fb:(e,t)=>{var n="std::string"===(t=ct(t));ht(e,{name:t,fromWireType:e=>{var t,i=s()[e>>2],o=e+4;if(n)for(var a=o,u=0;u<=i;++u){var c=o+u;if(u==i||0==r()[c]){var l=Te(a,c-a);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),a=c+1}}else{var d=new Array(i);for(u=0;u<i;++u)d[u]=String.fromCharCode(r()[o+u]);t=d.join("")}return _n(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||dt("Cannot pass non-string to std::string"),i=n&&o?ve(t):t.length;var a=bn(4+i+1),u=a+4;if(s()[a>>2]=i,n&&o)fr(t,u,i+1);else if(o)for(var c=0;c<i;++c){var l=t.charCodeAt(c);l>255&&(_n(u),dt("String has UTF-16 code units that do not fit in 8 bits")),r()[u+c]=l}else for(c=0;c<i;++c)r()[u+c]=t[c];return null!==e&&e.push(_n,a),a},argPackAdvance:mt,readValueFromPointer:Ut,destructorFunction:e=>_n(e)})},Pa:(e,t,r)=>{var n,i,a,u,c;r=ct(r),2===t?(n=gr,i=vr,u=yr,a=()=>o(),c=1):4===t&&(n=wr,i=br,u=_r,a=()=>s(),c=2),ht(e,{name:r,fromWireType:e=>{for(var r,i=s()[e>>2],o=a(),u=e+4,l=0;l<=i;++l){var d=e+4+l*t;if(l==i||0==o[d>>c]){var h=n(u,d-u);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),u=d+t}}return _n(e),r},toWireType:(e,n)=>{"string"!=typeof n&&dt(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),a=bn(4+o+t);return s()[a>>2]=o>>c,i(n,a+4,o+t),null!==e&&e.push(_n,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:e=>_n(e)})},Db:(e,t,r,n,i,o)=>{qe[e]={name:ct(t),rawConstructor:qt(r,n),rawDestructor:qt(i,o),fields:[]}},Bb:(e,t,r,n,i,o,a,s,u,c)=>{qe[e].fields.push({fieldName:ct(t),getterReturnType:r,getter:qt(n,i),getterContext:o,setterArgumentType:a,setter:qt(s,u),setterContext:c})},wc:(e,t)=>{ht(e,{isVoid:!0,name:t=ct(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},tc:()=>!0,bc:(e,t,r)=>{if(e==t)setTimeout((()=>xr()));else if(y)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Pe.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},hc:(e,t,r,n)=>{Dr.length=r;for(var i=n>>3,o=0;o<r;o++)Dr[o]=u()[i+o];var a=e<0?ae[-e-1]:vn[e];Pe.currentProxiedOperationCallerThread=t;var s=a.apply(null,Dr);return Pe.currentProxiedOperationCallerThread=0,s},ic:Er,sc:e=>{},_b:()=>{throw 1/0},pa:(e,t,r)=>{e=lr.toValue(e),t=Sr(t,"emval::as");var n=[],i=lr.toHandle(n);return s()[r>>2]=i,t.toWireType(n,e)},Ma:(e,t,r,n,i)=>(e=Pr[e])(t=lr.toValue(t),r=Ar(r),(e=>{var t=[];return s()[e>>2]=lr.toHandle(t),t})(n),i),La:(e,t,r,n)=>{(e=Pr[e])(t=lr.toValue(t),r=Ar(r),null,n)},xc:ur,xb:e=>0===e?lr.toHandle(Rr()):(e=Ar(e),lr.toHandle(Rr()[e])),oa:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Sr(s()[t+4*n>>2],"parameter "+n);return r})(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Mr[i];if(void 0!==o)return o;for(var a=["retType"],u=[n],c="",l=0;l<e-1;++l)c+=(0!==l?", ":"")+"arg"+l,a.push("argType"+l),u.push(r[1+l]);var d="return function "+Zt("methodCaller_"+i)+"(handle, name, destructors, args) {\n",h=0;for(l=0;l<e-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(h?"+"+h:"")+");\n",h+=r[l+1].argPackAdvance;for(d+=" var rv = handle[name]("+c+");\n",l=0;l<e-1;++l)r[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var m,f,p=ir(Function,a).apply(null,u);return m=p,f=Pr.length,Pr.push(m),o=f,Mr[i]=o,o},Tb:(e,t)=>(e=lr.toValue(e),t=lr.toValue(t),lr.toHandle(e[t])),t:e=>{e>4&&(sr.get(e).refcount+=1)},Q:()=>lr.toHandle([]),fa:e=>lr.toHandle(Ar(e)),D:()=>lr.toHandle({}),Eb:e=>{var t=lr.toValue(e);et(t),ur(e)},Fc:(e,t,r)=>{e=lr.toValue(e),t=lr.toValue(t),r=lr.toValue(r),e[t]=r},$:(e,t)=>{var r=(e=Sr(e,"_emval_take_value")).readValueFromPointer(t);return lr.toHandle(r)},Lb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getUTCSeconds(),a()[r+4>>2]=i.getUTCMinutes(),a()[r+8>>2]=i.getUTCHours(),a()[r+12>>2]=i.getUTCDate(),a()[r+16>>2]=i.getUTCMonth(),a()[r+20>>2]=i.getUTCFullYear()-1900,a()[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),s=(i.getTime()-o)/864e5|0;a()[r+28>>2]=s},Mb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getSeconds(),a()[r+4>>2]=i.getMinutes(),a()[r+8>>2]=i.getHours(),a()[r+12>>2]=i.getDate(),a()[r+16>>2]=i.getMonth(),a()[r+20>>2]=i.getFullYear()-1900,a()[r+24>>2]=i.getDay();var o=0|zr(i);a()[r+28>>2]=o,a()[r+36>>2]=-60*i.getTimezoneOffset();var s=new Date(i.getFullYear(),0,1),u=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&i.getTimezoneOffset()==Math.min(c,u));a()[r+32>>2]=l},Nb:function(e){var t=(()=>{var t=new Date(a()[e+20>>2]+1900,a()[e+16>>2],a()[e+12>>2],a()[e+8>>2],a()[e+4>>2],a()[e>>2],0),r=a()[e+32>>2],n=t.getTimezoneOffset(),i=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),s=i.getTimezoneOffset(),u=Math.min(s,o);if(r<0)a()[e+32>>2]=Number(o!=s&&u==n);else if(r>0!=(u==n)){var c=Math.max(s,o),l=r>0?u:c;t.setTime(t.getTime()+6e4*(l-n))}a()[e+24>>2]=t.getDay();var d=0|zr(t);return a()[e+28>>2]=d,a()[e>>2]=t.getSeconds(),a()[e+4>>2]=t.getMinutes(),a()[e+8>>2]=t.getHours(),a()[e+12>>2]=t.getDate(),a()[e+16>>2]=t.getMonth(),a()[e+20>>2]=t.getYear(),t.getTime()/1e3})();return xn((Q=t,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)),t>>>0},Jb:Lr,Kb:$r,ac:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),u=i.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(u,c);function d(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[e>>2]=60*l,a()[t>>2]=Number(u!=c);var h=d(i),m=d(o),f=Vr(h),p=Vr(m);c<u?(s()[r>>2]=f,s()[r+4>>2]=p):(s()[r>>2]=p,s()[r+4>>2]=f)},E:()=>{re("")},yb:(e,t,r)=>Hr(e,t,r),bb:()=>{},va:()=>Date.now(),rc:()=>{throw H+=1,"unwind"},cc:()=>2147483648,Z:Nr,ib:()=>navigator.hardwareConcurrency,$b:e=>{var t=r().length;if((e>>>=0)<=t)return!1;var n=2147483648;e>n&&Br();for(var i,o,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var u=Math.min(n,(i=Math.max(e,s))+((o=65536)-i%o)%o);if(Ur(u))return!0}Br()},lc:Qr,mc:Xr,hb:ke,Oa:Jr,kc:Kr,cb:qr,Ob:en,Na:tn,Ab:function(){return cn(location.toString())},Wb:(e,t)=>(he(r().subarray(e,e+t)),0),zb:function(){return cn((e=Kn,self[e(429,"uFZ%")][e(441,"9ZVa")]()));var e},ba:function(e,t){var r=Wn();try{return We(e)(t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},Gc:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Ta:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},R:function(e,t,r,n,i,o){var a=Wn();try{return We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},F:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Sa:function(e,t,r,n,i,o){var a=Wn();try{return We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},tb:function(e,t,r,n,i,o,a,s){var u=Wn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Ic:function(e,t){var r=Wn();try{return We(e)(t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},s:function(e,t){var r=Wn();try{return We(e)(t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},C:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},ra:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Y:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},ta:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},w:function(e){var t=Wn();try{return We(e)()}catch(e){if(On(t),e!==e+0)throw e;Rn(1,0)}},j:function(e,t){var r=Wn();try{return We(e)(t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},ob:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},jb:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},ya:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Jc:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Lc:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Kc:function(e,t,r,n,i,o,a,s){var u=Wn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Pc:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{return We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},c:function(e,t,r){var n=Wn();try{return We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Va:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Hc:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},h:function(e,t,r,n){var i=Wn();try{return We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},ia:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Aa:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},l:function(e,t,r,n,i){var o=Wn();try{return We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},$a:function(e,t,r,n,i,o){var a=Wn();try{return We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},lb:function(e,t,r,n,i,o,a){var s=Wn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},o:function(e,t,r,n,i,o){var a=Wn();try{return We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},A:function(e,t,r,n,i,o,a){var s=Wn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},mb:function(e,t,r,n,i,o,a,s){var u=Wn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},aa:function(e,t,r,n,i,o,a,s){var u=Wn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},K:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{return We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},ja:function(e,t,r,n,i,o,a,s,u,c){var l=Wn();try{return We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(On(l),e!==e+0)throw e;Rn(1,0)}},ma:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{return We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},Fa:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=Wn();try{return We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(On(h),e!==e+0)throw e;Rn(1,0)}},Gb:function(e,t,r,n,i,o,a){var s=Wn();try{return Yn(e,t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},Ub:function(e,t,r,n){var i=Wn();try{return jn(e,t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Ib:function(e){var t=Wn();try{return Un(e)}catch(e){if(On(t),e!==e+0)throw e;Rn(1,0)}},Vb:function(e,t){var r=Wn();try{return Nn(e,t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},Hb:function(e,t,r){var n=Wn();try{return Gn(e,t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Sb:function(e,t,r,n){var i=Wn();try{return Hn(e,t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Fb:function(e,t,r,n,i){var o=Wn();try{return Qn(e,t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},m:function(e){var t=Wn();try{We(e)()}catch(e){if(On(t),e!==e+0)throw e;Rn(1,0)}},d:function(e,t){var r=Wn();try{We(e)(t)}catch(e){if(On(r),e!==e+0)throw e;Rn(1,0)}},Ga:function(e,t,r){var n=Wn();try{We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Ha:function(e,t,r,n){var i=Wn();try{We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},qa:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},ua:function(e,t,r){var n=Wn();try{We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},Za:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},f:function(e,t,r){var n=Wn();try{We(e)(t,r)}catch(e){if(On(n),e!==e+0)throw e;Rn(1,0)}},G:function(e,t,r,n){var i=Wn();try{We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},Da:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Qa:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},Mc:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},za:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},U:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Ia:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Ac:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},M:function(e,t,r,n){var i=Wn();try{We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},na:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Oc:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},Ca:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},ga:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},Wa:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Ya:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},g:function(e,t,r,n){var i=Wn();try{We(e)(t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},nb:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},y:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},ub:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},Nc:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},z:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},la:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},H:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},wa:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},xa:function(e,t,r,n,i,o,a,s,u,c){var l=Wn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(On(l),e!==e+0)throw e;Rn(1,0)}},pb:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},X:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},qb:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},Xa:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},vb:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},k:function(e,t,r,n,i){var o=Wn();try{We(e)(t,r,n,i)}catch(e){if(On(o),e!==e+0)throw e;Rn(1,0)}},Ra:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},yc:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Ka:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},J:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},ha:function(e,t,r,n,i,o,a,s,u,c){var l=Wn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(On(l),e!==e+0)throw e;Rn(1,0)}},rb:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},n:function(e,t,r,n,i,o){var a=Wn();try{We(e)(t,r,n,i,o)}catch(e){if(On(a),e!==e+0)throw e;Rn(1,0)}},Qc:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},B:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},sb:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},V:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},q:function(e,t,r,n,i,o,a){var s=Wn();try{We(e)(t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},kb:function(e,t,r,n,i,o,a,s,u,c){var l=Wn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(On(l),e!==e+0)throw e;Rn(1,0)}},Ja:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Ec:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},Ba:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},u:function(e,t,r,n,i,o,a,s){var u=Wn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(On(u),e!==e+0)throw e;Rn(1,0)}},Dc:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(On(h),e!==e+0)throw e;Rn(1,0)}},Cc:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},L:function(e,t,r,n,i,o,a,s,u){var c=Wn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(On(c),e!==e+0)throw e;Rn(1,0)}},Ua:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(On(h),e!==e+0)throw e;Rn(1,0)}},sa:function(e,t,r,n,i,o,a,s,u,c,l,d,h){var m=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h)}catch(e){if(On(m),e!==e+0)throw e;Rn(1,0)}},S:function(e,t,r,n,i,o,a,s,u,c){var l=Wn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(On(l),e!==e+0)throw e;Rn(1,0)}},P:function(e,t,r,n,i,o,a,s,u,c,l){var d=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(On(d),e!==e+0)throw e;Rn(1,0)}},wb:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(On(h),e!==e+0)throw e;Rn(1,0)}},ka:function(e,t,r,n,i,o,a,s,u,c,l,d,h,m){var f=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h,m)}catch(e){if(On(f),e!==e+0)throw e;Rn(1,0)}},Ea:function(e,t,r,n,i,o,a,s,u,c,l,d,h,m,f,p){var g=Wn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h,m,f,p)}catch(e){if(On(g),e!==e+0)throw e;Rn(1,0)}},Qb:function(e,t,r,n,i,o,a){var s=Wn();try{Vn(e,t,r,n,i,o,a)}catch(e){if(On(s),e!==e+0)throw e;Rn(1,0)}},Rb:function(e,t,r,n){var i=Wn();try{Bn(e,t,r,n)}catch(e){if(On(i),e!==e+0)throw e;Rn(1,0)}},N:e=>e,a:x||d.wasmMemory,Bc:sn,T:(e,t,r,n,i)=>sn(e,t,r,n),zc:(e,t,r)=>{for(var n=Te(t),i="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,s=i.length;o<s;++o)n=n.replace(new RegExp("\\"+i[o],"g"),"\\"+i[o]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var c in u)n=n.replace(c,u[c]);var l={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in l)n=n.replace(d,"("+d+l[d]+")");var h=[];for(o=n.indexOf("%");o>=0;o=n.indexOf("%"))h.push(n[o+1]),n=n.replace(new RegExp("\\%"+n[o+1],"g"),"");var m=new RegExp("^"+n,"i").exec(Te(e));if(m){var f,p=function(){function e(e,t,r){return"number"!=typeof e||isNaN(e)?t:e>=t?e<=r?e:r:t}return{year:e(a()[r+20>>2]+1900,1970,9999),month:e(a()[r+16>>2],0,11),day:e(a()[r+12>>2],1,31),hour:e(a()[r+8>>2],0,23),min:e(a()[r+4>>2],0,59),sec:e(a()[r>>2],0,59)}}(),g=e=>{var t=h.indexOf(e);if(t>=0)return m[t+1]};if((f=g("S"))&&(p.sec=un(f)),(f=g("M"))&&(p.min=un(f)),f=g("H"))p.hour=un(f);else if(f=g("I")){var v=un(f);(f=g("p"))&&(v+="P"===f.toUpperCase()[0]?12:0),p.hour=v}if(f=g("Y"))p.year=un(f);else if(f=g("y")){var y=un(f);(f=g("C"))?y+=100*un(f):y+=y<69?2e3:1900,p.year=y}if((f=g("m"))?p.month=un(f)-1:(f=g("b"))&&(p.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[f.substring(0,3).toUpperCase()]||0),f=g("d"))p.day=un(f);else if(f=g("j"))for(var w=un(f),b=Or(p.year),_=0;_<12;++_){var C=rn(b?nn:on,_-1);w<=C+(b?nn:on)[_]&&(p.day=w-C)}else if(f=g("a")){var E=f.substring(0,3).toUpperCase();if(f=g("U")){var x={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[E],F=un(f);D=0===(T=new Date(p.year,0,1)).getDay()?an(T,x+7*(F-1)):an(T,7-T.getDay()+x+7*(F-1)),p.day=D.getDate(),p.month=D.getMonth()}else if(f=g("W")){var T,D;x={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[E],F=un(f),D=1===(T=new Date(p.year,0,1)).getDay()?an(T,x+7*(F-1)):an(T,7-T.getDay()+1+x+7*(F-1)),p.day=D.getDate(),p.month=D.getMonth()}}var S=new Date(p.year,p.month,p.day,p.hour,p.min,p.sec,0);return a()[r>>2]=S.getSeconds(),a()[r+4>>2]=S.getMinutes(),a()[r+8>>2]=S.getHours(),a()[r+12>>2]=S.getDate(),a()[r+16>>2]=S.getMonth(),a()[r+20>>2]=S.getFullYear()-1900,a()[r+24>>2]=S.getDay(),a()[r+28>>2]=rn(Or(S.getFullYear())?nn:on,S.getMonth()-1)+S.getDate()-1,a()[r+32>>2]=0,e+we(m[0]).length-1}return 0}},wn=function(){var e,t,r,n,i={a:yn};function o(e,t){var r,n=e.exports;return Oe((wn=n).Yc),L=wn.Tc,r=wn.Rc,V.unshift(r),F=t,te(),n}if(ee(),d.instantiateWasm)try{return d.instantiateWasm(i,o)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),l(e)}return(e=_,t=Y,r=i,n=function(e){o(e.instance,e.module)},e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||"function"!=typeof fetch?oe(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),oe(t,r,n)}))))).catch(l),{}}(),bn=d._malloc=e=>(bn=d._malloc=wn.Sc)(e),_n=d._free=e=>(_n=d._free=wn.Uc)(e),Cn=()=>(Cn=wn.Vc)(),En=d._pthread_self=()=>(En=d._pthread_self=wn.Wc)(),xn=e=>(xn=wn.Xc)(e),Fn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=wn.Yc)(),(e,t)=>(Fn=wn.Zc)(e,t)),Tn=e=>(Tn=wn._c)(e),Dn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=wn.$c)(),d.__emscripten_thread_init=(e,t,r,n,i,o)=>(Dn=d.__emscripten_thread_init=wn.ad)(e,t,r,n,i,o)),Sn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=wn.bd)(),(e,t,r,n)=>(Sn=wn.cd)(e,t,r,n)),kn=e=>(kn=wn.dd)(e),An=d.__emscripten_thread_exit=e=>(An=d.__emscripten_thread_exit=wn.ed)(e),Pn=d.__emscripten_check_mailbox=()=>(Pn=d.__emscripten_check_mailbox=wn.fd)(),Rn=(e,t)=>(Rn=wn.gd)(e,t),Mn=(e,t)=>(Mn=wn.hd)(e,t),Wn=()=>(Wn=wn.id)(),On=e=>(On=wn.jd)(e),In=e=>(In=wn.kd)(e),Zn=e=>(Zn=wn.ld)(e),zn=e=>(zn=wn.md)(e),Ln=(e,t,r)=>(Ln=wn.nd)(e,t,r),$n=e=>($n=wn.od)(e),Nn=d.dynCall_ji=(e,t)=>(Nn=d.dynCall_ji=wn.pd)(e,t),Vn=d.dynCall_viijii=(e,t,r,n,i,o,a)=>(Vn=d.dynCall_viijii=wn.qd)(e,t,r,n,i,o,a),jn=d.dynCall_iij=(e,t,r,n)=>(jn=d.dynCall_iij=wn.rd)(e,t,r,n),Hn=d.dynCall_jiii=(e,t,r,n)=>(Hn=d.dynCall_jiii=wn.sd)(e,t,r,n),Bn=d.dynCall_vij=(e,t,r,n)=>(Bn=d.dynCall_vij=wn.td)(e,t,r,n),Un=(d.dynCall_jiji=(e,t,r,n,i)=>(d.dynCall_jiji=wn.ud)(e,t,r,n,i),d.dynCall_viij=(e,t,r,n,i)=>(d.dynCall_viij=wn.vd)(e,t,r,n,i),d.dynCall_jjj=(e,t,r,n,i)=>(d.dynCall_jjj=wn.wd)(e,t,r,n,i),d.dynCall_iiiijj=(e,t,r,n,i,o,a,s)=>(d.dynCall_iiiijj=wn.xd)(e,t,r,n,i,o,a,s),d.dynCall_viijj=(e,t,r,n,i,o,a)=>(d.dynCall_viijj=wn.yd)(e,t,r,n,i,o,a),d.dynCall_viiijjj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_viiijjj=wn.zd)(e,t,r,n,i,o,a,s,u,c),d.dynCall_j=e=>(Un=d.dynCall_j=wn.Ad)(e)),Gn=d.dynCall_jii=(e,t,r)=>(Gn=d.dynCall_jii=wn.Bd)(e,t,r),Yn=d.dynCall_iiiiij=(e,t,r,n,i,o,a)=>(Yn=d.dynCall_iiiiij=wn.Cd)(e,t,r,n,i,o,a),Qn=d.dynCall_jiiii=(e,t,r,n,i)=>(Qn=d.dynCall_jiiii=wn.Dd)(e,t,r,n,i);function Xn(){if(!(J>0)){if(y)return c(d),U(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)G(d.preRun.shift());Re(N)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e())}function e(){gn||(gn=!0,d.calledRun=!0,I||(U(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!y){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),j.unshift(e);var e;Re(j)}}()))}}if(d.dynCall_iiiiijj=(e,t,r,n,i,o,a,s,u)=>(d.dynCall_iiiiijj=wn.Ed)(e,t,r,n,i,o,a,s,u),d.dynCall_iiiiiijj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_iiiiiijj=wn.Fd)(e,t,r,n,i,o,a,s,u,c),d.___start_em_js=8793272,d.___stop_em_js=8793380,d.keepRuntimeAlive=B,d.wasmMemory=x,d.UTF8ToString=Te,d.stringToUTF8=fr,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=cn,d.PThread=Pe,q=function e(){gn||Xn(),gn||(q=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Jn(){var e=["W67dPW9JWQtdQsvn","xuL4W73dSfpdTCk9fHK","W5JcRGWslrVcTexdVSoHWPy","WPBdGN/dKbVdUSkvW5S3Bb9H","W4ddVXumWPxcNmkeW74EvX4","WPXQWOCMW453lqy","W4xdUbKaWPddNSk8W7yEtIGX","WODzxSoPdc16za","FmoigCkMoqVdNmomW6RcSSo6WQG","oSoSWPX+WQRcVeFcMtWSWO17WOdcOa","WOxdImoVlvhcVCkFCI8","W4OrwSobW4LMdmkCW4/cLG","kmkWzvCqfmkDWP8","WOtdOSo2W6RdJmoJxdS+WPtcJmo/WRO","C2eXW7xcTmkEW4ToW47cP8o9FY9I","W7NdPCoJf2ddPmkxW4LGnG","g8kbmmkIgvmkWQtcOgZcQG","W5FcMmkNpmkwW449BfpcRa","d1LcrNpcVGlcJvC","WRtcVafyWPxdTsvv","oCo/W6NcU1BdJ8oEpSkNW7NcOJHC","oSoSWPf8WQJdVc/dJt8HWPG","d2FdKKKUsCkhWPWNy8kXnW","pSoVW4qsW53dUHhdNq"];return(Jn=function(){return e})()}function Kn(e,t){var r=Jn();return Kn=function(t,n){var i=r[t-=425];if(void 0===Kn.IgPDva){var o=function(e){for(var t,r,n="",i="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=n.length;s<u;s++)i+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(i)},a=function(e,t){var r,n,i=[],a=0,s="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)a=(a+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[a],i[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+i[n=(n+1)%256])%256,r=i[n],i[n]=i[a],i[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[a])%256]);return s};Kn.pOlgUI=a,e=arguments,Kn.IgPDva=!0}var s=r[0],u=t+s,c=e[u];return c?i=c:(void 0===Kn.GaNKxM&&(Kn.GaNKxM=!0),i=Kn.pOlgUI(i,n),e[u]=i),i},Kn(e,t)}Xn(),function(e,t){for(var r=Kn,n=e();;)try{if(470921==parseInt(r(432,"Wgw1"))/1+parseInt(r(431,"uZN0"))/2*(-parseInt(r(434,"2[@Z"))/3)+-parseInt(r(447,"Q@E5"))/4*(-parseInt(r(433,"r]yk"))/5)+-parseInt(r(425,"z#^("))/6+parseInt(r(427,"[cIO"))/7*(-parseInt(r(448,"uFZ%"))/8)+parseInt(r(446,"s@N#"))/9*(-parseInt(r(440,"rWKy"))/10)+parseInt(r(438,"#Tfs"))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Jn);var ighnua,qn=(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}),ei=qn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(ei)};return e()}));return ei(),e.ready});e.exports=i},function(e,t,r){"use strict";r.r(t),t.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Se})),r.d(t,"commands",(function(){return Me}));var n,i,o,a,s,u,c,l,d,h,m=r(0);class f{_marker(){}}class p extends f{constructor(e={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class g extends f{constructor(e={}){super(),this.attributes=new p({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new p(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class v extends f{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class y extends f{constructor(e={}){super(),this.accumulatedResultsVerifierConfig=new v({}),void 0!==e.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new v(e.accumulatedResultsVerifierConfig))}}class w extends f{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class b extends f{constructor(e={}){super(),this.qualityThresholds=[new w({symbolQuality:.5,symbolRatio:.5}),new w({symbolQuality:.7,symbolRatio:.3}),new w({symbolQuality:.85,symbolRatio:.3}),new w({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new w(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new _(e);case"CustomBinarizationFilter":return new C(e);case"ColorDocumentFilter":return new E(e);case"BrightnessFilter":return new x(e);case"ContrastFilter":return new F(e);case"GrayscaleFilter":return new T(e);case"LegacyFilter":return new D(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class _ extends f{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class C extends f{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class E extends f{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class x extends f{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class F extends f{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class T extends f{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class D extends f{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends f{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class k extends f{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class A extends f{constructor(e={}){super(),this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.requiredAspectRatios=[],this.rectangleOfInterest={x:0,y:0,width:0,height:0},void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.requiredAspectRatios&&(this.requiredAspectRatios=e.requiredAspectRatios.map((e=>new k(e)))),void 0!==e.rectangleOfInterest&&(this.rectangleOfInterest={x:e.rectangleOfInterest.x,y:e.rectangleOfInterest.y,width:e.rectangleOfInterest.width,height:e.rectangleOfInterest.height})}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new P(e);case"PresetContentValidator":return new R(e);case"PatternContentValidator":return new M(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class P extends f{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class R extends f{constructor(e={}){if(super(),this._type="PresetContentValidator",void 0===e.preset)throw new Error("preset must be present in constructor argument");this.preset=e.preset}}class M extends f{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class W extends f{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new P({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=i.From(e.validator))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new O(e);case"Code11Config":return new I(e);case"Code39Config":return new Z(e);case"Code93Config":return new z(e);case"Code128Config":return new L(e);case"Code2Of5Config":return new $(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new V(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new H(e);case"MSIPlesseyConfig":return new B(e);case"UpcEanConfig":return new U(e);case"PharmaCodeConfig":return new G(e);case"AztecConfig":return new Y(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new J(e);case"DataMatrixConfig":return new K(e);case"MaxiCodeConfig":return new q(e);case"AustraliaPostConfig":return new ee(e);case"JapanPostConfig":return new te(e);case"RoyalMailConfig":return new re(e);case"RoyalTNTPostConfig":return new ne(e);case"USPSIntelligentMailConfig":return new ie(e);case"PharmaCodeTwoTrackConfig":return new oe(e);case"GS1CompositeConfig":return new ae(e);case"GroupOneDConfig":return new se(e);case"GroupTwoDConfig":return new ue(e);case"GroupFourStateConfig":return new ce(e);case"GroupCommonConfig":return new le(e);default:throw`Unknown child class name: ${t}`}}}(o||(o={})),function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new O(e);case"Code11Config":return new I(e);case"Code39Config":return new Z(e);case"Code93Config":return new z(e);case"Code128Config":return new L(e);case"Code2Of5Config":return new $(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new V(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new H(e);case"MSIPlesseyConfig":return new B(e);case"UpcEanConfig":return new U(e);case"PharmaCodeConfig":return new G(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class O extends f{constructor(e={}){super(),this._type="CodabarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class I extends f{constructor(e={}){super(),this._type="Code11Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class Z extends f{constructor(e={}){super(),this._type="Code39Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class z extends f{constructor(e={}){super(),this._type="Code93Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class L extends f{constructor(e={}){super(),this._type="Code128Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class $ extends f{constructor(e={}){super(),this._type="Code2Of5Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class N extends f{constructor(e={}){super(),this._type="DataBarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class V extends f{constructor(e={}){super(),this._type="DataBarExpandedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class j extends f{constructor(e={}){super(),this._type="DataBarLimitedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class H extends f{constructor(e={}){super(),this._type="ITFConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class B extends f{constructor(e={}){super(),this._type="MSIPlesseyConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class U extends f{constructor(e={}){super(),this._type="UpcEanConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class G extends f{constructor(e={}){super(),this._type="PharmaCodeConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AztecConfig":return new Y(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new J(e);case"DataMatrixConfig":return new K(e);case"MaxiCodeConfig":return new q(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class Y extends f{constructor(e={}){super(),this._type="AztecConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Q extends f{constructor(e={}){super(),this._type="QRCodeConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class X extends f{constructor(e={}){super(),this._type="PDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class J extends f{constructor(e={}){super(),this._type="MicroPDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class K extends f{constructor(e={}){super(),this._type="DataMatrixConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class q extends f{constructor(e={}){super(),this._type="MaxiCodeConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AustraliaPostConfig":return new ee(e);case"JapanPostConfig":return new te(e);case"RoyalMailConfig":return new re(e);case"RoyalTNTPostConfig":return new ne(e);case"USPSIntelligentMailConfig":return new ie(e);case"PharmaCodeTwoTrackConfig":return new oe(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class ee extends f{constructor(e={}){super(),this._type="AustraliaPostConfig",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class te extends f{constructor(e={}){super(),this._type="JapanPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class re extends f{constructor(e={}){super(),this._type="RoyalMailConfig",this.regexFilter="",this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ne extends f{constructor(e={}){super(),this._type="RoyalTNTPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends f{constructor(e={}){super(),this._type="USPSIntelligentMailConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class oe extends f{constructor(e={}){super(),this._type="PharmaCodeTwoTrackConfig",this.regexFilter="",this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ae extends f{constructor(e={}){super(),this._type="GS1CompositeConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class se extends f{constructor(e={}){super(),this._type="GroupOneDConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends f{constructor(e={}){super(),this._type="GroupTwoDConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ce extends f{constructor(e={}){super(),this._type="GroupFourStateConfig",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class le extends f{constructor(e={}){super(),this._type="GroupCommonConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class de extends f{constructor(e={}){super()}}(c=de||(de={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],c.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};class he extends f{constructor(e={}){super(),this.configurators=[new le({})],this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==e.configurators&&(this.configurators=e.configurators.map((e=>o.From(e)))),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfig":return new me(e);case"EuropeanHealthInsuranceCardConfig":return new fe(e);case"MRZFallbackConfig":return new pe(e);case"GDRGroupConfig":return new ge(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class me extends f{constructor(e={}){super(),this._type="DateValidationConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.documentTypes=[],void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.documentTypes&&(this.documentTypes=e.documentTypes.map((e=>e)))}}class fe extends f{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.expectedCountry=null,void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry?e.expectedCountry:null)}}class pe extends f{constructor(e={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class ge extends f{constructor(e={}){super(),this._type="GDRGroupConfig",this.acceptedDocumentTypes=[],void 0!==e.acceptedDocumentTypes&&(this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e)))}}class ve extends f{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ye extends f{constructor(e={}){super(),this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class we extends f{constructor(e={}){super(),this.resultAccumulationConfig=new ye({}),this.fieldExcludeList=[],this.configurations=[new ge({})],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new ye(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0!==e.configurations&&(this.configurations=e.configurations.map((e=>l.From(e))))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new be(e);case"UserFieldStringValue":return new _e(e);case"UserFieldIntValue":return new Ce(e);default:throw`Unknown child class name: ${t}`}}}(d||(d={}));class be extends f{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class _e extends f{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ce extends f{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ee extends f{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=d.From(e.value)}}class xe extends f{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new Ee(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(h=xe||(xe={})).defaultCompression="LZW",h.binaryDocumentOptimizedCompression="CCITTFAX4";var Fe=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};let Te;class De extends Error{}class Se{constructor(e){this.id=e}}const ke={};function Ae(e){const t=Math.random().toString(36);return ke[t]=e,new Se(t)}function Pe(e){if(!ke.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return ke[e.id]}function Re(e){const t=Pe(e);t.delete&&t.delete(),delete ke[e.id]}const Me={initialize:function(e,t,n,i,o){return Fe(this,void 0,void 0,(function*(){try{const{captureConsole:a,jpegQuality:s=80,requestSuffix:u=""}=o||{};a&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),l=r(3),d={locateFile:function(e,r){let n;return n=t?Object(m.c)(t)?t:"":i,e.endsWith(".worker.js")&&l?l.default:new URL(n+e+u,location.href).href}},h=Object(m.b)(o),f=h.includes("-threads");d.mainScriptUrlOrBlob=d.locateFile(`ScanbotSDK.Asm${h}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=n,e.push(4*n));for(let r=0;r<e.length;r++){const n=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(d.wasmMemory=p),d.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new De("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield c(d),Te=d,Te.initialize(e||"",n,s)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Fe(this,void 0,void 0,(function*(){return Te.getLicenseInfo()}))},encodeJpeg:function(e){return Fe(this,void 0,void 0,(function*(){const t=Ie(e);return We(Te.encodeJpeg(t))}))},detectDocument:function(e,t){return Fe(this,void 0,void 0,(function*(){const r=new Te.DocumentDetector(new A(t)),n=r.detect(Ie(e));return r.delete(),We(n)}))},detectAndCropDocument:function(e){return Fe(this,void 0,void 0,(function*(){let t=We(Te.detectAndCropDocument(Ie(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentDetector(new A(e)))}))},documentDetectorDetect:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).detect(Ie(t)),t)}))},parseBarcodeDocument:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.BarcodeRecognizer(new he(e)))}))},recognizeBarcodes:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ie(t)),t)}))},beginPdf:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.PdfGenerationContext(new g(e)))}))},addPageToPdf:function(e,t){return Fe(this,void 0,void 0,(function*(){We(Pe(e).addPage(Ie(t)))}))},completePdf:function(e){return Fe(this,void 0,void 0,(function*(){try{const t=Pe(e);return We(t.complete())}finally{Re(e)}}))},beginTiff:function(e){return Fe(this,void 0,void 0,(function*(){const t=new Te.TiffGenerationContext(new xe(e));return We(t.begin()),Ae(t)}))},addPageToTiff:function(e,t,r){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).addPage(Ie(t),r))}))},completeTiff:function(e){return Fe(this,void 0,void 0,(function*(){try{const t=Pe(e);return We(t.complete())}finally{Re(e)}}))},createMRZRecognizer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.MrzRecognizerContext(new y(e)))}))},recognizeMRZ:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ie(t)),t)}))},releaseObject:function(e){return Fe(this,void 0,void 0,(function*(){Re(e)}))},createOcrEngine:function(){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.TLDROcrContext)}))},performOcr:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).performOcr(Ie(t)))}))},createGenericTextLineScanner:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.GenericTextLineScanner(new W(e)))}))},recognizeTextLine:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ie(t)),t)}))},cleanTextLineRecognitionQueue:function(e){return Fe(this,void 0,void 0,(function*(){Pe(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentQualityAnalyzer(new b(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).analyze(Ie(t)))}))},imageApplyFilter:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageApplyFilter(Ie(e),n.From(t)))}))},imageCrop:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageCrop(Ie(e),t))}))},imageResize:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageResize(Ie(e),t))}))},imageRotate:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageRotate(Ie(e),t))}))},genericDocumentRecognizerCreate:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.GenericDocumentRecognizer(new we(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ie(t),new ve(r)),t)}))},version:function(){return Fe(this,void 0,void 0,(function*(){return"6.0.0-dev.3"}))},__hasModuleFunction:function(e){return Fe(this,void 0,void 0,(function*(){return Te.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Fe(this,void 0,void 0,(function*(){return Te[e](...t)}))}};function We(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},We(e)),{originalImage:t})}function Ie(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;Te||"initialize"===t?(()=>Fe(this,void 0,void 0,(function*(){return yield Me[t].apply(null,r)})))().then((e=>{const t=Object(m.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof De)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(Te.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,error:new Error("WASM module not loaded yet.")})}}]);
|