scanbot-web-sdk 5.1.0-dev.2 → 5.1.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +18 -0
- package/bundle/ScanbotSDK.min.js +1 -1
- package/bundle/ScanbotSDK.ui2.min.js +2 -2
- 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.Asm.wasm-webpack-file-loader +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-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +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.Asm.wasm-webpack-file-loader +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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=t(1);let o;const a={};function i(e){const r=Math.random().toString(36);return a[r]=e,r}function s(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function u(e){const r=s(e);r.delete&&r.delete(),delete a[e]}const c={initialize:async function(e,r,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality:d=80,requestSuffix:f=""}=s||{};u&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const h=t(3),p=t(4),m={locateFile:function(e,t){let o;return o=r?(0,n.isRemote)(r)?r:"":i,e.endsWith(".worker.js")&&p?p.default:new URL(o+e+f,location).href}},y=(0,n.getBuildType)(s),v=y.includes("-threads");m.mainScriptUrlOrBlob=m.locateFile(`ScanbotSDK.Asm${y}.js`);let g;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&v){let e=[2147483648,805306368,536870912],r=134217728;const t=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&t.includes(SCANBOTSDK_FLAVOR)&&(r=n,e.push(4*n));for(let t=0;t<e.length;t++){const n=e[t];try{g=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),g.grow(r/65536);break}catch(r){if(t===e.length-1)throw r}}}return g&&(m.wasmMemory=g),await h(m),o=m,o.initialize(e||"",a,d)}catch(e){throw console.error(e),e}},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(e,r){return f(o.applyFilter(p(e),r),d)},rotateImageCcw:function(e,r){return f(o.rotateImageCcw(p(e),r),d)},cropAndRotateImageCcw:function(e,r,t){const n=function(e){const r=[];for(let t=0;t<e.length;++t)r.push(e[t].x,e[t].y);return r}(r);return f(o.cropAndRotateImageCcw(p(e),n,t),d)},detectDocument:async function(e,r,t){const n=new o.DocumentDetector({acceptedAngleScore:r,acceptedSizeScore:t}),a=n.detect(p(e));return n.delete(),await l(a)},detectAndCropDocument:async function(e){return await l(o.detectAndCropDocument(p(e)))},createDocumentDetector:async function(e){return i(new o.DocumentDetector(e||{}))},documentDetectorDetect:async function(e,r){const t=s(e);return await l(t.detect(p(r)))},createBarcodeRecognizer:async function(e){return i(new o.BarcodeRecognizer(e||{}))},recognizeBarcodes:async function(e,r,t){let n,a=!1;"string"==typeof e?n=s(e):(t=r,r=e,n=new o.BarcodeRecognizer(t),a=!0);try{const e=n.recognize(p(r),t||{});if(!e)return null;let o;return e.length?(o=e.map((e=>({format:e.format,text:e.text,parsedDocument:e.parsedDocument,rawBytes:d(e.rawBytes),quad:e.quad,barcodeImage:d(e.barcodeImage)}))),e.forEach((e=>e.delete()))):o=[],{result:o,originalImage:r}}finally{a&&n.delete()}},beginPdf:async function(e){return i(new o.PdfGenerationContext(e||{}))},addPageToPdf:async function(e,r){f(s(e).addPage(r))},completePdf:async function(e){const r=f(s(e).complete(),d);return u(e),r},beginTiff:async function(e){const r=new o.TiffGenerationContext(e||{});return f(r.begin()),i(r)},addPageToTiff:async function(e,r){const t=s(e);if("string"==typeof r){let e=s(r).nativeImageContainer();const n=f(t.addPageFromContainer(e));return e.delete(),n}return f(t.addPageFromJsImage(p(r)))},completeTiff:async function(e){try{const r=s(e).complete();return f(r,d)}finally{u(e)}},createMRZRecognizer:async function(e){return i(new o.MrzRecognizerContext(e||{}))},recognizeMRZ:async function(e,r){return s(e).recognize(p(r))},releaseObject:async function(e){u(e)},createOcrEngine:async function(e){return i(new o.TLDROcrContext(e||{}))},performOcr:async function(e,r){return s(e).performOcr(p(r))},createGenericTextLineScanner:async function(e){e.languages||(e.languages=["eng"]);return i(new o.GenericTextLineScanner(e))},recognizeTextLine:async function(e,r){return s(e).recognize(p(r))},cleanTextLineRecognitionQueue:async function(e){s(e).cleanRecognitionQueue()},createDocumentQualityAnalyzer:async function(e){return i(new o.DocumentQualityAnalyzer(e||{}))},documentQualityAnalyzerAnalyze:async function(e,r){return s(e).analyze(p(r))},imageProcessorCreate:async function(e){return i(new o.ImageProcessor(p(e)))},imageProcessorCopy:async function(e){return i(s(e).copy())},imageProcessorApplyFilter:async function(e,r){s(e).applyFilter(r)},imageProcessorCrop:async function(e,r){s(e).crop(r)},imageProcessorResize:async function(e,r){s(e).resize(r)},imageProcessorRotate:async function(e,r){s(e).rotate(r)},imageProcessorEncodedProcessedImage:async function(e,r){return f(s(e).encodedProcessedImage(r),d)},__hasModuleFunction:async function(e){return o.hasOwnProperty(e)},__callModuleFunction:async function(e,r=[]){return o[e].apply(r)}};async function l(e){if(!e)return{success:!1,detectionStatus:"Error_License"};const r=m[e.status],t={detectionStatus:r,success:(n=r,"OK"===n.substr(0,2))};var n;return t.original=d(e.originalImageJpegData),t.success&&(t.cropped=d(e.croppedImageJpegData),t.polygon=function(e){if(e.length%2!=0)throw Error("pointCoords size is not even.");const r=[];for(let t=0;t<e.length;t+=2)r.push({x:e[t],y:e[t+1]});return r}(d(e.polygon)),t.horizontalLines=h(d(e.horizontalLines)),t.verticalLines=h(d(e.verticalLines)),t.averageBrightness=e.averageBrightness),e.delete(),t}function d(e){return e&&e.slice()}function f(e,r){try{if(e.errorMessage){throw new Error(e.errorMessage)}return(r||(e=>e))(e.result)}finally{e.delete()}}function h(e){const r=[];if(!e)return r;if(e.length%4!=0)throw Error("lineCoords size invalid.");for(let t=0;t<e.length;t+=4)r.push({p1:{x:e[t],y:e[t+1]},p2:{x:e[t+2],y:e[t+3]}});return r}function p(e){if(!e)throw new Error("null image data or buffer");return"number"==typeof e.width?e:{data:e,width:-1,height:-1}}const m={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(e){const{command:r,args:t,ticket:a}=e.data;o||"initialize"===r?(async()=>await c[r].apply(null,t))().then((e=>{const r=(0,n.gatherTransferables)(e);self.postMessage({ticket:a,result:e},r)})).catch((e=>{const r="number"==typeof e?Error(o.stringFromException(e)):e;console.error(r),self.postMessage({ticket:a,error:r})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(e,r,t){"use strict";(function(e){function t(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.gatherTransferables=function(e,r){const t=[];return function e(n){if(!n)return;if(n.constructor===ImageData){const e={data:n.data.slice(),width:n.width,height:n.height};return t.push(e.data.buffer),e}if(n.constructor===ArrayBuffer){const e=r?n.slice(0):n;if(t.push(e),r)return n}else if(ArrayBuffer.isView(n)){let e;if(r){e=new(0,n.constructor)(n.buffer.slice(0))}else e=n;if(t.push(e.buffer),r)return n}else if(Array.isArray(n))for(let r=0;r<n.length;++r){const t=e(n[r]);t&&(n[r]=t)}else if(n.constructor===Object)for(const r in n)if(n.hasOwnProperty(r)){const t=e(n[r]);t&&(n[r]=t)}}(e),t},r.isRemote=function(e){return e.startsWith("http:")||e.startsWith("https:")},r.areThreadsAvailable=t,r.getBuildType=function(e){const{allowSimd:r=!0,allowThreads:n=!0}=e||{};let o="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){o+="-simd";n&&t()&&(o+="-threads")}return o}}).call(this,t(2))},function(e,r){var t,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var r=c.length;r;){for(u=c,c=[];++d<r;)u&&u[d].run();d=-1,r=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function p(e,r){this.fun=e,this.array=r}function m(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];c.push(new p(e,r)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,t){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function r(){return k.buffer!=F.buffer&&Z(),F}function t(){return k.buffer!=F.buffer&&Z(),S}function o(){return k.buffer!=F.buffer&&Z(),$}function a(){return k.buffer!=F.buffer&&Z(),A}function i(){return k.buffer!=F.buffer&&Z(),D}function s(){return k.buffer!=F.buffer&&Z(),R}function u(){return k.buffer!=F.buffer&&Z(),j}var c,l,d=e;d.ready=new Promise(((e,r)=>{c=e,l=r}));var f,h,p,m=Object.assign({},d),y="./this.program",v=(e,r)=>{throw r},g=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):"",f=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},p=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)},h=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var _,E=d.print||console.log.bind(console),T=d.printErr||console.error.bind(console);Object.assign(d,m),m=null,d.arguments&&d.arguments,d.thisProgram&&(y=d.thisProgram),d.quit&&(v=d.quit),d.wasmBinary&&(_=d.wasmBinary);var k,W,C=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&te("no native wasm support detected");var P,F,S,$,A,D,R,M,j,x=!1;function V(e,r){e||te(r)}function Z(){var e=k.buffer;d.HEAP8=F=new Int8Array(e),d.HEAP16=$=new Int16Array(e),d.HEAPU8=S=new Uint8Array(e),d.HEAPU16=A=new Uint16Array(e),d.HEAP32=D=new Int32Array(e),d.HEAPU32=R=new Uint32Array(e),d.HEAPF32=M=new Float32Array(e),d.HEAPF64=j=new Float64Array(e)}var O,I=d.INITIAL_MEMORY||67108864;if(V(I>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+I+"! (STACK_SIZE=4194304)"),g)k=d.wasmMemory;else if(d.wasmMemory)k=d.wasmMemory;else if(!((k=new WebAssembly.Memory({initial:I/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw T("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(),I=k.buffer.byteLength;var N=[],G=[],z=[],X=0;function U(){return C||X>0}function L(){g||(d.noFSInit||We.init.initialized||We.init(),We.ignorePermissions=!1,be.init(),De(G))}function B(e){N.unshift(e)}var H,Y,K,J=0,Q=null,q=null;function ee(e){J++,d.monitorRunDependencies&&d.monitorRunDependencies(J)}function re(e){if(J--,d.monitorRunDependencies&&d.monitorRunDependencies(J),0==J&&(null!==Q&&(clearInterval(Q),Q=null),q)){var r=q;q=null,r()}}function te(e){d.onAbort&&d.onAbort(e),T(e="Aborted("+e+")"),x=!0,P=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw l(r),r}function ne(e){return e.startsWith("data:application/octet-stream;base64,")}function oe(e){if(e==H&&_)return new Uint8Array(_);if(p)return p(e);throw"both async and sync fetching of the wasm failed"}function ae(e,r,t){return function(e){return _||"function"!=typeof fetch?Promise.resolve().then((()=>oe(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>oe(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{T(`failed to asynchronously prepare wasm: ${e}`),te(e)}))}ne(H="ScanbotSDK.Asm-simd-threads.wasm")||(H=b(H));var ie={1120276:e=>an(function(){return this[Ce(e)].toString()}.apply((0,eval)("(()=>this)()"))),1120390:e=>{throw new Error("Invalid barcode format: "+Ce(e))}};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 r=Ae.pthreads[e];V(r),Ae.returnWorkerToPool(r)},le=e=>{var r=Ae.getNewWorker();if(!r)return 6;Ae.runningWorkers.push(r),Ae.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return r.postMessage(t,e.transferList),0},de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=de.isAbs(e),t="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=de.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return de.normalize(e.join("/"))},join2:(e,r)=>de.normalize(e+"/"+r)},fe=e=>(fe=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);te("initRandomDevice")})())(e),he={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:We.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=de.isAbs(n)}return(r?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=he.resolve(e).substr(1),r=he.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,me=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&pe)return pe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},ye=[],ve=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ge=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function we(e,r,t){var n=t>0?t:ve(e)+1,o=new Array(n),a=ge(e,o,0,o.length);return r&&(o.length=a),o}var be={ttys:[],init(){},shutdown(){},register(e,r){be.ttys[e]={input:[],output:[],ops:r},We.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var r=be.ttys[e.node.rdev];if(!r)throw new We.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new We.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new We.ErrnoError(29)}if(void 0===s&&0===a)throw new We.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new We.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new We.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!ye.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;ye=we(e,!0)}return ye.shift()})(),put_char(e,r){null===r||10===r?(E(me(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(E(me(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(T(me(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(T(me(e.output,0)),e.output=[])}}},_e=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=En(65536,e);return r?((e,r)=>(t().fill(0,e,e+r),e))(r,e):0},Ee={ops_table:null,mount:e=>Ee.createNode(null,"/",16895,0),createNode(e,r,t,n){if(We.isBlkdev(t)||We.isFIFO(t))throw new We.ErrnoError(63);Ee.ops_table||(Ee.ops_table={dir:{node:{getattr:Ee.node_ops.getattr,setattr:Ee.node_ops.setattr,lookup:Ee.node_ops.lookup,mknod:Ee.node_ops.mknod,rename:Ee.node_ops.rename,unlink:Ee.node_ops.unlink,rmdir:Ee.node_ops.rmdir,readdir:Ee.node_ops.readdir,symlink:Ee.node_ops.symlink},stream:{llseek:Ee.stream_ops.llseek}},file:{node:{getattr:Ee.node_ops.getattr,setattr:Ee.node_ops.setattr},stream:{llseek:Ee.stream_ops.llseek,read:Ee.stream_ops.read,write:Ee.stream_ops.write,allocate:Ee.stream_ops.allocate,mmap:Ee.stream_ops.mmap,msync:Ee.stream_ops.msync}},link:{node:{getattr:Ee.node_ops.getattr,setattr:Ee.node_ops.setattr,readlink:Ee.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ee.node_ops.getattr,setattr:Ee.node_ops.setattr},stream:We.chrdev_stream_ops}});var o=We.createNode(e,r,t,n);return We.isDir(o.mode)?(o.node_ops=Ee.ops_table.dir.node,o.stream_ops=Ee.ops_table.dir.stream,o.contents={}):We.isFile(o.mode)?(o.node_ops=Ee.ops_table.file.node,o.stream_ops=Ee.ops_table.file.stream,o.usedBytes=0,o.contents=null):We.isLink(o.mode)?(o.node_ops=Ee.ops_table.link.node,o.stream_ops=Ee.ops_table.link.stream):We.isChrdev(o.mode)&&(o.node_ops=Ee.ops_table.chrdev.node,o.stream_ops=Ee.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=We.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,We.isDir(e.mode)?r.size=4096:We.isFile(e.mode)?r.size=e.usedBytes:We.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Ee.resizeFileStorage(e,r.size)},lookup(e,r){throw We.genericErrors[44]},mknod:(e,r,t,n)=>Ee.createNode(e,r,t,n),rename(e,r,t){if(We.isDir(e.mode)){var n;try{n=We.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new We.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=We.lookupNode(e,r);for(var n in t.contents)throw new We.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=Ee.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!We.isLink(e.mode))throw new We.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,t,n,o,a,i){if(t.buffer===r().buffer&&(i=!1),!o)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=t.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=t.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(t.subarray(n,n+o),a),o}if(Ee.expandFileStorage(s,a+o),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=t[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&We.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new We.ErrnoError(28);return n},allocate(e,r,t){Ee.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,t,n,o,a){if(!We.isFile(e.node.mode))throw new We.ErrnoError(43);var i,s,u=e.node.contents;if(2&a||u.buffer!==r().buffer){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(i=_e(t)))throw new We.ErrnoError(48);r().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(e,r,t,n,o)=>(Ee.stream_ops.write(e,r,0,n,t,!1),0)}},Te=d.preloadPlugins||[],ke=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},We={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=he.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new We.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=We.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=We.lookupNode(n,t[a]),o=de.join2(o,t[a]),We.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;We.isLink(n.mode);){var u=We.readlink(o);if(o=he.resolve(de.dirname(o),u),n=We.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new We.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(We.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%We.nameTable.length},hashAddNode(e){var r=We.hashName(e.parent.id,e.name);e.name_next=We.nameTable[r],We.nameTable[r]=e},hashRemoveNode(e){var r=We.hashName(e.parent.id,e.name);if(We.nameTable[r]===e)We.nameTable[r]=e.name_next;else for(var t=We.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=We.mayLookup(e);if(t)throw new We.ErrnoError(t,e);for(var n=We.hashName(e.id,r),o=We.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return We.lookup(e,r)},createNode(e,r,t,n){var o=new We.FSNode(e,r,t,n);return We.hashAddNode(o),o},destroyNode(e){We.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>We.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=We.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return We.lookupNode(e,r),20}catch(e){}return We.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=We.lookupNode(e,r)}catch(e){return e.errno}var o=We.nodePermissions(e,"wx");if(o)return o;if(t){if(!We.isDir(n.mode))return 54;if(We.isRoot(n)||We.getPath(n)===We.cwd())return 10}else if(We.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?We.isLink(e.mode)?32:We.isDir(e.mode)&&("r"!==We.flagsToPermissionString(r)||512&r)?31:We.nodePermissions(e,We.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=We.MAX_OPEN_FDS;e++)if(!We.streams[e])return e;throw new We.ErrnoError(33)},getStreamChecked(e){var r=We.getStream(e);if(!r)throw new We.ErrnoError(8);return r},getStream:e=>We.streams[e],createStream:(e,r=-1)=>(We.FSStream||(We.FSStream=function(){this.shared={}},We.FSStream.prototype={},Object.defineProperties(We.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 We.FSStream,e),-1==r&&(r=We.nextfd()),e.fd=r,We.streams[r]=e,e),closeStream(e){We.streams[e]=null},chrdev_stream_ops:{open(e){var r=We.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new We.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){We.devices[e]={stream_ops:r}},getDevice:e=>We.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),We.syncFSRequests++,We.syncFSRequests>1&&T(`warning: ${We.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=We.getMounts(We.root.mount),n=0;function o(e){return We.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&We.root)throw new We.ErrnoError(10);if(!o&&!a){var i=We.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,We.isMountpoint(n))throw new We.ErrnoError(10);if(!We.isDir(n.mode))throw new We.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?We.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=We.lookupPath(e,{follow_mount:!1});if(!We.isMountpoint(r.node))throw new We.ErrnoError(28);var t=r.node,n=t.mounted,o=We.getMounts(n);Object.keys(We.nameTable).forEach((e=>{for(var r=We.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&We.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=We.lookupPath(e,{parent:!0}).node,o=de.basename(e);if(!o||"."===o||".."===o)throw new We.ErrnoError(28);var a=We.mayCreate(n,o);if(a)throw new We.ErrnoError(a);if(!n.node_ops.mknod)throw new We.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,We.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,We.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{We.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,We.mknod(e,r,t)),symlink(e,r){if(!he.resolve(e))throw new We.ErrnoError(44);var t=We.lookupPath(r,{parent:!0}).node;if(!t)throw new We.ErrnoError(44);var n=de.basename(r),o=We.mayCreate(t,n);if(o)throw new We.ErrnoError(o);if(!t.node_ops.symlink)throw new We.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=de.dirname(e),a=de.dirname(r),i=de.basename(e),s=de.basename(r);if(t=We.lookupPath(e,{parent:!0}).node,n=We.lookupPath(r,{parent:!0}).node,!t||!n)throw new We.ErrnoError(44);if(t.mount!==n.mount)throw new We.ErrnoError(75);var u,c=We.lookupNode(t,i),l=he.relative(e,a);if("."!==l.charAt(0))throw new We.ErrnoError(28);if("."!==(l=he.relative(r,o)).charAt(0))throw new We.ErrnoError(55);try{u=We.lookupNode(n,s)}catch(e){}if(c!==u){var d=We.isDir(c.mode),f=We.mayDelete(t,i,d);if(f)throw new We.ErrnoError(f);if(f=u?We.mayDelete(n,s,d):We.mayCreate(n,s))throw new We.ErrnoError(f);if(!t.node_ops.rename)throw new We.ErrnoError(63);if(We.isMountpoint(c)||u&&We.isMountpoint(u))throw new We.ErrnoError(10);if(n!==t&&(f=We.nodePermissions(t,"w")))throw new We.ErrnoError(f);We.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{We.hashAddNode(c)}}},rmdir(e){var r=We.lookupPath(e,{parent:!0}).node,t=de.basename(e),n=We.lookupNode(r,t),o=We.mayDelete(r,t,!0);if(o)throw new We.ErrnoError(o);if(!r.node_ops.rmdir)throw new We.ErrnoError(63);if(We.isMountpoint(n))throw new We.ErrnoError(10);r.node_ops.rmdir(r,t),We.destroyNode(n)},readdir(e){var r=We.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new We.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=We.lookupPath(e,{parent:!0}).node;if(!r)throw new We.ErrnoError(44);var t=de.basename(e),n=We.lookupNode(r,t),o=We.mayDelete(r,t,!1);if(o)throw new We.ErrnoError(o);if(!r.node_ops.unlink)throw new We.ErrnoError(63);if(We.isMountpoint(n))throw new We.ErrnoError(10);r.node_ops.unlink(r,t),We.destroyNode(n)},readlink(e){var r=We.lookupPath(e).node;if(!r)throw new We.ErrnoError(44);if(!r.node_ops.readlink)throw new We.ErrnoError(28);return he.resolve(We.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=We.lookupPath(e,{follow:!r}).node;if(!t)throw new We.ErrnoError(44);if(!t.node_ops.getattr)throw new We.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>We.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?We.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new We.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){We.chmod(e,r,!0)},fchmod(e,r){var t=We.getStreamChecked(e);We.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?We.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new We.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){We.chown(e,r,t,!0)},fchown(e,r,t){var n=We.getStreamChecked(e);We.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new We.ErrnoError(28);var t;if(!(t="string"==typeof e?We.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new We.ErrnoError(63);if(We.isDir(t.mode))throw new We.ErrnoError(31);if(!We.isFile(t.mode))throw new We.ErrnoError(28);var n=We.nodePermissions(t,"w");if(n)throw new We.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=We.getStreamChecked(e);if(0==(2097155&t.flags))throw new We.ErrnoError(28);We.truncate(t.node,r)},utime(e,r,t){var n=We.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new We.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=We.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new We.ErrnoError(20)}else n=We.mknod(e,t,0),o=!0;if(!n)throw new We.ErrnoError(44);if(We.isChrdev(n.mode)&&(r&=-513),65536&r&&!We.isDir(n.mode))throw new We.ErrnoError(54);if(!o){var a=We.mayOpen(n,r);if(a)throw new We.ErrnoError(a)}512&r&&!o&&We.truncate(n,0),r&=-131713;var i=We.createStream({node:n,path:We.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&r||(We.readFiles||(We.readFiles={}),e in We.readFiles||(We.readFiles[e]=1)),i},close(e){if(We.isClosed(e))throw new We.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{We.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(We.isClosed(e))throw new We.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new We.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new We.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new We.ErrnoError(28);if(We.isClosed(e))throw new We.ErrnoError(8);if(1==(2097155&e.flags))throw new We.ErrnoError(8);if(We.isDir(e.node.mode))throw new We.ErrnoError(31);if(!e.stream_ops.read)throw new We.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new We.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new We.ErrnoError(28);if(We.isClosed(e))throw new We.ErrnoError(8);if(0==(2097155&e.flags))throw new We.ErrnoError(8);if(We.isDir(e.node.mode))throw new We.ErrnoError(31);if(!e.stream_ops.write)throw new We.ErrnoError(28);e.seekable&&1024&e.flags&&We.llseek(e,0,2);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new We.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(We.isClosed(e))throw new We.ErrnoError(8);if(r<0||t<=0)throw new We.ErrnoError(28);if(0==(2097155&e.flags))throw new We.ErrnoError(8);if(!We.isFile(e.node.mode)&&!We.isDir(e.node.mode))throw new We.ErrnoError(43);if(!e.stream_ops.allocate)throw new We.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new We.ErrnoError(2);if(1==(2097155&e.flags))throw new We.ErrnoError(2);if(!e.stream_ops.mmap)throw new We.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new We.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=We.open(e,r.flags),o=We.stat(e).size,a=new Uint8Array(o);return We.read(n,a,0,o,0),"utf8"===r.encoding?t=me(a,0):"binary"===r.encoding&&(t=a),We.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=We.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ve(r)+1),a=ge(r,o,0,o.length);We.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");We.write(n,r,0,r.byteLength,void 0,t.canOwn)}We.close(n)},cwd:()=>We.currentPath,chdir(e){var r=We.lookupPath(e,{follow:!0});if(null===r.node)throw new We.ErrnoError(44);if(!We.isDir(r.node.mode))throw new We.ErrnoError(54);var t=We.nodePermissions(r.node,"x");if(t)throw new We.ErrnoError(t);We.currentPath=r.path},createDefaultDirectories(){We.mkdir("/tmp"),We.mkdir("/home"),We.mkdir("/home/web_user")},createDefaultDevices(){We.mkdir("/dev"),We.registerDevice(We.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),We.mkdev("/dev/null",We.makedev(1,3)),be.register(We.makedev(5,0),be.default_tty_ops),be.register(We.makedev(6,0),be.default_tty1_ops),We.mkdev("/dev/tty",We.makedev(5,0)),We.mkdev("/dev/tty1",We.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=fe(e).byteLength),e[--r]);We.createDevice("/dev","random",t),We.createDevice("/dev","urandom",t),We.mkdir("/dev/shm"),We.mkdir("/dev/shm/tmp")},createSpecialDirectories(){We.mkdir("/proc");var e=We.mkdir("/proc/self");We.mkdir("/proc/self/fd"),We.mount({mount(){var r=We.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=We.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?We.createDevice("/dev","stdin",d.stdin):We.symlink("/dev/tty","/dev/stdin"),d.stdout?We.createDevice("/dev","stdout",null,d.stdout):We.symlink("/dev/tty","/dev/stdout"),d.stderr?We.createDevice("/dev","stderr",null,d.stderr):We.symlink("/dev/tty1","/dev/stderr"),We.open("/dev/stdin",0),We.open("/dev/stdout",1),We.open("/dev/stderr",1)},ensureErrnoError(){We.ErrnoError||(We.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},We.ErrnoError.prototype=new Error,We.ErrnoError.prototype.constructor=We.ErrnoError,[44].forEach((e=>{We.genericErrors[e]=new We.ErrnoError(e),We.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){We.ensureErrnoError(),We.nameTable=new Array(4096),We.mount(Ee,{},"/"),We.createDefaultDirectories(),We.createDefaultDevices(),We.createSpecialDirectories(),We.filesystems={MEMFS:Ee}},init(e,r,t){We.init.initialized=!0,We.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=r||d.stdout,d.stderr=t||d.stderr,We.createStandardStreams()},quit(){We.init.initialized=!1;for(var e=0;e<We.streams.length;e++){var r=We.streams[e];r&&We.close(r)}},findObject(e,r){var t=We.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=We.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=We.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=de.basename(e),n=We.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:We.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=de.join2(e,a);try{We.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=de.join2("string"==typeof e?e:We.getPath(e),r),i=ke(n,o);return We.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:We.getPath(e),i=r?de.join2(e,r):e);var s=ke(n,o),u=We.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}We.chmod(u,146|s);var f=We.open(u,577);We.write(f,t,0,t.length,0,a),We.close(f),We.chmod(u,s)}return u},createDevice(e,r,t,n){var o=de.join2("string"==typeof e?e:We.getPath(e),r),a=ke(!!t,!!n);We.createDevice.major||(We.createDevice.major=64);var i=We.makedev(We.createDevice.major++,0);return We.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new We.ErrnoError(29)}if(void 0===u&&0===i)throw new We.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new We.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),We.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=we(f(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new We.ErrnoError(29)}},createLazyFile(e,t,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=t);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,t-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):we(o.responseText||"",!0)})(r,o)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=We.createFile(e,t,u,o,a);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,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((e=>{var r=c.stream_ops[e];l[e]=function(){return We.forceLoadFile(c),r.apply(null,arguments)}})),l.read=(e,r,t,n,o)=>(We.forceLoadFile(c),d(e,r,t,n,o)),l.mmap=(e,t,n,o,a)=>{We.forceLoadFile(c);var i=_e(t);if(!i)throw new We.ErrnoError(48);return d(e,r(),i,t,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},Ce=(e,r)=>e?me(t(),e,r):"",Pe={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(de.isAbs(r))return r;var n;if(n=-100===e?We.cwd():Pe.getStreamFromFD(e).path,0==r.length){if(!t)throw new We.ErrnoError(44);return n}return de.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&de.normalize(r)!==de.normalize(We.getPath(e.node)))return-54;throw e}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=K[0],i()[t+28>>2]=K[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=K[0],i()[t+44>>2]=K[1],s()[t+48>>2]=o%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(Y=Math.floor(a/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=K[0],i()[t+60>>2]=K[1],s()[t+64>>2]=a%1e3*1e3,K=[Math.floor(u/1e3)>>>0,(Y=Math.floor(u/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=K[0],i()[t+76>>2]=K[1],s()[t+80>>2]=u%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=K[0],i()[t+92>>2]=K[1],0},doMsync(e,r,n,o,a){if(!We.isFile(r.node.mode))throw new We.ErrnoError(43);if(2&o)return 0;var i=t().slice(e,e+n);We.msync(r,i,a,n,o)},varargs:void 0,get(){var e=i()[Pe.varargs>>2];return Pe.varargs+=4,e},getp:()=>Pe.get(),getStr:e=>Ce(e),getStreamFromFD:e=>We.getStreamChecked(e)};function Fe(e){if(g)return At(0,1,e);P=e,U()||(Ae.terminateAllThreads(),d.onExit&&d.onExit(e),x=!0),v(e,new se(e))}var Se=(e,r)=>{if(P=e,g)throw Re(e),"unwind";Fe(e)},$e=e=>{if(e instanceof se||"unwind"==e)return P;v(1,e)},Ae={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){g?Ae.initWorker():Ae.initMainThread()},initMainThread(){for(var e=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));e--;)Ae.allocateUnusedWorker();B((()=>{ee(),Ae.loadWasmModuleToAllWorkers((()=>re()))}))},initWorker(){C=!1},setExitStatus:e=>{P=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Ae.runningWorkers)ue(e);for(var e of Ae.unusedWorkers)ue(e);Ae.unusedWorkers=[],Ae.runningWorkers=[],Ae.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete Ae.pthreads[r],Ae.unusedWorkers.push(e),Ae.runningWorkers.splice(Ae.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Cn(r)},receiveObjectTransfer(e){},threadInitTLS(){Ae.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((r=>{e.onmessage=t=>{var n=t.data,o=n.cmd;if(n.targetThread&&n.targetThread!=bn()){var a=Ae.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):T(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?St():"spawnThread"===o?le(n):"cleanupThread"===o?ce(n.thread):"killThread"===o?(e=>{var r=Ae.pthreads[e];delete Ae.pthreads[e],ue(r),Cn(e),Ae.runningWorkers.splice(Ae.runningWorkers.indexOf(r),1),r.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Ae.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,r(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&T(`worker sent an unknown command ${o}`)}},e.onerror=e=>{throw T(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var t=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&t.push(o);e.postMessage({cmd:"load",handlers:t,urlOrBlob:d.mainScriptUrlOrBlob||n,wasmMemory:k,wasmModule:W})})),loadWasmModuleToAllWorkers(e){if(g)return e();Promise.all(Ae.unusedWorkers.map(Ae.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e,r=b("ScanbotSDK.Asm-simd-threads.worker.js");e=new Worker(r),Ae.unusedWorkers.push(e)},getNewWorker:()=>(0==Ae.unusedWorkers.length&&(Ae.allocateUnusedWorker(),Ae.loadWasmModuleToWorker(Ae.unusedWorkers[0])),Ae.unusedWorkers.pop())};d.PThread=Ae;var De=e=>{for(;e.length>0;)e.shift()(d)};function Re(e){if(g)return At(1,0,e);Se(e)}d.establishStackSpace=()=>{var e=bn(),r=i()[e+52>>2],t=i()[e+56>>2];$n(r,r-t),Dn(r)};var Me=[],je=e=>{var r=Me[e];return r||(e>=Me.length&&(Me.length=e+1),Me[e]=r=O.get(e)),r};d.invokeEntryPoint=(e,r)=>{!function(e){U()?Ae.setExitStatus(e):Pn(e)}(je(e)(r))};var xe=e=>{Ae.tlsInitFunctions.push(e)},Ve=[],Ze=0,Oe=0;function Ie(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,r()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=r()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,r()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=r()[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Vn(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Ne=e=>{var r=Oe;if(!r)return _n(0),0;var t=new Ie(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return _n(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(xn(a,n,i))return _n(a),r}return _n(n),r},Ge=()=>{var e=Ve.pop();e||te("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(Ve.push(e),e.set_rethrown(!0),e.set_caught(!1),Ze++),Oe=r};function ze(e,r,t,n){return g?At(2,1,e,r,t,n):Xe(e,r,t,n)}var Xe=(e,r,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return T("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(g&&0===o.length)return ze(e,r,t,n);var a={startRoutine:t,pthread_ptr:e,arg:n,transferList:o};return g?(a.cmd="spawnThread",postMessage(a,o),0):le(a)};function Ue(e,r,t,n,o){if(g)return At(3,1,e,r,t,n,o);try{for(var a=0,s=r?i()[r>>2]:0,u=r?i()[r+4>>2]:0,c=t?i()[t>>2]:0,l=t?i()[t+4>>2]:0,d=n?i()[n>>2]:0,f=n?i()[n+4>>2]:0,h=0,p=0,m=0,y=0,v=0,w=0,b=(r?i()[r>>2]:0)|(t?i()[t>>2]:0)|(n?i()[n>>2]:0),_=(r?i()[r+4>>2]:0)|(t?i()[t+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(e,r,t,n){return e<32?r&n:t&n},T=0;T<e;T++){var k=1<<T%32;if(E(T,b,_,k)){var W=Pe.getStreamFromFD(T),C=Pe.DEFAULT_POLLMASK;if(W.stream_ops.poll){var P=-1;o&&(P=1e3*((r?i()[o>>2]:0)+(r?i()[o+8>>2]:0)/1e6)),C=W.stream_ops.poll(W,P)}1&C&&E(T,s,u,k)&&(T<32?h|=k:p|=k,a++),4&C&&E(T,c,l,k)&&(T<32?m|=k:y|=k,a++),2&C&&E(T,d,f,k)&&(T<32?v|=k:w|=k,a++)}}return r&&(i()[r>>2]=h,i()[r+4>>2]=p),t&&(i()[t>>2]=m,i()[t+4>>2]=y),n&&(i()[n>>2]=v,i()[n+4>>2]=w),a}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Le(e,r,t){if(g)return At(4,1,e,r,t);Pe.varargs=t;try{var n=Pe.getStreamFromFD(e);switch(r){case 0:if((a=Pe.get())<0)return-28;for(;We.streams[a];)a++;return We.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Pe.get();return n.flags|=a,0;case 5:return a=Pe.getp(),o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[wn()>>2]=s,-1}}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Be(e,r){if(g)return At(5,1,e,r);try{var t=Pe.getStreamFromFD(e);return Pe.doStat(We.stat,t.path,r)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function He(e,t,n){if(g)return At(6,1,e,t,n);Pe.varargs=n;try{var a=Pe.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=Pe.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)r()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=Pe.getp();var l=i()[u>>2],d=i()[u+4>>2],f=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(r()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:return a.tty?(u=Pe.getp(),i()[u>>2]=0,0):-59;case 21520:return a.tty?-28:-59;case 21531:return u=Pe.getp(),We.ioctl(a,t,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=Pe.getp(),o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e,r,t,n){if(g)return At(8,1,e,r,t,n);try{r=Pe.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=Pe.calculateAt(e,r,a),Pe.doStat(o?We.lstat:We.stat,r,t)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ke(e,r,t,n){if(g)return At(9,1,e,r,t,n);Pe.varargs=n;try{r=Pe.getStr(r),r=Pe.calculateAt(e,r);var o=n?Pe.get():0;return We.open(r,t,o).fd}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e){if(g)return At(10,1,e);try{return e=Pe.getStr(e),We.rmdir(e),0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Qe(e,r){if(g)return At(11,1,e,r);try{return e=Pe.getStr(e),Pe.doStat(We.stat,e,r)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function qe(e,r,t){if(g)return At(12,1,e,r,t);try{return r=Pe.getStr(r),r=Pe.calculateAt(e,r),0===t?We.unlink(r):512===t?We.rmdir(r):te("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}var er={},rr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function tr(e){return this.fromWireType(i()[e>>2])}var nr={},or={},ar={},ir=void 0,sr=e=>{throw new ir(e)},ur=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&sr("Mismatched type converter count");for(var o=0;o<e.length;++o)pr(e[o],n[o])}e.forEach((function(e){ar[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{or.hasOwnProperty(e)?o[r]=or[e]:(a.push(e),nr.hasOwnProperty(e)||(nr[e]=[]),nr[e].push((()=>{o[r]=or[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},cr={},lr=void 0,dr=e=>{for(var r="",n=e;t()[n];)r+=lr[t()[n++]];return r},fr=void 0,hr=e=>{throw new fr(e)};function pr(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||hr(`type "${n}" must have a positive integer typeid pointer`),or.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;hr(`Cannot register type '${n}' twice`)}if(or[e]=r,delete ar[e],nr.hasOwnProperty(e)){var o=nr[e];delete nr[e],o.forEach((e=>e()))}}(e,r,t)}var mr=8;function yr(e){if(!(this instanceof Zr))return!1;if(!(e instanceof Zr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}var vr=e=>{hr(e.$$.ptrType.registeredClass.name+" instance already deleted")},gr=!1,wr=e=>{},br=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},_r=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=_r(e,r,t.baseClass);return null===n?null:t.downcast(n)},Er={},Tr=()=>Object.keys(Sr).length,kr=()=>{var e=[];for(var r in Sr)Sr.hasOwnProperty(r)&&e.push(Sr[r]);return e},Wr=[],Cr=()=>{for(;Wr.length;){var e=Wr.pop();e.$$.deleteScheduled=!1,e.delete()}},Pr=void 0,Fr=e=>{Pr=e,Wr.length&&Pr&&Pr(Cr)},Sr={},$r=(e,r)=>(r=((e,r)=>{for(void 0===r&&hr("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),Sr[r]),Ar=(e,r)=>(r.ptrType&&r.ptr||sr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&sr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Rr(Object.create(e,{$$:{value:r}})));function Dr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=$r(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ar(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Ar(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Er[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=_r(r,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ar(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):Ar(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Rr=e=>"undefined"==typeof FinalizationRegistry?(Rr=e=>e,e):(gr=new FinalizationRegistry((e=>{br(e.$$)})),Rr=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};gr.register(e,t,e)}return e},wr=e=>gr.unregister(e),Rr(e));function Mr(){if(this.$$.ptr||vr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=Rr(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function jr(){this.$$.ptr||vr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&hr("Object already scheduled for deletion"),wr(this),br(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xr(){return!this.$$.ptr}function Vr(){return this.$$.ptr||vr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&hr("Object already scheduled for deletion"),Wr.push(this),1===Wr.length&&Pr&&Pr(Cr),this.$$.deleteScheduled=!0,this}function Zr(){}var Or=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e};function Ir(e,r){return{[e=Or(e)]:function(){return r.apply(this,arguments)}}[e]}var Nr=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||hr(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Gr=(e,r,t)=>{d.hasOwnProperty(e)?((void 0===t||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[t])&&hr(`Cannot register public name '${e}' twice`),Nr(d,e,e),d.hasOwnProperty(t)&&hr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[e].overloadTable[t]=r):(d[e]=r,void 0!==t&&(d[e].numArguments=t))};function zr(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Xr=(e,r,t)=>{for(;r!==t;)r.upcast||hr(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function Ur(e,r){if(null===r)return this.isReference&&hr(`null is not a valid ${this.name}`),0;r.$$||hr(`Cannot pass "${yt(r)}" as a ${this.name}`),r.$$.ptr||hr(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Xr(r.$$.ptr,t,this.registeredClass)}function Lr(e,r){var t;if(null===r)return this.isReference&&hr(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||hr(`Cannot pass "${yt(r)}" as a ${this.name}`),r.$$.ptr||hr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&hr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=Xr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&hr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:hr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,ht.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:hr("Unsupporting sharing policy")}return t}function Br(e,r){if(null===r)return this.isReference&&hr(`null is not a valid ${this.name}`),0;r.$$||hr(`Cannot pass "${yt(r)}" as a ${this.name}`),r.$$.ptr||hr(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&hr(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Xr(r.$$.ptr,t,this.registeredClass)}function Hr(e){return this.fromWireType(s()[e>>2])}function Yr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Kr(e){this.rawDestructor&&this.rawDestructor(e)}var Jr=e=>{null!==e&&e.delete()};function Qr(e,r,t,n,o,a,i,s,u,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==r.baseClass?this.toWireType=Lr:n?(this.toWireType=Ur,this.destructorFunction=null):(this.toWireType=Br,this.destructorFunction=null)}var qr=(e,r,t)=>{d.hasOwnProperty(e)||sr("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==t?d[e].overloadTable[t]=r:(d[e]=r,d[e].argCount=t)},et=(e,r,t)=>e.includes("j")?((e,r,t)=>{var n=d["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):je(r).apply(null,t),rt=(e,r)=>{var t,n,o,a=(e=dr(e)).includes("j")?(t=e,n=r,o=[],function(){return o.length=0,Object.assign(o,arguments),et(t,n,o)}):je(r);return"function"!=typeof a&&hr(`unknown function pointer with signature ${e}: ${r}`),a},tt=void 0,nt=e=>{var r=Tn(e),t=dr(r);return gn(r),t},ot=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||or[r]||(ar[r]?ar[r].forEach(e):(t.push(r),n[r]=!0))})),new tt(`${e}: `+t.map(nt).join([", "]))},at=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(s()[r+4*n>>2]);return t};function it(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=Ir(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function st(e,r,t,n,o,a){var i=r.length;i<2&&hr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,c=1;c<r.length;++c)if(null!==r[c]&&void 0===r[c].destructorFunction){u=!0;break}var l="void"!==r[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${Or(e)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[hr,n,o,rr,r[0],r[1]];for(s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+r[c+2].name+"\n",m.push("argType"+c),y.push(r[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(l||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<r.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==r[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+r[c].name+"\n",m.push(v+"_dtor"),y.push(r[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),it(Function,m).apply(null,y)}var ut=(e,r,t)=>(e instanceof Object||hr(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||hr(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||hr(`cannot call emscripten binding method ${t} on deleted object`),Xr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass));function ct(){this.allocated=[void 0],this.freelist=[]}var lt=new ct,dt=e=>{e>=lt.reserved&&0==--lt.get(e).refcount&<.free(e)},ft=()=>{for(var e=0,r=lt.reserved;r<lt.allocated.length;++r)void 0!==lt.allocated[r]&&++e;return e},ht={toValue:e=>(e||hr("Cannot use deleted val. handle = "+e),lt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return lt.allocate({refcount:1,value:e})}}},pt=(e,n,u)=>{switch(n){case 1:return u?function(e){return this.fromWireType(r()[e>>0])}:function(e){return this.fromWireType(t()[e>>0])};case 2:return u?function(e){return this.fromWireType(o()[e>>1])}:function(e){return this.fromWireType(a()[e>>1])};case 4:return u?function(e){return this.fromWireType(i()[e>>2])}:function(e){return this.fromWireType(s()[e>>2])};default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},mt=(e,r)=>{var t=or[e];return void 0===t&&hr(r+" has unknown type "+nt(e)),t},yt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},vt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType((k.buffer!=F.buffer&&Z(),M)[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},gt=(e,n,u)=>{switch(n){case 1:return u?e=>r()[e>>0]:e=>t()[e>>0];case 2:return u?e=>o()[e>>1]:e=>a()[e>>1];case 4:return u?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},wt=(e,r,n)=>ge(e,t(),r,n),bt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,_t=(e,r)=>{for(var n=e,i=n>>1,s=i+r/2;!(i>=s)&&a()[i];)++i;if((n=i<<1)-e>32&&bt)return bt.decode(t().slice(e,n));for(var u="",c=0;!(c>=r/2);++c){var l=o()[e+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},Et=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var s=e.charCodeAt(i);o()[r>>1]=s,r+=2}return o()[r>>1]=0,r-n},Tt=e=>2*e.length,kt=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=i()[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Wt=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),i()[r>>2]=s,(r+=4)+4>o)break}return i()[r>>2]=0,r-n},Ct=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Pt=e=>{if(!x)try{e(),(()=>{if(!U())try{g?Pn(P):Se(P)}catch(e){$e(e)}})()}catch(e){$e(e)}},Ft=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),e>>2,e).value.then(St);var r=e+128;Atomics.store(i(),r>>2,1)}};d.__emscripten_thread_mailbox_await=Ft;var St=()=>{var e=bn();e&&(Ft(e),Pt((()=>Fn())))};d.checkMailbox=St;var $t=e=>{var r=An(),t=e();return Dn(r),t},At=function(e,r){var t=arguments.length-2,n=arguments;return $t((()=>{for(var o=t,a=Rn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Wn(e,o,a,r)}))},Dt=[],Rt={},Mt=e=>{var r=Rt[e];return void 0===r?dr(e):r},jt=[],xt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Vt=[],Zt=e=>e%4==0&&(e%100!=0||e%400==0),Ot=[0,31,60,91,121,152,182,213,244,274,305,335],It=[0,31,59,90,120,151,181,212,243,273,304,334],Nt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN;function Gt(e,r,t,n,o,a,i){if(g)return At(14,1,e,r,t,n,o,a,i);var s=Nt(a,i);try{if(isNaN(s))return 61;var u=Pe.getStreamFromFD(o);2&t&&Pe.doMsync(e,u,r,n,s),We.munmap(u)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}var zt,Xt=e=>{var r=ve(e)+1,t=vn(r);return t&&wt(e,t,r),t},Ut=[],Lt=(e,r,n)=>{var o=((e,r)=>{var n;for(Ut.length=0;n=t()[e++];)r+=105!=n&&r%8?4:0,Ut.push(105==n?i()[r>>2]:u()[r>>3]),r+=105==n?4:8;return Ut})(r,n);return ie[e].apply(null,o)};zt=()=>performance.timeOrigin+performance.now();var Bt=e=>{var r=(e-k.buffer.byteLength+65535)/65536;try{return k.grow(r),Z(),1}catch(e){}},Ht={},Yt=()=>{if(!Yt.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",_:y||"./this.program"};for(var r in Ht)void 0===Ht[r]?delete e[r]:e[r]=Ht[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Yt.strings=t}return Yt.strings},Kt=function(e,t){if(g)return At(15,1,e,t);var n=0;return Yt().forEach(((o,a)=>{var i=t+n;s()[e+4*a>>2]=i,((e,t)=>{for(var n=0;n<e.length;++n)r()[t++>>0]=e.charCodeAt(n);r()[t>>0]=0})(o,i),n+=o.length+1})),0},Jt=function(e,r){if(g)return At(16,1,e,r);var t=Yt();s()[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),s()[r>>2]=n,0};function Qt(e){if(g)return At(17,1,e);try{var r=Pe.getStreamFromFD(e);return We.close(r),0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return e.errno}}function qt(e,t,n,o){if(g)return At(18,1,e,t,n,o);try{var a=((e,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=We.read(e,r(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})(Pe.getStreamFromFD(e),t,n);return s()[o>>2]=a,0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return e.errno}}function en(e,r,t,n,o){if(g)return At(19,1,e,r,t,n,o);var a=Nt(r,t);try{if(isNaN(a))return 61;var s=Pe.getStreamFromFD(e);return We.llseek(s,a,n),K=[s.position>>>0,(Y=s.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[o>>2]=K[0],i()[o+4>>2]=K[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t,n,o){if(g)return At(20,1,e,t,n,o);try{var a=((e,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=We.write(e,r(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})(Pe.getStreamFromFD(e),t,n);return s()[o>>2]=a,0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return e.errno}}var tn=[31,29,31,30,31,30,31,31,30,31,30,31],nn=[31,28,31,30,31,30,31,31,30,31,30,31],on=(e,t,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Ce(a):""},c=Ce(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 f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function m(e,r){return p(e,r,"0")}function y(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function 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 g(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Zt(t.getFullYear()),o=t.getMonth(),a=(n?tn:nn)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=v(t),a=v(n);return y(o,r)<=0?y(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var w={"%a":e=>f[e.tm_wday].substring(0,3),"%A":e=>f[e.tm_wday],"%b":e=>h[e.tm_mon].substring(0,3),"%B":e=>h[e.tm_mon],"%C":e=>m((e.tm_year+1900)/100|0,2),"%d":e=>m(e.tm_mday,2),"%e":e=>p(e.tm_mday,2," "),"%g":e=>g(e).toString().substring(2),"%G":e=>g(e),"%H":e=>m(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),m(r,2)},"%j":e=>m(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(Zt(e.tm_year+1900)?tn:nn,e.tm_mon-1),3),"%m":e=>m(e.tm_mon+1,2),"%M":e=>m(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>m(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return m(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Zt(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Zt(e.tm_year%400-1))&&r++}return m(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return m(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),w)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),w[d](u)));var b,_,E=we(c=c.replace(/\0\0/g,"%"),!1);return E.length>t?0:(b=E,_=e,r().set(b,_),E.length-1)},an=Xt;Ae.init();var sn,un,cn,ln=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=We.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},dn=365,fn=146;Object.defineProperties(ln.prototype,{read:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=-366}},write:{get:function(){return(this.mode&fn)===fn},set:function(e){e?this.mode|=fn:this.mode&=-147}},isFolder:{get:function(){return We.isDir(this.mode)}},isDevice:{get:function(){return We.isChrdev(this.mode)}}}),We.FSNode=ln,We.createPreloadedFile=(e,r,t,n,o,a,i,s,u,c)=>{var l=r?he.resolve(de.join2(e,r)):e;function d(t){function d(t){c&&c(),s||We.createDataFile(e,r,t,n,o,u),a&&a(),re()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Te.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,l,d,(()=>{i&&i(),re()}))||d(t)}ee(),"string"==typeof t?((e,r,t,n)=>{var o=n?"":`al ${e}`;h(e,(t=>{V(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&re()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&ee()})(t,(e=>d(e)),i):d(t)},We.staticInit(),ir=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);lr=e})(),fr=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Zr.prototype.isAliasOf=yr,Zr.prototype.clone=Mr,Zr.prototype.delete=jr,Zr.prototype.isDeleted=xr,Zr.prototype.deleteLater=Vr,d.getInheritedInstanceCount=Tr,d.getLiveInheritedInstances=kr,d.flushPendingDeletes=Cr,d.setDelayFunction=Fr,Qr.prototype.getPointee=Yr,Qr.prototype.destructor=Kr,Qr.prototype.argPackAdvance=mr,Qr.prototype.readValueFromPointer=Hr,Qr.prototype.deleteObject=Jr,Qr.prototype.fromWireType=Dr,tt=d.UnboundTypeError=(sn=Error,(cn=Ir(un="UnboundTypeError",(function(e){this.name=un,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(sn.prototype),cn.prototype.constructor=cn,cn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},cn),Object.assign(ct.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),lt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),lt.reserved=lt.allocated.length,d.count_emval_handles=ft;var hn,pn=[Fe,Re,ze,Ue,Le,Be,He,function(e,r){if(g)return At(7,1,e,r);try{return e=Pe.getStr(e),Pe.doStat(We.lstat,e,r)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}},Ye,Ke,Je,Qe,qe,function(e,r,t,n,o,a,u,c){if(g)return At(13,1,e,r,t,n,o,a,u,c);var l=Nt(o,a);try{if(isNaN(l))return 61;var d=Pe.getStreamFromFD(n),f=We.mmap(d,e,l,r,t),h=f.ptr;return i()[u>>2]=f.allocated,s()[c>>2]=h,0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}},Gt,Kt,Jt,Qt,qt,en,rn],mn={u:e=>{var r=new Ie(e);return r.get_caught()||(r.set_caught(!0),Ze--),r.set_rethrown(!1),Ve.push(r),jn(r.excPtr),r.get_exception_ptr()},Eb:()=>{if(!Ve.length)return 0;var e=Ve[Ve.length-1];return jn(e.excPtr),e.excPtr},z:()=>{Sn(0,0);var e=Ve.pop();Mn(e.excPtr),Oe=0},b:()=>Ne([]),h:e=>Ne([e]),G:(e,r)=>Ne([e,r]),Da:Ge,Db:e=>{if(e){var r=new Ie(e);Ve.push(r),r.set_rethrown(!0),Ge()}},p:(e,r,t)=>{throw new Ie(e).init(r,t),Ze++,Oe=e},Fb:()=>Ze,Rb:e=>{kn(e,!1,1,!0,4194304,!1),Ae.threadInitTLS()},Ma:e=>{g?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},Ob:Xe,e:e=>{throw Oe||(Oe=e),Oe},Lb:Ue,Pa:Le,Wb:Be,Xb:He,Ub:Ye,Qa:Ke,Mb:Je,Vb:Qe,Nb:qe,ob:e=>{var r=er[e];delete er[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;ur([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],u=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];u(c,e,s.toWireType(t,r)),rr(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==e&&e.push(i,s),s},argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:i}]}))},nb:e=>{var r=cr[e];delete cr[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));ur([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],l=r.setter,d=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];l(d,e,c.toWireType(t,r)),rr(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:n}]}))},yb:(e,r,t,n,o)=>{},ac:(e,r,n,o)=>{pr(e,{name:r=dr(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?n:o},argPackAdvance:mr,readValueFromPointer:function(e){return this.fromWireType(t()[e])},destructorFunction:null})},V:(e,r,t,n,o,a,i,s,u,c,l,d,f)=>{l=dr(l),a=rt(o,a),s&&(s=rt(i,s)),c&&(c=rt(u,c)),f=rt(d,f);var h=Or(l);Gr(h,(function(){ot(`Cannot construct ${l} due to unbound types`,[n])})),ur([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:Zr.prototype;var i=Ir(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new fr("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new fr(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new fr(`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(o,{constructor:{value:i}});i.prototype=u;var d=new zr(l,i,u,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Qr(l,d,!0,!1,!1),m=new Qr(l+"*",d,!1,!1,!1),y=new Qr(l+" const*",d,!1,!0,!1);return Er[e]={pointerType:m,constPointerType:y},qr(h,i),[p,m,y]}))},Ja:(e,r,t,n,o,a)=>{var i=at(r,t);o=rt(n,o),ur([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new fr(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{ot(`Cannot construct ${e.name} due to unbound types`,i)},ur([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=st(t,n,null,o,a),[]))),[]}))},Ia:(e,r,t,n,o,a,i,s,u)=>{var c=at(t,n);r=dr(r),a=rt(o,a),ur([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){ot(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var l=e.registeredClass.instancePrototype,d=l[r];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===t-2?(o.argCount=t-2,o.className=e.name,l[r]=o):(Nr(l,r,n),l[r].overloadTable[t-2]=o),ur([],c,(function(o){var s=st(n,o,e,a,i,u);return void 0===l[r].overloadTable?(s.argCount=t-2,l[r]=s):l[r].overloadTable[t-2]=s,[]})),[]}))},I:(e,r,t,n,o,a,i,s,u,c)=>{r=dr(r),o=rt(n,o),ur([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,l={get(){ot(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>ot(`Cannot access ${n} due to unbound types`,[t,i]):e=>hr(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,l),ur([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var r=ut(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(u){u=rt(s,u);var d=t[1];l.set=function(r){var t=ut(this,e,n+" setter"),o=[];u(c,t,d.toWireType(o,r)),rr(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,l),[]})),[]}))},$b:(e,r)=>{pr(e,{name:r=dr(r),fromWireType:e=>{var r=ht.toValue(e);return dt(e),r},toWireType:(e,r)=>ht.toHandle(r),argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:null})},pb:(e,r,t,n)=>{function o(){}r=dr(r),o.values={},pr(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:mr,readValueFromPointer:pt(r,t,n),destructorFunction:null}),Gr(r,o)},Y:(e,r,t)=>{var n=mt(e,"enum");r=dr(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Ir(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},Sa:(e,r,t)=>{pr(e,{name:r=dr(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:mr,readValueFromPointer:vt(r,t),destructorFunction:null})},la:(e,r,t,n,o,a,i)=>{var s=at(r,t);e=dr(e),o=rt(n,o),Gr(e,(function(){ot(`Cannot call ${e} due to unbound types`,s)}),r-1),ur([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return qr(e,st(e,n,null,o,a,i),r-1),[]}))},R:(e,r,t,n,o)=>{r=dr(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");pr(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:mr,readValueFromPointer:gt(r,t,0!==n),destructorFunction:null})},F:(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function a(e){var t=s()[e>>2],n=s()[e+4>>2];return new o(r().buffer,n,t)}pr(e,{name:n=dr(n),fromWireType:a,argPackAdvance:mr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Ra:(e,r)=>{var n="std::string"===(r=dr(r));pr(e,{name:r,fromWireType:e=>{var r,o=s()[e>>2],a=e+4;if(n)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==t()[c]){var l=Ce(i,c-i);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),i=c+1}}else{var d=new Array(o);for(u=0;u<o;++u)d[u]=String.fromCharCode(t()[a+u]);r=d.join("")}return gn(e),r},toWireType:(e,r)=>{var o;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||hr("Cannot pass non-string to std::string"),o=n&&a?ve(r):r.length;var i=vn(4+o+1),u=i+4;if(s()[i>>2]=o,n&&a)wt(r,u,o+1);else if(a)for(var c=0;c<o;++c){var l=r.charCodeAt(c);l>255&&(gn(u),hr("String has UTF-16 code units that do not fit in 8 bits")),t()[u+c]=l}else for(c=0;c<o;++c)t()[u+c]=r[c];return null!==e&&e.push(gn,i),i},argPackAdvance:mr,readValueFromPointer:Hr,destructorFunction:e=>gn(e)})},xa:(e,r,t)=>{var n,o,i,u,c;t=dr(t),2===r?(n=_t,o=Et,u=Tt,i=()=>a(),c=1):4===r&&(n=kt,o=Wt,u=Ct,i=()=>s(),c=2),pr(e,{name:t,fromWireType:e=>{for(var t,o=s()[e>>2],a=i(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==a[d>>c]){var f=n(u,d-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=d+r}}return gn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&hr(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=vn(4+a+r);return s()[i>>2]=a>>c,o(n,i+4,a+r),null!==e&&e.push(gn,i),i},argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:e=>gn(e)})},Ha:(e,r,t,n,o,a)=>{er[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),elements:[]}},Ga:(e,r,t,n,o,a,i,s,u)=>{er[e].elements.push({getterReturnType:r,getter:rt(t,n),getterContext:o,setterArgumentType:a,setter:rt(i,s),setterContext:u})},S:(e,r,t,n,o,a)=>{cr[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),fields:[]}},E:(e,r,t,n,o,a,i,s,u,c)=>{cr[e].fields.push({fieldName:dr(r),getterReturnType:t,getter:rt(n,o),getterContext:a,setterArgumentType:i,setter:rt(s,u),setterContext:c})},bc:(e,r)=>{pr(e,{isVoid:!0,name:r=dr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},_b:()=>!0,Jb:(e,r,t)=>{if(e==r)setTimeout((()=>St()));else if(g)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Ae.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Pb:(e,r,t,n)=>{Dt.length=t;for(var o=n>>3,a=0;a<t;a++)Dt[a]=u()[o+a];var i=e<0?ie[-e-1]:pn[e];Ae.currentProxiedOperationCallerThread=r;var s=i.apply(null,Dt);return Ae.currentProxiedOperationCallerThread=0,s},Qb:Ft,Zb:e=>{},Gb:()=>{throw 1/0},O:(e,r,t)=>{e=ht.toValue(e),r=mt(r,"emval::as");var n=[],o=ht.toHandle(n);return s()[t>>2]=o,r.toWireType(n,e)},Ea:(e,r,t,n,o)=>(e=jt[e])(r=ht.toValue(r),t=Mt(t),(e=>{var r=[];return s()[e>>2]=ht.toHandle(r),r})(n),o),ta:(e,r,t,n)=>{(e=jt[e])(r=ht.toValue(r),t=Mt(t),null,n)},xb:dt,ra:e=>0===e?ht.toHandle(xt()):(e=Mt(e),ht.toHandle(xt()[e])),da:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=mt(s()[r+4*n>>2],"parameter "+n);return t})(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Vt[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<e-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(t[1+l]);var d="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(l=0;l<e-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[l+1].argPackAdvance;for(d+=" var rv = handle[name]("+c+");\n",l=0;l<e-1;++l)t[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",i.push(d);var h,p,m=it(Function,i).apply(null,u);return h=m,p=jt.length,jt.push(h),a=p,Vt[o]=a,a},lb:(e,r)=>(e=ht.toValue(e),r=ht.toValue(r),ht.toHandle(e[r])),ka:e=>{e>4&&(lt.get(e).refcount+=1)},fb:(e,r)=>(e=ht.toValue(e))instanceof(r=ht.toValue(r)),gb:e=>"string"==typeof(e=ht.toValue(e)),ha:()=>ht.toHandle([]),jb:e=>{e=ht.toValue(e);for(var r=new Array(e.length),t=0;t<e.length;t++)r[t]=e[t];return ht.toHandle(r)},sa:e=>ht.toHandle(Mt(e)),mb:e=>{var r=ht.toValue(e);rr(r),dt(e)},M:(e,r)=>{var t=(e=mt(e,"_emval_take_value")).readValueFromPointer(r);return ht.toHandle(t)},vb:function(e,r,t){var n=Nt(e,r),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|(e=>(Zt(e.getFullYear())?Ot:It)[e.getMonth()]+e.getDate()-1)(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[t+32>>2]=l},ub:Gt,Ib:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}s()[e>>2]=60*l,i()[r>>2]=Number(u!=c);var f=d(o),h=d(a),p=Xt(f),m=Xt(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},x:()=>{te("")},Fa:(e,r,t)=>Lt(e,r,t),Na:()=>{},va:()=>Date.now(),Yb:()=>{throw X+=1,"unwind"},Kb:()=>2147483648,J:zt,Ua:()=>navigator.hardwareConcurrency,Hb:e=>{var r=t().length;if((e>>>=0)<=r)return!1;var n=2147483648;if(e>n)return!1;for(var o,a,i=1;i<=4;i*=2){var s=r*(1+.2/i);s=Math.min(s,e+100663296);var u=Math.min(n,(o=Math.max(e,s))+((a=65536)-o%a)%a);if(Bt(u))return!0}return!1},Sb:Kt,Tb:Jt,Ta:Se,wa:Qt,Oa:qt,wb:en,ua:rn,ib:function(){return an(location.toString())},hb:function(){return an((e=Ln,self[e(297,"7!VW")][e(299,"JR%^")]()));var e},Ya:function(e,r){var t=An();try{return je(e)(r)}catch(e){if(Dn(t),e!==e+0)throw e;Sn(1,0)}},_a:function(e,r,t,n,o,a){var i=An();try{return je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},A:function(e,r,t,n){var o=An();try{return je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},ec:function(e,r,t,n,o,a,i,s){var u=An();try{return je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},q:function(e,r){var t=An();try{return je(e)(r)}catch(e){if(Dn(t),e!==e+0)throw e;Sn(1,0)}},w:function(e,r,t){var n=An();try{return je(e)(r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},N:function(e,r,t,n){var o=An();try{return je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},fa:function(e,r,t,n,o){var a=An();try{return je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},v:function(e){var r=An();try{return je(e)()}catch(e){if(Dn(r),e!==e+0)throw e;Sn(1,0)}},j:function(e,r){var t=An();try{return je(e)(r)}catch(e){if(Dn(t),e!==e+0)throw e;Sn(1,0)}},c:function(e,r,t){var n=An();try{return je(e)(r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},g:function(e,r,t,n){var o=An();try{return je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},l:function(e,r,t,n,o){var a=An();try{return je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},La:function(e,r,t,n,o,a){var i=An();try{return je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},cb:function(e,r,t,n,o,a){var i=An();try{return je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},o:function(e,r,t,n,o,a){var i=An();try{return je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},y:function(e,r,t,n,o,a,i){var s=An();try{return je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},Ka:function(e,r,t,n,o,a,i,s){var u=An();try{return je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},oa:function(e,r,t,n,o,a,i,s,u){var c=An();try{return je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Dn(c),e!==e+0)throw e;Sn(1,0)}},cc:function(e,r,t,n,o,a,i,s,u,c){var l=An();try{return je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Dn(l),e!==e+0)throw e;Sn(1,0)}},ja:function(e,r,t,n,o,a,i,s,u,c,l,d){var f=An();try{return je(e)(r,t,n,o,a,i,s,u,c,l,d)}catch(e){if(Dn(f),e!==e+0)throw e;Sn(1,0)}},rb:function(e,r,t,n,o,a,i){var s=An();try{return zn(e,r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},Ab:function(e,r,t,n){var o=An();try{return In(e,r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},tb:function(e){var r=An();try{return Nn(e)}catch(e){if(Dn(r),e!==e+0)throw e;Sn(1,0)}},Bb:function(e,r){var t=An();try{return Zn(e,r)}catch(e){if(Dn(t),e!==e+0)throw e;Sn(1,0)}},sb:function(e,r,t){var n=An();try{return Gn(e,r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},qb:function(e,r,t,n,o){var a=An();try{return Xn(e,r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},m:function(e){var r=An();try{je(e)()}catch(e){if(Dn(r),e!==e+0)throw e;Sn(1,0)}},i:function(e,r){var t=An();try{je(e)(r)}catch(e){if(Dn(t),e!==e+0)throw e;Sn(1,0)}},kb:function(e,r,t){var n=An();try{je(e)(r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},ga:function(e,r,t){var n=An();try{je(e)(r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},d:function(e,r,t){var n=An();try{je(e)(r,t)}catch(e){if(Dn(n),e!==e+0)throw e;Sn(1,0)}},X:function(e,r,t,n){var o=An();try{je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},ab:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},Xa:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},na:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},ba:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},qa:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},L:function(e,r,t,n){var o=An();try{je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},_:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},Aa:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},pa:function(e,r,t,n,o,a){var i=An();try{je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},Ba:function(e,r,t,n,o,a,i,s,u){var c=An();try{je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Dn(c),e!==e+0)throw e;Sn(1,0)}},f:function(e,r,t,n){var o=An();try{je(e)(r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},B:function(e,r,t,n,o,a){var i=An();try{je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},fc:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},K:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},C:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},aa:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},Wa:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},U:function(e,r,t,n,o,a){var i=An();try{je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},bb:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},za:function(e,r,t,n,o,a,i,s,u,c){var l=An();try{je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Dn(l),e!==e+0)throw e;Sn(1,0)}},$a:function(e,r,t,n,o,a,i,s,u,c,l){var d=An();try{je(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Dn(d),e!==e+0)throw e;Sn(1,0)}},k:function(e,r,t,n,o){var a=An();try{je(e)(r,t,n,o)}catch(e){if(Dn(a),e!==e+0)throw e;Sn(1,0)}},Ca:function(e,r,t,n,o,a,i,s,u){var c=An();try{je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Dn(c),e!==e+0)throw e;Sn(1,0)}},D:function(e,r,t,n,o,a){var i=An();try{je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},W:function(e,r,t,n,o,a,i,s,u,c){var l=An();try{je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Dn(l),e!==e+0)throw e;Sn(1,0)}},ea:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},n:function(e,r,t,n,o,a){var i=An();try{je(e)(r,t,n,o,a)}catch(e){if(Dn(i),e!==e+0)throw e;Sn(1,0)}},db:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},t:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},Z:function(e,r,t,n,o,a,i,s,u,c,l){var d=An();try{je(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Dn(d),e!==e+0)throw e;Sn(1,0)}},T:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},r:function(e,r,t,n,o,a,i){var s=An();try{je(e)(r,t,n,o,a,i)}catch(e){if(Dn(s),e!==e+0)throw e;Sn(1,0)}},ma:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},Va:function(e,r,t,n,o,a,i,s,u,c,l){var d=An();try{je(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Dn(d),e!==e+0)throw e;Sn(1,0)}},dc:function(e,r,t,n,o,a,i,s,u){var c=An();try{je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Dn(c),e!==e+0)throw e;Sn(1,0)}},s:function(e,r,t,n,o,a,i,s){var u=An();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Dn(u),e!==e+0)throw e;Sn(1,0)}},H:function(e,r,t,n,o,a,i,s,u){var c=An();try{je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Dn(c),e!==e+0)throw e;Sn(1,0)}},ya:function(e,r,t,n,o,a,i,s,u,c,l,d){var f=An();try{je(e)(r,t,n,o,a,i,s,u,c,l,d)}catch(e){if(Dn(f),e!==e+0)throw e;Sn(1,0)}},P:function(e,r,t,n,o,a,i,s,u,c){var l=An();try{je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Dn(l),e!==e+0)throw e;Sn(1,0)}},$:function(e,r,t,n,o,a,i,s,u,c,l){var d=An();try{je(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Dn(d),e!==e+0)throw e;Sn(1,0)}},Za:function(e,r,t,n,o,a,i,s,u,c,l,d){var f=An();try{je(e)(r,t,n,o,a,i,s,u,c,l,d)}catch(e){if(Dn(f),e!==e+0)throw e;Sn(1,0)}},ca:function(e,r,t,n,o,a,i,s,u,c,l,d,f,h){var p=An();try{je(e)(r,t,n,o,a,i,s,u,c,l,d,f,h)}catch(e){if(Dn(p),e!==e+0)throw e;Sn(1,0)}},ia:function(e,r,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var y=An();try{je(e)(r,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(e){if(Dn(y),e!==e+0)throw e;Sn(1,0)}},zb:function(e,r,t,n){var o=An();try{On(e,r,t,n)}catch(e){if(Dn(o),e!==e+0)throw e;Sn(1,0)}},Q:e=>e,a:k||d.wasmMemory,eb:on,Cb:(e,r,t,n,o)=>on(e,r,t,n)},yn=function(){var e,r,t,n,o={a:mn};function a(e,r){var t,n=e.exports;return xe((yn=n).nc),O=yn.ic,t=yn.gc,G.unshift(t),W=r,re(),n}if(ee(),d.instantiateWasm)try{return d.instantiateWasm(o,a)}catch(e){T(`Module.instantiateWasm callback failed with error: ${e}`),l(e)}return(e=_,r=H,t=o,n=function(e){a(e.instance,e.module)},e||"function"!=typeof WebAssembly.instantiateStreaming||ne(r)||"function"!=typeof fetch?ae(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return T(`wasm streaming compile failed: ${e}`),T("falling back to ArrayBuffer instantiation"),ae(r,t,n)}))))).catch(l),{}}(),vn=d._malloc=e=>(vn=d._malloc=yn.hc)(e),gn=d._free=e=>(gn=d._free=yn.jc)(e),wn=()=>(wn=yn.kc)(),bn=d._pthread_self=()=>(bn=d._pthread_self=yn.lc)(),_n=e=>(_n=yn.mc)(e),En=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=yn.nc)(),(e,r)=>(En=yn.oc)(e,r)),Tn=e=>(Tn=yn.pc)(e),kn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=yn.qc)(),d.__emscripten_thread_init=(e,r,t,n,o,a)=>(kn=d.__emscripten_thread_init=yn.rc)(e,r,t,n,o,a)),Wn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=yn.sc)(),(e,r,t,n)=>(Wn=yn.tc)(e,r,t,n)),Cn=e=>(Cn=yn.uc)(e),Pn=d.__emscripten_thread_exit=e=>(Pn=d.__emscripten_thread_exit=yn.vc)(e),Fn=d.__emscripten_check_mailbox=()=>(Fn=d.__emscripten_check_mailbox=yn.wc)(),Sn=(e,r)=>(Sn=yn.xc)(e,r),$n=(e,r)=>($n=yn.yc)(e,r),An=()=>(An=yn.zc)(),Dn=e=>(Dn=yn.Ac)(e),Rn=e=>(Rn=yn.Bc)(e),Mn=e=>(Mn=yn.Cc)(e),jn=e=>(jn=yn.Dc)(e),xn=(e,r,t)=>(xn=yn.Ec)(e,r,t),Vn=e=>(Vn=yn.Fc)(e),Zn=d.dynCall_ji=(e,r)=>(Zn=d.dynCall_ji=yn.Gc)(e,r),On=d.dynCall_vij=(e,r,t,n)=>(On=d.dynCall_vij=yn.Hc)(e,r,t,n),In=d.dynCall_iij=(e,r,t,n)=>(In=d.dynCall_iij=yn.Ic)(e,r,t,n),Nn=(d.dynCall_viijii=(e,r,t,n,o,a,i)=>(d.dynCall_viijii=yn.Jc)(e,r,t,n,o,a,i),d.dynCall_jjj=(e,r,t,n,o)=>(d.dynCall_jjj=yn.Kc)(e,r,t,n,o),d.dynCall_iiiijj=(e,r,t,n,o,a,i,s)=>(d.dynCall_iiiijj=yn.Lc)(e,r,t,n,o,a,i,s),d.dynCall_viijj=(e,r,t,n,o,a,i)=>(d.dynCall_viijj=yn.Mc)(e,r,t,n,o,a,i),d.dynCall_viiijjj=(e,r,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=yn.Nc)(e,r,t,n,o,a,i,s,u,c),d.dynCall_jiji=(e,r,t,n,o)=>(d.dynCall_jiji=yn.Oc)(e,r,t,n,o),d.dynCall_j=e=>(Nn=d.dynCall_j=yn.Pc)(e)),Gn=d.dynCall_jii=(e,r,t)=>(Gn=d.dynCall_jii=yn.Qc)(e,r,t),zn=d.dynCall_iiiiij=(e,r,t,n,o,a,i)=>(zn=d.dynCall_iiiiij=yn.Rc)(e,r,t,n,o,a,i),Xn=d.dynCall_jiiii=(e,r,t,n,o)=>(Xn=d.dynCall_jiiii=yn.Sc)(e,r,t,n,o);function Un(){if(!(J>0)){if(g)return c(d),L(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)B(d.preRun.shift());De(N)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e())}function e(){hn||(hn=!0,d.calledRun=!0,x||(L(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!g){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),z.unshift(e);var e;De(z)}}()))}}if(d.dynCall_iiiiijj=(e,r,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=yn.Tc)(e,r,t,n,o,a,i,s,u),d.dynCall_iiiiiijj=(e,r,t,n,o,a,i,s,u,c)=>(d.dynCall_iiiiiijj=yn.Uc)(e,r,t,n,o,a,i,s,u,c),d.___start_em_js=1120168,d.___stop_em_js=1120276,d.keepRuntimeAlive=U,d.wasmMemory=k,d.UTF8ToString=Ce,d.stringToUTF8=wt,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=an,d.PThread=Ae,q=function e(){hn||Un(),hn||(q=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Ln(e,r){var t=Bn();return Ln=function(r,n){var o=t[r-=281];if(void 0===Ln.rTDMVM){var a=function(e){for(var r,t,n="",o="",a=0,i=0;t=e.charAt(i++);~t&&(r=a%4?64*r+t:t,a++%4)?n+=String.fromCharCode(255&r>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(e,r){var t,n,o=[],i=0,s="";for(e=a(e),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+r.charCodeAt(n%r.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<e.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(e.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Ln.ufrGTj=i,e=arguments,Ln.rTDMVM=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Ln.dFZQhq&&(Ln.dFZQhq=!0),o=Ln.ufrGTj(o,n),e[u]=o),o},Ln(e,r)}function Bn(){var e=["W7JdKwBdUCkmWPBdGb8tW4/cHGK","EJlcKvJcIMW9WRG","CfxdUeq5DsNdG8oGW4bXAGS","DL8qeCoAW4bbWQ8","qu1PW6lcP8kXW7eYW7KyheO","y2hdT8oIWQ3cTqaYiSkB","WRfXW6FdUWrdv8kiWQmmW58","W4ZdPuFcTmowW6HwW6pcGSkAn8k/WQG","W4/dOW3dS8kdWQu1W6S","W4aXWRq0WOBcOSoPzSolD8oFWQa","ws9eWP3dVmkUW5veWORdGHa5va","feObAIa3W5JcGXiDDa","WPXHW5dcImoXWRNdIa","W6xdK3FcOKWgW5K/bwRdU8o9","d3qsWQXJW6FdJwboECkVua","A1vUW7BdK8k2WRDFeeu3WQy","xY9lWP/cPmo8WQPNWQddJq","W6hcUWFdTaH4W7q","WQakW7TMW4yBjCoVWQikWRm","WRf0WQpcTvTWBSkt","gSkQl8knW4vhW7uBWQbIWOK","xSoLvmolFmobxCoeW78+WQhcQCkC"];return(Bn=function(){return e})()}Un(),function(e,r){for(var t=Ln,n=e();;)try{if(415516==-parseInt(t(292,"u(@o"))/1+-parseInt(t(296,"x5ec"))/2+parseInt(t(288,"g^O8"))/3*(parseInt(t(282,"mAgf"))/4)+-parseInt(t(281,"mAgf"))/5+parseInt(t(300,"esM^"))/6*(parseInt(t(291,"MCRd"))/7)+parseInt(t(290,"k*]e"))/8*(parseInt(t(302,"z7nN"))/9)+parseInt(t(295,"uewU"))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Bn);var ighnua,Hn=(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}),Yn=Hn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yn)};return e()}));return Yn(),e.ready});e.exports=o},function(e,r,t){"use strict";t.r(r),r.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"}]);
|
|
1
|
+
!function(r){var e={};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,e){if(1&e&&(r=t(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var o in r)t.d(n,o,function(e){return r[e]}.bind(null,o));return n},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p="",t(t.s=0)}([function(r,e,t){"use strict";var n=t(1);let o;const a={};function i(r){const e=Math.random().toString(36);return a[e]=r,e}function s(r){if(!a.hasOwnProperty(r))throw new Error(`Object ${r} does not exist`);return a[r]}function u(r){const e=s(r);e.delete&&e.delete(),delete a[r]}const c={initialize:async function(r,e,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality:d=80,requestSuffix:f=""}=s||{};u&&(console.log=function(...r){self.postMessage({log:r})},console.error=function(...r){self.postMessage({logError:r})});const h=t(3),p=t(4),m={locateFile:function(r,t){let o;return o=e?(0,n.isRemote)(e)?e:"":i,r.endsWith(".worker.js")&&p?p.default:new URL(o+r+f,location).href}},y=(0,n.getBuildType)(s),v=y.includes("-threads");m.mainScriptUrlOrBlob=m.locateFile(`ScanbotSDK.Asm${y}.js`);let g;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((r=>"Chromium"===r.brand))&&v){let r=[2147483648,805306368,536870912],e=134217728;const t=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&t.includes(SCANBOTSDK_FLAVOR)&&(e=n,r.push(4*n));for(let t=0;t<r.length;t++){const n=r[t];try{g=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),g.grow(e/65536);break}catch(e){if(t===r.length-1)throw e}}}return g&&(m.wasmMemory=g),await h(m),o=m,o.initialize(r||"",a,d)}catch(r){throw console.error(r),r}},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(r,e){return f(o.applyFilter(p(r),e),d)},rotateImageCcw:function(r,e){return f(o.rotateImageCcw(p(r),e),d)},cropAndRotateImageCcw:function(r,e,t){const n=function(r){const e=[];for(let t=0;t<r.length;++t)e.push(r[t].x,r[t].y);return e}(e);return f(o.cropAndRotateImageCcw(p(r),n,t),d)},detectDocument:async function(r,e,t){const n=new o.DocumentDetector({acceptedAngleScore:e,acceptedSizeScore:t}),a=n.detect(p(r));return n.delete(),await l(a)},detectAndCropDocument:async function(r){return await l(o.detectAndCropDocument(p(r)))},createDocumentDetector:async function(r){return i(new o.DocumentDetector(r||{}))},documentDetectorDetect:async function(r,e){const t=s(r);return await l(t.detect(p(e)))},createBarcodeRecognizer:async function(r){return i(new o.BarcodeRecognizer(r||{}))},recognizeBarcodes:async function(r,e,t){let n,a=!1;"string"==typeof r?n=s(r):(t=e,e=r,n=new o.BarcodeRecognizer(t),a=!0);try{const r=n.recognize(p(e),t||{});if(!r)return null;let o;return r.length?(o=r.map((r=>({format:r.format,text:r.text,parsedDocument:r.parsedDocument,rawBytes:d(r.rawBytes),quad:r.quad,barcodeImage:d(r.barcodeImage)}))),r.forEach((r=>r.delete()))):o=[],{result:o,originalImage:e}}finally{a&&n.delete()}},beginPdf:async function(r){return i(new o.PdfGenerationContext(r||{}))},addPageToPdf:async function(r,e){f(s(r).addPage(e))},completePdf:async function(r){const e=f(s(r).complete(),d);return u(r),e},beginTiff:async function(r){const e=new o.TiffGenerationContext(r||{});return f(e.begin()),i(e)},addPageToTiff:async function(r,e){const t=s(r);if("string"==typeof e){let r=s(e).nativeImageContainer();const n=f(t.addPageFromContainer(r));return r.delete(),n}return f(t.addPageFromJsImage(p(e)))},completeTiff:async function(r){try{const e=s(r).complete();return f(e,d)}finally{u(r)}},createMRZRecognizer:async function(r){return i(new o.MrzRecognizerContext(r||{}))},recognizeMRZ:async function(r,e){return s(r).recognize(p(e))},releaseObject:async function(r){u(r)},createOcrEngine:async function(r){return i(new o.TLDROcrContext(r||{}))},performOcr:async function(r,e){return s(r).performOcr(p(e))},createGenericTextLineScanner:async function(r){r.languages||(r.languages=["eng"]);return i(new o.GenericTextLineScanner(r))},recognizeTextLine:async function(r,e){return s(r).recognize(p(e))},cleanTextLineRecognitionQueue:async function(r){s(r).cleanRecognitionQueue()},createDocumentQualityAnalyzer:async function(r){return i(new o.DocumentQualityAnalyzer(r||{}))},documentQualityAnalyzerAnalyze:async function(r,e){return s(r).analyze(p(e))},imageProcessorCreate:async function(r){return i(new o.ImageProcessor(p(r)))},imageProcessorCopy:async function(r){return i(s(r).copy())},imageProcessorApplyFilter:async function(r,e){s(r).applyFilter(e)},imageProcessorCrop:async function(r,e){s(r).crop(e)},imageProcessorResize:async function(r,e){s(r).resize(e)},imageProcessorRotate:async function(r,e){s(r).rotate(e)},imageProcessorEncodedProcessedImage:async function(r,e){return f(s(r).encodedProcessedImage(e),d)},__hasModuleFunction:async function(r){return o.hasOwnProperty(r)},__callModuleFunction:async function(r,e=[]){return o[r].apply(e)}};async function l(r){if(!r)return{success:!1,detectionStatus:"Error_License"};const e=m[r.status],t={detectionStatus:e,success:(n=e,"OK"===n.substr(0,2))};var n;return t.original=d(r.originalImageJpegData),t.success&&(t.cropped=d(r.croppedImageJpegData),t.polygon=function(r){if(r.length%2!=0)throw Error("pointCoords size is not even.");const e=[];for(let t=0;t<r.length;t+=2)e.push({x:r[t],y:r[t+1]});return e}(d(r.polygon)),t.horizontalLines=h(d(r.horizontalLines)),t.verticalLines=h(d(r.verticalLines)),t.averageBrightness=r.averageBrightness),r.delete(),t}function d(r){return r&&r.slice()}function f(r,e){try{if(r.errorMessage){throw new Error(r.errorMessage)}return(e||(r=>r))(r.result)}finally{r.delete()}}function h(r){const e=[];if(!r)return e;if(r.length%4!=0)throw Error("lineCoords size invalid.");for(let t=0;t<r.length;t+=4)e.push({p1:{x:r[t],y:r[t+1]},p2:{x:r[t+2],y:r[t+3]}});return e}function p(r){if(!r)throw new Error("null image data or buffer");return"number"==typeof r.width?r:{data:r,width:-1,height:-1}}const m={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(r){const{command:e,args:t,ticket:a}=r.data;o||"initialize"===e?(async()=>await c[e].apply(null,t))().then((r=>{const e=(0,n.gatherTransferables)(r);self.postMessage({ticket:a,result:r},e)})).catch((r=>{const e="number"==typeof r?Error(o.stringFromException(r)):r;console.error(e),self.postMessage({ticket:a,error:e})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(r,e,t){"use strict";(function(r){function t(){if("undefined"!=typeof r&&"undefined"!=typeof r.versions&&"undefined"!=typeof r.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(r){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.gatherTransferables=function(r,e){const t=[];return function r(n){if(!n)return;if(n.constructor===ImageData){const r={data:n.data.slice(),width:n.width,height:n.height};return t.push(r.data.buffer),r}if(n.constructor===ArrayBuffer){const r=e?n.slice(0):n;if(t.push(r),e)return n}else if(ArrayBuffer.isView(n)){let r;if(e){r=new(0,n.constructor)(n.buffer.slice(0))}else r=n;if(t.push(r.buffer),e)return n}else if(Array.isArray(n))for(let e=0;e<n.length;++e){const t=r(n[e]);t&&(n[e]=t)}else if(n.constructor===Object)for(const e in n)if(n.hasOwnProperty(e)){const t=r(n[e]);t&&(n[e]=t)}}(r),t},e.isRemote=function(r){return r.startsWith("http:")||r.startsWith("https:")},e.areThreadsAvailable=t,e.getBuildType=function(r){const{allowSimd:e=!0,allowThreads:n=!0}=r||{};let o="";if(e&&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(r){return!1}}()){o+="-simd";n&&t()&&(o+="-threads")}return o}}).call(this,t(2))},function(r,e){var t,n,o=r.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(r){if(t===setTimeout)return setTimeout(r,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(r,0);try{return t(r,0)}catch(e){try{return t.call(null,r,0)}catch(e){return t.call(this,r,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(r){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(r){n=i}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&h())}function h(){if(!l){var r=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++d<e;)u&&u[d].run();d=-1,e=c.length}u=null,l=!1,function(r){if(n===clearTimeout)return clearTimeout(r);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(r);try{n(r)}catch(e){try{return n.call(null,r)}catch(e){return n.call(this,r)}}}(r)}}function p(r,e){this.fun=r,this.array=e}function m(){}o.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];c.push(new p(r,e)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(r){return[]},o.binding=function(r){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(r){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(r,e,t){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r={}){function e(){return k.buffer!=S.buffer&&Z(),S}function t(){return k.buffer!=S.buffer&&Z(),F}function o(){return k.buffer!=S.buffer&&Z(),$}function a(){return k.buffer!=S.buffer&&Z(),A}function i(){return k.buffer!=S.buffer&&Z(),R}function s(){return k.buffer!=S.buffer&&Z(),D}function u(){return k.buffer!=S.buffer&&Z(),M}var c,l,d=r;d.ready=new Promise(((r,e)=>{c=r,l=e}));var f,h,p,m=Object.assign({},d),y="./this.program",v=(r,e)=>{throw e},g=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function b(r){return d.locateFile?d.locateFile(r,w):w+r}w=self.location.href,n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},p=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},h=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var _,E=d.print||console.log.bind(console),T=d.printErr||console.error.bind(console);Object.assign(d,m),m=null,d.arguments&&d.arguments,d.thisProgram&&(y=d.thisProgram),d.quit&&(v=d.quit),d.wasmBinary&&(_=d.wasmBinary);var k,C,W=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&tr("no native wasm support detected");var P,S,F,$,A,R,D,j,M,V=!1;function x(r,e){r||tr(e)}function Z(){var r=k.buffer;d.HEAP8=S=new Int8Array(r),d.HEAP16=$=new Int16Array(r),d.HEAPU8=F=new Uint8Array(r),d.HEAPU16=A=new Uint16Array(r),d.HEAP32=R=new Int32Array(r),d.HEAPU32=D=new Uint32Array(r),d.HEAPF32=j=new Float32Array(r),d.HEAPF64=M=new Float64Array(r)}var O,I=d.INITIAL_MEMORY||67108864;if(x(I>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+I+"! (STACK_SIZE=4194304)"),g)k=d.wasmMemory;else if(d.wasmMemory)k=d.wasmMemory;else if(!((k=new WebAssembly.Memory({initial:I/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw T("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(),I=k.buffer.byteLength;var N=[],z=[],G=[],L=0;function X(){return W||L>0}function B(){g||(d.noFSInit||Cr.init.initialized||Cr.init(),Cr.ignorePermissions=!1,br.init(),Rr(z))}function H(r){N.unshift(r)}var U,Y,K,J=0,Q=null,q=null;function rr(r){J++,d.monitorRunDependencies&&d.monitorRunDependencies(J)}function er(r){if(J--,d.monitorRunDependencies&&d.monitorRunDependencies(J),0==J&&(null!==Q&&(clearInterval(Q),Q=null),q)){var e=q;q=null,e()}}function tr(r){d.onAbort&&d.onAbort(r),T(r="Aborted("+r+")"),V=!0,P=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l(e),e}function nr(r){return r.startsWith("data:application/octet-stream;base64,")}function or(r){if(r==U&&_)return new Uint8Array(_);if(p)return p(r);throw"both async and sync fetching of the wasm failed"}function ar(r,e,t){return function(r){return _||"function"!=typeof fetch?Promise.resolve().then((()=>or(r))):fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((()=>or(r)))}(r).then((r=>WebAssembly.instantiate(r,e))).then((r=>r)).then(t,(r=>{T(`failed to asynchronously prepare wasm: ${r}`),tr(r)}))}nr(U="ScanbotSDK.Asm-simd-threads.wasm")||(U=b(U));var ir={1120276:r=>an(function(){return this[Wr(r)].toString()}.apply((0,eval)("(()=>this)()"))),1120390:r=>{throw new Error("Invalid barcode format: "+Wr(r))}};function sr(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var ur=r=>{r.terminate(),r.onmessage=r=>{}},cr=r=>{var e=Ar.pthreads[r];x(e),Ar.returnWorkerToPool(e)},lr=r=>{var e=Ar.getNewWorker();if(!e)return 6;Ar.runningWorkers.push(e),Ar.pthreads[r.pthread_ptr]=e,e.pthread_ptr=r.pthread_ptr;var t={cmd:"run",start_routine:r.startRoutine,arg:r.arg,pthread_ptr:r.pthread_ptr};return e.postMessage(t,r.transferList),0},dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return dr.normalize(r.join("/"))},join2:(r,e)=>dr.normalize(r+"/"+e)},fr=r=>(fr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>(r.set(crypto.getRandomValues(new Uint8Array(r.byteLength))),r);tr("initRandomDevice")})())(r),hr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Cr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=dr.isAbs(n)}return(e?"/":"")+(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pr="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mr=(r,e,t)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&pr)return pr.decode(r.buffer instanceof SharedArrayBuffer?r.slice(e,o):r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var u=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},yr=[],vr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},gr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function wr(r,e,t){var n=t>0?t:vr(r)+1,o=new Array(n),a=gr(r,o,0,o.length);return e&&(o.length=a),o}var br={ttys:[],init(){},shutdown(){},register(r,e){br.ttys[r]={input:[],output:[],ops:e},Cr.registerDevice(r,br.stream_ops)},stream_ops:{open(r){var e=br.ttys[r.node.rdev];if(!e)throw new Cr.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Cr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Cr.ErrnoError(29)}if(void 0===s&&0===a)throw new Cr.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Cr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new Cr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!yr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;yr=wr(r,!0)}return yr.shift()})(),put_char(r,e){null===e||10===e?(E(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(E(mr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({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:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(T(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(T(mr(r.output,0)),r.output=[])}}},_r=r=>{r=((r,e)=>Math.ceil(r/e)*e)(r,65536);var e=En(65536,r);return e?((r,e)=>(t().fill(0,r,r+e),r))(e,r):0},Er={ops_table:null,mount:r=>Er.createNode(null,"/",16895,0),createNode(r,e,t,n){if(Cr.isBlkdev(t)||Cr.isFIFO(t))throw new Cr.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:Cr.chrdev_stream_ops}});var o=Cr.createNode(r,e,t,n);return Cr.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):Cr.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):Cr.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):Cr.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=Cr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Cr.isDir(r.mode)?e.size=4096:Cr.isFile(r.mode)?e.size=r.usedBytes:Cr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Er.resizeFileStorage(r,e.size)},lookup(r,e){throw Cr.genericErrors[44]},mknod:(r,e,t,n)=>Er.createNode(r,e,t,n),rename(r,e,t){if(Cr.isDir(r.mode)){var n;try{n=Cr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Cr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=Cr.lookupNode(r,e);for(var n in t.contents)throw new Cr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink(r,e,t){var n=Er.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!Cr.isLink(r.mode))throw new Cr.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,t,n,o,a,i){if(t.buffer===e().buffer&&(i=!1),!o)return 0;var s=r.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=t.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=t.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(t.subarray(n,n+o),a),o}if(Er.expandFileStorage(s,a+o),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=t[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Cr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Cr.ErrnoError(28);return n},allocate(r,e,t){Er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,t,n,o,a){if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==e().buffer){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(i=_r(t)))throw new Cr.ErrnoError(48);e().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(r,e,t,n,o)=>(Er.stream_ops.write(r,e,0,n,t,!1),0)}},Tr=d.preloadPlugins||[],kr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},Cr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new Cr.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=Cr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=Cr.lookupNode(n,t[a]),o=dr.join2(o,t[a]),Cr.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;Cr.isLink(n.mode);){var u=Cr.readlink(o);if(o=hr.resolve(dr.dirname(o),u),n=Cr.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new Cr.ErrnoError(32)}}return{path:o,node:n}},getPath(r){for(var e;;){if(Cr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Cr.nameTable.length},hashAddNode(r){var e=Cr.hashName(r.parent.id,r.name);r.name_next=Cr.nameTable[e],Cr.nameTable[e]=r},hashRemoveNode(r){var e=Cr.hashName(r.parent.id,r.name);if(Cr.nameTable[e]===r)Cr.nameTable[e]=r.name_next;else for(var t=Cr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=Cr.mayLookup(r);if(t)throw new Cr.ErrnoError(t,r);for(var n=Cr.hashName(r.id,e),o=Cr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return Cr.lookup(r,e)},createNode(r,e,t,n){var o=new Cr.FSNode(r,e,t,n);return Cr.hashAddNode(o),o},destroyNode(r){Cr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Cr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){var e=Cr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{return Cr.lookupNode(r,e),20}catch(r){}return Cr.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=Cr.lookupNode(r,e)}catch(r){return r.errno}var o=Cr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Cr.isDir(n.mode))return 54;if(Cr.isRoot(n)||Cr.getPath(n)===Cr.cwd())return 10}else if(Cr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Cr.isLink(r.mode)?32:Cr.isDir(r.mode)&&("r"!==Cr.flagsToPermissionString(e)||512&e)?31:Cr.nodePermissions(r,Cr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=Cr.MAX_OPEN_FDS;r++)if(!Cr.streams[r])return r;throw new Cr.ErrnoError(33)},getStreamChecked(r){var e=Cr.getStream(r);if(!e)throw new Cr.ErrnoError(8);return e},getStream:r=>Cr.streams[r],createStream:(r,e=-1)=>(Cr.FSStream||(Cr.FSStream=function(){this.shared={}},Cr.FSStream.prototype={},Object.defineProperties(Cr.FSStream.prototype,{object:{get(){return this.node},set(r){this.node=r}},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(r){this.shared.flags=r}},position:{get(){return this.shared.position},set(r){this.shared.position=r}}})),r=Object.assign(new Cr.FSStream,r),-1==e&&(e=Cr.nextfd()),r.fd=e,Cr.streams[e]=r,r),closeStream(r){Cr.streams[r]=null},chrdev_stream_ops:{open(r){var e=Cr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new Cr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){Cr.devices[r]={stream_ops:e}},getDevice:r=>Cr.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),Cr.syncFSRequests++,Cr.syncFSRequests>1&&T(`warning: ${Cr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Cr.getMounts(Cr.root.mount),n=0;function o(r){return Cr.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&Cr.root)throw new Cr.ErrnoError(10);if(!o&&!a){var i=Cr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Cr.isMountpoint(n))throw new Cr.ErrnoError(10);if(!Cr.isDir(n.mode))throw new Cr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Cr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var e=Cr.lookupPath(r,{follow_mount:!1});if(!Cr.isMountpoint(e.node))throw new Cr.ErrnoError(28);var t=e.node,n=t.mounted,o=Cr.getMounts(n);Object.keys(Cr.nameTable).forEach((r=>{for(var e=Cr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Cr.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=Cr.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new Cr.ErrnoError(28);var a=Cr.mayCreate(n,o);if(a)throw new Cr.ErrnoError(a);if(!n.node_ops.mknod)throw new Cr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Cr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Cr.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Cr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Cr.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new Cr.ErrnoError(44);var t=Cr.lookupPath(e,{parent:!0}).node;if(!t)throw new Cr.ErrnoError(44);var n=dr.basename(e),o=Cr.mayCreate(t,n);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.symlink)throw new Cr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=Cr.lookupPath(r,{parent:!0}).node,n=Cr.lookupPath(e,{parent:!0}).node,!t||!n)throw new Cr.ErrnoError(44);if(t.mount!==n.mount)throw new Cr.ErrnoError(75);var u,c=Cr.lookupNode(t,i),l=hr.relative(r,a);if("."!==l.charAt(0))throw new Cr.ErrnoError(28);if("."!==(l=hr.relative(e,o)).charAt(0))throw new Cr.ErrnoError(55);try{u=Cr.lookupNode(n,s)}catch(r){}if(c!==u){var d=Cr.isDir(c.mode),f=Cr.mayDelete(t,i,d);if(f)throw new Cr.ErrnoError(f);if(f=u?Cr.mayDelete(n,s,d):Cr.mayCreate(n,s))throw new Cr.ErrnoError(f);if(!t.node_ops.rename)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(c)||u&&Cr.isMountpoint(u))throw new Cr.ErrnoError(10);if(n!==t&&(f=Cr.nodePermissions(t,"w")))throw new Cr.ErrnoError(f);Cr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Cr.hashAddNode(c)}}},rmdir(r){var e=Cr.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!0);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.rmdir)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.rmdir(e,t),Cr.destroyNode(n)},readdir(r){var e=Cr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Cr.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=Cr.lookupPath(r,{parent:!0}).node;if(!e)throw new Cr.ErrnoError(44);var t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!1);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.unlink)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.unlink(e,t),Cr.destroyNode(n)},readlink(r){var e=Cr.lookupPath(r).node;if(!e)throw new Cr.ErrnoError(44);if(!e.node_ops.readlink)throw new Cr.ErrnoError(28);return hr.resolve(Cr.getPath(e.parent),e.node_ops.readlink(e))},stat(r,e){var t=Cr.lookupPath(r,{follow:!e}).node;if(!t)throw new Cr.ErrnoError(44);if(!t.node_ops.getattr)throw new Cr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Cr.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?Cr.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Cr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){Cr.chmod(r,e,!0)},fchmod(r,e){var t=Cr.getStreamChecked(r);Cr.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?Cr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Cr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){Cr.chown(r,e,t,!0)},fchown(r,e,t){var n=Cr.getStreamChecked(r);Cr.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new Cr.ErrnoError(28);var t;if(!(t="string"==typeof r?Cr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Cr.ErrnoError(63);if(Cr.isDir(t.mode))throw new Cr.ErrnoError(31);if(!Cr.isFile(t.mode))throw new Cr.ErrnoError(28);var n=Cr.nodePermissions(t,"w");if(n)throw new Cr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=Cr.getStreamChecked(r);if(0==(2097155&t.flags))throw new Cr.ErrnoError(28);Cr.truncate(t.node,e)},utime(r,e,t){var n=Cr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t){if(""===r)throw new Cr.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(e="string"==typeof e?(r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${r}`);return e})(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=Cr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new Cr.ErrnoError(20)}else n=Cr.mknod(r,t,0),o=!0;if(!n)throw new Cr.ErrnoError(44);if(Cr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Cr.isDir(n.mode))throw new Cr.ErrnoError(54);if(!o){var a=Cr.mayOpen(n,e);if(a)throw new Cr.ErrnoError(a)}512&e&&!o&&Cr.truncate(n,0),e&=-131713;var i=Cr.createStream({node:n,path:Cr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&e||(Cr.readFiles||(Cr.readFiles={}),r in Cr.readFiles||(Cr.readFiles[r]=1)),i},close(r){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Cr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Cr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Cr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(1==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.read)throw new Cr.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.write)throw new Cr.ErrnoError(28);r.seekable&&1024&r.flags&&Cr.llseek(r,0,2);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(e<0||t<=0)throw new Cr.ErrnoError(28);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(!Cr.isFile(r.node.mode)&&!Cr.isDir(r.node.mode))throw new Cr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Cr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new Cr.ErrnoError(2);if(1==(2097155&r.flags))throw new Cr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Cr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new Cr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=Cr.open(r,e.flags),o=Cr.stat(r).size,a=new Uint8Array(o);return Cr.read(n,a,0,o,0),"utf8"===e.encoding?t=mr(a,0):"binary"===e.encoding&&(t=a),Cr.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=Cr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(vr(e)+1),a=gr(e,o,0,o.length);Cr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Cr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Cr.close(n)},cwd:()=>Cr.currentPath,chdir(r){var e=Cr.lookupPath(r,{follow:!0});if(null===e.node)throw new Cr.ErrnoError(44);if(!Cr.isDir(e.node.mode))throw new Cr.ErrnoError(54);var t=Cr.nodePermissions(e.node,"x");if(t)throw new Cr.ErrnoError(t);Cr.currentPath=e.path},createDefaultDirectories(){Cr.mkdir("/tmp"),Cr.mkdir("/home"),Cr.mkdir("/home/web_user")},createDefaultDevices(){Cr.mkdir("/dev"),Cr.registerDevice(Cr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Cr.mkdev("/dev/null",Cr.makedev(1,3)),br.register(Cr.makedev(5,0),br.default_tty_ops),br.register(Cr.makedev(6,0),br.default_tty1_ops),Cr.mkdev("/dev/tty",Cr.makedev(5,0)),Cr.mkdev("/dev/tty1",Cr.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);Cr.createDevice("/dev","random",t),Cr.createDevice("/dev","urandom",t),Cr.mkdir("/dev/shm"),Cr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Cr.mkdir("/proc");var r=Cr.mkdir("/proc/self");Cr.mkdir("/proc/self/fd"),Cr.mount({mount(){var e=Cr.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=Cr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?Cr.createDevice("/dev","stdin",d.stdin):Cr.symlink("/dev/tty","/dev/stdin"),d.stdout?Cr.createDevice("/dev","stdout",null,d.stdout):Cr.symlink("/dev/tty","/dev/stdout"),d.stderr?Cr.createDevice("/dev","stderr",null,d.stderr):Cr.symlink("/dev/tty1","/dev/stderr"),Cr.open("/dev/stdin",0),Cr.open("/dev/stdout",1),Cr.open("/dev/stderr",1)},ensureErrnoError(){Cr.ErrnoError||(Cr.ErrnoError=function(r,e){this.name="ErrnoError",this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Cr.ErrnoError.prototype=new Error,Cr.ErrnoError.prototype.constructor=Cr.ErrnoError,[44].forEach((r=>{Cr.genericErrors[r]=new Cr.ErrnoError(r),Cr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit(){Cr.ensureErrnoError(),Cr.nameTable=new Array(4096),Cr.mount(Er,{},"/"),Cr.createDefaultDirectories(),Cr.createDefaultDevices(),Cr.createSpecialDirectories(),Cr.filesystems={MEMFS:Er}},init(r,e,t){Cr.init.initialized=!0,Cr.ensureErrnoError(),d.stdin=r||d.stdin,d.stdout=e||d.stdout,d.stderr=t||d.stderr,Cr.createStandardStreams()},quit(){Cr.init.initialized=!1;for(var r=0;r<Cr.streams.length;r++){var e=Cr.streams[r];e&&Cr.close(e)}},findObject(r,e){var t=Cr.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=Cr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Cr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=Cr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:Cr.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{Cr.mkdir(i)}catch(r){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:Cr.getPath(r),e),i=kr(n,o);return Cr.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:Cr.getPath(r),i=e?dr.join2(r,e):r);var s=kr(n,o),u=Cr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Cr.chmod(u,146|s);var f=Cr.open(u,577);Cr.write(f,t,0,t.length,0,a),Cr.close(f),Cr.chmod(u,s)}return u},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:Cr.getPath(r),e),a=kr(!!t,!!n);Cr.createDevice.major||(Cr.createDevice.major=64);var i=Cr.makedev(Cr.createDevice.major++,0);return Cr.registerDevice(i,{open(r){r.seekable=!1},close(r){n&&n.buffer&&n.buffer.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Cr.ErrnoError(29)}if(void 0===u&&0===i)throw new Cr.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(r){throw new Cr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Cr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.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(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=wr(f(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Cr.ErrnoError(29)}},createLazyFile(r,t,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",n,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+n+". Status: "+r.status);var e,t=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=t);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,t-1),"undefined"==typeof s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):wr(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=Cr.createFile(r,t,u,o,a);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(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((r=>{var e=c.stream_ops[r];l[r]=function(){return Cr.forceLoadFile(c),e.apply(null,arguments)}})),l.read=(r,e,t,n,o)=>(Cr.forceLoadFile(c),d(r,e,t,n,o)),l.mmap=(r,t,n,o,a)=>{Cr.forceLoadFile(c);var i=_r(t);if(!i)throw new Cr.ErrnoError(48);return d(r,e(),i,t,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},Wr=(r,e)=>r?mr(t(),r,e):"",Pr={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;if(n=-100===r?Cr.cwd():Pr.getStreamFromFD(r).path,0==e.length){if(!t)throw new Cr.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&dr.normalize(e)!==dr.normalize(Cr.getPath(r.node)))return-54;throw r}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=K[0],i()[t+28>>2]=K[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=K[0],i()[t+44>>2]=K[1],s()[t+48>>2]=o%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(Y=Math.floor(a/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=K[0],i()[t+60>>2]=K[1],s()[t+64>>2]=a%1e3*1e3,K=[Math.floor(u/1e3)>>>0,(Y=Math.floor(u/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=K[0],i()[t+76>>2]=K[1],s()[t+80>>2]=u%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=K[0],i()[t+92>>2]=K[1],0},doMsync(r,e,n,o,a){if(!Cr.isFile(e.node.mode))throw new Cr.ErrnoError(43);if(2&o)return 0;var i=t().slice(r,r+n);Cr.msync(e,i,a,n,o)},varargs:void 0,get(){var r=i()[Pr.varargs>>2];return Pr.varargs+=4,r},getp:()=>Pr.get(),getStr:r=>Wr(r),getStreamFromFD:r=>Cr.getStreamChecked(r)};function Sr(r){if(g)return At(0,1,r);P=r,X()||(Ar.terminateAllThreads(),d.onExit&&d.onExit(r),V=!0),v(r,new sr(r))}var Fr=(r,e)=>{if(P=r,g)throw Dr(r),"unwind";Sr(r)},$r=r=>{if(r instanceof sr||"unwind"==r)return P;v(1,r)},Ar={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){g?Ar.initWorker():Ar.initMainThread()},initMainThread(){for(var r=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));r--;)Ar.allocateUnusedWorker();H((()=>{rr(),Ar.loadWasmModuleToAllWorkers((()=>er()))}))},initWorker(){W=!1},setExitStatus:r=>{P=r},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var r of Ar.runningWorkers)ur(r);for(var r of Ar.unusedWorkers)ur(r);Ar.unusedWorkers=[],Ar.runningWorkers=[],Ar.pthreads=[]},returnWorkerToPool:r=>{var e=r.pthread_ptr;delete Ar.pthreads[e],Ar.unusedWorkers.push(r),Ar.runningWorkers.splice(Ar.runningWorkers.indexOf(r),1),r.pthread_ptr=0,Wn(e)},receiveObjectTransfer(r){},threadInitTLS(){Ar.tlsInitFunctions.forEach((r=>r()))},loadWasmModuleToWorker:r=>new Promise((e=>{r.onmessage=t=>{var n=t.data,o=n.cmd;if(n.targetThread&&n.targetThread!=bn()){var a=Ar.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):T(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?Ft():"spawnThread"===o?lr(n):"cleanupThread"===o?cr(n.thread):"killThread"===o?(r=>{var e=Ar.pthreads[r];delete Ar.pthreads[r],ur(e),Wn(r),Ar.runningWorkers.splice(Ar.runningWorkers.indexOf(e),1),e.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Ar.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(r.loaded=!0,e(r)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?r.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&T(`worker sent an unknown command ${o}`)}},r.onerror=r=>{throw T(`worker sent an error! ${r.filename}:${r.lineno}: ${r.message}`),r};var t=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&t.push(o);r.postMessage({cmd:"load",handlers:t,urlOrBlob:d.mainScriptUrlOrBlob||n,wasmMemory:k,wasmModule:C})})),loadWasmModuleToAllWorkers(r){if(g)return r();Promise.all(Ar.unusedWorkers.map(Ar.loadWasmModuleToWorker)).then(r)},allocateUnusedWorker(){var r,e=b("ScanbotSDK.Asm-simd-threads.worker.js");r=new Worker(e),Ar.unusedWorkers.push(r)},getNewWorker:()=>(0==Ar.unusedWorkers.length&&(Ar.allocateUnusedWorker(),Ar.loadWasmModuleToWorker(Ar.unusedWorkers[0])),Ar.unusedWorkers.pop())};d.PThread=Ar;var Rr=r=>{for(;r.length>0;)r.shift()(d)};function Dr(r){if(g)return At(1,0,r);Fr(r)}d.establishStackSpace=()=>{var r=bn(),e=i()[r+52>>2],t=i()[r+56>>2];$n(e,e-t),Rn(e)};var jr=[],Mr=r=>{var e=jr[r];return e||(r>=jr.length&&(jr.length=r+1),jr[r]=e=O.get(r)),e};d.invokeEntryPoint=(r,e)=>{!function(r){X()?Ar.setExitStatus(r):Pn(r)}(Mr(r)(e))};var Vr=r=>{Ar.tlsInitFunctions.push(r)},xr=[],Zr=0,Or=0;function Ir(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){s()[this.ptr+4>>2]=r},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(r){s()[this.ptr+8>>2]=r},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(r){r=r?1:0,e()[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=e()[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,e()[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=e()[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)},this.set_adjusted_ptr=function(r){s()[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(xn(this.get_type()))return s()[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var Nr=r=>{var e=Or;if(!e)return _n(0),0;var t=new Ir(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return _n(0),e;for(var o in r){var a=r[o];if(0===a||a===n)break;var i=t.ptr+16;if(Vn(a,n,i))return _n(a),e}return _n(n),e},zr=()=>{var r=xr.pop();r||tr("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(xr.push(r),r.set_rethrown(!0),r.set_caught(!1),Zr++),Or=e};function Gr(r,e,t,n){return g?At(2,1,r,e,t,n):Lr(r,e,t,n)}var Lr=(r,e,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return T("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(g&&0===o.length)return Gr(r,e,t,n);var a={startRoutine:t,pthread_ptr:r,arg:n,transferList:o};return g?(a.cmd="spawnThread",postMessage(a,o),0):lr(a)};function Xr(r,e,t,n,o){if(g)return At(3,1,r,e,t,n,o);try{for(var a=0,s=e?i()[e>>2]:0,u=e?i()[e+4>>2]:0,c=t?i()[t>>2]:0,l=t?i()[t+4>>2]:0,d=n?i()[n>>2]:0,f=n?i()[n+4>>2]:0,h=0,p=0,m=0,y=0,v=0,w=0,b=(e?i()[e>>2]:0)|(t?i()[t>>2]:0)|(n?i()[n>>2]:0),_=(e?i()[e+4>>2]:0)|(t?i()[t+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(r,e,t,n){return r<32?e&n:t&n},T=0;T<r;T++){var k=1<<T%32;if(E(T,b,_,k)){var C=Pr.getStreamFromFD(T),W=Pr.DEFAULT_POLLMASK;if(C.stream_ops.poll){var P=-1;o&&(P=1e3*((e?i()[o>>2]:0)+(e?i()[o+8>>2]:0)/1e6)),W=C.stream_ops.poll(C,P)}1&W&&E(T,s,u,k)&&(T<32?h|=k:p|=k,a++),4&W&&E(T,c,l,k)&&(T<32?m|=k:y|=k,a++),2&W&&E(T,d,f,k)&&(T<32?v|=k:w|=k,a++)}}return e&&(i()[e>>2]=h,i()[e+4>>2]=p),t&&(i()[t>>2]=m,i()[t+4>>2]=y),n&&(i()[n>>2]=v,i()[n+4>>2]=w),a}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Br(r,e,t){if(g)return At(4,1,r,e,t);Pr.varargs=t;try{var n=Pr.getStreamFromFD(r);switch(e){case 0:if((a=Pr.get())<0)return-28;for(;Cr.streams[a];)a++;return Cr.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Pr.get();return n.flags|=a,0;case 5:return a=Pr.getp(),o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[wn()>>2]=s,-1}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}var s}function Hr(r,e){if(g)return At(5,1,r,e);try{var t=Pr.getStreamFromFD(r);return Pr.doStat(Cr.stat,t.path,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Ur(r,t,n){if(g)return At(6,1,r,t,n);Pr.varargs=n;try{var a=Pr.getStreamFromFD(r);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=Pr.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)e()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=Pr.getp();var l=i()[u>>2],d=i()[u+4>>2],f=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(e()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:return a.tty?(u=Pr.getp(),i()[u>>2]=0,0):-59;case 21520:return a.tty?-28:-59;case 21531:return u=Pr.getp(),Cr.ioctl(a,t,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=Pr.getp(),o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Yr(r,e,t,n){if(g)return At(8,1,r,e,t,n);try{e=Pr.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=Pr.calculateAt(r,e,a),Pr.doStat(o?Cr.lstat:Cr.stat,e,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Kr(r,e,t,n){if(g)return At(9,1,r,e,t,n);Pr.varargs=n;try{e=Pr.getStr(e),e=Pr.calculateAt(r,e);var o=n?Pr.get():0;return Cr.open(e,t,o).fd}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Jr(r){if(g)return At(10,1,r);try{return r=Pr.getStr(r),Cr.rmdir(r),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Qr(r,e){if(g)return At(11,1,r,e);try{return r=Pr.getStr(r),Pr.doStat(Cr.stat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function qr(r,e,t){if(g)return At(12,1,r,e,t);try{return e=Pr.getStr(e),e=Pr.calculateAt(r,e),0===t?Cr.unlink(e):512===t?Cr.rmdir(e):tr("Invalid flags passed to unlinkat"),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var re={},ee=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function te(r){return this.fromWireType(i()[r>>2])}var ne={},oe={},ae={},ie=void 0,se=r=>{throw new ie(r)},ue=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&se("Mismatched type converter count");for(var o=0;o<r.length;++o)pe(r[o],n[o])}r.forEach((function(r){ae[r]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{oe.hasOwnProperty(r)?o[e]=oe[r]:(a.push(r),ne.hasOwnProperty(r)||(ne[r]=[]),ne[r].push((()=>{o[e]=oe[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ce={},le=void 0,de=r=>{for(var e="",n=r;t()[n];)e+=le[t()[n++]];return e},fe=void 0,he=r=>{throw new fe(r)};function pe(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(r,e,t={}){var n=e.name;if(r||he(`type "${n}" must have a positive integer typeid pointer`),oe.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;he(`Cannot register type '${n}' twice`)}if(oe[r]=e,delete ae[r],ne.hasOwnProperty(r)){var o=ne[r];delete ne[r],o.forEach((r=>r()))}}(r,e,t)}var me=8;function ye(r){if(!(this instanceof Ze))return!1;if(!(r instanceof Ze))return!1;for(var e=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&t===o}var ve=r=>{he(r.$$.ptrType.registeredClass.name+" instance already deleted")},ge=!1,we=r=>{},be=r=>{r.count.value-=1,0===r.count.value&&(r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)})(r)},_e=(r,e,t)=>{if(e===t)return r;if(void 0===t.baseClass)return null;var n=_e(r,e,t.baseClass);return null===n?null:t.downcast(n)},Ee={},Te=()=>Object.keys(Fe).length,ke=()=>{var r=[];for(var e in Fe)Fe.hasOwnProperty(e)&&r.push(Fe[e]);return r},Ce=[],We=()=>{for(;Ce.length;){var r=Ce.pop();r.$$.deleteScheduled=!1,r.delete()}},Pe=void 0,Se=r=>{Pe=r,Ce.length&&Pe&&Pe(We)},Fe={},$e=(r,e)=>(e=((r,e)=>{for(void 0===e&&he("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e})(r,e),Fe[e]),Ae=(r,e)=>(e.ptrType&&e.ptr||se("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&se("Both smartPtrType and smartPtr must be specified"),e.count={value:1},De(Object.create(r,{$$:{value:e}})));function Re(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=$e(this.registeredClass,e);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Ae(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):Ae(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(e),s=Ee[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=_e(e,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ae(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):Ae(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var De=r=>"undefined"==typeof FinalizationRegistry?(De=r=>r,r):(ge=new FinalizationRegistry((r=>{be(r.$$)})),De=r=>{var e=r.$$;if(e.smartPtr){var t={$$:e};ge.register(r,t,r)}return r},we=r=>ge.unregister(r),De(r));function je(){if(this.$$.ptr||ve(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,e=De(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Me(){this.$$.ptr||ve(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),we(this),be(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ve(){return!this.$$.ptr}function xe(){return this.$$.ptr||ve(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),Ce.push(this),1===Ce.length&&Pe&&Pe(We),this.$$.deleteScheduled=!0,this}function Ze(){}var Oe=r=>{if(void 0===r)return"_unknown";var e=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${r}`:r};function Ie(r,e){return{[r=Oe(r)]:function(){return e.apply(this,arguments)}}[r]}var Ne=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(){return r[e].overloadTable.hasOwnProperty(arguments.length)||he(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[arguments.length].apply(this,arguments)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},ze=(r,e,t)=>{d.hasOwnProperty(r)?((void 0===t||void 0!==d[r].overloadTable&&void 0!==d[r].overloadTable[t])&&he(`Cannot register public name '${r}' twice`),Ne(d,r,r),d.hasOwnProperty(t)&&he(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[r].overloadTable[t]=e):(d[r]=e,void 0!==t&&(d[r].numArguments=t))};function Ge(r,e,t,n,o,a,i,s){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Le=(r,e,t)=>{for(;e!==t;)e.upcast||he(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function Xe(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${yt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass;return Le(e.$$.ptr,t,this.registeredClass)}function Be(r,e){var t;if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,t),t):0;e.$$||he(`Cannot pass "${yt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=Le(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&he("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var o=e.clone();t=this.rawShare(t,ht.toHandle((()=>o.delete()))),null!==r&&r.push(this.rawDestructor,t)}break;default:he("Unsupporting sharing policy")}return t}function He(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${yt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass;return Le(e.$$.ptr,t,this.registeredClass)}function Ue(r){return this.fromWireType(s()[r>>2])}function Ye(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function Ke(r){this.rawDestructor&&this.rawDestructor(r)}var Je=r=>{null!==r&&r.delete()};function Qe(r,e,t,n,o,a,i,s,u,c,l){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Be:n?(this.toWireType=Xe,this.destructorFunction=null):(this.toWireType=He,this.destructorFunction=null)}var qe=(r,e,t)=>{d.hasOwnProperty(r)||se("Replacing nonexistant public symbol"),void 0!==d[r].overloadTable&&void 0!==t?d[r].overloadTable[t]=e:(d[r]=e,d[r].argCount=t)},rt=(r,e,t)=>r.includes("j")?((r,e,t)=>{var n=d["dynCall_"+r];return t&&t.length?n.apply(null,[e].concat(t)):n.call(null,e)})(r,e,t):Mr(e).apply(null,t),et=(r,e)=>{var t,n,o,a=(r=de(r)).includes("j")?(t=r,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),rt(t,n,o)}):Mr(e);return"function"!=typeof a&&he(`unknown function pointer with signature ${r}: ${e}`),a},tt=void 0,nt=r=>{var e=Tn(r),t=de(e);return gn(e),t},ot=(r,e)=>{var t=[],n={};throw e.forEach((function r(e){n[e]||oe[e]||(ae[e]?ae[e].forEach(r):(t.push(e),n[e]=!0))})),new tt(`${r}: `+t.map(nt).join([", "]))},at=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(s()[e+4*n>>2]);return t};function it(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=Ie(r.name||"unknownFunctionName",(function(){}));t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}function st(r,e,t,n,o,a){var i=e.length;i<2&&he("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==t,u=!1,c=1;c<e.length;++c)if(null!==e[c]&&void 0===e[c].destructorFunction){u=!0;break}var l="void"!==e[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${Oe(r)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${r} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[he,n,o,ee,e[0],e[1]];for(s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+e[c+2].name+"\n",m.push("argType"+c),y.push(e[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(l||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<e.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==e[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+e[c].name+"\n",m.push(v+"_dtor"),y.push(e[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),it(Function,m).apply(null,y)}var ut=(r,e,t)=>(r instanceof Object||he(`${t} with invalid "this": ${r}`),r instanceof e.registeredClass.constructor||he(`${t} incompatible with "this" of type ${r.constructor.name}`),r.$$.ptr||he(`cannot call emscripten binding method ${t} on deleted object`),Le(r.$$.ptr,r.$$.ptrType.registeredClass,e.registeredClass));function ct(){this.allocated=[void 0],this.freelist=[]}var lt=new ct,dt=r=>{r>=lt.reserved&&0==--lt.get(r).refcount&<.free(r)},ft=()=>{for(var r=0,e=lt.reserved;e<lt.allocated.length;++e)void 0!==lt.allocated[e]&&++r;return r},ht={toValue:r=>(r||he("Cannot use deleted val. handle = "+r),lt.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return lt.allocate({refcount:1,value:r})}}},pt=(r,n,u)=>{switch(n){case 1:return u?function(r){return this.fromWireType(e()[r>>0])}:function(r){return this.fromWireType(t()[r>>0])};case 2:return u?function(r){return this.fromWireType(o()[r>>1])}:function(r){return this.fromWireType(a()[r>>1])};case 4:return u?function(r){return this.fromWireType(i()[r>>2])}:function(r){return this.fromWireType(s()[r>>2])};default:throw new TypeError(`invalid integer width (${n}): ${r}`)}},mt=(r,e)=>{var t=oe[r];return void 0===t&&he(e+" has unknown type "+nt(r)),t},yt=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},vt=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType((k.buffer!=S.buffer&&Z(),j)[r>>2])};case 8:return function(r){return this.fromWireType(u()[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},gt=(r,n,u)=>{switch(n){case 1:return u?r=>e()[r>>0]:r=>t()[r>>0];case 2:return u?r=>o()[r>>1]:r=>a()[r>>1];case 4:return u?r=>i()[r>>2]:r=>s()[r>>2];default:throw new TypeError(`invalid integer width (${n}): ${r}`)}},wt=(r,e,n)=>gr(r,t(),e,n),bt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,_t=(r,e)=>{for(var n=r,i=n>>1,s=i+e/2;!(i>=s)&&a()[i];)++i;if((n=i<<1)-r>32&&bt)return bt.decode(t().slice(r,n));for(var u="",c=0;!(c>=e/2);++c){var l=o()[r+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},Et=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);o()[e>>1]=s,e+=2}return o()[e>>1]=0,e-n},Tt=r=>2*r.length,kt=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=i()[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ct=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),i()[e>>2]=s,(e+=4)+4>o)break}return i()[e>>2]=0,e-n},Wt=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Pt=r=>{if(!V)try{r(),(()=>{if(!X())try{g?Pn(P):Fr(P)}catch(r){$r(r)}})()}catch(r){$r(r)}},St=r=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),r>>2,r).value.then(Ft);var e=r+128;Atomics.store(i(),e>>2,1)}};d.__emscripten_thread_mailbox_await=St;var Ft=()=>{var r=bn();r&&(St(r),Pt((()=>Sn())))};d.checkMailbox=Ft;var $t=r=>{var e=An(),t=r();return Rn(e),t},At=function(r,e){var t=arguments.length-2,n=arguments;return $t((()=>{for(var o=t,a=Dn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Cn(r,o,a,e)}))},Rt=[],Dt={},jt=r=>{var e=Dt[r];return void 0===e?de(r):e},Mt=[],Vt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),xt=[],Zt=r=>r%4==0&&(r%100!=0||r%400==0),Ot=[0,31,60,91,121,152,182,213,244,274,305,335],It=[0,31,59,90,120,151,181,212,243,273,304,334],Nt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function zt(r,e,t,n,o,a,i){if(g)return At(14,1,r,e,t,n,o,a,i);var s=Nt(a,i);try{if(isNaN(s))return 61;var u=Pr.getStreamFromFD(o);2&t&&Pr.doMsync(r,u,e,n,s),Cr.munmap(u)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var Gt,Lt=r=>{var e=vr(r)+1,t=vn(e);return t&&wt(r,t,e),t},Xt=[],Bt=(r,e,n)=>{var o=((r,e)=>{var n;for(Xt.length=0;n=t()[r++];)e+=105!=n&&e%8?4:0,Xt.push(105==n?i()[e>>2]:u()[e>>3]),e+=105==n?4:8;return Xt})(e,n);return ir[r].apply(null,o)};Gt=()=>performance.timeOrigin+performance.now();var Ht=r=>{var e=(r-k.buffer.byteLength+65535)/65536;try{return k.grow(e),Z(),1}catch(r){}},Ut={},Yt=()=>{if(!Yt.strings){var r={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",_:y||"./this.program"};for(var e in Ut)void 0===Ut[e]?delete r[e]:r[e]=Ut[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Yt.strings=t}return Yt.strings},Kt=function(r,t){if(g)return At(15,1,r,t);var n=0;return Yt().forEach(((o,a)=>{var i=t+n;s()[r+4*a>>2]=i,((r,t)=>{for(var n=0;n<r.length;++n)e()[t++>>0]=r.charCodeAt(n);e()[t>>0]=0})(o,i),n+=o.length+1})),0},Jt=function(r,e){if(g)return At(16,1,r,e);var t=Yt();s()[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),s()[e>>2]=n,0};function Qt(r){if(g)return At(17,1,r);try{var e=Pr.getStreamFromFD(r);return Cr.close(e),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function qt(r,t,n,o){if(g)return At(18,1,r,t,n,o);try{var a=((r,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=Cr.read(r,e(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),t,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function rn(r,e,t,n,o){if(g)return At(19,1,r,e,t,n,o);var a=Nt(e,t);try{if(isNaN(a))return 61;var s=Pr.getStreamFromFD(r);return Cr.llseek(s,a,n),K=[s.position>>>0,(Y=s.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[o>>2]=K[0],i()[o+4>>2]=K[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function en(r,t,n,o){if(g)return At(20,1,r,t,n,o);try{var a=((r,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=Cr.write(r,e(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),t,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}var tn=[31,29,31,30,31,30,31,31,30,31,30,31],nn=[31,28,31,30,31,30,31,31,30,31,30,31],on=(r,t,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Wr(a):""},c=Wr(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 f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function m(r,e){return p(r,e,"0")}function y(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function v(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function g(r){var e=((r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=Zt(t.getFullYear()),o=t.getMonth(),a=(n?tn:nn)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=v(t),a=v(n);return y(o,e)<=0?y(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":r=>f[r.tm_wday].substring(0,3),"%A":r=>f[r.tm_wday],"%b":r=>h[r.tm_mon].substring(0,3),"%B":r=>h[r.tm_mon],"%C":r=>m((r.tm_year+1900)/100|0,2),"%d":r=>m(r.tm_mday,2),"%e":r=>p(r.tm_mday,2," "),"%g":r=>g(r).toString().substring(2),"%G":r=>g(r),"%H":r=>m(r.tm_hour,2),"%I":r=>{var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),m(e,2)},"%j":r=>m(r.tm_mday+((r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t})(Zt(r.tm_year+1900)?tn:nn,r.tm_mon-1),3),"%m":r=>m(r.tm_mon+1,2),"%M":r=>m(r.tm_min,2),"%n":()=>"\n","%p":r=>r.tm_hour>=0&&r.tm_hour<12?"AM":"PM","%S":r=>m(r.tm_sec,2),"%t":()=>"\t","%u":r=>r.tm_wday||7,"%U":r=>{var e=r.tm_yday+7-r.tm_wday;return m(Math.floor(e/7),2)},"%V":r=>{var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&Zt(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Zt(r.tm_year%400-1))&&e++}return m(e,2)},"%w":r=>r.tm_wday,"%W":r=>{var e=r.tm_yday+7-(r.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":r=>(r.tm_year+1900).toString().substring(2),"%Y":r=>r.tm_year+1900,"%z":r=>{var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":r=>r.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,_,E=wr(c=c.replace(/\0\0/g,"%"),!1);return E.length>t?0:(b=E,_=r,e().set(b,_),E.length-1)},an=Lt;Ar.init();var sn,un,cn,ln=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Cr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},dn=365,fn=146;Object.defineProperties(ln.prototype,{read:{get:function(){return(this.mode&dn)===dn},set:function(r){r?this.mode|=dn:this.mode&=-366}},write:{get:function(){return(this.mode&fn)===fn},set:function(r){r?this.mode|=fn:this.mode&=-147}},isFolder:{get:function(){return Cr.isDir(this.mode)}},isDevice:{get:function(){return Cr.isChrdev(this.mode)}}}),Cr.FSNode=ln,Cr.createPreloadedFile=(r,e,t,n,o,a,i,s,u,c)=>{var l=e?hr.resolve(dr.join2(r,e)):r;function d(t){function d(t){c&&c(),s||Cr.createDataFile(r,e,t,n,o,u),a&&a(),er()}((r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Tr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o})(t,l,d,(()=>{i&&i(),er()}))||d(t)}rr(),"string"==typeof t?((r,e,t,n)=>{var o=n?"":`al ${r}`;h(r,(t=>{x(t,`Loading data file "${r}" failed (no arrayBuffer).`),e(new Uint8Array(t)),o&&er()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&rr()})(t,(r=>d(r)),i):d(t)},Cr.staticInit(),ie=d.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},(()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);le=r})(),fe=d.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},Ze.prototype.isAliasOf=ye,Ze.prototype.clone=je,Ze.prototype.delete=Me,Ze.prototype.isDeleted=Ve,Ze.prototype.deleteLater=xe,d.getInheritedInstanceCount=Te,d.getLiveInheritedInstances=ke,d.flushPendingDeletes=We,d.setDelayFunction=Se,Qe.prototype.getPointee=Ye,Qe.prototype.destructor=Ke,Qe.prototype.argPackAdvance=me,Qe.prototype.readValueFromPointer=Ue,Qe.prototype.deleteObject=Je,Qe.prototype.fromWireType=Re,tt=d.UnboundTypeError=(sn=Error,(cn=Ie(un="UnboundTypeError",(function(r){this.name=un,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(sn.prototype),cn.prototype.constructor=cn,cn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},cn),Object.assign(ct.prototype,{get(r){return this.allocated[r]},has(r){return void 0!==this.allocated[r]},allocate(r){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=r,e},free(r){this.allocated[r]=void 0,this.freelist.push(r)}}),lt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),lt.reserved=lt.allocated.length,d.count_emval_handles=ft;var hn,pn=[Sr,Dr,Gr,Xr,Br,Hr,Ur,function(r,e){if(g)return At(7,1,r,e);try{return r=Pr.getStr(r),Pr.doStat(Cr.lstat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},Yr,Kr,Jr,Qr,qr,function(r,e,t,n,o,a,u,c){if(g)return At(13,1,r,e,t,n,o,a,u,c);var l=Nt(o,a);try{if(isNaN(l))return 61;var d=Pr.getStreamFromFD(n),f=Cr.mmap(d,r,l,e,t),h=f.ptr;return i()[u>>2]=f.allocated,s()[c>>2]=h,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},zt,Kt,Jt,Qt,qt,rn,en],mn={u:r=>{var e=new Ir(r);return e.get_caught()||(e.set_caught(!0),Zr--),e.set_rethrown(!1),xr.push(e),Mn(e.excPtr),e.get_exception_ptr()},Eb:()=>{if(!xr.length)return 0;var r=xr[xr.length-1];return Mn(r.excPtr),r.excPtr},z:()=>{Fn(0,0);var r=xr.pop();jn(r.excPtr),Or=0},b:()=>Nr([]),h:r=>Nr([r]),G:(r,e)=>Nr([r,e]),Da:zr,Db:r=>{if(r){var e=new Ir(r);xr.push(e),e.set_rethrown(!0),zr()}},p:(r,e,t)=>{throw new Ir(r).init(e,t),Zr++,Or=r},Fb:()=>Zr,Rb:r=>{kn(r,!1,1,!0,4194304,!1),Ar.threadInitTLS()},Ma:r=>{g?postMessage({cmd:"cleanupThread",thread:r}):cr(r)},Ob:Lr,e:r=>{throw Or||(Or=r),Or},Lb:Xr,Pa:Br,Wb:Hr,Xb:Ur,Ub:Yr,Qa:Kr,Mb:Jr,Vb:Qr,Nb:qr,ob:r=>{var e=re[r];delete re[r];var t=e.elements,n=t.length,o=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),a=e.rawConstructor,i=e.rawDestructor;ue([r],o,(function(r){return t.forEach(((e,t)=>{var o=r[t],a=e.getter,i=e.getterContext,s=r[t+n],u=e.setter,c=e.setterContext;e.read=r=>o.fromWireType(a(i,r)),e.write=(r,e)=>{var t=[];u(c,r,s.toWireType(t,e)),ee(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),o=0;o<n;++o)e[o]=t[o].read(r);return i(r),e},toWireType:(r,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==r&&r.push(i,s),s},argPackAdvance:me,readValueFromPointer:te,destructorFunction:i}]}))},nb:r=>{var e=ce[r];delete ce[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));ue([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,u=e.getterContext,c=r[t+o.length],l=e.setter,d=e.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,e)=>{var t=[];l(d,r,c.toWireType(t,e)),ee(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:n}]}))},yb:(r,e,t,n,o)=>{},ac:(r,e,n,o)=>{pe(r,{name:e=de(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?n:o},argPackAdvance:me,readValueFromPointer:function(r){return this.fromWireType(t()[r])},destructorFunction:null})},V:(r,e,t,n,o,a,i,s,u,c,l,d,f)=>{l=de(l),a=et(o,a),s&&(s=et(i,s)),c&&(c=et(u,c)),f=et(d,f);var h=Oe(l);ze(h,(function(){ot(`Cannot construct ${l} due to unbound types`,[n])})),ue([r,e,t],n?[n]:[],(function(e){var t,o;e=e[0],o=n?(t=e.registeredClass).instancePrototype:Ze.prototype;var i=Ie(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new fe(l+" has no accessible constructor");var r=d.constructor_body[arguments.length];if(void 0===r)throw new fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var d=new Ge(l,i,u,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Qe(l,d,!0,!1,!1),m=new Qe(l+"*",d,!1,!1,!1),y=new Qe(l+" const*",d,!1,!0,!1);return Ee[r]={pointerType:m,constPointerType:y},qe(h,i),[p,m,y]}))},Ja:(r,e,t,n,o,a)=>{var i=at(e,t);o=et(n,o),ue([],[r],(function(r){var t=`constructor ${(r=r[0]).name}`;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[e-1])throw new fe(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${r.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return r.registeredClass.constructor_body[e-1]=()=>{ot(`Cannot construct ${r.name} due to unbound types`,i)},ue([],i,(n=>(n.splice(1,0,null),r.registeredClass.constructor_body[e-1]=st(t,n,null,o,a),[]))),[]}))},Ia:(r,e,t,n,o,a,i,s,u)=>{var c=at(t,n);e=de(e),a=et(o,a),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`;function o(){ot(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(e);var l=r.registeredClass.instancePrototype,d=l[e];return void 0===d||void 0===d.overloadTable&&d.className!==r.name&&d.argCount===t-2?(o.argCount=t-2,o.className=r.name,l[e]=o):(Ne(l,e,n),l[e].overloadTable[t-2]=o),ue([],c,(function(o){var s=st(n,o,r,a,i,u);return void 0===l[e].overloadTable?(s.argCount=t-2,l[e]=s):l[e].overloadTable[t-2]=s,[]})),[]}))},I:(r,e,t,n,o,a,i,s,u,c)=>{e=de(e),o=et(n,o),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`,l={get(){ot(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>ot(`Cannot access ${n} due to unbound types`,[t,i]):r=>he(n+" is a read-only property"),Object.defineProperty(r.registeredClass.instancePrototype,e,l),ue([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var e=ut(this,r,n+" getter");return i.fromWireType(o(a,e))},enumerable:!0};if(u){u=et(s,u);var d=t[1];l.set=function(e){var t=ut(this,r,n+" setter"),o=[];u(c,t,d.toWireType(o,e)),ee(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,e,l),[]})),[]}))},$b:(r,e)=>{pe(r,{name:e=de(e),fromWireType:r=>{var e=ht.toValue(r);return dt(r),e},toWireType:(r,e)=>ht.toHandle(e),argPackAdvance:me,readValueFromPointer:te,destructorFunction:null})},pb:(r,e,t,n)=>{function o(){}e=de(e),o.values={},pe(r,{name:e,constructor:o,fromWireType:function(r){return this.constructor.values[r]},toWireType:(r,e)=>e.value,argPackAdvance:me,readValueFromPointer:pt(e,t,n),destructorFunction:null}),ze(e,o)},Y:(r,e,t)=>{var n=mt(r,"enum");e=de(e);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Ie(`${n.name}_${e}`,(function(){}))}});o.values[t]=a,o[e]=a},Sa:(r,e,t)=>{pe(r,{name:e=de(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:me,readValueFromPointer:vt(e,t),destructorFunction:null})},la:(r,e,t,n,o,a,i)=>{var s=at(e,t);r=de(r),o=et(n,o),ze(r,(function(){ot(`Cannot call ${r} due to unbound types`,s)}),e-1),ue([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return qe(r,st(r,n,null,o,a,i),e-1),[]}))},R:(r,e,t,n,o)=>{e=de(e),-1===o&&(o=4294967295);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned");pe(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return this.name,e>>>0}:function(r,e){return this.name,e},argPackAdvance:me,readValueFromPointer:gt(e,t,0!==n),destructorFunction:null})},F:(r,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function a(r){var t=s()[r>>2],n=s()[r+4>>2];return new o(e().buffer,n,t)}pe(r,{name:n=de(n),fromWireType:a,argPackAdvance:me,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Ra:(r,e)=>{var n="std::string"===(e=de(e));pe(r,{name:e,fromWireType:r=>{var e,o=s()[r>>2],a=r+4;if(n)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==t()[c]){var l=Wr(i,c-i);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),i=c+1}}else{var d=new Array(o);for(u=0;u<o;++u)d[u]=String.fromCharCode(t()[a+u]);e=d.join("")}return gn(r),e},toWireType:(r,e)=>{var o;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var a="string"==typeof e;a||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||he("Cannot pass non-string to std::string"),o=n&&a?vr(e):e.length;var i=vn(4+o+1),u=i+4;if(s()[i>>2]=o,n&&a)wt(e,u,o+1);else if(a)for(var c=0;c<o;++c){var l=e.charCodeAt(c);l>255&&(gn(u),he("String has UTF-16 code units that do not fit in 8 bits")),t()[u+c]=l}else for(c=0;c<o;++c)t()[u+c]=e[c];return null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:Ue,destructorFunction:r=>gn(r)})},xa:(r,e,t)=>{var n,o,i,u,c;t=de(t),2===e?(n=_t,o=Et,u=Tt,i=()=>a(),c=1):4===e&&(n=kt,o=Ct,u=Wt,i=()=>s(),c=2),pe(r,{name:t,fromWireType:r=>{for(var t,o=s()[r>>2],a=i(),u=r+4,l=0;l<=o;++l){var d=r+4+l*e;if(l==o||0==a[d>>c]){var f=n(u,d-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=d+e}}return gn(r),t},toWireType:(r,n)=>{"string"!=typeof n&&he(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=vn(4+a+e);return s()[i>>2]=a>>c,o(n,i+4,a+e),null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:r=>gn(r)})},Ha:(r,e,t,n,o,a)=>{re[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),elements:[]}},Ga:(r,e,t,n,o,a,i,s,u)=>{re[r].elements.push({getterReturnType:e,getter:et(t,n),getterContext:o,setterArgumentType:a,setter:et(i,s),setterContext:u})},S:(r,e,t,n,o,a)=>{ce[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),fields:[]}},E:(r,e,t,n,o,a,i,s,u,c)=>{ce[r].fields.push({fieldName:de(e),getterReturnType:t,getter:et(n,o),getterContext:a,setterArgumentType:i,setter:et(s,u),setterContext:c})},bc:(r,e)=>{pe(r,{isVoid:!0,name:e=de(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},_b:()=>!0,Jb:(r,e,t)=>{if(r==e)setTimeout((()=>Ft()));else if(g)postMessage({targetThread:r,cmd:"checkMailbox"});else{var n=Ar.pthreads[r];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Pb:(r,e,t,n)=>{Rt.length=t;for(var o=n>>3,a=0;a<t;a++)Rt[a]=u()[o+a];var i=r<0?ir[-r-1]:pn[r];Ar.currentProxiedOperationCallerThread=e;var s=i.apply(null,Rt);return Ar.currentProxiedOperationCallerThread=0,s},Qb:St,Zb:r=>{},Gb:()=>{throw 1/0},O:(r,e,t)=>{r=ht.toValue(r),e=mt(e,"emval::as");var n=[],o=ht.toHandle(n);return s()[t>>2]=o,e.toWireType(n,r)},Ea:(r,e,t,n,o)=>(r=Mt[r])(e=ht.toValue(e),t=jt(t),(r=>{var e=[];return s()[r>>2]=ht.toHandle(e),e})(n),o),ta:(r,e,t,n)=>{(r=Mt[r])(e=ht.toValue(e),t=jt(t),null,n)},xb:dt,ra:r=>0===r?ht.toHandle(Vt()):(r=jt(r),ht.toHandle(Vt()[r])),da:(r,e)=>{var t=((r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=mt(s()[e+4*n>>2],"parameter "+n);return t})(r,e),n=t[0],o=n.name+"_$"+t.slice(1).map((function(r){return r.name})).join("_")+"$",a=xt[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<r-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(t[1+l]);var d="return function "+Oe("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(l=0;l<r-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[l+1].argPackAdvance;for(d+=" var rv = handle[name]("+c+");\n",l=0;l<r-1;++l)t[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",i.push(d);var h,p,m=it(Function,i).apply(null,u);return h=m,p=Mt.length,Mt.push(h),a=p,xt[o]=a,a},lb:(r,e)=>(r=ht.toValue(r),e=ht.toValue(e),ht.toHandle(r[e])),ka:r=>{r>4&&(lt.get(r).refcount+=1)},fb:(r,e)=>(r=ht.toValue(r))instanceof(e=ht.toValue(e)),gb:r=>"string"==typeof(r=ht.toValue(r)),ha:()=>ht.toHandle([]),jb:r=>{r=ht.toValue(r);for(var e=new Array(r.length),t=0;t<r.length;t++)e[t]=r[t];return ht.toHandle(e)},sa:r=>ht.toHandle(jt(r)),mb:r=>{var e=ht.toValue(r);ee(e),dt(r)},M:(r,e)=>{var t=(r=mt(r,"_emval_take_value")).readValueFromPointer(e);return ht.toHandle(t)},vb:function(r,e,t){var n=Nt(r,e),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|(r=>(Zt(r.getFullYear())?Ot:It)[r.getMonth()]+r.getDate()-1)(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[t+32>>2]=l},ub:zt,Ib:(r,e,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function d(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}s()[r>>2]=60*l,i()[e>>2]=Number(u!=c);var f=d(o),h=d(a),p=Lt(f),m=Lt(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},x:()=>{tr("")},Fa:(r,e,t)=>Bt(r,e,t),Na:()=>{},va:()=>Date.now(),Yb:()=>{throw L+=1,"unwind"},Kb:()=>2147483648,J:Gt,Ua:()=>navigator.hardwareConcurrency,Hb:r=>{var e=t().length;if((r>>>=0)<=e)return!1;var n=2147483648;if(r>n)return!1;for(var o,a,i=1;i<=4;i*=2){var s=e*(1+.2/i);s=Math.min(s,r+100663296);var u=Math.min(n,(o=Math.max(r,s))+((a=65536)-o%a)%a);if(Ht(u))return!0}return!1},Sb:Kt,Tb:Jt,Ta:Fr,wa:Qt,Oa:qt,wb:rn,ua:en,ib:function(){return an(location.toString())},hb:function(){return an((r=Hn,self[r(341,"S)%W")][r(326,"LOol")]()));var r},Ya:function(r,e){var t=An();try{return Mr(r)(e)}catch(r){if(Rn(t),r!==r+0)throw r;Fn(1,0)}},_a:function(r,e,t,n,o,a){var i=An();try{return Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},A:function(r,e,t,n){var o=An();try{return Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},ec:function(r,e,t,n,o,a,i,s){var u=An();try{return Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},q:function(r,e){var t=An();try{return Mr(r)(e)}catch(r){if(Rn(t),r!==r+0)throw r;Fn(1,0)}},w:function(r,e,t){var n=An();try{return Mr(r)(e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},N:function(r,e,t,n){var o=An();try{return Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},fa:function(r,e,t,n,o){var a=An();try{return Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},v:function(r){var e=An();try{return Mr(r)()}catch(r){if(Rn(e),r!==r+0)throw r;Fn(1,0)}},j:function(r,e){var t=An();try{return Mr(r)(e)}catch(r){if(Rn(t),r!==r+0)throw r;Fn(1,0)}},c:function(r,e,t){var n=An();try{return Mr(r)(e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},g:function(r,e,t,n){var o=An();try{return Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},l:function(r,e,t,n,o){var a=An();try{return Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},La:function(r,e,t,n,o,a){var i=An();try{return Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},cb:function(r,e,t,n,o,a){var i=An();try{return Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},o:function(r,e,t,n,o,a){var i=An();try{return Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},y:function(r,e,t,n,o,a,i){var s=An();try{return Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},Ka:function(r,e,t,n,o,a,i,s){var u=An();try{return Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},oa:function(r,e,t,n,o,a,i,s,u){var c=An();try{return Mr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Rn(c),r!==r+0)throw r;Fn(1,0)}},cc:function(r,e,t,n,o,a,i,s,u,c){var l=An();try{return Mr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Rn(l),r!==r+0)throw r;Fn(1,0)}},ja:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=An();try{return Mr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Rn(f),r!==r+0)throw r;Fn(1,0)}},rb:function(r,e,t,n,o,a,i){var s=An();try{return Gn(r,e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},Ab:function(r,e,t,n){var o=An();try{return In(r,e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},tb:function(r){var e=An();try{return Nn(r)}catch(r){if(Rn(e),r!==r+0)throw r;Fn(1,0)}},Bb:function(r,e){var t=An();try{return Zn(r,e)}catch(r){if(Rn(t),r!==r+0)throw r;Fn(1,0)}},sb:function(r,e,t){var n=An();try{return zn(r,e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},qb:function(r,e,t,n,o){var a=An();try{return Ln(r,e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},m:function(r){var e=An();try{Mr(r)()}catch(r){if(Rn(e),r!==r+0)throw r;Fn(1,0)}},i:function(r,e){var t=An();try{Mr(r)(e)}catch(r){if(Rn(t),r!==r+0)throw r;Fn(1,0)}},kb:function(r,e,t){var n=An();try{Mr(r)(e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},ga:function(r,e,t){var n=An();try{Mr(r)(e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},d:function(r,e,t){var n=An();try{Mr(r)(e,t)}catch(r){if(Rn(n),r!==r+0)throw r;Fn(1,0)}},X:function(r,e,t,n){var o=An();try{Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},ab:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},Xa:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},na:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},ba:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},qa:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},L:function(r,e,t,n){var o=An();try{Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},_:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},Aa:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},pa:function(r,e,t,n,o,a){var i=An();try{Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},Ba:function(r,e,t,n,o,a,i,s,u){var c=An();try{Mr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Rn(c),r!==r+0)throw r;Fn(1,0)}},f:function(r,e,t,n){var o=An();try{Mr(r)(e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},B:function(r,e,t,n,o,a){var i=An();try{Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},fc:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},K:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},C:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},aa:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},Wa:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},U:function(r,e,t,n,o,a){var i=An();try{Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},bb:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},za:function(r,e,t,n,o,a,i,s,u,c){var l=An();try{Mr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Rn(l),r!==r+0)throw r;Fn(1,0)}},$a:function(r,e,t,n,o,a,i,s,u,c,l){var d=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Rn(d),r!==r+0)throw r;Fn(1,0)}},k:function(r,e,t,n,o){var a=An();try{Mr(r)(e,t,n,o)}catch(r){if(Rn(a),r!==r+0)throw r;Fn(1,0)}},Ca:function(r,e,t,n,o,a,i,s,u){var c=An();try{Mr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Rn(c),r!==r+0)throw r;Fn(1,0)}},D:function(r,e,t,n,o,a){var i=An();try{Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},W:function(r,e,t,n,o,a,i,s,u,c){var l=An();try{Mr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Rn(l),r!==r+0)throw r;Fn(1,0)}},ea:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},n:function(r,e,t,n,o,a){var i=An();try{Mr(r)(e,t,n,o,a)}catch(r){if(Rn(i),r!==r+0)throw r;Fn(1,0)}},db:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},t:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},Z:function(r,e,t,n,o,a,i,s,u,c,l){var d=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Rn(d),r!==r+0)throw r;Fn(1,0)}},T:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},r:function(r,e,t,n,o,a,i){var s=An();try{Mr(r)(e,t,n,o,a,i)}catch(r){if(Rn(s),r!==r+0)throw r;Fn(1,0)}},ma:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},Va:function(r,e,t,n,o,a,i,s,u,c,l){var d=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Rn(d),r!==r+0)throw r;Fn(1,0)}},dc:function(r,e,t,n,o,a,i,s,u){var c=An();try{Mr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Rn(c),r!==r+0)throw r;Fn(1,0)}},s:function(r,e,t,n,o,a,i,s){var u=An();try{Mr(r)(e,t,n,o,a,i,s)}catch(r){if(Rn(u),r!==r+0)throw r;Fn(1,0)}},H:function(r,e,t,n,o,a,i,s,u){var c=An();try{Mr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Rn(c),r!==r+0)throw r;Fn(1,0)}},ya:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Rn(f),r!==r+0)throw r;Fn(1,0)}},P:function(r,e,t,n,o,a,i,s,u,c){var l=An();try{Mr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Rn(l),r!==r+0)throw r;Fn(1,0)}},$:function(r,e,t,n,o,a,i,s,u,c,l){var d=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Rn(d),r!==r+0)throw r;Fn(1,0)}},Za:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Rn(f),r!==r+0)throw r;Fn(1,0)}},ca:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h){var p=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h)}catch(r){if(Rn(p),r!==r+0)throw r;Fn(1,0)}},ia:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var y=An();try{Mr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(r){if(Rn(y),r!==r+0)throw r;Fn(1,0)}},zb:function(r,e,t,n){var o=An();try{On(r,e,t,n)}catch(r){if(Rn(o),r!==r+0)throw r;Fn(1,0)}},Q:r=>r,a:k||d.wasmMemory,eb:on,Cb:(r,e,t,n,o)=>on(r,e,t,n)},yn=function(){var r,e,t,n,o={a:mn};function a(r,e){var t,n=r.exports;return Vr((yn=n).nc),O=yn.ic,t=yn.gc,z.unshift(t),C=e,er(),n}if(rr(),d.instantiateWasm)try{return d.instantiateWasm(o,a)}catch(r){T(`Module.instantiateWasm callback failed with error: ${r}`),l(r)}return(r=_,e=U,t=o,n=function(r){a(r.instance,r.module)},r||"function"!=typeof WebAssembly.instantiateStreaming||nr(e)||"function"!=typeof fetch?ar(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return T(`wasm streaming compile failed: ${r}`),T("falling back to ArrayBuffer instantiation"),ar(e,t,n)}))))).catch(l),{}}(),vn=d._malloc=r=>(vn=d._malloc=yn.hc)(r),gn=d._free=r=>(gn=d._free=yn.jc)(r),wn=()=>(wn=yn.kc)(),bn=d._pthread_self=()=>(bn=d._pthread_self=yn.lc)(),_n=r=>(_n=yn.mc)(r),En=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=yn.nc)(),(r,e)=>(En=yn.oc)(r,e)),Tn=r=>(Tn=yn.pc)(r),kn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=yn.qc)(),d.__emscripten_thread_init=(r,e,t,n,o,a)=>(kn=d.__emscripten_thread_init=yn.rc)(r,e,t,n,o,a)),Cn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=yn.sc)(),(r,e,t,n)=>(Cn=yn.tc)(r,e,t,n)),Wn=r=>(Wn=yn.uc)(r),Pn=d.__emscripten_thread_exit=r=>(Pn=d.__emscripten_thread_exit=yn.vc)(r),Sn=d.__emscripten_check_mailbox=()=>(Sn=d.__emscripten_check_mailbox=yn.wc)(),Fn=(r,e)=>(Fn=yn.xc)(r,e),$n=(r,e)=>($n=yn.yc)(r,e),An=()=>(An=yn.zc)(),Rn=r=>(Rn=yn.Ac)(r),Dn=r=>(Dn=yn.Bc)(r),jn=r=>(jn=yn.Cc)(r),Mn=r=>(Mn=yn.Dc)(r),Vn=(r,e,t)=>(Vn=yn.Ec)(r,e,t),xn=r=>(xn=yn.Fc)(r),Zn=d.dynCall_ji=(r,e)=>(Zn=d.dynCall_ji=yn.Gc)(r,e),On=d.dynCall_vij=(r,e,t,n)=>(On=d.dynCall_vij=yn.Hc)(r,e,t,n),In=d.dynCall_iij=(r,e,t,n)=>(In=d.dynCall_iij=yn.Ic)(r,e,t,n),Nn=(d.dynCall_viijii=(r,e,t,n,o,a,i)=>(d.dynCall_viijii=yn.Jc)(r,e,t,n,o,a,i),d.dynCall_jjj=(r,e,t,n,o)=>(d.dynCall_jjj=yn.Kc)(r,e,t,n,o),d.dynCall_iiiijj=(r,e,t,n,o,a,i,s)=>(d.dynCall_iiiijj=yn.Lc)(r,e,t,n,o,a,i,s),d.dynCall_viijj=(r,e,t,n,o,a,i)=>(d.dynCall_viijj=yn.Mc)(r,e,t,n,o,a,i),d.dynCall_viiijjj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=yn.Nc)(r,e,t,n,o,a,i,s,u,c),d.dynCall_jiji=(r,e,t,n,o)=>(d.dynCall_jiji=yn.Oc)(r,e,t,n,o),d.dynCall_j=r=>(Nn=d.dynCall_j=yn.Pc)(r)),zn=d.dynCall_jii=(r,e,t)=>(zn=d.dynCall_jii=yn.Qc)(r,e,t),Gn=d.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(Gn=d.dynCall_iiiiij=yn.Rc)(r,e,t,n,o,a,i),Ln=d.dynCall_jiiii=(r,e,t,n,o)=>(Ln=d.dynCall_jiiii=yn.Sc)(r,e,t,n,o);function Xn(){if(!(J>0)){if(g)return c(d),B(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)H(d.preRun.shift());Rr(N)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),r()}),1)):r())}function r(){hn||(hn=!0,d.calledRun=!0,V||(B(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!g){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)r=d.postRun.shift(),G.unshift(r);var r;Rr(G)}}()))}}if(d.dynCall_iiiiijj=(r,e,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=yn.Tc)(r,e,t,n,o,a,i,s,u),d.dynCall_iiiiiijj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_iiiiiijj=yn.Uc)(r,e,t,n,o,a,i,s,u,c),d.___start_em_js=1120168,d.___stop_em_js=1120276,d.keepRuntimeAlive=X,d.wasmMemory=k,d.UTF8ToString=Wr,d.stringToUTF8=wt,d.lengthBytesUTF8=vr,d.ExitStatus=sr,d.allocateUTF8=an,d.PThread=Ar,q=function r(){hn||Xn(),hn||(q=r)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Bn(){var r=["WQyyW6lcSCopWQ9TWQL2W5S5W6y","WRRcHmoNeCk7h8kwsmoVAW","W5ZdMmo8WPFcRSoWA8obW5C","CmoDcmo+i8oJEmoyyZlcPcK","W69Er8oTsSkFWQVdV39Ktq","WQH0rZqiAmoTWQ4c","suVdGGCYgCk5WRX+","WQmvW6tcSmocWQ4wWOLIW6CXW7eV","Dmozcmo4jCoJjSoKwYBcKXtdVG","WP7cVSopWOhdK1xdK8kNcxNcPmkQ","EHddMrdcO10AW5u","wLzIE0P9smoEWRjGbG","WQqrW6BcSComWQGtWRXHW7OTW6yE","WOpcKdxdVcusE8kUvdK","A8o2gCoFCSoczcZdIuO7","WQesW6FcS8okWQWFWRvbW4qnW5Kc","WRyxW5BdOSoAW4zwWPpdPCoHWRtdOrO","W4VdOCokWRflBSohWQK","WPVdRHzlySkZWONdQZ7cIxVcKG","DSoEc8o7lCoHl8oyEaxcRZZdKW","oHPyWRewW4GCWQzdWRZdPq","W6TCrSkvcCk7WPldR1G"];return(Bn=function(){return r})()}function Hn(r,e){var t=Bn();return Hn=function(e,n){var o=t[e-=324];if(void 0===Hn.BlZdPM){var a=function(r){for(var e,t,n="",o="",a=0,i=0;t=r.charAt(i++);~t&&(e=a%4?64*e+t:t,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,e){var t,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Hn.rVVKLZ=i,r=arguments,Hn.BlZdPM=!0}var s=t[0],u=e+s,c=r[u];return c?o=c:(void 0===Hn.RwOXWD&&(Hn.RwOXWD=!0),o=Hn.rVVKLZ(o,n),r[u]=o),o},Hn(r,e)}Xn(),function(r,e){for(var t=Hn,n=r();;)try{if(959658==parseInt(t(331,"Vxs#"))/1+-parseInt(t(343,"Vxs#"))/2+parseInt(t(338,"Vxs#"))/3+parseInt(t(339,"I3BG"))/4+parseInt(t(334,"I3BG"))/5*(parseInt(t(330,"0b!o"))/6)+parseInt(t(337,"K@g$"))/7*(parseInt(t(345,"2hlS"))/8)+parseInt(t(344,"pE2o"))/9*(-parseInt(t(342,"Txz("))/10))break;n.push(n.shift())}catch(r){n.push(n.shift())}}(Bn);var ighnua,Un=(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}),Yn=Un(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yn)};return r()}));return Yn(),r.ready});r.exports=o},function(r,e,t){"use strict";t.r(e),e.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"}]);
|