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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/@types/model/configuration/text-data-scanner-configuration.d.ts +18 -0
  2. package/bundle/ScanbotSDK.min.js +1 -1
  3. package/bundle/ScanbotSDK.ui2.min.js +2 -2
  4. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  5. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  6. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  7. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  8. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  9. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  10. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  11. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  12. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  13. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  14. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
  15. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  16. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
  17. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  18. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  19. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  20. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  21. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  22. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  23. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  24. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  25. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  26. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  27. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  28. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  29. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  30. package/package.json +1 -1
@@ -1 +1 @@
1
- !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=t(1);let o;const a={};function i(e){const r=Math.random().toString(36);return a[r]=e,r}function s(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function u(e){const r=s(e);r.delete&&r.delete(),delete a[e]}const c={initialize:async function(e,r,a,i,s){try{const{captureConsole:u,allowThreads:c,profileTfjsKernels:l,jpegQuality: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!=P.buffer&&Z(),P}function t(){return k.buffer!=P.buffer&&Z(),S}function o(){return k.buffer!=P.buffer&&Z(),$}function a(){return k.buffer!=P.buffer&&Z(),A}function i(){return k.buffer!=P.buffer&&Z(),D}function s(){return k.buffer!=P.buffer&&Z(),M}function u(){return k.buffer!=P.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 F,P,S,$,A,D,M,R,j,x=!1;function V(e,r){e||te(r)}function Z(){var e=k.buffer;d.HEAP8=P=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=M=new Uint32Array(e),d.HEAPF32=R=new Float32Array(e),d.HEAPF64=j=new Float64Array(e)}var O,I=d.INITIAL_MEMORY||134217728;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=[],U=0;function X(){return C||U>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 Y,H,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,F=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==Y&&_)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(Y="ScanbotSDK.Asm-simd-threads.wasm")||(Y=b(Y));var ie={3673948:e=>un(function(){return this[Ce(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var 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=kn(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):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(de.isAbs(r))return r;var n;if(n=-100===e?We.cwd():Fe.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,(H=n.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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,(H=Math.floor(a/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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,(H=Math.floor(u/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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,(H=n.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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()[Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>Ce(e),getStreamFromFD:e=>We.getStreamChecked(e)};function Pe(e){if(g)return At(0,1,e);F=e,X()||(Ae.terminateAllThreads(),d.onExit&&d.onExit(e),x=!0),v(e,new se(e))}var Se=(e,r)=>{if(F=e,g)throw Me(e),"unwind";Pe(e)},$e=e=>{if(e instanceof se||"unwind"==e)return F;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=>{F=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,Pn(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!=En()){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),Pn(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 Me(e){if(g)return At(1,0,e);Se(e)}d.establishStackSpace=()=>{var e=En(),r=i()[e+52>>2],t=i()[e+56>>2];Dn(r,r-t),Rn(r)};var Re=[],je=e=>{var r=Re[e];return r||(e>=Re.length&&(Re.length=e+1),Re[e]=r=O.get(e)),r};d.invokeEntryPoint=(e,r)=>{!function(e){X()?Ae.setExitStatus(e):Sn(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(On(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 Tn(0),0;var t=new Ie(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Tn(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Zn(a,n,i))return Tn(a),r}return Tn(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):Ue(e,r,t,n)}var Ue=(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 Xe(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=Fe.getStreamFromFD(T),C=Fe.DEFAULT_POLLMASK;if(W.stream_ops.poll){var F=-1;o&&(F=1e3*((r?i()[o>>2]:0)+(r?i()[o+8>>2]:0)/1e6)),C=W.stream_ops.poll(W,F)}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);Fe.varargs=t;try{var n=Fe.getStreamFromFD(e);switch(r){case 0:if((a=Fe.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=Fe.get();return n.flags|=a,0;case 5:return a=Fe.getp(),o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[_n()>>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=Fe.getStreamFromFD(e);return Fe.doStat(We.stat,t.path,r)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e,t,n){if(g)return At(6,1,e,t,n);Fe.varargs=n;try{var a=Fe.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=Fe.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=Fe.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=Fe.getp(),i()[u>>2]=0,0):-59;case 21520:return a.tty?-28:-59;case 21531:return u=Fe.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=Fe.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 He(e,r,t,n){if(g)return At(8,1,e,r,t,n);try{r=Fe.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=Fe.calculateAt(e,r,a),Fe.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);Fe.varargs=n;try{r=Fe.getStr(r),r=Fe.calculateAt(e,r);var o=n?Fe.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=Fe.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=Fe.getStr(e),Fe.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=Fe.getStr(r),r=Fe.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()}},Fr=void 0,Pr=e=>{Fr=e,Wr.length&&Fr&&Fr(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},Mr(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 Mr=e=>"undefined"==typeof FinalizationRegistry?(Mr=e=>e,e):(gr=new FinalizationRegistry((e=>{br(e.$$)})),Mr=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};gr.register(e,t,e)}return e},wr=e=>gr.unregister(e),Mr(e));function Rr(){if(this.$$.ptr||vr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=Mr(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&&Fr&&Fr(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 Ur=(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 Xr(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 Ur(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=Ur(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 Ur(r.$$.ptr,t,this.registeredClass)}function Yr(e){return this.fromWireType(s()[e>>2])}function Hr(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=Xr,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=Wn(e),t=dr(r);return bn(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`),Ur(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&&lt.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!=P.buffer&&Z(),R)[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},Ft=e=>{if(!x)try{e(),(()=>{if(!X())try{g?Sn(F):Se(F)}catch(e){$e(e)}})()}catch(e){$e(e)}},Pt=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=Pt;var St=()=>{var e=En();e&&(Pt(e),Ft((()=>$n())))};d.checkMailbox=St;var $t=e=>{var r=Mn(),t=e();return Rn(r),t},At=function(e,r){var t=arguments.length-2,n=arguments;return $t((()=>{for(var o=t,a=jn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Fn(e,o,a,r)}))},Dt=[],Mt=(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},Rt={},jt=e=>{var r=Rt[e];return void 0===r?dr(e):r},xt=[],Vt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Zt=[],Ot=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,It=e=>e%4==0&&(e%100!=0||e%400==0),Nt=[0,31,60,91,121,152,182,213,244,274,305,335],Gt=[0,31,59,90,120,151,181,212,243,273,304,334];function zt(e,r,t,n,o,a,i){if(g)return At(14,1,e,r,t,n,o,a,i);var s=Ot(a,i);try{if(isNaN(s))return 61;var u=Fe.getStreamFromFD(o);2&t&&Fe.doMsync(e,u,r,n,s),We.munmap(u)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ut,Xt=e=>{var r=ve(e)+1,t=wn(r);return t&&wt(e,t,r),t},Lt=[],Bt=(e,r,n)=>{var o=((e,r)=>{var n;for(Lt.length=0;n=t()[e++];)r+=105!=n&&r%8?4:0,Lt.push(105==n?i()[r>>2]:u()[r>>3]),r+=105==n?4:8;return Lt})(r,n);return ie[e].apply(null,o)};Ut=()=>performance.timeOrigin+performance.now();var Yt=e=>{var r=(e-k.buffer.byteLength+65535)/65536;try{return k.grow(r),Z(),1}catch(e){}},Ht={},Kt=()=>{if(!Kt.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]}`);Kt.strings=t}return Kt.strings},Jt=function(e,t){if(g)return At(15,1,e,t);var n=0;return Kt().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},Qt=function(e,r){if(g)return At(16,1,e,r);var t=Kt();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=Fe.getStreamFromFD(e);return We.close(r),0}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return e.errno}}function en(e,t){if(g)return At(18,1,e,t);try{var n=Fe.getStreamFromFD(e),a=n.tty?2:We.isDir(n.mode)?3:We.isLink(n.mode)?7:4;return r()[t>>0]=a,o()[t+2>>1]=0,K=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],i()[t+8>>2]=K[0],i()[t+12>>2]=K[1],K=[0,(H=0,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],i()[t+16>>2]=K[0],i()[t+20>>2]=K[1],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(19,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})(Fe.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 tn(e,r,t,n,o){if(g)return At(20,1,e,r,t,n,o);var a=Ot(r,t);try{if(isNaN(a))return 61;var s=Fe.getStreamFromFD(e);return We.llseek(s,a,n),K=[s.position>>>0,(H=s.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>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 nn(e,t,n,o){if(g)return At(21,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})(Fe.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 on=[31,29,31,30,31,30,31,31,30,31,30,31],an=[31,28,31,30,31,30,31,31,30,31,30,31],sn=(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=It(t.getFullYear()),o=t.getMonth(),a=(n?on:an)[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})(It(e.tm_year+1900)?on:an,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&&It(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&It(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)},un=Xt;Ae.init();var cn,ln,dn,fn=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},hn=365,pn=146;Object.defineProperties(fn.prototype,{read:{get:function(){return(this.mode&hn)===hn},set:function(e){e?this.mode|=hn:this.mode&=-366}},write:{get:function(){return(this.mode&pn)===pn},set:function(e){e?this.mode|=pn:this.mode&=-147}},isFolder:{get:function(){return We.isDir(this.mode)}},isDevice:{get:function(){return We.isChrdev(this.mode)}}}),We.FSNode=fn,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=Rr,Zr.prototype.delete=jr,Zr.prototype.isDeleted=xr,Zr.prototype.deleteLater=Vr,d.getInheritedInstanceCount=Tr,d.getLiveInheritedInstances=kr,d.flushPendingDeletes=Cr,d.setDelayFunction=Pr,Qr.prototype.getPointee=Hr,Qr.prototype.destructor=Kr,Qr.prototype.argPackAdvance=mr,Qr.prototype.readValueFromPointer=Yr,Qr.prototype.deleteObject=Jr,Qr.prototype.fromWireType=Dr,tt=d.UnboundTypeError=(cn=Error,(dn=Ir(ln="UnboundTypeError",(function(e){this.name=ln,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(cn.prototype),dn.prototype.constructor=dn,dn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},dn),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 mn,yn=[Pe,Me,ze,Xe,Le,Be,Ye,function(e,r){if(g)return At(7,1,e,r);try{return e=Fe.getStr(e),Fe.doStat(We.lstat,e,r)}catch(e){if("undefined"==typeof We||"ErrnoError"!==e.name)throw e;return-e.errno}},He,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=Ot(o,a);try{if(isNaN(l))return 61;var d=Fe.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}},zt,Jt,Qt,qt,en,rn,tn,nn],vn={r:e=>{var r=new Ie(e);return r.get_caught()||(r.set_caught(!0),Ze--),r.set_rethrown(!1),Ve.push(r),Vn(r.excPtr),r.get_exception_ptr()},yb:()=>{if(!Ve.length)return 0;var e=Ve[Ve.length-1];return Vn(e.excPtr),e.excPtr},s:()=>{An(0,0);var e=Ve.pop();xn(e.excPtr),Oe=0},b:()=>Ne([]),h:e=>Ne([e]),q:(e,r)=>Ne([e,r]),wa:Ge,xb:e=>{if(e){var r=new Ie(e);Ve.push(r),r.set_rethrown(!0),Ge()}},o:(e,r,t)=>{throw new Ie(e).init(r,t),Ze++,Oe=e},zb:()=>Ze,Lb:e=>{Cn(e,!1,1,!0,4194304,!1),Ae.threadInitTLS()},za:e=>{g?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},Ib:Ue,c:e=>{throw Oe||(Oe=e),Oe},Fb:Xe,Ca:Le,Rb:Be,Sb:Ye,Pb:He,Da:Ke,Gb:Je,Qb:Qe,Hb:qe,fb: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}]}))},eb: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}]}))},rb:(e,r,t,n,o)=>{},Xb:(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})},L:(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]}))},ha:(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),[]))),[]}))},K:(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,[]})),[]}))},E:(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),[]})),[]}))},Wb:(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})},ib:(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)},S:(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},Fa:(e,r,t)=>{pr(e,{name:r=dr(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:mr,readValueFromPointer:vt(r,t),destructorFunction:null})},P:(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),[]}))},N:(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})},y:(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})},db:(e,r,t,n,o,a,i,s,u,c,l,d)=>{t=dr(t),a=rt(o,a),s=rt(i,s),c=rt(u,c),d=rt(l,d),ur([e],[r],(function(e){return e=e[0],[new Qr(t,e.registeredClass,!1,!1,!0,e,n,a,s,c,d)]}))},Ea:(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 bn(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=wn(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&&(bn(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(bn,i),i},argPackAdvance:mr,readValueFromPointer:Yr,destructorFunction:e=>bn(e)})},la:(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 bn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&hr(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=wn(4+a+r);return s()[i>>2]=a>>c,o(n,i+4,a+r),null!==e&&e.push(bn,i),i},argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:e=>bn(e)})},hb:(e,r,t,n,o,a)=>{er[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),elements:[]}},gb:(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})},X:(e,r,t,n,o,a)=>{cr[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),fields:[]}},A:(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})},Yb:(e,r)=>{pr(e,{isVoid:!0,name:r=dr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Vb:()=>!0,Db:(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"})}},Jb:(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]:yn[e];Ae.currentProxiedOperationCallerThread=r;var s=i.apply(null,Dt);return Ae.currentProxiedOperationCallerThread=0,s},Kb:Pt,Ub:e=>{},Ab:()=>{throw 1/0},G:(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)},ab:(e,r,t,n)=>{e=ht.toValue(e);for(var o=Mt(r,t),a=new Array(r),i=0;i<r;++i){var s=o[i];a[i]=s.readValueFromPointer(n),n+=s.argPackAdvance}var u=e.apply(void 0,a);return ht.toHandle(u)},ta:(e,r,t,n,o)=>(e=xt[e])(r=ht.toValue(r),t=jt(t),(e=>{var r=[];return s()[e>>2]=ht.toHandle(r),r})(n),o),jb:dt,va:e=>0===e?ht.toHandle(Vt()):(e=jt(e),ht.toHandle(Vt()[e])),ua:(e,r)=>{var t=Mt(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Zt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(t[1+c]);var l="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=t[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)t[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var f,h,p=it(Function,i).apply(null,s);return f=p,h=xt.length,xt.push(f),a=h,Zt[o]=a,a},$a:(e,r)=>(e=ht.toValue(e),r=ht.toValue(r),ht.toHandle(e[r])),ia:e=>{e>4&&(lt.get(e).refcount+=1)},Xa:e=>"number"==typeof(e=ht.toValue(e)),Va:e=>"string"==typeof(e=ht.toValue(e)),_:e=>ht.toHandle(jt(e)),cb:e=>{var r=ht.toValue(e);rr(r),dt(e)},bb:(e,r,t)=>{e=ht.toValue(e),r=ht.toValue(r),t=ht.toValue(t),e[r]=t},C:(e,r)=>{var t=(e=mt(e,"_emval_take_value")).readValueFromPointer(r);return ht.toHandle(t)},ob:function(e,r,t){var n=Ot(e,r),o=new Date(1e3*n);i()[t>>2]=o.getUTCSeconds(),i()[t+4>>2]=o.getUTCMinutes(),i()[t+8>>2]=o.getUTCHours(),i()[t+12>>2]=o.getUTCDate(),i()[t+16>>2]=o.getUTCMonth(),i()[t+20>>2]=o.getUTCFullYear()-1900,i()[t+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-a)/864e5|0;i()[t+28>>2]=s},pb:function(e,r,t){var n=Ot(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=>(It(e.getFullYear())?Nt:Gt)[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},nb:zt,Cb:(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)},v:()=>{te("")},Ya:(e,r,t)=>Bt(e,r,t),Aa:()=>{},W:()=>Date.now(),Tb:()=>{throw U+=1,"unwind"},Eb:()=>2147483648,H:Ut,na:()=>navigator.hardwareConcurrency,Bb: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(Yt(u))return!0}return!1},Nb:Jt,Ob:Qt,ma:Se,ka:qt,Mb:en,Ba:rn,qb:tn,ja:nn,_a:function(){return un(location.toString())},Za:function(){return un((e=Bn,self[e(297,"7!VW")][e(299,"JR%^")]()));var e},Wa:function(e,r){var t=Mn();try{return je(e)(r)}catch(e){if(Rn(t),e!==e+0)throw e;An(1,0)}},M:function(e,r,t,n,o,a){var i=Mn();try{return je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},R:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},ga:function(e,r,t,n,o,a){var i=Mn();try{return je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},Z:function(e,r){var t=Mn();try{return je(e)(r)}catch(e){if(Rn(t),e!==e+0)throw e;An(1,0)}},Sa:function(e,r,t){var n=Mn();try{return je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},xa:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},Q:function(e,r,t,n,o){var a=Mn();try{return je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},p:function(e){var r=Mn();try{return je(e)()}catch(e){if(Rn(r),e!==e+0)throw e;An(1,0)}},g:function(e,r){var t=Mn();try{return je(e)(r)}catch(e){if(Rn(t),e!==e+0)throw e;An(1,0)}},Oa:function(e,r,t){var n=Mn();try{return je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},Pa:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},Ra:function(e,r,t,n,o){var a=Mn();try{return je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},Qa:function(e,r,t,n,o,a,i,s){var u=Mn();try{return je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},oa:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},e:function(e,r,t){var n=Mn();try{return je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},Ta:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},l:function(e,r,t,n){var o=Mn();try{return je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},O:function(e,r,t,n,o){var a=Mn();try{return je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},k:function(e,r,t,n,o){var a=Mn();try{return je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},wb:function(e,r,t,n,o,a){var i=Mn();try{return je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},sa:function(e,r,t,n,o,a,i){var s=Mn();try{return je(e)(r,t,n,o,a,i)}catch(e){if(Rn(s),e!==e+0)throw e;An(1,0)}},z:function(e,r,t,n,o,a){var i=Mn();try{return je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},F:function(e,r,t,n,o,a,i){var s=Mn();try{return je(e)(r,t,n,o,a,i)}catch(e){if(Rn(s),e!==e+0)throw e;An(1,0)}},ya:function(e,r,t,n,o,a,i,s){var u=Mn();try{return je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},Ha:function(e,r,t,n,o,a,i,s,u){var c=Mn();try{return je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Rn(c),e!==e+0)throw e;An(1,0)}},Ga:function(e,r,t,n,o,a,i,s,u,c){var l=Mn();try{return je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Rn(l),e!==e+0)throw e;An(1,0)}},aa:function(e,r,t,n,o,a,i,s,u,c,l,d){var f=Mn();try{return je(e)(r,t,n,o,a,i,s,u,c,l,d)}catch(e){if(Rn(f),e!==e+0)throw e;An(1,0)}},tb:function(e,r,t,n){var o=Mn();try{return Gn(e,r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},mb:function(e){var r=Mn();try{return zn(e)}catch(e){if(Rn(r),e!==e+0)throw e;An(1,0)}},ub:function(e,r){var t=Mn();try{return In(e,r)}catch(e){if(Rn(t),e!==e+0)throw e;An(1,0)}},lb:function(e,r,t){var n=Mn();try{return Un(e,r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},kb:function(e,r,t,n,o){var a=Mn();try{return Xn(e,r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},n:function(e){var r=Mn();try{je(e)()}catch(e){if(Rn(r),e!==e+0)throw e;An(1,0)}},f:function(e,r){var t=Mn();try{je(e)(r)}catch(e){if(Rn(t),e!==e+0)throw e;An(1,0)}},Y:function(e,r,t){var n=Mn();try{je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},da:function(e,r,t,n){var o=Mn();try{je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},T:function(e,r,t,n,o,a,i,s){var u=Mn();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},La:function(e,r,t){var n=Mn();try{je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},d:function(e,r,t){var n=Mn();try{je(e)(r,t)}catch(e){if(Rn(n),e!==e+0)throw e;An(1,0)}},x:function(e,r,t,n){var o=Mn();try{je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},fa:function(e,r,t,n,o){var a=Mn();try{je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},Ma:function(e,r,t,n,o,a,i){var s=Mn();try{je(e)(r,t,n,o,a,i)}catch(e){if(Rn(s),e!==e+0)throw e;An(1,0)}},V:function(e,r,t,n,o,a,i,s){var u=Mn();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},Na:function(e,r,t,n,o){var a=Mn();try{je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},Ja:function(e,r,t,n,o,a,i,s){var u=Mn();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},Ka:function(e,r,t,n){var o=Mn();try{je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},Ia:function(e,r,t,n,o){var a=Mn();try{je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},ba:function(e,r,t,n,o,a){var i=Mn();try{je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},pa:function(e,r,t,n,o){var a=Mn();try{je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},qa:function(e,r,t,n,o,a){var i=Mn();try{je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},i:function(e,r,t,n){var o=Mn();try{je(e)(r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},B:function(e,r,t,n,o,a){var i=Mn();try{je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},t:function(e,r,t,n,o,a,i){var s=Mn();try{je(e)(r,t,n,o,a,i)}catch(e){if(Rn(s),e!==e+0)throw e;An(1,0)}},U:function(e,r,t,n,o,a){var i=Mn();try{je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},j:function(e,r,t,n,o){var a=Mn();try{je(e)(r,t,n,o)}catch(e){if(Rn(a),e!==e+0)throw e;An(1,0)}},ca:function(e,r,t,n,o,a,i,s){var u=Mn();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},m:function(e,r,t,n,o,a){var i=Mn();try{je(e)(r,t,n,o,a)}catch(e){if(Rn(i),e!==e+0)throw e;An(1,0)}},u:function(e,r,t,n,o,a,i){var s=Mn();try{je(e)(r,t,n,o,a,i)}catch(e){if(Rn(s),e!==e+0)throw e;An(1,0)}},ra:function(e,r,t,n,o,a,i,s,u,c){var l=Mn();try{je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Rn(l),e!==e+0)throw e;An(1,0)}},w:function(e,r,t,n,o,a,i,s){var u=Mn();try{je(e)(r,t,n,o,a,i,s)}catch(e){if(Rn(u),e!==e+0)throw e;An(1,0)}},ea:function(e,r,t,n,o,a,i,s,u){var c=Mn();try{je(e)(r,t,n,o,a,i,s,u)}catch(e){if(Rn(c),e!==e+0)throw e;An(1,0)}},I:function(e,r,t,n,o,a,i,s,u,c){var l=Mn();try{je(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Rn(l),e!==e+0)throw e;An(1,0)}},D:function(e,r,t,n,o,a,i,s,u,c,l){var d=Mn();try{je(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Rn(d),e!==e+0)throw e;An(1,0)}},$:function(e,r,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var y=Mn();try{je(e)(r,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(e){if(Rn(y),e!==e+0)throw e;An(1,0)}},sb:function(e,r,t,n){var o=Mn();try{Nn(e,r,t,n)}catch(e){if(Rn(o),e!==e+0)throw e;An(1,0)}},J:e=>e,a:k||d.wasmMemory,Ua:sn,vb:(e,r,t,n,o)=>sn(e,r,t,n)},gn=function(){var e,r,t,n,o={a:vn};function a(e,r){var t,n=e.exports;return xe((gn=n).ec),O=gn.$b,t=gn.Zb,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=Y,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),{}}(),wn=d._malloc=e=>(wn=d._malloc=gn._b)(e),bn=d._free=e=>(bn=d._free=gn.ac)(e),_n=()=>(_n=gn.bc)(),En=d._pthread_self=()=>(En=d._pthread_self=gn.cc)(),Tn=e=>(Tn=gn.dc)(e),kn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=gn.ec)(),(e,r)=>(kn=gn.fc)(e,r)),Wn=e=>(Wn=gn.gc)(e),Cn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=gn.hc)(),d.__emscripten_thread_init=(e,r,t,n,o,a)=>(Cn=d.__emscripten_thread_init=gn.ic)(e,r,t,n,o,a)),Fn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=gn.jc)(),(e,r,t,n)=>(Fn=gn.kc)(e,r,t,n)),Pn=e=>(Pn=gn.lc)(e),Sn=d.__emscripten_thread_exit=e=>(Sn=d.__emscripten_thread_exit=gn.mc)(e),$n=d.__emscripten_check_mailbox=()=>($n=d.__emscripten_check_mailbox=gn.nc)(),An=(e,r)=>(An=gn.oc)(e,r),Dn=(e,r)=>(Dn=gn.pc)(e,r),Mn=()=>(Mn=gn.qc)(),Rn=e=>(Rn=gn.rc)(e),jn=e=>(jn=gn.sc)(e),xn=e=>(xn=gn.tc)(e),Vn=e=>(Vn=gn.uc)(e),Zn=(e,r,t)=>(Zn=gn.vc)(e,r,t),On=e=>(On=gn.wc)(e),In=d.dynCall_ji=(e,r)=>(In=d.dynCall_ji=gn.xc)(e,r),Nn=d.dynCall_vij=(e,r,t,n)=>(Nn=d.dynCall_vij=gn.yc)(e,r,t,n),Gn=d.dynCall_iij=(e,r,t,n)=>(Gn=d.dynCall_iij=gn.zc)(e,r,t,n),zn=(d.dynCall_iiiijj=(e,r,t,n,o,a,i,s)=>(d.dynCall_iiiijj=gn.Ac)(e,r,t,n,o,a,i,s),d.dynCall_viijj=(e,r,t,n,o,a,i)=>(d.dynCall_viijj=gn.Bc)(e,r,t,n,o,a,i),d.dynCall_viiijjj=(e,r,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=gn.Cc)(e,r,t,n,o,a,i,s,u,c),d.dynCall_jiji=(e,r,t,n,o)=>(d.dynCall_jiji=gn.Dc)(e,r,t,n,o),d.dynCall_j=e=>(zn=d.dynCall_j=gn.Ec)(e)),Un=d.dynCall_jii=(e,r,t)=>(Un=d.dynCall_jii=gn.Fc)(e,r,t),Xn=(d.dynCall_viijii=(e,r,t,n,o,a,i)=>(d.dynCall_viijii=gn.Gc)(e,r,t,n,o,a,i),d.dynCall_jiiii=(e,r,t,n,o)=>(Xn=d.dynCall_jiiii=gn.Hc)(e,r,t,n,o));function Ln(){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(){mn||(mn=!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_iiiiij=(e,r,t,n,o,a,i)=>(d.dynCall_iiiiij=gn.Ic)(e,r,t,n,o,a,i),d.dynCall_iiiiijj=(e,r,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=gn.Jc)(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=gn.Kc)(e,r,t,n,o,a,i,s,u,c),d.___start_em_js=3673840,d.___stop_em_js=3673948,d.keepRuntimeAlive=X,d.wasmMemory=k,d.UTF8ToString=Ce,d.stringToUTF8=wt,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=un,d.PThread=Ae,q=function e(){mn||Ln(),mn||(q=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Bn(e,r){var t=Yn();return Bn=function(r,n){var o=t[r-=281];if(void 0===Bn.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};Bn.ufrGTj=i,e=arguments,Bn.rTDMVM=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Bn.dFZQhq&&(Bn.dFZQhq=!0),o=Bn.ufrGTj(o,n),e[u]=o),o},Bn(e,r)}function Yn(){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(Yn=function(){return e})()}Ln(),function(e,r){for(var t=Bn,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())}}(Yn);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}),Kn=Hn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Kn)};return e()}));return Kn(),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(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(),V}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,C,W=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&te("no native wasm support detected");var P,F,S,$,A,D,R,M,V,j=!1;function x(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=V=new Float64Array(e)}var O,I=d.INITIAL_MEMORY||134217728;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 z=[],N=[],G=[],L=0;function U(){return W||L>0}function X(){g||(d.noFSInit||Ce.init.initialized||Ce.init(),Ce.ignorePermissions=!1,be.init(),De(N))}function B(e){z.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+")"),j=!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={3673948:e=>un(function(){return this[We(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var r=Ae.pthreads[e];x(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]:Ce.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},Ce.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var r=be.ttys[e.node.rdev];if(!r)throw new Ce.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 Ce.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 Ce.ErrnoError(29)}if(void 0===s&&0===a)throw new Ce.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 Ce.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new Ce.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=kn(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(Ce.isBlkdev(t)||Ce.isFIFO(t))throw new Ce.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:Ce.chrdev_stream_ops}});var o=Ce.createNode(e,r,t,n);return Ce.isDir(o.mode)?(o.node_ops=Ee.ops_table.dir.node,o.stream_ops=Ee.ops_table.dir.stream,o.contents={}):Ce.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):Ce.isLink(o.mode)?(o.node_ops=Ee.ops_table.link.node,o.stream_ops=Ee.ops_table.link.stream):Ce.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=Ce.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,Ce.isDir(e.mode)?r.size=4096:Ce.isFile(e.mode)?r.size=e.usedBytes:Ce.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 Ce.genericErrors[44]},mknod:(e,r,t,n)=>Ee.createNode(e,r,t,n),rename(e,r,t){if(Ce.isDir(e.mode)){var n;try{n=Ce.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Ce.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=Ce.lookupNode(e,r);for(var n in t.contents)throw new Ce.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(!Ce.isLink(e.mode))throw new Ce.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&&Ce.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ce.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(!Ce.isFile(e.node.mode))throw new Ce.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 Ce.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},Ce={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 Ce.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Ce.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=Ce.lookupNode(n,t[a]),o=de.join2(o,t[a]),Ce.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;Ce.isLink(n.mode);){var u=Ce.readlink(o);if(o=he.resolve(de.dirname(o),u),n=Ce.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Ce.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Ce.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)%Ce.nameTable.length},hashAddNode(e){var r=Ce.hashName(e.parent.id,e.name);e.name_next=Ce.nameTable[r],Ce.nameTable[r]=e},hashRemoveNode(e){var r=Ce.hashName(e.parent.id,e.name);if(Ce.nameTable[r]===e)Ce.nameTable[r]=e.name_next;else for(var t=Ce.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Ce.mayLookup(e);if(t)throw new Ce.ErrnoError(t,e);for(var n=Ce.hashName(e.id,r),o=Ce.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Ce.lookup(e,r)},createNode(e,r,t,n){var o=new Ce.FSNode(e,r,t,n);return Ce.hashAddNode(o),o},destroyNode(e){Ce.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)=>Ce.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=Ce.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Ce.lookupNode(e,r),20}catch(e){}return Ce.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Ce.lookupNode(e,r)}catch(e){return e.errno}var o=Ce.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ce.isDir(n.mode))return 54;if(Ce.isRoot(n)||Ce.getPath(n)===Ce.cwd())return 10}else if(Ce.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ce.isLink(e.mode)?32:Ce.isDir(e.mode)&&("r"!==Ce.flagsToPermissionString(r)||512&r)?31:Ce.nodePermissions(e,Ce.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ce.MAX_OPEN_FDS;e++)if(!Ce.streams[e])return e;throw new Ce.ErrnoError(33)},getStreamChecked(e){var r=Ce.getStream(e);if(!r)throw new Ce.ErrnoError(8);return r},getStream:e=>Ce.streams[e],createStream:(e,r=-1)=>(Ce.FSStream||(Ce.FSStream=function(){this.shared={}},Ce.FSStream.prototype={},Object.defineProperties(Ce.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 Ce.FSStream,e),-1==r&&(r=Ce.nextfd()),e.fd=r,Ce.streams[r]=e,e),closeStream(e){Ce.streams[e]=null},chrdev_stream_ops:{open(e){var r=Ce.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ce.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Ce.devices[e]={stream_ops:r}},getDevice:e=>Ce.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),Ce.syncFSRequests++,Ce.syncFSRequests>1&&T(`warning: ${Ce.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Ce.getMounts(Ce.root.mount),n=0;function o(e){return Ce.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&&Ce.root)throw new Ce.ErrnoError(10);if(!o&&!a){var i=Ce.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Ce.isMountpoint(n))throw new Ce.ErrnoError(10);if(!Ce.isDir(n.mode))throw new Ce.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Ce.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=Ce.lookupPath(e,{follow_mount:!1});if(!Ce.isMountpoint(r.node))throw new Ce.ErrnoError(28);var t=r.node,n=t.mounted,o=Ce.getMounts(n);Object.keys(Ce.nameTable).forEach((e=>{for(var r=Ce.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Ce.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=Ce.lookupPath(e,{parent:!0}).node,o=de.basename(e);if(!o||"."===o||".."===o)throw new Ce.ErrnoError(28);var a=Ce.mayCreate(n,o);if(a)throw new Ce.ErrnoError(a);if(!n.node_ops.mknod)throw new Ce.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ce.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ce.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{Ce.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,Ce.mknod(e,r,t)),symlink(e,r){if(!he.resolve(e))throw new Ce.ErrnoError(44);var t=Ce.lookupPath(r,{parent:!0}).node;if(!t)throw new Ce.ErrnoError(44);var n=de.basename(r),o=Ce.mayCreate(t,n);if(o)throw new Ce.ErrnoError(o);if(!t.node_ops.symlink)throw new Ce.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=Ce.lookupPath(e,{parent:!0}).node,n=Ce.lookupPath(r,{parent:!0}).node,!t||!n)throw new Ce.ErrnoError(44);if(t.mount!==n.mount)throw new Ce.ErrnoError(75);var u,c=Ce.lookupNode(t,i),l=he.relative(e,a);if("."!==l.charAt(0))throw new Ce.ErrnoError(28);if("."!==(l=he.relative(r,o)).charAt(0))throw new Ce.ErrnoError(55);try{u=Ce.lookupNode(n,s)}catch(e){}if(c!==u){var d=Ce.isDir(c.mode),f=Ce.mayDelete(t,i,d);if(f)throw new Ce.ErrnoError(f);if(f=u?Ce.mayDelete(n,s,d):Ce.mayCreate(n,s))throw new Ce.ErrnoError(f);if(!t.node_ops.rename)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(c)||u&&Ce.isMountpoint(u))throw new Ce.ErrnoError(10);if(n!==t&&(f=Ce.nodePermissions(t,"w")))throw new Ce.ErrnoError(f);Ce.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{Ce.hashAddNode(c)}}},rmdir(e){var r=Ce.lookupPath(e,{parent:!0}).node,t=de.basename(e),n=Ce.lookupNode(r,t),o=Ce.mayDelete(r,t,!0);if(o)throw new Ce.ErrnoError(o);if(!r.node_ops.rmdir)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(n))throw new Ce.ErrnoError(10);r.node_ops.rmdir(r,t),Ce.destroyNode(n)},readdir(e){var r=Ce.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Ce.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Ce.lookupPath(e,{parent:!0}).node;if(!r)throw new Ce.ErrnoError(44);var t=de.basename(e),n=Ce.lookupNode(r,t),o=Ce.mayDelete(r,t,!1);if(o)throw new Ce.ErrnoError(o);if(!r.node_ops.unlink)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(n))throw new Ce.ErrnoError(10);r.node_ops.unlink(r,t),Ce.destroyNode(n)},readlink(e){var r=Ce.lookupPath(e).node;if(!r)throw new Ce.ErrnoError(44);if(!r.node_ops.readlink)throw new Ce.ErrnoError(28);return he.resolve(Ce.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Ce.lookupPath(e,{follow:!r}).node;if(!t)throw new Ce.ErrnoError(44);if(!t.node_ops.getattr)throw new Ce.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Ce.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Ce.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Ce.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Ce.chmod(e,r,!0)},fchmod(e,r){var t=Ce.getStreamChecked(e);Ce.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Ce.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ce.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Ce.chown(e,r,t,!0)},fchown(e,r,t){var n=Ce.getStreamChecked(e);Ce.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Ce.ErrnoError(28);var t;if(!(t="string"==typeof e?Ce.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ce.ErrnoError(63);if(Ce.isDir(t.mode))throw new Ce.ErrnoError(31);if(!Ce.isFile(t.mode))throw new Ce.ErrnoError(28);var n=Ce.nodePermissions(t,"w");if(n)throw new Ce.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Ce.getStreamChecked(e);if(0==(2097155&t.flags))throw new Ce.ErrnoError(28);Ce.truncate(t.node,r)},utime(e,r,t){var n=Ce.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Ce.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=Ce.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new Ce.ErrnoError(20)}else n=Ce.mknod(e,t,0),o=!0;if(!n)throw new Ce.ErrnoError(44);if(Ce.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ce.isDir(n.mode))throw new Ce.ErrnoError(54);if(!o){var a=Ce.mayOpen(n,r);if(a)throw new Ce.ErrnoError(a)}512&r&&!o&&Ce.truncate(n,0),r&=-131713;var i=Ce.createStream({node:n,path:Ce.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||(Ce.readFiles||(Ce.readFiles={}),e in Ce.readFiles||(Ce.readFiles[e]=1)),i},close(e){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ce.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ce.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ce.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 Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(1==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.read)throw new Ce.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new Ce.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 Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.write)throw new Ce.ErrnoError(28);e.seekable&&1024&e.flags&&Ce.llseek(e,0,2);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new Ce.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(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(r<0||t<=0)throw new Ce.ErrnoError(28);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(!Ce.isFile(e.node.mode)&&!Ce.isDir(e.node.mode))throw new Ce.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ce.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 Ce.ErrnoError(2);if(1==(2097155&e.flags))throw new Ce.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ce.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 Ce.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=Ce.open(e,r.flags),o=Ce.stat(e).size,a=new Uint8Array(o);return Ce.read(n,a,0,o,0),"utf8"===r.encoding?t=me(a,0):"binary"===r.encoding&&(t=a),Ce.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Ce.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ve(r)+1),a=ge(r,o,0,o.length);Ce.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ce.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ce.close(n)},cwd:()=>Ce.currentPath,chdir(e){var r=Ce.lookupPath(e,{follow:!0});if(null===r.node)throw new Ce.ErrnoError(44);if(!Ce.isDir(r.node.mode))throw new Ce.ErrnoError(54);var t=Ce.nodePermissions(r.node,"x");if(t)throw new Ce.ErrnoError(t);Ce.currentPath=r.path},createDefaultDirectories(){Ce.mkdir("/tmp"),Ce.mkdir("/home"),Ce.mkdir("/home/web_user")},createDefaultDevices(){Ce.mkdir("/dev"),Ce.registerDevice(Ce.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ce.mkdev("/dev/null",Ce.makedev(1,3)),be.register(Ce.makedev(5,0),be.default_tty_ops),be.register(Ce.makedev(6,0),be.default_tty1_ops),Ce.mkdev("/dev/tty",Ce.makedev(5,0)),Ce.mkdev("/dev/tty1",Ce.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=fe(e).byteLength),e[--r]);Ce.createDevice("/dev","random",t),Ce.createDevice("/dev","urandom",t),Ce.mkdir("/dev/shm"),Ce.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ce.mkdir("/proc");var e=Ce.mkdir("/proc/self");Ce.mkdir("/proc/self/fd"),Ce.mount({mount(){var r=Ce.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Ce.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?Ce.createDevice("/dev","stdin",d.stdin):Ce.symlink("/dev/tty","/dev/stdin"),d.stdout?Ce.createDevice("/dev","stdout",null,d.stdout):Ce.symlink("/dev/tty","/dev/stdout"),d.stderr?Ce.createDevice("/dev","stderr",null,d.stderr):Ce.symlink("/dev/tty1","/dev/stderr"),Ce.open("/dev/stdin",0),Ce.open("/dev/stdout",1),Ce.open("/dev/stderr",1)},ensureErrnoError(){Ce.ErrnoError||(Ce.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ce.ErrnoError.prototype=new Error,Ce.ErrnoError.prototype.constructor=Ce.ErrnoError,[44].forEach((e=>{Ce.genericErrors[e]=new Ce.ErrnoError(e),Ce.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Ce.ensureErrnoError(),Ce.nameTable=new Array(4096),Ce.mount(Ee,{},"/"),Ce.createDefaultDirectories(),Ce.createDefaultDevices(),Ce.createSpecialDirectories(),Ce.filesystems={MEMFS:Ee}},init(e,r,t){Ce.init.initialized=!0,Ce.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=r||d.stdout,d.stderr=t||d.stderr,Ce.createStandardStreams()},quit(){Ce.init.initialized=!1;for(var e=0;e<Ce.streams.length;e++){var r=Ce.streams[e];r&&Ce.close(r)}},findObject(e,r){var t=Ce.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Ce.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=Ce.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=de.basename(e),n=Ce.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:Ce.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=de.join2(e,a);try{Ce.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=de.join2("string"==typeof e?e:Ce.getPath(e),r),i=ke(n,o);return Ce.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:Ce.getPath(e),i=r?de.join2(e,r):e);var s=ke(n,o),u=Ce.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}Ce.chmod(u,146|s);var f=Ce.open(u,577);Ce.write(f,t,0,t.length,0,a),Ce.close(f),Ce.chmod(u,s)}return u},createDevice(e,r,t,n){var o=de.join2("string"==typeof e?e:Ce.getPath(e),r),a=ke(!!t,!!n);Ce.createDevice.major||(Ce.createDevice.major=64);var i=Ce.makedev(Ce.createDevice.major++,0);return Ce.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 Ce.ErrnoError(29)}if(void 0===u&&0===i)throw new Ce.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 Ce.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),Ce.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 Ce.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=Ce.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 Ce.forceLoadFile(c),r.apply(null,arguments)}})),l.read=(e,r,t,n,o)=>(Ce.forceLoadFile(c),d(e,r,t,n,o)),l.mmap=(e,t,n,o,a)=>{Ce.forceLoadFile(c);var i=_e(t);if(!i)throw new Ce.ErrnoError(48);return d(e,r(),i,t,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},We=(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?Ce.cwd():Pe.getStreamFromFD(e).path,0==r.length){if(!t)throw new Ce.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(Ce.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(!Ce.isFile(r.node.mode))throw new Ce.ErrnoError(43);if(2&o)return 0;var i=t().slice(e,e+n);Ce.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=>We(e),getStreamFromFD:e=>Ce.getStreamChecked(e)};function Fe(e){if(g)return At(0,1,e);P=e,U()||(Ae.terminateAllThreads(),d.onExit&&d.onExit(e),j=!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(){W=!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,Fn(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!=En()){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),Fn(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:C})})),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=En(),r=i()[e+52>>2],t=i()[e+56>>2];Dn(r,r-t),Mn(r)};var Me=[],Ve=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):Sn(e)}(Ve(e)(r))};var je=e=>{Ae.tlsInitFunctions.push(e)},xe=[],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(On(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ze=e=>{var r=Oe;if(!r)return Tn(0),0;var t=new Ie(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Tn(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Zn(a,n,i))return Tn(a),r}return Tn(n),r},Ne=()=>{var e=xe.pop();e||te("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(xe.push(e),e.set_rethrown(!0),e.set_caught(!1),Ze++),Oe=r};function Ge(e,r,t,n){return g?At(2,1,e,r,t,n):Le(e,r,t,n)}var Le=(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 Ge(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 C=Pe.getStreamFromFD(T),W=Pe.DEFAULT_POLLMASK;if(C.stream_ops.poll){var P=-1;o&&(P=1e3*((r?i()[o>>2]:0)+(r?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 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 Ce||"ErrnoError"!==e.name)throw e;return-e.errno}}function Xe(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(;Ce.streams[a];)a++;return Ce.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()[_n()>>2]=s,-1}}catch(e){if("undefined"==typeof Ce||"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(Ce.stat,t.path,r)}catch(e){if("undefined"==typeof Ce||"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(),Ce.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 Ce||"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?Ce.lstat:Ce.stat,r,t)}catch(e){if("undefined"==typeof Ce||"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 Ce.open(r,t,o).fd}catch(e){if("undefined"==typeof Ce||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e){if(g)return At(10,1,e);try{return e=Pe.getStr(e),Ce.rmdir(e),0}catch(e){if("undefined"==typeof Ce||"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(Ce.stat,e,r)}catch(e){if("undefined"==typeof Ce||"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?Ce.unlink(r):512===t?Ce.rmdir(r):te("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof Ce||"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},Cr=[],Wr=()=>{for(;Cr.length;){var e=Cr.pop();e.$$.deleteScheduled=!1,e.delete()}},Pr=void 0,Fr=e=>{Pr=e,Cr.length&&Pr&&Pr(Wr)},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 Vr(){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 jr(){return!this.$$.ptr}function xr(){return this.$$.ptr||vr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&hr("Object already scheduled for deletion"),Cr.push(this),1===Cr.length&&Pr&&Pr(Wr),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 zr=(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}},Nr=(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`),zr(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 Gr(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 Lr=(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 Lr(r.$$.ptr,t,this.registeredClass)}function Xr(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=Lr(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 Lr(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=Xr: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):Ve(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)}):Ve(r);return"function"!=typeof a&&hr(`unknown function pointer with signature ${e}: ${r}`),a},tt=void 0,nt=e=>{var r=Cn(e),t=dr(r);return bn(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`),Lr(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&&lt.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},Ct=(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},Wt=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(!j)try{e(),(()=>{if(!U())try{g?Sn(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=En();e&&(Ft(e),Pt((()=>$n())))};d.checkMailbox=St;var $t=e=>{var r=Rn(),t=e();return Mn(r),t},At=function(e,r){var t=arguments.length-2,n=arguments;return $t((()=>{for(var o=t,a=Vn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Pn(e,o,a,r)}))},Dt=[],Rt=(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},Mt={},Vt=e=>{var r=Mt[e];return void 0===r?dr(e):r},jt=[],xt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Zt=[],Ot=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,It=e=>e%4==0&&(e%100!=0||e%400==0),zt=[0,31,60,91,121,152,182,213,244,274,305,335],Nt=[0,31,59,90,120,151,181,212,243,273,304,334];function Gt(e,r,t,n,o,a,i){if(g)return At(14,1,e,r,t,n,o,a,i);var s=Ot(a,i);try{if(isNaN(s))return 61;var u=Pe.getStreamFromFD(o);2&t&&Pe.doMsync(e,u,r,n,s),Ce.munmap(u)}catch(e){if("undefined"==typeof Ce||"ErrnoError"!==e.name)throw e;return-e.errno}}var Lt,Ut=e=>{var r=ve(e)+1,t=wn(r);return t&&wt(e,t,r),t},Xt=[],Bt=(e,r,n)=>{var o=((e,r)=>{var n;for(Xt.length=0;n=t()[e++];)r+=105!=n&&r%8?4:0,Xt.push(105==n?i()[r>>2]:u()[r>>3]),r+=105==n?4:8;return Xt})(r,n);return ie[e].apply(null,o)};Lt=()=>performance.timeOrigin+performance.now();var Ht=e=>{var r=(e-k.buffer.byteLength+65535)/65536;try{return k.grow(r),Z(),1}catch(e){}},Yt={},Kt=()=>{if(!Kt.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 Yt)void 0===Yt[r]?delete e[r]:e[r]=Yt[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Kt.strings=t}return Kt.strings},Jt=function(e,t){if(g)return At(15,1,e,t);var n=0;return Kt().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},Qt=function(e,r){if(g)return At(16,1,e,r);var t=Kt();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 Ce.close(r),0}catch(e){if("undefined"==typeof Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function en(e,t){if(g)return At(18,1,e,t);try{var n=Pe.getStreamFromFD(e),a=n.tty?2:Ce.isDir(n.mode)?3:Ce.isLink(n.mode)?7:4;return r()[t>>0]=a,o()[t+2>>1]=0,K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+8>>2]=K[0],i()[t+12>>2]=K[1],K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],i()[t+16>>2]=K[0],i()[t+20>>2]=K[1],0}catch(e){if("undefined"==typeof Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t,n,o){if(g)return At(19,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=Ce.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 Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function tn(e,r,t,n,o){if(g)return At(20,1,e,r,t,n,o);var a=Ot(r,t);try{if(isNaN(a))return 61;var s=Pe.getStreamFromFD(e);return Ce.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 Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function nn(e,t,n,o){if(g)return At(21,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=Ce.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 Ce||"ErrnoError"!==e.name)throw e;return e.errno}}var on=[31,29,31,30,31,30,31,31,30,31,30,31],an=[31,28,31,30,31,30,31,31,30,31,30,31],sn=(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?We(a):""},c=We(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=It(t.getFullYear()),o=t.getMonth(),a=(n?on:an)[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})(It(e.tm_year+1900)?on:an,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&&It(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&It(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)},un=Ut;Ae.init();var cn,ln,dn,fn=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ce.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},hn=365,pn=146;Object.defineProperties(fn.prototype,{read:{get:function(){return(this.mode&hn)===hn},set:function(e){e?this.mode|=hn:this.mode&=-366}},write:{get:function(){return(this.mode&pn)===pn},set:function(e){e?this.mode|=pn:this.mode&=-147}},isFolder:{get:function(){return Ce.isDir(this.mode)}},isDevice:{get:function(){return Ce.isChrdev(this.mode)}}}),Ce.FSNode=fn,Ce.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||Ce.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=>{x(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)},Ce.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=Vr,Zr.prototype.isDeleted=jr,Zr.prototype.deleteLater=xr,d.getInheritedInstanceCount=Tr,d.getLiveInheritedInstances=kr,d.flushPendingDeletes=Wr,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=(cn=Error,(dn=Ir(ln="UnboundTypeError",(function(e){this.name=ln,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(cn.prototype),dn.prototype.constructor=dn,dn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},dn),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 mn,yn=[Fe,Re,Ge,Ue,Xe,Be,He,function(e,r){if(g)return At(7,1,e,r);try{return e=Pe.getStr(e),Pe.doStat(Ce.lstat,e,r)}catch(e){if("undefined"==typeof Ce||"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=Ot(o,a);try{if(isNaN(l))return 61;var d=Pe.getStreamFromFD(n),f=Ce.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 Ce||"ErrnoError"!==e.name)throw e;return-e.errno}},Gt,Jt,Qt,qt,en,rn,tn,nn],vn={r:e=>{var r=new Ie(e);return r.get_caught()||(r.set_caught(!0),Ze--),r.set_rethrown(!1),xe.push(r),xn(r.excPtr),r.get_exception_ptr()},yb:()=>{if(!xe.length)return 0;var e=xe[xe.length-1];return xn(e.excPtr),e.excPtr},s:()=>{An(0,0);var e=xe.pop();jn(e.excPtr),Oe=0},b:()=>ze([]),h:e=>ze([e]),q:(e,r)=>ze([e,r]),wa:Ne,xb:e=>{if(e){var r=new Ie(e);xe.push(r),r.set_rethrown(!0),Ne()}},o:(e,r,t)=>{throw new Ie(e).init(r,t),Ze++,Oe=e},zb:()=>Ze,Lb:e=>{Wn(e,!1,1,!0,4194304,!1),Ae.threadInitTLS()},za:e=>{g?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},Ib:Le,c:e=>{throw Oe||(Oe=e),Oe},Fb:Ue,Ca:Xe,Rb:Be,Sb:He,Pb:Ye,Da:Ke,Gb:Je,Qb:Qe,Hb:qe,fb: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}]}))},eb: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}]}))},rb:(e,r,t,n,o)=>{},Xb:(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})},L:(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);Nr(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 Gr(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]}))},ha:(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),[]))),[]}))},K:(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):(zr(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,[]})),[]}))},E:(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),[]})),[]}))},Wb:(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})},ib:(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}),Nr(r,o)},S:(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},Fa:(e,r,t)=>{pr(e,{name:r=dr(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:mr,readValueFromPointer:vt(r,t),destructorFunction:null})},P:(e,r,t,n,o,a,i)=>{var s=at(r,t);e=dr(e),o=rt(n,o),Nr(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),[]}))},N:(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})},y:(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})},db:(e,r,t,n,o,a,i,s,u,c,l,d)=>{t=dr(t),a=rt(o,a),s=rt(i,s),c=rt(u,c),d=rt(l,d),ur([e],[r],(function(e){return e=e[0],[new Qr(t,e.registeredClass,!1,!1,!0,e,n,a,s,c,d)]}))},Ea:(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=We(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 bn(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=wn(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&&(bn(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(bn,i),i},argPackAdvance:mr,readValueFromPointer:Hr,destructorFunction:e=>bn(e)})},la:(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=Ct,u=Wt,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 bn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&hr(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=wn(4+a+r);return s()[i>>2]=a>>c,o(n,i+4,a+r),null!==e&&e.push(bn,i),i},argPackAdvance:mr,readValueFromPointer:tr,destructorFunction:e=>bn(e)})},hb:(e,r,t,n,o,a)=>{er[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),elements:[]}},gb:(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})},X:(e,r,t,n,o,a)=>{cr[e]={name:dr(r),rawConstructor:rt(t,n),rawDestructor:rt(o,a),fields:[]}},A:(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})},Yb:(e,r)=>{pr(e,{isVoid:!0,name:r=dr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Vb:()=>!0,Db:(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"})}},Jb:(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]:yn[e];Ae.currentProxiedOperationCallerThread=r;var s=i.apply(null,Dt);return Ae.currentProxiedOperationCallerThread=0,s},Kb:Ft,Ub:e=>{},Ab:()=>{throw 1/0},G:(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)},ab:(e,r,t,n)=>{e=ht.toValue(e);for(var o=Rt(r,t),a=new Array(r),i=0;i<r;++i){var s=o[i];a[i]=s.readValueFromPointer(n),n+=s.argPackAdvance}var u=e.apply(void 0,a);return ht.toHandle(u)},ta:(e,r,t,n,o)=>(e=jt[e])(r=ht.toValue(r),t=Vt(t),(e=>{var r=[];return s()[e>>2]=ht.toHandle(r),r})(n),o),jb:dt,va:e=>0===e?ht.toHandle(xt()):(e=Vt(e),ht.toHandle(xt()[e])),ua:(e,r)=>{var t=Rt(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",a=Zt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(t[1+c]);var l="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(c=0;c<e-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=t[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)t[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var f,h,p=it(Function,i).apply(null,s);return f=p,h=jt.length,jt.push(f),a=h,Zt[o]=a,a},$a:(e,r)=>(e=ht.toValue(e),r=ht.toValue(r),ht.toHandle(e[r])),ia:e=>{e>4&&(lt.get(e).refcount+=1)},Xa:e=>"number"==typeof(e=ht.toValue(e)),Va:e=>"string"==typeof(e=ht.toValue(e)),_:e=>ht.toHandle(Vt(e)),cb:e=>{var r=ht.toValue(e);rr(r),dt(e)},bb:(e,r,t)=>{e=ht.toValue(e),r=ht.toValue(r),t=ht.toValue(t),e[r]=t},C:(e,r)=>{var t=(e=mt(e,"_emval_take_value")).readValueFromPointer(r);return ht.toHandle(t)},ob:function(e,r,t){var n=Ot(e,r),o=new Date(1e3*n);i()[t>>2]=o.getUTCSeconds(),i()[t+4>>2]=o.getUTCMinutes(),i()[t+8>>2]=o.getUTCHours(),i()[t+12>>2]=o.getUTCDate(),i()[t+16>>2]=o.getUTCMonth(),i()[t+20>>2]=o.getUTCFullYear()-1900,i()[t+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-a)/864e5|0;i()[t+28>>2]=s},pb:function(e,r,t){var n=Ot(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=>(It(e.getFullYear())?zt:Nt)[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},nb:Gt,Cb:(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=Ut(f),m=Ut(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},v:()=>{te("")},Ya:(e,r,t)=>Bt(e,r,t),Aa:()=>{},W:()=>Date.now(),Tb:()=>{throw L+=1,"unwind"},Eb:()=>2147483648,H:Lt,na:()=>navigator.hardwareConcurrency,Bb: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(Ht(u))return!0}return!1},Nb:Jt,Ob:Qt,ma:Se,ka:qt,Mb:en,Ba:rn,qb:tn,ja:nn,_a:function(){return un(location.toString())},Za:function(){return un((e=Hn,self[e(341,"S)%W")][e(326,"LOol")]()));var e},Wa:function(e,r){var t=Rn();try{return Ve(e)(r)}catch(e){if(Mn(t),e!==e+0)throw e;An(1,0)}},M:function(e,r,t,n,o,a){var i=Rn();try{return Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},R:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},ga:function(e,r,t,n,o,a){var i=Rn();try{return Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},Z:function(e,r){var t=Rn();try{return Ve(e)(r)}catch(e){if(Mn(t),e!==e+0)throw e;An(1,0)}},Sa:function(e,r,t){var n=Rn();try{return Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},xa:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},Q:function(e,r,t,n,o){var a=Rn();try{return Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},p:function(e){var r=Rn();try{return Ve(e)()}catch(e){if(Mn(r),e!==e+0)throw e;An(1,0)}},g:function(e,r){var t=Rn();try{return Ve(e)(r)}catch(e){if(Mn(t),e!==e+0)throw e;An(1,0)}},Oa:function(e,r,t){var n=Rn();try{return Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},Pa:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},Ra:function(e,r,t,n,o){var a=Rn();try{return Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},Qa:function(e,r,t,n,o,a,i,s){var u=Rn();try{return Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},oa:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},e:function(e,r,t){var n=Rn();try{return Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},Ta:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},l:function(e,r,t,n){var o=Rn();try{return Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},O:function(e,r,t,n,o){var a=Rn();try{return Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},k:function(e,r,t,n,o){var a=Rn();try{return Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},wb:function(e,r,t,n,o,a){var i=Rn();try{return Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},sa:function(e,r,t,n,o,a,i){var s=Rn();try{return Ve(e)(r,t,n,o,a,i)}catch(e){if(Mn(s),e!==e+0)throw e;An(1,0)}},z:function(e,r,t,n,o,a){var i=Rn();try{return Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},F:function(e,r,t,n,o,a,i){var s=Rn();try{return Ve(e)(r,t,n,o,a,i)}catch(e){if(Mn(s),e!==e+0)throw e;An(1,0)}},ya:function(e,r,t,n,o,a,i,s){var u=Rn();try{return Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},Ha:function(e,r,t,n,o,a,i,s,u){var c=Rn();try{return Ve(e)(r,t,n,o,a,i,s,u)}catch(e){if(Mn(c),e!==e+0)throw e;An(1,0)}},Ga:function(e,r,t,n,o,a,i,s,u,c){var l=Rn();try{return Ve(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Mn(l),e!==e+0)throw e;An(1,0)}},aa:function(e,r,t,n,o,a,i,s,u,c,l,d){var f=Rn();try{return Ve(e)(r,t,n,o,a,i,s,u,c,l,d)}catch(e){if(Mn(f),e!==e+0)throw e;An(1,0)}},tb:function(e,r,t,n){var o=Rn();try{return Nn(e,r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},mb:function(e){var r=Rn();try{return Gn(e)}catch(e){if(Mn(r),e!==e+0)throw e;An(1,0)}},ub:function(e,r){var t=Rn();try{return In(e,r)}catch(e){if(Mn(t),e!==e+0)throw e;An(1,0)}},lb:function(e,r,t){var n=Rn();try{return Ln(e,r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},kb:function(e,r,t,n,o){var a=Rn();try{return Un(e,r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},n:function(e){var r=Rn();try{Ve(e)()}catch(e){if(Mn(r),e!==e+0)throw e;An(1,0)}},f:function(e,r){var t=Rn();try{Ve(e)(r)}catch(e){if(Mn(t),e!==e+0)throw e;An(1,0)}},Y:function(e,r,t){var n=Rn();try{Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},da:function(e,r,t,n){var o=Rn();try{Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},T:function(e,r,t,n,o,a,i,s){var u=Rn();try{Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},La:function(e,r,t){var n=Rn();try{Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},d:function(e,r,t){var n=Rn();try{Ve(e)(r,t)}catch(e){if(Mn(n),e!==e+0)throw e;An(1,0)}},x:function(e,r,t,n){var o=Rn();try{Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},fa:function(e,r,t,n,o){var a=Rn();try{Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},Ma:function(e,r,t,n,o,a,i){var s=Rn();try{Ve(e)(r,t,n,o,a,i)}catch(e){if(Mn(s),e!==e+0)throw e;An(1,0)}},V:function(e,r,t,n,o,a,i,s){var u=Rn();try{Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},Na:function(e,r,t,n,o){var a=Rn();try{Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},Ja:function(e,r,t,n,o,a,i,s){var u=Rn();try{Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},Ka:function(e,r,t,n){var o=Rn();try{Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},Ia:function(e,r,t,n,o){var a=Rn();try{Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},ba:function(e,r,t,n,o,a){var i=Rn();try{Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},pa:function(e,r,t,n,o){var a=Rn();try{Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},qa:function(e,r,t,n,o,a){var i=Rn();try{Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},i:function(e,r,t,n){var o=Rn();try{Ve(e)(r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},B:function(e,r,t,n,o,a){var i=Rn();try{Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},t:function(e,r,t,n,o,a,i){var s=Rn();try{Ve(e)(r,t,n,o,a,i)}catch(e){if(Mn(s),e!==e+0)throw e;An(1,0)}},U:function(e,r,t,n,o,a){var i=Rn();try{Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},j:function(e,r,t,n,o){var a=Rn();try{Ve(e)(r,t,n,o)}catch(e){if(Mn(a),e!==e+0)throw e;An(1,0)}},ca:function(e,r,t,n,o,a,i,s){var u=Rn();try{Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},m:function(e,r,t,n,o,a){var i=Rn();try{Ve(e)(r,t,n,o,a)}catch(e){if(Mn(i),e!==e+0)throw e;An(1,0)}},u:function(e,r,t,n,o,a,i){var s=Rn();try{Ve(e)(r,t,n,o,a,i)}catch(e){if(Mn(s),e!==e+0)throw e;An(1,0)}},ra:function(e,r,t,n,o,a,i,s,u,c){var l=Rn();try{Ve(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Mn(l),e!==e+0)throw e;An(1,0)}},w:function(e,r,t,n,o,a,i,s){var u=Rn();try{Ve(e)(r,t,n,o,a,i,s)}catch(e){if(Mn(u),e!==e+0)throw e;An(1,0)}},ea:function(e,r,t,n,o,a,i,s,u){var c=Rn();try{Ve(e)(r,t,n,o,a,i,s,u)}catch(e){if(Mn(c),e!==e+0)throw e;An(1,0)}},I:function(e,r,t,n,o,a,i,s,u,c){var l=Rn();try{Ve(e)(r,t,n,o,a,i,s,u,c)}catch(e){if(Mn(l),e!==e+0)throw e;An(1,0)}},D:function(e,r,t,n,o,a,i,s,u,c,l){var d=Rn();try{Ve(e)(r,t,n,o,a,i,s,u,c,l)}catch(e){if(Mn(d),e!==e+0)throw e;An(1,0)}},$:function(e,r,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var y=Rn();try{Ve(e)(r,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(e){if(Mn(y),e!==e+0)throw e;An(1,0)}},sb:function(e,r,t,n){var o=Rn();try{zn(e,r,t,n)}catch(e){if(Mn(o),e!==e+0)throw e;An(1,0)}},J:e=>e,a:k||d.wasmMemory,Ua:sn,vb:(e,r,t,n,o)=>sn(e,r,t,n)},gn=function(){var e,r,t,n,o={a:vn};function a(e,r){var t,n=e.exports;return je((gn=n).ec),O=gn.$b,t=gn.Zb,N.unshift(t),C=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),{}}(),wn=d._malloc=e=>(wn=d._malloc=gn._b)(e),bn=d._free=e=>(bn=d._free=gn.ac)(e),_n=()=>(_n=gn.bc)(),En=d._pthread_self=()=>(En=d._pthread_self=gn.cc)(),Tn=e=>(Tn=gn.dc)(e),kn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=gn.ec)(),(e,r)=>(kn=gn.fc)(e,r)),Cn=e=>(Cn=gn.gc)(e),Wn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=gn.hc)(),d.__emscripten_thread_init=(e,r,t,n,o,a)=>(Wn=d.__emscripten_thread_init=gn.ic)(e,r,t,n,o,a)),Pn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=gn.jc)(),(e,r,t,n)=>(Pn=gn.kc)(e,r,t,n)),Fn=e=>(Fn=gn.lc)(e),Sn=d.__emscripten_thread_exit=e=>(Sn=d.__emscripten_thread_exit=gn.mc)(e),$n=d.__emscripten_check_mailbox=()=>($n=d.__emscripten_check_mailbox=gn.nc)(),An=(e,r)=>(An=gn.oc)(e,r),Dn=(e,r)=>(Dn=gn.pc)(e,r),Rn=()=>(Rn=gn.qc)(),Mn=e=>(Mn=gn.rc)(e),Vn=e=>(Vn=gn.sc)(e),jn=e=>(jn=gn.tc)(e),xn=e=>(xn=gn.uc)(e),Zn=(e,r,t)=>(Zn=gn.vc)(e,r,t),On=e=>(On=gn.wc)(e),In=d.dynCall_ji=(e,r)=>(In=d.dynCall_ji=gn.xc)(e,r),zn=d.dynCall_vij=(e,r,t,n)=>(zn=d.dynCall_vij=gn.yc)(e,r,t,n),Nn=d.dynCall_iij=(e,r,t,n)=>(Nn=d.dynCall_iij=gn.zc)(e,r,t,n),Gn=(d.dynCall_iiiijj=(e,r,t,n,o,a,i,s)=>(d.dynCall_iiiijj=gn.Ac)(e,r,t,n,o,a,i,s),d.dynCall_viijj=(e,r,t,n,o,a,i)=>(d.dynCall_viijj=gn.Bc)(e,r,t,n,o,a,i),d.dynCall_viiijjj=(e,r,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=gn.Cc)(e,r,t,n,o,a,i,s,u,c),d.dynCall_jiji=(e,r,t,n,o)=>(d.dynCall_jiji=gn.Dc)(e,r,t,n,o),d.dynCall_j=e=>(Gn=d.dynCall_j=gn.Ec)(e)),Ln=d.dynCall_jii=(e,r,t)=>(Ln=d.dynCall_jii=gn.Fc)(e,r,t),Un=(d.dynCall_viijii=(e,r,t,n,o,a,i)=>(d.dynCall_viijii=gn.Gc)(e,r,t,n,o,a,i),d.dynCall_jiiii=(e,r,t,n,o)=>(Un=d.dynCall_jiiii=gn.Hc)(e,r,t,n,o));function Xn(){if(!(J>0)){if(g)return c(d),X(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)B(d.preRun.shift());De(z)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e())}function e(){mn||(mn=!0,d.calledRun=!0,j||(X(),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(),G.unshift(e);var e;De(G)}}()))}}if(d.dynCall_iiiiij=(e,r,t,n,o,a,i)=>(d.dynCall_iiiiij=gn.Ic)(e,r,t,n,o,a,i),d.dynCall_iiiiijj=(e,r,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=gn.Jc)(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=gn.Kc)(e,r,t,n,o,a,i,s,u,c),d.___start_em_js=3673840,d.___stop_em_js=3673948,d.keepRuntimeAlive=U,d.wasmMemory=k,d.UTF8ToString=We,d.stringToUTF8=wt,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=un,d.PThread=Ae,q=function e(){mn||Xn(),mn||(q=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Bn(){var e=["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 e})()}function Hn(e,r){var t=Bn();return Hn=function(r,n){var o=t[r-=324];if(void 0===Hn.BlZdPM){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};Hn.rVVKLZ=i,e=arguments,Hn.BlZdPM=!0}var s=t[0],u=r+s,c=e[u];return c?o=c:(void 0===Hn.RwOXWD&&(Hn.RwOXWD=!0),o=Hn.rVVKLZ(o,n),e[u]=o),o},Hn(e,r)}Xn(),function(e,r){for(var t=Hn,n=e();;)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(e){n.push(n.shift())}}(Bn);var ighnua,Yn=(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}),Kn=Yn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Kn)};return e()}));return Kn(),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"}]);