scanbot-web-sdk 2.11.0-alpha.5 → 2.11.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/ScanbotSDK.min.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=0)}([function(r,t,e){"use strict";var n=e(1);let o;const a="/tessdata",i={};function s(r){const t=Math.random().toString(36);return i[t]=r,t}function u(r){if(!i.hasOwnProperty(r))throw new Error(`Object ${r} does not exist`);return i[r]}function c(r){const t=u(r);t.delete&&t.delete(),delete i[r]}function f(r,t){for(let e in t){if(r===t[e])return e}}function l(r){if(!(r instanceof Array))throw new Error('languages must be an array of valid language codes, e.g. ["eng", "deu"]');return o.FS.analyzePath(a).exists||o.FS.mkdir(a),r.forEach((function(r){if(!o.FS.analyzePath("/tessdata/"+r+".traineddata").exists){let t=o.locateFile(`tessdata/${r}.traineddata`);o.FS.createLazyFile(a,r+".traineddata",t,!0,!1)}})),r.join("+")}const d={initialize:async function(r,t,n,a){const i=e(2),s={locateFile:function(r,e){let n;return n=t?function(r){return r.startsWith("http:")||r.startsWith("https:")}(t)?t:"":a,n+r}};return await i(s),o=s,o.initialize(r||"",n)},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(r,t){return m(o.applyFilter(g(r),t),p)},rotateImageCcw:function(r,t){return m(o.rotateImageCcw(g(r),t),p)},cropAndRotateImageCcw:function(r,t,e){const n=function(r){const t=[];for(let e=0;e<r.length;++e)t.push(r[e].x,r[e].y);return t}(t);return m(o.cropAndRotateImageCcw(g(r),n,e),p)},detectDocument:async function(r,t,e){return await h(o.detectDocument(g(r),t,e))},detectDocumentOnImage:async function(r,t,e){return await d.detectDocument(r,t,e)},detectAndCropDocument:async function(r){return await h(o.detectAndCropDocument(g(r)))},createBarcodeRecognizer:async function(r){return s(new o.BarcodeRecognizer(r||{}))},recognizeBarcodes:async function(r,t,e){let n,a=!1;"string"==typeof r?n=u(r):(e=t,t=r,n=new o.BarcodeRecognizer(e),a=!0);try{const r=n.recognize(g(t),e||{});if(!r)return null;let i;return r.length?(i=r.map((r=>({format:f(r.format,o.BarcodeFormat),text:r.text,rawBytes:r.rawBytes.data.slice(),barcodeImage:p(r.barcodeImage)}))),r.forEach((r=>r.delete()))):i=[],{result:i,originalImage:t}}finally{a&&n.delete()}},beginPdf:async function(r){return s(new o.PdfGenerationContext(r||{}))},addPageToPdf:async function(r,t){m(u(r).addPage(t))},completePdf:async function(r){const t=m(u(r).complete(),p);return c(r),t},beginTiff:async function(r){const t=new o.TiffGenerationContext(r||{});return m(t.begin()),s(t)},addPageToTiff:async function(r,t){return m(u(r).addPage(g(t)))},completeTiff:async function(r){try{const t=u(r).complete();return m(t,p)}finally{c(r)}},createSimpleMRZRecognizer:async function(){return s(new o.SimpleMrzRecognizerContext)},recognizeSimpleMRZ:async function(r,t){return u(r).recognize(g(t))},createBlurDetector:function(){return s(new o.BlurDetectorContext)},estimateBlurriness:function(r,t){return m(u(r).estimateBlurriness(g(t)))},estimateBlurrinessOnBuffer:function(r,t){return d.estimateBlurriness(r,t)},releaseObject:async function(r){c(r)},createOcrEngine:async function(r){const t=l(r);return s(new o.TesseractOcrContext(a,t))},performOcr:async function(r,t){return u(r).performOcr(g(t))},createGenericTextLineScanner:async function(r){r.languages||(r.languages=["eng"]),r.languages=l(r.languages),r.tessdataPath=a;return s(new o.GenericTextLineScanner(r))},recognizeTextLine:async function(r,t){return u(r).recognize(g(t))},cleanTextLineRecognitionQueue:async function(r){u(r).cleanRecognitionQueue()}};async function h(r){if(!r)return{success:!1,detectionStatus:"Error_License"};const t=(e=r.detectionResult,w[e]?w[e]:e>=200?"Error_Unknown":"OK");var e;const n={detectionStatus:t,success:v(t)};return n.original=p(r.originalImageJpegData),n.success&&(n.cropped=p(r.croppedImageJpegData),n.polygon=function(r){if(r.length%2!=0)throw Error("pointCoords size is not even.");const t=[];for(let e=0;e<r.length;e+=2)t.push({x:r[e],y:r[e+1]});return t}(r.polygon.data),n.horizontalLines=y(r.horizontalLines.data),n.verticalLines=y(r.verticalLines.data)),r.delete(),n}function p(r){return r&&r.data&&r.data.slice()}function m(r,t){try{if(r.errorMessage){throw new Error(r.errorMessage)}return(t||(r=>r))(r.result)}finally{r.delete()}}function v(r){return"OK"===r.substr(0,2)}function y(r){const t=[];if(!r)return t;if(r.length%4!=0)throw Error("lineCoords size invalid.");for(let e=0;e<r.length;e+=4)t.push({p1:{x:r[e],y:r[e+1]},p2:{x:r[e+2],y:r[e+3]}});return t}function g(r){if(!r)throw new Error("null image data or buffer");return"number"==typeof r.width?r:{data:r,width:-1,height:-1}}const w={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(r){const{command:t,args:e,ticket:a}=r.data;o||"initialize"===t?(async()=>await d[t].apply(null,e))().then((r=>{const t=(0,n.gatherTransferables)(r);self.postMessage({ticket:a,result:r},t)})).catch((r=>{const t="number"==typeof r?Error(o.stringFromException(r)):r;console.error(t),self.postMessage({ticket:a,error:t})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(r,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gatherTransferables=function(r,t){const e=[];return function r(n){if(!n)return;if(n.constructor===ImageData){const r={data:n.data.slice(),width:n.width,height:n.height};return e.push(r.data.buffer),r}if(n.constructor===ArrayBuffer){const r=t?n.slice(0):n;if(e.push(r),t)return n}else if(ArrayBuffer.isView(n)){let r;if(t){r=new(0,n.constructor)(n.buffer.slice(0))}else r=n;if(e.push(r.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const e=r(n[t]);e&&(n[t]=e)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const e=r(n[t]);e&&(n[t]=e)}}(r),e}},function(r,t,e){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,e,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){t=r,e=n}));var a,i,s,u=Object.assign({},o),c=[],f="./this.program",l=(r,t)=>{throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},s=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},i=(r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)};var h,p=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&(f=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(h=o.wasmBinary);var v,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var g=!1;function w(r,t){r||K(t)}var _,b,E,k,T,P,C,S,D,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&F)return F.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<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}function j(r,t){return r?A(E,r,t):""}function M(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function O(r,t,e){return M(r,E,t,e)}function $(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++e):t+=3}return t}function x(r){_=r,o.HEAP8=b=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=P=new Int32Array(r),o.HEAPU8=E=new Uint8Array(r),o.HEAPU16=T=new Uint16Array(r),o.HEAPU32=C=new Uint32Array(r),o.HEAPF32=S=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var W,R,z,B,I,N=[],L=[],U=[],H=0,V=null,q=null;function Y(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function G(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&(null!==V&&(clearInterval(V),V=null),q)){var t=q;q=null,t()}}function K(r){o.onAbort&&o.onAbort(r),m(r="Aborted("+r+")"),g=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw e(t),t}function X(r){return r.startsWith("data:application/octet-stream;base64,")}function Q(r){try{if(r==R&&h)return new Uint8Array(h);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){K(r)}}X(R="ScanbotSDK.Asm.wasm")||(z=R,R=o.locateFile?o.locateFile(z,d):d+z);var J={1011760:r=>Qt(function(){return this[j(r)].toString()}.apply((0,eval)("(()=>this)()")))};function Z(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function rr(r){for(;r.length>0;)r.shift()(o)}var tr=[];function er(r){r.add_ref()}var nr=0;function or(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){C[this.ptr+4>>2]=r},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(r){C[this.ptr+8>>2]=r},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(r){P[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,b[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,b[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=P[this.ptr>>2];P[this.ptr>>2]=r+1},this.release_ref=function(){var r=P[this.ptr>>2];return P[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){C[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Te(this.get_type()))return C[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function ar(r){return me(new or(r).ptr)}var ir=[];function sr(r){var t=ir[r];return t||(r>=ir.length&&(ir.length=r+1),ir[r]=t=W.get(r)),t}function ur(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&sr(t)(r.excPtr),ar(r.excPtr)}}var cr=0;function fr(){var r=tr.pop();r||K("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(tr.push(r),r.set_rethrown(!0),r.set_caught(!1),nr++),cr=t,t}var lr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,t)=>{for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:r=>{var t=lr.isAbs(r),e="/"===r.substr(-1);return(r=lr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:r=>{var t=lr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:r=>{if("/"===r)return"/";var t=(r=(r=lr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},join:function(){var r=Array.prototype.slice.call(arguments);return lr.normalize(r.join("/"))},join2:(r,t)=>lr.normalize(r+"/"+t)},dr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:yr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t=lr.isAbs(n)}return(t?"/":"")+(r=lr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,t)=>{function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=dr.resolve(r).substr(1),t=dr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.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("/")}};function hr(r,t,e){var n=e>0?e:$(r)+1,o=new Array(n),a=M(r,o,0,o.length);return t&&(o.length=a),o}var pr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){pr.ttys[r]={input:[],output:[],ops:t},yr.registerDevice(r,pr.stream_ops)},stream_ops:{open:function(r){var t=pr.ttys[r.node.rdev];if(!t)throw new yr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new yr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new yr.ErrnoError(29)}if(void 0===s&&0===a)throw new yr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new yr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new yr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=hr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(p(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(m(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(m(A(r.output,0)),r.output=[])}}};function mr(r){r=function(r,t){return Math.ceil(r/t)*t}(r,65536);var t=we(65536,r);return t?function(r,t){return E.fill(0,r,r+t),r}(t,r):0}var vr={ops_table:null,mount:function(r){return vr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(yr.isBlkdev(e)||yr.isFIFO(e))throw new yr.ErrnoError(63);vr.ops_table||(vr.ops_table={dir:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,lookup:vr.node_ops.lookup,mknod:vr.node_ops.mknod,rename:vr.node_ops.rename,unlink:vr.node_ops.unlink,rmdir:vr.node_ops.rmdir,readdir:vr.node_ops.readdir,symlink:vr.node_ops.symlink},stream:{llseek:vr.stream_ops.llseek}},file:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:{llseek:vr.stream_ops.llseek,read:vr.stream_ops.read,write:vr.stream_ops.write,allocate:vr.stream_ops.allocate,mmap:vr.stream_ops.mmap,msync:vr.stream_ops.msync}},link:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,readlink:vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:yr.chrdev_stream_ops}});var o=yr.createNode(r,t,e,n);return yr.isDir(o.mode)?(o.node_ops=vr.ops_table.dir.node,o.stream_ops=vr.ops_table.dir.stream,o.contents={}):yr.isFile(o.mode)?(o.node_ops=vr.ops_table.file.node,o.stream_ops=vr.ops_table.file.stream,o.usedBytes=0,o.contents=null):yr.isLink(o.mode)?(o.node_ops=vr.ops_table.link.node,o.stream_ops=vr.ops_table.link.stream):yr.isChrdev(o.mode)&&(o.node_ops=vr.ops_table.chrdev.node,o.stream_ops=vr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=yr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,yr.isDir(r.mode)?t.size=4096:yr.isFile(r.mode)?t.size=r.usedBytes:yr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&vr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw yr.genericErrors[44]},mknod:function(r,t,e,n){return vr.createNode(r,t,e,n)},rename:function(r,t,e){if(yr.isDir(r.mode)){var n;try{n=yr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new yr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=yr.lookupNode(r,t);for(var n in e.contents)throw new yr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=vr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!yr.isLink(r.mode))throw new yr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(t.buffer===b.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(vr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&yr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new yr.ErrnoError(28);return n},allocate:function(r,t,e){vr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!yr.isFile(r.node.mode))throw new yr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==_){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=mr(t)))throw new yr.ErrnoError(48);b.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return vr.stream_ops.write(r,t,0,n,e,!1),0}}},yr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,t={})=>{if(!(r=dr.resolve(yr.cwd(),r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new yr.ErrnoError(32);for(var e=lr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=yr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=yr.lookupNode(n,e[a]),o=lr.join2(o,e[a]),yr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;yr.isLink(n.mode);){var u=yr.readlink(o);if(o=dr.resolve(lr.dirname(o),u),n=yr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new yr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(yr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:(r,t)=>{for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%yr.nameTable.length},hashAddNode:r=>{var t=yr.hashName(r.parent.id,r.name);r.name_next=yr.nameTable[t],yr.nameTable[t]=r},hashRemoveNode:r=>{var t=yr.hashName(r.parent.id,r.name);if(yr.nameTable[t]===r)yr.nameTable[t]=r.name_next;else for(var e=yr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=yr.mayLookup(r);if(e)throw new yr.ErrnoError(e,r);for(var n=yr.hashName(r.id,t),o=yr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return yr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new yr.FSNode(r,t,e,n);return yr.hashAddNode(o),o},destroyNode:r=>{yr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=yr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>yr.ignorePermissions||(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var t=yr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{return yr.lookupNode(r,t),20}catch(r){}return yr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=yr.lookupNode(r,t)}catch(r){return r.errno}var o=yr.nodePermissions(r,"wx");if(o)return o;if(e){if(!yr.isDir(n.mode))return 54;if(yr.isRoot(n)||yr.getPath(n)===yr.cwd())return 10}else if(yr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?yr.isLink(r.mode)?32:yr.isDir(r.mode)&&("r"!==yr.flagsToPermissionString(t)||512&t)?31:yr.nodePermissions(r,yr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=yr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!yr.streams[e])return e;throw new yr.ErrnoError(33)},getStream:r=>yr.streams[r],createStream:(r,t,e)=>{yr.FSStream||(yr.FSStream=function(){this.shared={}},yr.FSStream.prototype={},Object.defineProperties(yr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new yr.FSStream,r);var n=yr.nextfd(t,e);return r.fd=n,yr.streams[n]=r,r},closeStream:r=>{yr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=yr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new yr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{yr.devices[r]={stream_ops:t}},getDevice:r=>yr.devices[r],getMounts:r=>{for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),yr.syncFSRequests++,yr.syncFSRequests>1&&m("warning: "+yr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=yr.getMounts(yr.root.mount),n=0;function o(r){return yr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)}))},mount:(r,t,e)=>{var n,o="/"===e,a=!e;if(o&&yr.root)throw new yr.ErrnoError(10);if(!o&&!a){var i=yr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,yr.isMountpoint(n))throw new yr.ErrnoError(10);if(!yr.isDir(n.mode))throw new yr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?yr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=yr.lookupPath(r,{follow_mount:!1});if(!yr.isMountpoint(t.node))throw new yr.ErrnoError(28);var e=t.node,n=e.mounted,o=yr.getMounts(n);Object.keys(yr.nameTable).forEach((r=>{for(var t=yr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&yr.destroyNode(t),t=e}})),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod:(r,t,e)=>{var n=yr.lookupPath(r,{parent:!0}).node,o=lr.basename(r);if(!o||"."===o||".."===o)throw new yr.ErrnoError(28);var a=yr.mayCreate(n,o);if(a)throw new yr.ErrnoError(a);if(!n.node_ops.mknod)throw new yr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yr.mknod(r,t,0)),mkdirTree:(r,t)=>{for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{yr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,yr.mknod(r,t,e)),symlink:(r,t)=>{if(!dr.resolve(r))throw new yr.ErrnoError(44);var e=yr.lookupPath(t,{parent:!0}).node;if(!e)throw new yr.ErrnoError(44);var n=lr.basename(t),o=yr.mayCreate(e,n);if(o)throw new yr.ErrnoError(o);if(!e.node_ops.symlink)throw new yr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:(r,t)=>{var e,n,o=lr.dirname(r),a=lr.dirname(t),i=lr.basename(r),s=lr.basename(t);if(e=yr.lookupPath(r,{parent:!0}).node,n=yr.lookupPath(t,{parent:!0}).node,!e||!n)throw new yr.ErrnoError(44);if(e.mount!==n.mount)throw new yr.ErrnoError(75);var u,c=yr.lookupNode(e,i),f=dr.relative(r,a);if("."!==f.charAt(0))throw new yr.ErrnoError(28);if("."!==(f=dr.relative(t,o)).charAt(0))throw new yr.ErrnoError(55);try{u=yr.lookupNode(n,s)}catch(r){}if(c!==u){var l=yr.isDir(c.mode),d=yr.mayDelete(e,i,l);if(d)throw new yr.ErrnoError(d);if(d=u?yr.mayDelete(n,s,l):yr.mayCreate(n,s))throw new yr.ErrnoError(d);if(!e.node_ops.rename)throw new yr.ErrnoError(63);if(yr.isMountpoint(c)||u&&yr.isMountpoint(u))throw new yr.ErrnoError(10);if(n!==e&&(d=yr.nodePermissions(e,"w")))throw new yr.ErrnoError(d);yr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{yr.hashAddNode(c)}}},rmdir:r=>{var t=yr.lookupPath(r,{parent:!0}).node,e=lr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!0);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.rmdir)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.rmdir(t,e),yr.destroyNode(n)},readdir:r=>{var t=yr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new yr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=yr.lookupPath(r,{parent:!0}).node;if(!t)throw new yr.ErrnoError(44);var e=lr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!1);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.unlink)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.unlink(t,e),yr.destroyNode(n)},readlink:r=>{var t=yr.lookupPath(r).node;if(!t)throw new yr.ErrnoError(44);if(!t.node_ops.readlink)throw new yr.ErrnoError(28);return dr.resolve(yr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=yr.lookupPath(r,{follow:!t}).node;if(!e)throw new yr.ErrnoError(44);if(!e.node_ops.getattr)throw new yr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>yr.stat(r,!0),chmod:(r,t,e)=>{var n;if(!(n="string"==typeof r?yr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{yr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);yr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;if(!(o="string"==typeof r?yr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{yr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=yr.getStream(r);if(!n)throw new yr.ErrnoError(8);yr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new yr.ErrnoError(28);var e;if(!(e="string"==typeof r?yr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);if(yr.isDir(e.mode))throw new yr.ErrnoError(31);if(!yr.isFile(e.mode))throw new yr.ErrnoError(28);var n=yr.nodePermissions(e,"w");if(n)throw new yr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);if(0==(2097155&e.flags))throw new yr.ErrnoError(28);yr.truncate(e.node,t)},utime:(r,t,e)=>{var n=yr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new yr.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?yr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=lr.normalize(r);try{n=yr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var a=!1;if(64&t)if(n){if(128&t)throw new yr.ErrnoError(20)}else n=yr.mknod(r,e,0),a=!0;if(!n)throw new yr.ErrnoError(44);if(yr.isChrdev(n.mode)&&(t&=-513),65536&t&&!yr.isDir(n.mode))throw new yr.ErrnoError(54);if(!a){var i=yr.mayOpen(n,t);if(i)throw new yr.ErrnoError(i)}512&t&&!a&&yr.truncate(n,0),t&=-131713;var s=yr.createStream({node:n,path:yr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(yr.readFiles||(yr.readFiles={}),r in yr.readFiles||(yr.readFiles[r]=1)),s},close:r=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{yr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new yr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new yr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:(r,t,e,n,o)=>{if(n<0||o<0)throw new yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(1==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.read)throw new yr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new yr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:(r,t,e,n,o,a)=>{if(n<0||o<0)throw new yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.write)throw new yr.ErrnoError(28);r.seekable&&1024&r.flags&&yr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new yr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(t<0||e<=0)throw new yr.ErrnoError(28);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(!yr.isFile(r.node.mode)&&!yr.isDir(r.node.mode))throw new yr.ErrnoError(43);if(!r.stream_ops.allocate)throw new yr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:(r,t,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new yr.ErrnoError(2);if(1==(2097155&r.flags))throw new yr.ErrnoError(2);if(!r.stream_ops.mmap)throw new yr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o)},msync:(r,t,e,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl:(r,t,e)=>{if(!r.stream_ops.ioctl)throw new yr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:(r,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=yr.open(r,t.flags),o=yr.stat(r).size,a=new Uint8Array(o);return yr.read(n,a,0,o,0),"utf8"===t.encoding?e=A(a,0):"binary"===t.encoding&&(e=a),yr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=yr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array($(t)+1),a=M(t,o,0,o.length);yr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yr.write(n,t,0,t.byteLength,void 0,e.canOwn)}yr.close(n)},cwd:()=>yr.currentPath,chdir:r=>{var t=yr.lookupPath(r,{follow:!0});if(null===t.node)throw new yr.ErrnoError(44);if(!yr.isDir(t.node.mode))throw new yr.ErrnoError(54);var e=yr.nodePermissions(t.node,"x");if(e)throw new yr.ErrnoError(e);yr.currentPath=t.path},createDefaultDirectories:()=>{yr.mkdir("/tmp"),yr.mkdir("/home"),yr.mkdir("/home/web_user")},createDefaultDevices:()=>{yr.mkdir("/dev"),yr.registerDevice(yr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),yr.mkdev("/dev/null",yr.makedev(1,3)),pr.register(yr.makedev(5,0),pr.default_tty_ops),pr.register(yr.makedev(6,0),pr.default_tty1_ops),yr.mkdev("/dev/tty",yr.makedev(5,0)),yr.mkdev("/dev/tty1",yr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>K("randomDevice")}();yr.createDevice("/dev","random",r),yr.createDevice("/dev","urandom",r),yr.mkdir("/dev/shm"),yr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yr.mkdir("/proc");var r=yr.mkdir("/proc/self");yr.mkdir("/proc/self/fd"),yr.mount({mount:()=>{var t=yr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=yr.getStream(e);if(!n)throw new yr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yr.createDevice("/dev","stdin",o.stdin):yr.symlink("/dev/tty","/dev/stdin"),o.stdout?yr.createDevice("/dev","stdout",null,o.stdout):yr.symlink("/dev/tty","/dev/stdout"),o.stderr?yr.createDevice("/dev","stderr",null,o.stderr):yr.symlink("/dev/tty1","/dev/stderr"),yr.open("/dev/stdin",0),yr.open("/dev/stdout",1),yr.open("/dev/stderr",1)},ensureErrnoError:()=>{yr.ErrnoError||(yr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},yr.ErrnoError.prototype=new Error,yr.ErrnoError.prototype.constructor=yr.ErrnoError,[44].forEach((r=>{yr.genericErrors[r]=new yr.ErrnoError(r),yr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{yr.ensureErrnoError(),yr.nameTable=new Array(4096),yr.mount(vr,{},"/"),yr.createDefaultDirectories(),yr.createDefaultDevices(),yr.createSpecialDirectories(),yr.filesystems={MEMFS:vr}},init:(r,t,e)=>{yr.init.initialized=!0,yr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=t||o.stdout,o.stderr=e||o.stderr,yr.createStandardStreams()},quit:()=>{yr.init.initialized=!1;for(var r=0;r<yr.streams.length;r++){var t=yr.streams[r];t&&yr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=yr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=yr.lookupPath(r,{follow:!t})).path}catch(r){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=lr.basename(r),n=yr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(r){e.error=r.errno}return e},createPath:(r,t,e,n)=>{r="string"==typeof r?r:yr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=lr.join2(r,a);try{yr.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=lr.join2("string"==typeof r?r:yr.getPath(r),t),i=yr.getMode(n,o);return yr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:yr.getPath(r),i=t?lr.join2(r,t):r);var s=yr.getMode(n,o),u=yr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}yr.chmod(u,146|s);var d=yr.open(u,577);yr.write(d,e,0,e.length,0,a),yr.close(d),yr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=lr.join2("string"==typeof r?r:yr.getPath(r),t),a=yr.getMode(!!e,!!n);yr.createDevice.major||(yr.createDevice.major=64);var i=yr.makedev(yr.createDevice.major++,0);return yr.registerDevice(i,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,t,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(r){throw new yr.ErrnoError(29)}if(void 0===u&&0===i)throw new yr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:(r,t,e,o,a)=>{for(var i=0;i<o;i++)try{n(t[e+i])}catch(r){throw new yr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),yr.mkdev(o,a,i)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=hr(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new yr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter((r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=yr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(r,t,e,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((r=>{var t=u.stream_ops[r];c[r]=function(){return yr.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(r,t,e,n,o)=>(yr.forceLoadFile(u),f(r,t,e,n,o)),c.mmap=(r,t,e,n,o)=>{yr.forceLoadFile(u);var a=mr(t);if(!a)throw new yr.ErrnoError(48);return f(r,b,a,t,e),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,s,u,c,f)=>{var l=t?dr.resolve(lr.join2(r,t)):r;function d(e){function i(e){f&&f(),u||yr.createDataFile(r,t,e,n,o,c),a&&a(),G()}Browser.handledByPreloadPlugin(e,l,i,(()=>{s&&s(),G()}))||i(e)}Y(),"string"==typeof e?function(r,t,e,n){var o=n?"":"al "+r;i(r,(e=>{w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&G()}),(t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()})),o&&Y()}(e,(r=>d(r)),s):d(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=()=>{p("creating db"),o.result.createObjectStore(yr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yr.DB_STORE_NAME],"readwrite"),a=n.objectStore(yr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((r=>{var t=a.put(yr.analyzePath(r).object.contents,r);t.onsuccess=()=>{++i+s==u&&c()},t.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([yr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(yr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?t():e()}r.forEach((r=>{var t=i.get(r);t.onsuccess=()=>{yr.analyzePath(r).exists&&yr.unlink(r),yr.createDataFile(lr.dirname(r),lr.basename(r),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=()=>{u++,s+u==c&&f()}})),a.onerror=e},o.onerror=e}},gr={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(lr.isAbs(t))return t;var n;if(n=-100===r?yr.cwd():gr.getStreamFromFD(r).path,0==t.length){if(!e)throw new yr.ErrnoError(44);return n}return lr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&lr.normalize(t)!==lr.normalize(yr.getPath(r.node)))return-54;throw r}return P[e>>2]=n.dev,P[e+8>>2]=n.ino,P[e+12>>2]=n.mode,C[e+16>>2]=n.nlink,P[e+20>>2]=n.uid,P[e+24>>2]=n.gid,P[e+28>>2]=n.rdev,I=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+40>>2]=I[0],P[e+44>>2]=I[1],P[e+48>>2]=4096,P[e+52>>2]=n.blocks,I=[Math.floor(n.atime.getTime()/1e3)>>>0,(B=Math.floor(n.atime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+56>>2]=I[0],P[e+60>>2]=I[1],C[e+64>>2]=0,I=[Math.floor(n.mtime.getTime()/1e3)>>>0,(B=Math.floor(n.mtime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+72>>2]=I[0],P[e+76>>2]=I[1],C[e+80>>2]=0,I=[Math.floor(n.ctime.getTime()/1e3)>>>0,(B=Math.floor(n.ctime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+88>>2]=I[0],P[e+92>>2]=I[1],C[e+96>>2]=0,I=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+104>>2]=I[0],P[e+108>>2]=I[1],0},doMsync:function(r,t,e,n,o){if(!yr.isFile(t.node.mode))throw new yr.ErrnoError(43);if(2&n)return 0;var a=E.slice(r,r+e);yr.msync(t,a,o,e,n)},varargs:void 0,get:function(){return gr.varargs+=4,P[gr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var t=yr.getStream(r);if(!t)throw new yr.ErrnoError(8);return t}},wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",_r={};function br(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function Er(r){return this.fromWireType(P[r>>2])}var kr={},Tr={},Pr={};function Cr(r){if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+r:r}function Sr(r,t){return r=Cr(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Dr(r,t){var e=Sr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Fr=void 0;function Ar(r){throw new Fr(r)}function jr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ar("Mismatched type converter count");for(var o=0;o<r.length;++o)Rr(r[o],n[o])}r.forEach((function(r){Pr[r]=t}));var o=new Array(t.length),a=[],i=0;t.forEach(((r,t)=>{Tr.hasOwnProperty(r)?o[t]=Tr[r]:(a.push(r),kr.hasOwnProperty(r)||(kr[r]=[]),kr[r].push((()=>{o[t]=Tr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)}function Mr(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}var Or=void 0;function $r(r){for(var t="",e=r;E[e];)t+=Or[E[e++]];return t}var xr=void 0;function Wr(r){throw new xr(r)}function Rr(r,t,e={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||Wr('type "'+n+'" must have a positive integer typeid pointer'),Tr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;Wr("Cannot register type '"+n+"' twice")}if(Tr[r]=t,delete Pr[r],kr.hasOwnProperty(r)){var o=kr[r];delete kr[r],o.forEach((r=>r()))}}function zr(r){if(!(this instanceof it))return!1;if(!(r instanceof it))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}function Br(r){Wr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Ir=!1;function Nr(r){}function Lr(r){r.count.value-=1,0===r.count.value&&function(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}(r)}function Ur(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=Ur(r,t,e.baseClass);return null===n?null:e.downcast(n)}var Hr={};function Vr(){return Object.keys(Qr).length}function qr(){var r=[];for(var t in Qr)Qr.hasOwnProperty(t)&&r.push(Qr[t]);return r}var Yr=[];function Gr(){for(;Yr.length;){var r=Yr.pop();r.$$.deleteScheduled=!1,r.delete()}}var Kr=void 0;function Xr(r){Kr=r,Yr.length&&Kr&&Kr(Gr)}var Qr={};function Jr(r,t){return t=function(r,t){for(void 0===t&&Wr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}(r,t),Qr[t]}function Zr(r,t){return t.ptrType&&t.ptr||Ar("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ar("Both smartPtrType and smartPtr must be specified"),t.count={value:1},tt(Object.create(r,{$$:{value:t}}))}function rt(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Jr(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Zr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Zr(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(t),s=Hr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=Ur(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Zr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):Zr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function tt(r){return"undefined"==typeof FinalizationRegistry?(tt=r=>r,r):(Ir=new FinalizationRegistry((r=>{Lr(r.$$)})),tt=r=>{var t=r.$$;if(t.smartPtr){var e={$$:t};Ir.register(r,e,r)}return r},Nr=r=>Ir.unregister(r),tt(r))}function et(){if(this.$$.ptr||Br(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,t=tt(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function nt(){this.$$.ptr||Br(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Wr("Object already scheduled for deletion"),Nr(this),Lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ot(){return!this.$$.ptr}function at(){return this.$$.ptr||Br(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Wr("Object already scheduled for deletion"),Yr.push(this),1===Yr.length&&Kr&&Kr(Gr),this.$$.deleteScheduled=!0,this}function it(){}function st(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||Wr("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[t].overloadTable+")!"),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}}function ut(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&Wr("Cannot register public name '"+r+"' twice"),st(o,r,r),o.hasOwnProperty(e)&&Wr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function ct(r,t,e,n,o,a,i,s){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}function ft(r,t,e){for(;t!==e;)t.upcast||Wr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function lt(r,t){if(null===t)return this.isReference&&Wr("null is not a valid "+this.name),0;t.$$||Wr('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||Wr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function dt(r,t){var e;if(null===t)return this.isReference&&Wr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||Wr('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||Wr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Wr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ft(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Wr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:Wr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,Ot.toHandle((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:Wr("Unsupporting sharing policy")}return e}function ht(r,t){if(null===t)return this.isReference&&Wr("null is not a valid "+this.name),0;t.$$||Wr('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||Wr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Wr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function pt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function mt(r){this.rawDestructor&&this.rawDestructor(r)}function vt(r){null!==r&&r.delete()}function yt(r,t,e,n,o,a,i,s,u,c,f){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=dt:n?(this.toWireType=lt,this.destructorFunction=null):(this.toWireType=ht,this.destructorFunction=null)}function gt(r,t,e){o.hasOwnProperty(r)||Ar("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function wt(r,t,e){return r.includes("j")?function(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}(r,t,e):sr(t).apply(null,e)}function _t(r,t){var e,n,o,a=(r=$r(r)).includes("j")?(e=r,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),wt(e,n,o)}):sr(t);return"function"!=typeof a&&Wr("unknown function pointer with signature "+r+": "+t),a}var bt=void 0;function Et(r){var t=ge(r),e=$r(t);return me(t),e}function kt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Tr[t]||(Pr[t]?Pr[t].forEach(r):(e.push(t),n[t]=!0))})),new bt(r+": "+e.map(Et).join([", "]))}function Tt(r,t){for(var e=[],n=0;n<r;n++)e.push(C[t+4*n>>2]);return e}function Pt(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=Sr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function Ct(r,t,e,n,o){var a=t.length;a<2&&Wr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==t[1]&&null!==e,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",l="";for(u=0;u<a-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+Cr(r)+"("+f+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var h=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[Wr,n,o,br,t[0],t[1]];for(i&&(d+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<a-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+t[u+2].name+"\n",p.push("argType"+u),m.push(t[u+2]);if(i&&(l="thisWired"+(l.length>0?", ":"")+l),d+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)d+="runDestructors(destructors);\n";else for(u=i?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",p.push(v+"_dtor"),m.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",p.push(d),Pt(Function,p).apply(null,m)}function St(r,t,e){return r instanceof Object||Wr(e+' with invalid "this": '+r),r instanceof t.registeredClass.constructor||Wr(e+' incompatible with "this" of type '+r.constructor.name),r.$$.ptr||Wr("cannot call emscripten binding method "+e+" on deleted object"),ft(r.$$.ptr,r.$$.ptrType.registeredClass,t.registeredClass)}var Dt=[],Ft=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function At(r){r>4&&0==--Ft[r].refcount&&(Ft[r]=void 0,Dt.push(r))}function jt(){for(var r=0,t=5;t<Ft.length;++t)void 0!==Ft[t]&&++r;return r}function Mt(){for(var r=5;r<Ft.length;++r)if(void 0!==Ft[r])return Ft[r];return null}var Ot={toValue:r=>(r||Wr("Cannot use deleted val. handle = "+r),Ft[r].value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Dt.length?Dt.pop():Ft.length;return Ft[t]={refcount:1,value:r},t}}};function $t(r,t,e){switch(t){case 0:return function(r){var t=e?b:E;return this.fromWireType(t[r])};case 1:return function(r){var t=e?k:T;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?P:C;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function xt(r,t){var e=Tr[r];return void 0===e&&Wr(t+" has unknown type "+Et(r)),e}function Wt(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function Rt(r,t){switch(t){case 2:return function(r){return this.fromWireType(S[r>>2])};case 3:return function(r){return this.fromWireType(D[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function zt(r,t,e){switch(t){case 0:return e?function(r){return b[r]}:function(r){return E[r]};case 1:return e?function(r){return k[r>>1]}:function(r){return T[r>>1]};case 2:return e?function(r){return P[r>>2]}:function(r){return C[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}var Bt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function It(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&T[n];)++n;if((e=n<<1)-r>32&&Bt)return Bt.decode(E.subarray(r,e));for(var a="",i=0;!(i>=t/2);++i){var s=k[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Nt(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);k[t>>1]=i,t+=2}return k[t>>1]=0,t-n}function Lt(r){return 2*r.length}function Ut(r,t){for(var e=0,n="";!(e>=t/4);){var o=P[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n}function Ht(r,t,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),P[t>>2]=i,(t+=4)+4>o)break}return P[t>>2]=0,t-n}function Vt(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t}var qt={};function Yt(r){var t=qt[r];return void 0===t?$r(r):t}var Gt=[];function Kt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Xt=[];function Qt(r){var t=$(r)+1,e=pe(t);return e&&M(r,b,e,t),e}var Jt,Zt=[];function re(r){try{return v.grow(r-_.byteLength+65535>>>16),x(v.buffer),1}catch(r){}}Jt=()=>performance.now();var te={};function ee(){if(!ee.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var t in te)void 0===te[t]?delete r[t]:r[t]=te[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ee.strings=e}return ee.strings}function ne(r){y||(o.onExit&&o.onExit(r),g=!0),l(r,new Z(r))}var oe=function(r,t){ne(r)};function ae(r){return r%4==0&&(r%100!=0||r%400==0)}var ie=[31,29,31,30,31,30,31,31,30,31,30,31],se=[31,28,31,30,31,30,31,31,30,31,30,31];function ue(r,t,e,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?j(o):""},i=j(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function h(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function p(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function m(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=ae(e.getFullYear()),o=e.getMonth(),a=(n?ie:se)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=p(e),a=p(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return m(r).toString().substring(2)},"%G":function(r){return m(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(ae(r.tm_year+1900)?ie:se,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(r){var t=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&t++,t){if(53==t){var e=(r.tm_wday+371-r.tm_yday)%7;4==e||3==e&&ae(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ae(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var y=hr(i=i.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(r,t){b.set(r,t)}(y,r),y.length-1)}var ce=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=yr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},fe=365,le=146;Object.defineProperties(ce.prototype,{read:{get:function(){return(this.mode&fe)===fe},set:function(r){r?this.mode|=fe:this.mode&=-366}},write:{get:function(){return(this.mode&le)===le},set:function(r){r?this.mode|=le:this.mode&=-147}},isFolder:{get:function(){return yr.isDir(this.mode)}},isDevice:{get:function(){return yr.isChrdev(this.mode)}}}),yr.FSNode=ce,yr.staticInit(),Fr=o.InternalError=Dr(Error,"InternalError"),function(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);Or=r}(),xr=o.BindingError=Dr(Error,"BindingError"),it.prototype.isAliasOf=zr,it.prototype.clone=et,it.prototype.delete=nt,it.prototype.isDeleted=ot,it.prototype.deleteLater=at,o.getInheritedInstanceCount=Vr,o.getLiveInheritedInstances=qr,o.flushPendingDeletes=Gr,o.setDelayFunction=Xr,yt.prototype.getPointee=pt,yt.prototype.destructor=mt,yt.prototype.argPackAdvance=8,yt.prototype.readValueFromPointer=Er,yt.prototype.deleteObject=vt,yt.prototype.fromWireType=rt,bt=o.UnboundTypeError=Dr(Error,"UnboundTypeError"),o.count_emval_handles=jt,o.get_first_emval=Mt;var de,he={k:function(r){return pe(r+24)+24},w:function(r){var t=new or(r);return t.get_caught()||(t.set_caught(!0),nr--),t.set_rethrown(!1),tr.push(t),er(t),t.get_exception_ptr()},rb:function(r){throw m("Unexpected exception thrown, this is not properly supported - aborting"),g=!0,r},ub:function(){if(!tr.length)return 0;var r=tr[tr.length-1];return er(r),r.excPtr},Ca:function(r){r&&ur(new or(r))},A:function(){_e(0),ur(tr.pop()),cr=0},a:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},g:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},H:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},n:ar,Ba:function(r){r&&er(new or(r))},ua:fr,tb:function(r){if(r){var t=new or(r);tr.push(t),t.set_rethrown(!0),fr()}},q:function(r,t,e){throw new or(r).init(t,e),cr=r,nr++,r},vb:function(){return nr},c:function(r){throw cr||(cr=r),r},zb:function(r,t,e,n,o){try{for(var a=0,i=t?P[t>>2]:0,s=t?P[t+4>>2]:0,u=e?P[e>>2]:0,c=e?P[e+4>>2]:0,f=n?P[n>>2]:0,l=n?P[n+4>>2]:0,d=0,h=0,p=0,m=0,v=0,y=0,g=(t?P[t>>2]:0)|(e?P[e>>2]:0)|(n?P[n>>2]:0),w=(t?P[t+4>>2]:0)|(e?P[e+4>>2]:0)|(n?P[n+4>>2]:0),_=function(r,t,e,n){return r<32?t&n:e&n},b=0;b<r;b++){var E=1<<b%32;if(_(b,g,w,E)){var k=gr.getStreamFromFD(b),T=gr.DEFAULT_POLLMASK;k.stream_ops.poll&&(T=k.stream_ops.poll(k)),1&T&&_(b,i,s,E)&&(b<32?d|=E:h|=E,a++),4&T&&_(b,u,c,E)&&(b<32?p|=E:m|=E,a++),2&T&&_(b,f,l,E)&&(b<32?v|=E:y|=E,a++)}}return t&&(P[t>>2]=d,P[t+4>>2]=h),e&&(P[e>>2]=p,P[e+4>>2]=m),n&&(P[n>>2]=v,P[n+4>>2]=y),a}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Ea:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 0:return(o=gr.get())<0?-28:yr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=gr.get();return n.flags|=o,0;case 5:return o=gr.get(),k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,P[ve()>>2]=a,-1}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}var a},Gb:function(r,t){try{var e=gr.getStreamFromFD(r);return gr.doStat(yr.stat,e.path,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Hb:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=gr.get();return P[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=gr.get(),yr.ioctl(n,t,o);default:return-28}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Eb:function(r,t,e,n){try{t=gr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=gr.calculateAt(r,t,a),gr.doStat(o?yr.lstat:yr.stat,t,e)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Fa:function(r,t,e,n){gr.varargs=n;try{t=gr.getStr(t),t=gr.calculateAt(r,t);var o=n?gr.get():0;return yr.open(t,e,o).fd}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Ab:function(r){try{return r=gr.getStr(r),yr.rmdir(r),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Fb:function(r,t){try{return r=gr.getStr(r),gr.doStat(yr.stat,r,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Bb:function(r,t,e){try{return t=gr.getStr(t),t=gr.calculateAt(r,t),0===e?yr.unlink(t):512===e?yr.rmdir(t):K("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Mb:function(r){},Ob:function(r,t){K(wr)},Nb:function(r,t){K(wr)},db:function(r){var t=_r[r];delete _r[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;jr([r],o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType))),(r=>{var a={};return o.forEach(((t,e)=>{var n=t.fieldName,i=r[e],s=t.getter,u=t.getterContext,c=r[e+o.length],f=t.setter,l=t.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,t)=>{var e=[];f(l,r,c.toWireType(e,t)),br(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in a)t[e]=a[e].read(r);return n(r),t},toWireType:function(r,t){for(var o in a)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var i=e();for(o in a)a[o].write(i,t[o]);return null!==r&&r.push(n,i),i},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:n}]}))},nb:function(r,t,e,n,o){},Ga:function(r,t,e,n,o){var a=Mr(e);Rr(r,{name:t=$r(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=b;else if(2===e)n=k;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=P}return this.fromWireType(n[r>>a])},destructorFunction:null})},J:function(r,t,e,n,o,a,i,s,u,c,f,l,d){f=$r(f),a=_t(o,a),s&&(s=_t(i,s)),c&&(c=_t(u,c)),d=_t(l,d);var h=Cr(f);ut(h,(function(){kt("Cannot construct "+f+" due to unbound types",[n])})),jr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:it.prototype;var i=Sr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new xr("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new xr(f+" has no accessible constructor");var r=l.constructor_body[arguments.length];if(void 0===r)throw new xr("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var l=new ct(f,i,u,d,e,a,s,c),p=new yt(f,l,!0,!1,!1),m=new yt(f+"*",l,!1,!1,!1),v=new yt(f+" const*",l,!1,!0,!1);return Hr[r]={pointerType:m,constPointerType:v},gt(h,i),[p,m,v]}))},hb:function(r,t,e,n,o,a){w(t>0);var i=Tt(t,e);o=_t(n,o),jr([],[r],(function(r){var e="constructor "+(r=r[0]).name;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new xr("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+r.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return r.registeredClass.constructor_body[t-1]=()=>{kt("Cannot construct "+r.name+" due to unbound types",i)},jr([],i,(function(n){return n.splice(1,0,null),r.registeredClass.constructor_body[t-1]=Ct(e,n,null,o,a),[]})),[]}))},gb:function(r,t,e,n,o,a,i,s){var u=Tt(e,n);t=$r(t),a=_t(o,a),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){kt("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(st(c,t,n),c[t].overloadTable[e-2]=o),jr([],u,(function(o){var s=Ct(n,o,r,a,i);return void 0===c[t].overloadTable?(s.argCount=e-2,c[t]=s):c[t].overloadTable[e-2]=s,[]})),[]}))},F:function(r,t,e,n,o,a,i,s,u,c){t=$r(t),o=_t(n,o),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t,f={get:function(){kt("Cannot access "+n+" due to unbound types",[e,i])},enumerable:!0,configurable:!0};return f.set=u?()=>{kt("Cannot access "+n+" due to unbound types",[e,i])}:r=>{Wr(n+" is a read-only property")},Object.defineProperty(r.registeredClass.instancePrototype,t,f),jr([],u?[e,i]:[e],(function(e){var i=e[0],f={get:function(){var t=St(this,r,n+" getter");return i.fromWireType(o(a,t))},enumerable:!0};if(u){u=_t(s,u);var l=e[1];f.set=function(t){var e=St(this,r,n+" setter"),o=[];u(c,e,l.toWireType(o,t)),br(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,t,f),[]})),[]}))},Pb:function(r,t){Rr(r,{name:t=$r(t),fromWireType:function(r){var t=Ot.toValue(r);return At(r),t},toWireType:function(r,t){return Ot.toHandle(t)},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:null})},ya:function(r,t,e,n){var o=Mr(e);function a(){}t=$r(t),a.values={},Rr(r,{name:t,constructor:a,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:$t(t,o,n),destructorFunction:null}),ut(t,a)},z:function(r,t,e){var n=xt(r,"enum");t=$r(t);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:Sr(n.name+"_"+t,(function(){}))}});o.values[e]=a,o[t]=a},ra:function(r,t,e){var n=Mr(e);Rr(r,{name:t=$r(t),fromWireType:function(r){return r},toWireType:function(r,t){return t},argPackAdvance:8,readValueFromPointer:Rt(t,n),destructorFunction:null})},ca:function(r,t,e,n,o,a){var i=Tt(t,e);r=$r(r),o=_t(n,o),ut(r,(function(){kt("Cannot call "+r+" due to unbound types",i)}),t-1),jr([],i,(function(e){var n=[e[0],null].concat(e.slice(1));return gt(r,Ct(r,n,null,o,a),t-1),[]}))},L:function(r,t,e,n,o){t=$r(t),-1===o&&(o=4294967295);var a=Mr(e),i=r=>r;if(0===n){var s=32-8*e;i=r=>r<<s>>>s}var u=t.includes("unsigned");Rr(r,{name:t,fromWireType:i,toWireType:u?function(r,t){return this.name,t>>>0}:function(r,t){return this.name,t},argPackAdvance:8,readValueFromPointer:zt(t,a,0!==n),destructorFunction:null})},E:function(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=C,e=t[r>>=2],o=t[r+1];return new n(_,o,e)}Rr(r,{name:e=$r(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},qa:function(r,t){var e="std::string"===(t=$r(t));Rr(r,{name:t,fromWireType:function(r){var t,n=C[r>>2],o=r+4;if(e)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=j(a,s-a);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);t=c.join("")}return me(r),t},toWireType:function(r,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Wr("Cannot pass non-string to std::string"),n=e&&o?$(t):t.length;var a=pe(4+n+1),i=a+4;if(C[a>>2]=n,e&&o)O(t,i,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(me(i),Wr("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=t[s];return null!==r&&r.push(me,a),a},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){me(r)}})},oa:function(r,t,e){var n,o,a,i,s;e=$r(e),2===t?(n=It,o=Nt,i=Lt,a=()=>T,s=1):4===t&&(n=Ut,o=Ht,i=Vt,a=()=>C,s=2),Rr(r,{name:e,fromWireType:function(r){for(var e,o=C[r>>2],i=a(),u=r+4,c=0;c<=o;++c){var f=r+4+c*t;if(c==o||0==i[f>>s]){var l=n(u,f-u);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),u=f+t}}return me(r),e},toWireType:function(r,n){"string"!=typeof n&&Wr("Cannot pass non-string to C++ string type "+e);var a=i(n),u=pe(4+a+t);return C[u>>2]=a>>s,o(n,u+4,a+t),null!==r&&r.push(me,u),u},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){me(r)}})},pa:function(r,t,e,n,o,a){_r[r]={name:$r(t),rawConstructor:_t(e,n),rawDestructor:_t(o,a),fields:[]}},ba:function(r,t,e,n,o,a,i,s,u,c){_r[r].fields.push({fieldName:$r(t),getterReturnType:e,getter:_t(n,o),getterContext:a,setterArgumentType:i,setter:_t(s,u),setterContext:c})},Ha:function(r,t){Rr(r,{isVoid:!0,name:t=$r(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})},Ib:function(){return!0},wb:function(){throw 1/0},fa:function(r,t,e){r=Ot.toValue(r),t=xt(t,"emval::as");var n=[],o=Ot.toHandle(n);return C[e>>2]=o,t.toWireType(n,r)},xa:function(r,t,e,n,o){return(r=Gt[r])(t=Ot.toValue(t),e=Yt(e),function(r){var t=[];return C[r>>2]=Ot.toHandle(t),t}(n),o)},Za:function(r,t,e,n){(r=Gt[r])(t=Ot.toValue(t),e=Yt(e),null,n)},ma:At,ia:function(r){return 0===r?Ot.toHandle(Kt()):(r=Yt(r),Ot.toHandle(Kt()[r]))},ha:function(r,t){var e=function(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=xt(C[t+4*n>>2],"parameter "+n);return e}(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",a=Xt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<r-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(e[1+c]);var f="return function "+Cr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",l=0;for(c=0;c<r-1;++c)f+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=e[c+1].argPackAdvance;for(f+=" var rv = handle[name]("+u+");\n",c=0;c<r-1;++c)e[c+1].deleteObject&&(f+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(f+=" return retType.toWireType(destructors, rv);\n"),f+="};\n",i.push(f);var d,h,p=Pt(Function,i).apply(null,s);return d=p,h=Gt.length,Gt.push(d),a=h,Xt[o]=a,a},ab:function(r,t){return r=Ot.toValue(r),t=Ot.toValue(t),Ot.toHandle(r[t])},O:function(r){r>4&&(Ft[r].refcount+=1)},_a:function(r,t){return(r=Ot.toValue(r))instanceof(t=Ot.toValue(t))},$a:function(r){return"string"==typeof(r=Ot.toValue(r))},wa:function(){return Ot.toHandle([])},ga:function(r){return Ot.toHandle(Yt(r))},bb:function(r){br(Ot.toValue(r)),At(r)},va:function(r,t){var e=(r=xt(r,"_emval_take_value")).readValueFromPointer(t);return Ot.toHandle(e)},Jb:function(r,t){var e,n=new Date(1e3*(C[(e=r)>>2]+4294967296*P[e+4>>2]));P[t>>2]=n.getSeconds(),P[t+4>>2]=n.getMinutes(),P[t+8>>2]=n.getHours(),P[t+12>>2]=n.getDate(),P[t+16>>2]=n.getMonth(),P[t+20>>2]=n.getFullYear()-1900,P[t+24>>2]=n.getDay();var o=new Date(n.getFullYear(),0,1),a=(n.getTime()-o.getTime())/864e5|0;P[t+28>>2]=a,P[t+36>>2]=-60*n.getTimezoneOffset();var i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),u=0|(i!=s&&n.getTimezoneOffset()==Math.min(s,i));P[t+32>>2]=u},Kb:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}P[r>>2]=60*u,P[t>>2]=Number(i!=s);var f=c(o),l=c(a),d=Qt(f),h=Qt(l);s<i?(C[e>>2]=d,C[e+4>>2]=h):(C[e>>2]=h,C[e+4>>2]=d)}(t,e,n))},p:function(){K("")},cb:function(r,t,e){var n=function(r,t){var e;for(Zt.length=0,t>>=2;e=E[r++];)t+=105!=e&t,Zt.push(105==e?P[t]:D[t++>>1]),++t;return Zt}(t,e);return J[r].apply(null,n)},la:function(){return Date.now()},yb:function(){return 2147483648},ka:Jt,Lb:function(r,t,e){E.copyWithin(r,t,t+e)},xb:function(r){var t,e,n=E.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),re(Math.min(o,(t=Math.max(r,i))+((e=65536)-t%e)%e)))return!0}return!1},Cb:function(r,t){var e=0;return ee().forEach((function(n,o){var a=t+e;C[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)b[t++>>0]=r.charCodeAt(n);e||(b[t>>0]=0)}(n,a),e+=n.length+1})),0},Db:function(r,t){var e=ee();C[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),C[t>>2]=n,0},sa:oe,na:function(r){try{var t=gr.getStreamFromFD(r);return yr.close(t),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},Da:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=yr.read(r,b,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(gr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},mb:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=gr.getStreamFromFD(r);return yr.llseek(i,a,n),I=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[o>>2]=I[0],P[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}var s,u},ja:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=yr.write(r,b,i,s,n);if(u<0)return-1;o+=u}return o}(gr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},fb:function(){return Qt(location.toString())},eb:function(){return Qt((r=Oe,self[r(106,"gI)R")][r(113,"C7xg")]()));var r},Na:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},Ra:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},B:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Ka:function(r,t,e,n,o,a,i,s){var u=be();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},s:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},C:function(r,t,e){var n=be();try{return sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},K:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Pa:function(r,t,e,n,o){var a=be();try{return sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},x:function(r){var t=be();try{return sr(r)()}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},f:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},d:function(r,t,e){var n=be();try{return sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},Va:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},j:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},m:function(r,t,e,n,o){var a=be();try{return sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Aa:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},r:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},y:function(r,t,e,n,o,a,i){var s=be();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},za:function(r,t,e,n,o,a,i,s){var u=be();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},ta:function(r,t,e,n,o,a,i,s,u){var c=be();try{return sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},Ia:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{return sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},aa:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=be();try{return sr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(r){if(Ee(d),r!==r+0)throw r;_e(1,0)}},jb:function(r,t,e,n,o,a,i){var s=be();try{return Ae(r,t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},pb:function(r,t,e,n){var o=be();try{return Se(r,t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},lb:function(r){var t=be();try{return De(r)}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},qb:function(r,t){var e=be();try{return Pe(r,t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},kb:function(r,t,e){var n=be();try{return Fe(r,t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},ib:function(r,t,e,n,o){var a=be();try{return je(r,t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},l:function(r){var t=be();try{sr(r)()}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},h:function(r,t){var e=be();try{sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},X:function(r,t,e){var n=be();try{sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},b:function(r,t,e){var n=be();try{sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},R:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Qa:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},U:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},ea:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},I:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},N:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Ta:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},e:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},D:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},La:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},M:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},G:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},T:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},Ma:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},da:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Ua:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},i:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Xa:function(r,t,e,n,o,a,i,s,u){var c=be();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},P:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Q:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},o:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Wa:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},u:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},Sa:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},t:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},V:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},Ja:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},v:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},W:function(r,t,e,n,o,a,i,s,u){var c=be();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},Y:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},S:function(r,t,e,n,o,a,i,s,u,c,f){var l=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f)}catch(r){if(Ee(l),r!==r+0)throw r;_e(1,0)}},Oa:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(r){if(Ee(d),r!==r+0)throw r;_e(1,0)}},Z:function(r,t,e,n,o,a,i,s,u,c,f,l,d){var h=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l,d)}catch(r){if(Ee(h),r!==r+0)throw r;_e(1,0)}},$:function(r,t,e,n,o,a,i,s,u,c,f,l,d,h,p,m){var v=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l,d,h,p,m)}catch(r){if(Ee(v),r!==r+0)throw r;_e(1,0)}},ob:function(r,t,e,n){var o=be();try{Ce(r,t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},_:function(r){return r},Ya:ue,sb:function(r,t,e,n,o){return ue(r,t,e,n)}},pe=(function(){var r={a:he};function t(r,t){var e,n=r.exports;o.asm=n,x((v=o.asm.Qb).buffer),W=o.asm.Tb,e=o.asm.Rb,L.unshift(e),G()}function n(r){t(r.instance)}function a(t){return(h||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(R)})):fetch(R,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+R+"'";return r.arrayBuffer()})).catch((function(){return Q(R)}))).then((function(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){m("failed to asynchronously prepare wasm: "+r),K(r)}))}if(Y(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){m("Module.instantiateWasm callback failed with error: "+r),e(r)}(h||"function"!=typeof WebAssembly.instantiateStreaming||X(R)||"function"!=typeof fetch?a(n):fetch(R,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(n,(function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(e)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Rb).apply(null,arguments)},o._malloc=function(){return(pe=o._malloc=o.asm.Sb).apply(null,arguments)}),me=o._free=function(){return(me=o._free=o.asm.Ub).apply(null,arguments)},ve=o.___errno_location=function(){return(ve=o.___errno_location=o.asm.Vb).apply(null,arguments)},ye=o.setTempRet0=function(){return(ye=o.setTempRet0=o.asm.Wb).apply(null,arguments)},ge=o.___getTypeName=function(){return(ge=o.___getTypeName=o.asm.Xb).apply(null,arguments)},we=(o.__embind_initialize_bindings=function(){return(o.__embind_initialize_bindings=o.asm.Yb).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(we=o._emscripten_builtin_memalign=o.asm.Zb).apply(null,arguments)}),_e=o._setThrew=function(){return(_e=o._setThrew=o.asm._b).apply(null,arguments)},be=o.stackSave=function(){return(be=o.stackSave=o.asm.$b).apply(null,arguments)},Ee=o.stackRestore=function(){return(Ee=o.stackRestore=o.asm.ac).apply(null,arguments)},ke=o.___cxa_can_catch=function(){return(ke=o.___cxa_can_catch=o.asm.bc).apply(null,arguments)},Te=o.___cxa_is_pointer_type=function(){return(Te=o.___cxa_is_pointer_type=o.asm.cc).apply(null,arguments)},Pe=o.dynCall_ji=function(){return(Pe=o.dynCall_ji=o.asm.dc).apply(null,arguments)},Ce=o.dynCall_vij=function(){return(Ce=o.dynCall_vij=o.asm.ec).apply(null,arguments)},Se=o.dynCall_iij=function(){return(Se=o.dynCall_iij=o.asm.fc).apply(null,arguments)},De=(o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm.gc).apply(null,arguments)},o.dynCall_iiiijj=function(){return(o.dynCall_iiiijj=o.asm.hc).apply(null,arguments)},o.dynCall_viijj=function(){return(o.dynCall_viijj=o.asm.ic).apply(null,arguments)},o.dynCall_viiijjjj=function(){return(o.dynCall_viiijjjj=o.asm.jc).apply(null,arguments)},o.dynCall_jjj=function(){return(o.dynCall_jjj=o.asm.kc).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.lc).apply(null,arguments)},o.dynCall_j=function(){return(De=o.dynCall_j=o.asm.mc).apply(null,arguments)}),Fe=o.dynCall_jii=function(){return(Fe=o.dynCall_jii=o.asm.nc).apply(null,arguments)},Ae=o.dynCall_iiiiij=function(){return(Ae=o.dynCall_iiiiij=o.asm.oc).apply(null,arguments)},je=o.dynCall_jiiii=function(){return(je=o.dynCall_jiiii=o.asm.pc).apply(null,arguments)};function Me(r){function e(){de||(de=!0,o.calledRun=!0,g||(o.noFSInit||yr.init.initialized||yr.init(),yr.ignorePermissions=!1,pr.init(),rr(L),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),U.unshift(r);var r;rr(U)}()))}r=r||c,H>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;rr(N)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.qc).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.rc).apply(null,arguments)},o.___start_em_js=1011652,o.___stop_em_js=1011760,o.UTF8ToString=j,o.stringToUTF8=O,o.lengthBytesUTF8=$,o.allocateUTF8=Qt,q=function r(){de||Me(),de||(q=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Oe(r,t){var e=$e();return Oe=function(t,n){var o=e[t-=101];if(void 0===Oe.Sqiioa){var a=function(r){for(var t,e,n="",o="",a=0,i=0;e=r.charAt(i++);~e&&(t=a%4?64*t+e:e,a++%4)?n+=String.fromCharCode(255&t>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,t){var e,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+t.charCodeAt(n%t.length))%256,e=o[n],o[n]=o[i],o[i]=e;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,e=o[n],o[n]=o[i],o[i]=e,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Oe.PEBlzg=i,r=arguments,Oe.Sqiioa=!0}var s=e[0],u=t+s,c=r[u];return c?o=c:(void 0===Oe.DrUKmF&&(Oe.DrUKmF=!0),o=Oe.PEBlzg(o,n),r[u]=o),o},Oe(r,t)}function $e(){var r=["iqTXt8koaSkDW4m","eCksrJOJWRW3WOOpWOFdOW","W7TjgCokW6T9WO7cK0OQACkt","WQldQY7cPSoHvZ4e","n8omd0xcPmk0qKZcLt7dQCk2WQ0","WPyyW6GXfLm7gq","amk5qSomWPFcKdddKmkx","nmonAJZdNmoQcum","WOXlW6u6WP1SWQK3WQiMCCkz","k8oiWPldLrNcI8olW7bt","WPCAWO5nBGj7meXgWQVdGCkF","WPjtW5bqW54pWPhdSNdcHJFcNui","uIGHWQZcRCkmuMmSW4ddNSk/W7W","WOXoW6a7WPyVWQ0eWOmexG","bmoVW4xcOvvnW5WA","W4/dRH3dU37dP27dKcddKxK","EvVdSmkfWRhcGdrjhCktsSoCzW","ztm8fSoAmmkgiLD1WPFcHXW","W7OTbSozESoMnc8","vwb3WQddL8oXw39IW4WGsua","W6bwWRj+rSolgSknnmooaG"];return($e=function(){return r})()}Me(),function(r,t){for(var e=Oe,n=r();;)try{if(678565==parseInt(e(117,"sGS*"))/1+-parseInt(e(104,"o*uF"))/2+-parseInt(e(121,"to$Y"))/3+-parseInt(e(111,"QDB2"))/4+parseInt(e(107,"QCKC"))/5*(parseInt(e(116,"i]j0"))/6)+-parseInt(e(118,"RIzC"))/7*(-parseInt(e(102,"RIzC"))/8)+parseInt(e(105,"to$Y"))/9*(-parseInt(e(119,"2%ay"))/10))break;n.push(n.shift())}catch(r){n.push(n.shift())}}($e);var ighnua,xe=(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}),We=xe(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(We)};return r()}));return We(),r.ready});r.exports=o}]);
|
|
1
|
+
!function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=0)}([function(r,t,e){"use strict";var n=e(1);let o;const a="/tessdata",i={};function s(r){const t=Math.random().toString(36);return i[t]=r,t}function u(r){if(!i.hasOwnProperty(r))throw new Error(`Object ${r} does not exist`);return i[r]}function c(r){const t=u(r);t.delete&&t.delete(),delete i[r]}function f(r,t){for(let e in t){if(r===t[e])return e}}function l(r){if(!(r instanceof Array))throw new Error('languages must be an array of valid language codes, e.g. ["eng", "deu"]');return o.FS.analyzePath(a).exists||o.FS.mkdir(a),r.forEach((function(r){if(!o.FS.analyzePath("/tessdata/"+r+".traineddata").exists){let t=o.locateFile(`tessdata/${r}.traineddata`);o.FS.createLazyFile(a,r+".traineddata",t,!0,!1)}})),r.join("+")}const d={initialize:async function(r,t,n,a){const i=e(2),s={locateFile:function(r,e){let n;return n=t?function(r){return r.startsWith("http:")||r.startsWith("https:")}(t)?t:"":a,n+r}};return await i(s),o=s,o.initialize(r||"",n)},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(r,t){return m(o.applyFilter(g(r),t),p)},rotateImageCcw:function(r,t){return m(o.rotateImageCcw(g(r),t),p)},cropAndRotateImageCcw:function(r,t,e){const n=function(r){const t=[];for(let e=0;e<r.length;++e)t.push(r[e].x,r[e].y);return t}(t);return m(o.cropAndRotateImageCcw(g(r),n,e),p)},detectDocument:async function(r,t,e){return await h(o.detectDocument(g(r),t,e))},detectDocumentOnImage:async function(r,t,e){return await d.detectDocument(r,t,e)},detectAndCropDocument:async function(r){return await h(o.detectAndCropDocument(g(r)))},createBarcodeRecognizer:async function(r){return s(new o.BarcodeRecognizer(r||{}))},recognizeBarcodes:async function(r,t,e){let n,a=!1;"string"==typeof r?n=u(r):(e=t,t=r,n=new o.BarcodeRecognizer(e),a=!0);try{const r=n.recognize(g(t),e||{});if(!r)return null;let i;return r.length?(i=r.map((r=>({format:f(r.format,o.BarcodeFormat),text:r.text,rawBytes:r.rawBytes.data.slice(),barcodeImage:p(r.barcodeImage)}))),r.forEach((r=>r.delete()))):i=[],{result:i,originalImage:t}}finally{a&&n.delete()}},beginPdf:async function(r){return s(new o.PdfGenerationContext(r||{}))},addPageToPdf:async function(r,t){m(u(r).addPage(t))},completePdf:async function(r){const t=m(u(r).complete(),p);return c(r),t},beginTiff:async function(r){const t=new o.TiffGenerationContext(r||{});return m(t.begin()),s(t)},addPageToTiff:async function(r,t){return m(u(r).addPage(g(t)))},completeTiff:async function(r){try{const t=u(r).complete();return m(t,p)}finally{c(r)}},createSimpleMRZRecognizer:async function(){return s(new o.SimpleMrzRecognizerContext)},recognizeSimpleMRZ:async function(r,t){return u(r).recognize(g(t))},createBlurDetector:function(){return s(new o.BlurDetectorContext)},estimateBlurriness:function(r,t){return m(u(r).estimateBlurriness(g(t)))},estimateBlurrinessOnBuffer:function(r,t){return d.estimateBlurriness(r,t)},releaseObject:async function(r){c(r)},createOcrEngine:async function(r){const t=l(r);return s(new o.TesseractOcrContext(a,t))},performOcr:async function(r,t){return u(r).performOcr(g(t))},createGenericTextLineScanner:async function(r){r.languages||(r.languages=["eng"]),r.languages=l(r.languages),r.tessdataPath=a;return s(new o.GenericTextLineScanner(r))},recognizeTextLine:async function(r,t){return u(r).recognize(g(t))},cleanTextLineRecognitionQueue:async function(r){u(r).cleanRecognitionQueue()}};async function h(r){if(!r)return{success:!1,detectionStatus:"Error_License"};const t=(e=r.detectionResult,w[e]?w[e]:e>=200?"Error_Unknown":"OK");var e;const n={detectionStatus:t,success:v(t)};return n.original=p(r.originalImageJpegData),n.success&&(n.cropped=p(r.croppedImageJpegData),n.polygon=function(r){if(r.length%2!=0)throw Error("pointCoords size is not even.");const t=[];for(let e=0;e<r.length;e+=2)t.push({x:r[e],y:r[e+1]});return t}(r.polygon.data),n.horizontalLines=y(r.horizontalLines.data),n.verticalLines=y(r.verticalLines.data)),r.delete(),n}function p(r){return r&&r.data&&r.data.slice()}function m(r,t){try{if(r.errorMessage){throw new Error(r.errorMessage)}return(t||(r=>r))(r.result)}finally{r.delete()}}function v(r){return"OK"===r.substr(0,2)}function y(r){const t=[];if(!r)return t;if(r.length%4!=0)throw Error("lineCoords size invalid.");for(let e=0;e<r.length;e+=4)t.push({p1:{x:r[e],y:r[e+1]},p2:{x:r[e+2],y:r[e+3]}});return t}function g(r){if(!r)throw new Error("null image data or buffer");return"number"==typeof r.width?r:{data:r,width:-1,height:-1}}const w={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(r){const{command:t,args:e,ticket:a}=r.data;o||"initialize"===t?(async()=>await d[t].apply(null,e))().then((r=>{const t=(0,n.gatherTransferables)(r);self.postMessage({ticket:a,result:r},t)})).catch((r=>{const t="number"==typeof r?Error(o.stringFromException(r)):r;console.error(t),self.postMessage({ticket:a,error:t})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(r,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gatherTransferables=function(r,t){const e=[];return function r(n){if(!n)return;if(n.constructor===ImageData){const r={data:n.data.slice(),width:n.width,height:n.height};return e.push(r.data.buffer),r}if(n.constructor===ArrayBuffer){const r=t?n.slice(0):n;if(e.push(r),t)return n}else if(ArrayBuffer.isView(n)){let r;if(t){r=new(0,n.constructor)(n.buffer.slice(0))}else r=n;if(e.push(r.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const e=r(n[t]);e&&(n[t]=e)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const e=r(n[t]);e&&(n[t]=e)}}(r),e}},function(r,t,e){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,e,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){t=r,e=n}));var a,i,s,u=Object.assign({},o),c=[],f="./this.program",l=(r,t)=>{throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},s=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},i=(r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)};var h,p=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&(f=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(h=o.wasmBinary);var v,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var g=!1;function w(r,t){r||K(t)}var _,b,E,k,T,C,P,S,D,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&F)return F.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<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}function j(r,t){return r?A(E,r,t):""}function M(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function O(r,t,e){return M(r,E,t,e)}function $(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++e):t+=3}return t}function R(r){_=r,o.HEAP8=b=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=C=new Int32Array(r),o.HEAPU8=E=new Uint8Array(r),o.HEAPU16=T=new Uint16Array(r),o.HEAPU32=P=new Uint32Array(r),o.HEAPF32=S=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var x,W,z,B,I,N=[],L=[],U=[],H=0,V=null,q=null;function G(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function Y(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&(null!==V&&(clearInterval(V),V=null),q)){var t=q;q=null,t()}}function K(r){o.onAbort&&o.onAbort(r),m(r="Aborted("+r+")"),g=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw e(t),t}function X(r){return r.startsWith("data:application/octet-stream;base64,")}function J(r){try{if(r==W&&h)return new Uint8Array(h);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){K(r)}}X(W="ScanbotSDK.Asm.wasm")||(z=W,W=o.locateFile?o.locateFile(z,d):d+z);var Z={1011760:r=>Jt(function(){return this[j(r)].toString()}.apply((0,eval)("(()=>this)()")))};function Q(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function rr(r){for(;r.length>0;)r.shift()(o)}var tr=[];function er(r){r.add_ref()}var nr=0;function or(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){P[this.ptr+4>>2]=r},this.get_type=function(){return P[this.ptr+4>>2]},this.set_destructor=function(r){P[this.ptr+8>>2]=r},this.get_destructor=function(){return P[this.ptr+8>>2]},this.set_refcount=function(r){C[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,b[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,b[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=C[this.ptr>>2];C[this.ptr>>2]=r+1},this.release_ref=function(){var r=C[this.ptr>>2];return C[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){P[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return P[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Te(this.get_type()))return P[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function ar(r){return me(new or(r).ptr)}var ir=[];function sr(r){var t=ir[r];return t||(r>=ir.length&&(ir.length=r+1),ir[r]=t=x.get(r)),t}function ur(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&sr(t)(r.excPtr),ar(r.excPtr)}}var cr=0;function fr(){var r=tr.pop();r||K("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(tr.push(r),r.set_rethrown(!0),r.set_caught(!1),nr++),cr=t,t}var lr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,t)=>{for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:r=>{var t=lr.isAbs(r),e="/"===r.substr(-1);return(r=lr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:r=>{var t=lr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:r=>{if("/"===r)return"/";var t=(r=(r=lr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},join:function(){var r=Array.prototype.slice.call(arguments);return lr.normalize(r.join("/"))},join2:(r,t)=>lr.normalize(r+"/"+t)},dr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:yr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t=lr.isAbs(n)}return(t?"/":"")+(r=lr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,t)=>{function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=dr.resolve(r).substr(1),t=dr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.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("/")}};function hr(r,t,e){var n=e>0?e:$(r)+1,o=new Array(n),a=M(r,o,0,o.length);return t&&(o.length=a),o}var pr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){pr.ttys[r]={input:[],output:[],ops:t},yr.registerDevice(r,pr.stream_ops)},stream_ops:{open:function(r){var t=pr.ttys[r.node.rdev];if(!t)throw new yr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new yr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new yr.ErrnoError(29)}if(void 0===s&&0===a)throw new yr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new yr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new yr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=hr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(p(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(m(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(m(A(r.output,0)),r.output=[])}}};function mr(r){r=function(r,t){return Math.ceil(r/t)*t}(r,65536);var t=we(65536,r);return t?function(r,t){return E.fill(0,r,r+t),r}(t,r):0}var vr={ops_table:null,mount:function(r){return vr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(yr.isBlkdev(e)||yr.isFIFO(e))throw new yr.ErrnoError(63);vr.ops_table||(vr.ops_table={dir:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,lookup:vr.node_ops.lookup,mknod:vr.node_ops.mknod,rename:vr.node_ops.rename,unlink:vr.node_ops.unlink,rmdir:vr.node_ops.rmdir,readdir:vr.node_ops.readdir,symlink:vr.node_ops.symlink},stream:{llseek:vr.stream_ops.llseek}},file:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:{llseek:vr.stream_ops.llseek,read:vr.stream_ops.read,write:vr.stream_ops.write,allocate:vr.stream_ops.allocate,mmap:vr.stream_ops.mmap,msync:vr.stream_ops.msync}},link:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,readlink:vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:yr.chrdev_stream_ops}});var o=yr.createNode(r,t,e,n);return yr.isDir(o.mode)?(o.node_ops=vr.ops_table.dir.node,o.stream_ops=vr.ops_table.dir.stream,o.contents={}):yr.isFile(o.mode)?(o.node_ops=vr.ops_table.file.node,o.stream_ops=vr.ops_table.file.stream,o.usedBytes=0,o.contents=null):yr.isLink(o.mode)?(o.node_ops=vr.ops_table.link.node,o.stream_ops=vr.ops_table.link.stream):yr.isChrdev(o.mode)&&(o.node_ops=vr.ops_table.chrdev.node,o.stream_ops=vr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=yr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,yr.isDir(r.mode)?t.size=4096:yr.isFile(r.mode)?t.size=r.usedBytes:yr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&vr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw yr.genericErrors[44]},mknod:function(r,t,e,n){return vr.createNode(r,t,e,n)},rename:function(r,t,e){if(yr.isDir(r.mode)){var n;try{n=yr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new yr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=yr.lookupNode(r,t);for(var n in e.contents)throw new yr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=vr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!yr.isLink(r.mode))throw new yr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(t.buffer===b.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(vr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&yr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new yr.ErrnoError(28);return n},allocate:function(r,t,e){vr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!yr.isFile(r.node.mode))throw new yr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==_){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=mr(t)))throw new yr.ErrnoError(48);b.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return vr.stream_ops.write(r,t,0,n,e,!1),0}}},yr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,t={})=>{if(!(r=dr.resolve(yr.cwd(),r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new yr.ErrnoError(32);for(var e=lr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=yr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=yr.lookupNode(n,e[a]),o=lr.join2(o,e[a]),yr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;yr.isLink(n.mode);){var u=yr.readlink(o);if(o=dr.resolve(lr.dirname(o),u),n=yr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new yr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(yr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:(r,t)=>{for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%yr.nameTable.length},hashAddNode:r=>{var t=yr.hashName(r.parent.id,r.name);r.name_next=yr.nameTable[t],yr.nameTable[t]=r},hashRemoveNode:r=>{var t=yr.hashName(r.parent.id,r.name);if(yr.nameTable[t]===r)yr.nameTable[t]=r.name_next;else for(var e=yr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=yr.mayLookup(r);if(e)throw new yr.ErrnoError(e,r);for(var n=yr.hashName(r.id,t),o=yr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return yr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new yr.FSNode(r,t,e,n);return yr.hashAddNode(o),o},destroyNode:r=>{yr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=yr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>yr.ignorePermissions||(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var t=yr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{return yr.lookupNode(r,t),20}catch(r){}return yr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=yr.lookupNode(r,t)}catch(r){return r.errno}var o=yr.nodePermissions(r,"wx");if(o)return o;if(e){if(!yr.isDir(n.mode))return 54;if(yr.isRoot(n)||yr.getPath(n)===yr.cwd())return 10}else if(yr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?yr.isLink(r.mode)?32:yr.isDir(r.mode)&&("r"!==yr.flagsToPermissionString(t)||512&t)?31:yr.nodePermissions(r,yr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=yr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!yr.streams[e])return e;throw new yr.ErrnoError(33)},getStream:r=>yr.streams[r],createStream:(r,t,e)=>{yr.FSStream||(yr.FSStream=function(){this.shared={}},yr.FSStream.prototype={},Object.defineProperties(yr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new yr.FSStream,r);var n=yr.nextfd(t,e);return r.fd=n,yr.streams[n]=r,r},closeStream:r=>{yr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=yr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new yr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{yr.devices[r]={stream_ops:t}},getDevice:r=>yr.devices[r],getMounts:r=>{for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),yr.syncFSRequests++,yr.syncFSRequests>1&&m("warning: "+yr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=yr.getMounts(yr.root.mount),n=0;function o(r){return yr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)}))},mount:(r,t,e)=>{var n,o="/"===e,a=!e;if(o&&yr.root)throw new yr.ErrnoError(10);if(!o&&!a){var i=yr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,yr.isMountpoint(n))throw new yr.ErrnoError(10);if(!yr.isDir(n.mode))throw new yr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?yr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=yr.lookupPath(r,{follow_mount:!1});if(!yr.isMountpoint(t.node))throw new yr.ErrnoError(28);var e=t.node,n=e.mounted,o=yr.getMounts(n);Object.keys(yr.nameTable).forEach((r=>{for(var t=yr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&yr.destroyNode(t),t=e}})),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod:(r,t,e)=>{var n=yr.lookupPath(r,{parent:!0}).node,o=lr.basename(r);if(!o||"."===o||".."===o)throw new yr.ErrnoError(28);var a=yr.mayCreate(n,o);if(a)throw new yr.ErrnoError(a);if(!n.node_ops.mknod)throw new yr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yr.mknod(r,t,0)),mkdirTree:(r,t)=>{for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{yr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,yr.mknod(r,t,e)),symlink:(r,t)=>{if(!dr.resolve(r))throw new yr.ErrnoError(44);var e=yr.lookupPath(t,{parent:!0}).node;if(!e)throw new yr.ErrnoError(44);var n=lr.basename(t),o=yr.mayCreate(e,n);if(o)throw new yr.ErrnoError(o);if(!e.node_ops.symlink)throw new yr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:(r,t)=>{var e,n,o=lr.dirname(r),a=lr.dirname(t),i=lr.basename(r),s=lr.basename(t);if(e=yr.lookupPath(r,{parent:!0}).node,n=yr.lookupPath(t,{parent:!0}).node,!e||!n)throw new yr.ErrnoError(44);if(e.mount!==n.mount)throw new yr.ErrnoError(75);var u,c=yr.lookupNode(e,i),f=dr.relative(r,a);if("."!==f.charAt(0))throw new yr.ErrnoError(28);if("."!==(f=dr.relative(t,o)).charAt(0))throw new yr.ErrnoError(55);try{u=yr.lookupNode(n,s)}catch(r){}if(c!==u){var l=yr.isDir(c.mode),d=yr.mayDelete(e,i,l);if(d)throw new yr.ErrnoError(d);if(d=u?yr.mayDelete(n,s,l):yr.mayCreate(n,s))throw new yr.ErrnoError(d);if(!e.node_ops.rename)throw new yr.ErrnoError(63);if(yr.isMountpoint(c)||u&&yr.isMountpoint(u))throw new yr.ErrnoError(10);if(n!==e&&(d=yr.nodePermissions(e,"w")))throw new yr.ErrnoError(d);yr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{yr.hashAddNode(c)}}},rmdir:r=>{var t=yr.lookupPath(r,{parent:!0}).node,e=lr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!0);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.rmdir)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.rmdir(t,e),yr.destroyNode(n)},readdir:r=>{var t=yr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new yr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=yr.lookupPath(r,{parent:!0}).node;if(!t)throw new yr.ErrnoError(44);var e=lr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!1);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.unlink)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.unlink(t,e),yr.destroyNode(n)},readlink:r=>{var t=yr.lookupPath(r).node;if(!t)throw new yr.ErrnoError(44);if(!t.node_ops.readlink)throw new yr.ErrnoError(28);return dr.resolve(yr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=yr.lookupPath(r,{follow:!t}).node;if(!e)throw new yr.ErrnoError(44);if(!e.node_ops.getattr)throw new yr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>yr.stat(r,!0),chmod:(r,t,e)=>{var n;if(!(n="string"==typeof r?yr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{yr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);yr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;if(!(o="string"==typeof r?yr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{yr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=yr.getStream(r);if(!n)throw new yr.ErrnoError(8);yr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new yr.ErrnoError(28);var e;if(!(e="string"==typeof r?yr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);if(yr.isDir(e.mode))throw new yr.ErrnoError(31);if(!yr.isFile(e.mode))throw new yr.ErrnoError(28);var n=yr.nodePermissions(e,"w");if(n)throw new yr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);if(0==(2097155&e.flags))throw new yr.ErrnoError(28);yr.truncate(e.node,t)},utime:(r,t,e)=>{var n=yr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new yr.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?yr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=lr.normalize(r);try{n=yr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var a=!1;if(64&t)if(n){if(128&t)throw new yr.ErrnoError(20)}else n=yr.mknod(r,e,0),a=!0;if(!n)throw new yr.ErrnoError(44);if(yr.isChrdev(n.mode)&&(t&=-513),65536&t&&!yr.isDir(n.mode))throw new yr.ErrnoError(54);if(!a){var i=yr.mayOpen(n,t);if(i)throw new yr.ErrnoError(i)}512&t&&!a&&yr.truncate(n,0),t&=-131713;var s=yr.createStream({node:n,path:yr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(yr.readFiles||(yr.readFiles={}),r in yr.readFiles||(yr.readFiles[r]=1)),s},close:r=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{yr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new yr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new yr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:(r,t,e,n,o)=>{if(n<0||o<0)throw new yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(1==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.read)throw new yr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new yr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:(r,t,e,n,o,a)=>{if(n<0||o<0)throw new yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.write)throw new yr.ErrnoError(28);r.seekable&&1024&r.flags&&yr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new yr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(t<0||e<=0)throw new yr.ErrnoError(28);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(!yr.isFile(r.node.mode)&&!yr.isDir(r.node.mode))throw new yr.ErrnoError(43);if(!r.stream_ops.allocate)throw new yr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:(r,t,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new yr.ErrnoError(2);if(1==(2097155&r.flags))throw new yr.ErrnoError(2);if(!r.stream_ops.mmap)throw new yr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o)},msync:(r,t,e,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl:(r,t,e)=>{if(!r.stream_ops.ioctl)throw new yr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:(r,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=yr.open(r,t.flags),o=yr.stat(r).size,a=new Uint8Array(o);return yr.read(n,a,0,o,0),"utf8"===t.encoding?e=A(a,0):"binary"===t.encoding&&(e=a),yr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=yr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array($(t)+1),a=M(t,o,0,o.length);yr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yr.write(n,t,0,t.byteLength,void 0,e.canOwn)}yr.close(n)},cwd:()=>yr.currentPath,chdir:r=>{var t=yr.lookupPath(r,{follow:!0});if(null===t.node)throw new yr.ErrnoError(44);if(!yr.isDir(t.node.mode))throw new yr.ErrnoError(54);var e=yr.nodePermissions(t.node,"x");if(e)throw new yr.ErrnoError(e);yr.currentPath=t.path},createDefaultDirectories:()=>{yr.mkdir("/tmp"),yr.mkdir("/home"),yr.mkdir("/home/web_user")},createDefaultDevices:()=>{yr.mkdir("/dev"),yr.registerDevice(yr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),yr.mkdev("/dev/null",yr.makedev(1,3)),pr.register(yr.makedev(5,0),pr.default_tty_ops),pr.register(yr.makedev(6,0),pr.default_tty1_ops),yr.mkdev("/dev/tty",yr.makedev(5,0)),yr.mkdev("/dev/tty1",yr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>K("randomDevice")}();yr.createDevice("/dev","random",r),yr.createDevice("/dev","urandom",r),yr.mkdir("/dev/shm"),yr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yr.mkdir("/proc");var r=yr.mkdir("/proc/self");yr.mkdir("/proc/self/fd"),yr.mount({mount:()=>{var t=yr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=yr.getStream(e);if(!n)throw new yr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yr.createDevice("/dev","stdin",o.stdin):yr.symlink("/dev/tty","/dev/stdin"),o.stdout?yr.createDevice("/dev","stdout",null,o.stdout):yr.symlink("/dev/tty","/dev/stdout"),o.stderr?yr.createDevice("/dev","stderr",null,o.stderr):yr.symlink("/dev/tty1","/dev/stderr"),yr.open("/dev/stdin",0),yr.open("/dev/stdout",1),yr.open("/dev/stderr",1)},ensureErrnoError:()=>{yr.ErrnoError||(yr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},yr.ErrnoError.prototype=new Error,yr.ErrnoError.prototype.constructor=yr.ErrnoError,[44].forEach((r=>{yr.genericErrors[r]=new yr.ErrnoError(r),yr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{yr.ensureErrnoError(),yr.nameTable=new Array(4096),yr.mount(vr,{},"/"),yr.createDefaultDirectories(),yr.createDefaultDevices(),yr.createSpecialDirectories(),yr.filesystems={MEMFS:vr}},init:(r,t,e)=>{yr.init.initialized=!0,yr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=t||o.stdout,o.stderr=e||o.stderr,yr.createStandardStreams()},quit:()=>{yr.init.initialized=!1;for(var r=0;r<yr.streams.length;r++){var t=yr.streams[r];t&&yr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=yr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=yr.lookupPath(r,{follow:!t})).path}catch(r){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=lr.basename(r),n=yr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(r){e.error=r.errno}return e},createPath:(r,t,e,n)=>{r="string"==typeof r?r:yr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=lr.join2(r,a);try{yr.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=lr.join2("string"==typeof r?r:yr.getPath(r),t),i=yr.getMode(n,o);return yr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:yr.getPath(r),i=t?lr.join2(r,t):r);var s=yr.getMode(n,o),u=yr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}yr.chmod(u,146|s);var d=yr.open(u,577);yr.write(d,e,0,e.length,0,a),yr.close(d),yr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=lr.join2("string"==typeof r?r:yr.getPath(r),t),a=yr.getMode(!!e,!!n);yr.createDevice.major||(yr.createDevice.major=64);var i=yr.makedev(yr.createDevice.major++,0);return yr.registerDevice(i,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,t,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(r){throw new yr.ErrnoError(29)}if(void 0===u&&0===i)throw new yr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:(r,t,e,o,a)=>{for(var i=0;i<o;i++)try{n(t[e+i])}catch(r){throw new yr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),yr.mkdev(o,a,i)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=hr(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new yr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter((r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=yr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(r,t,e,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((r=>{var t=u.stream_ops[r];c[r]=function(){return yr.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(r,t,e,n,o)=>(yr.forceLoadFile(u),f(r,t,e,n,o)),c.mmap=(r,t,e,n,o)=>{yr.forceLoadFile(u);var a=mr(t);if(!a)throw new yr.ErrnoError(48);return f(r,b,a,t,e),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,s,u,c,f)=>{var l=t?dr.resolve(lr.join2(r,t)):r;function d(e){function i(e){f&&f(),u||yr.createDataFile(r,t,e,n,o,c),a&&a(),Y()}Browser.handledByPreloadPlugin(e,l,i,(()=>{s&&s(),Y()}))||i(e)}G(),"string"==typeof e?function(r,t,e,n){var o=n?"":"al "+r;i(r,(e=>{w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&Y()}),(t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()})),o&&G()}(e,(r=>d(r)),s):d(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=()=>{p("creating db"),o.result.createObjectStore(yr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yr.DB_STORE_NAME],"readwrite"),a=n.objectStore(yr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((r=>{var t=a.put(yr.analyzePath(r).object.contents,r);t.onsuccess=()=>{++i+s==u&&c()},t.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([yr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(yr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?t():e()}r.forEach((r=>{var t=i.get(r);t.onsuccess=()=>{yr.analyzePath(r).exists&&yr.unlink(r),yr.createDataFile(lr.dirname(r),lr.basename(r),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=()=>{u++,s+u==c&&f()}})),a.onerror=e},o.onerror=e}},gr={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(lr.isAbs(t))return t;var n;if(n=-100===r?yr.cwd():gr.getStreamFromFD(r).path,0==t.length){if(!e)throw new yr.ErrnoError(44);return n}return lr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&lr.normalize(t)!==lr.normalize(yr.getPath(r.node)))return-54;throw r}return C[e>>2]=n.dev,C[e+8>>2]=n.ino,C[e+12>>2]=n.mode,P[e+16>>2]=n.nlink,C[e+20>>2]=n.uid,C[e+24>>2]=n.gid,C[e+28>>2]=n.rdev,I=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+40>>2]=I[0],C[e+44>>2]=I[1],C[e+48>>2]=4096,C[e+52>>2]=n.blocks,I=[Math.floor(n.atime.getTime()/1e3)>>>0,(B=Math.floor(n.atime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+56>>2]=I[0],C[e+60>>2]=I[1],P[e+64>>2]=0,I=[Math.floor(n.mtime.getTime()/1e3)>>>0,(B=Math.floor(n.mtime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+72>>2]=I[0],C[e+76>>2]=I[1],P[e+80>>2]=0,I=[Math.floor(n.ctime.getTime()/1e3)>>>0,(B=Math.floor(n.ctime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+88>>2]=I[0],C[e+92>>2]=I[1],P[e+96>>2]=0,I=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+104>>2]=I[0],C[e+108>>2]=I[1],0},doMsync:function(r,t,e,n,o){if(!yr.isFile(t.node.mode))throw new yr.ErrnoError(43);if(2&n)return 0;var a=E.slice(r,r+e);yr.msync(t,a,o,e,n)},varargs:void 0,get:function(){return gr.varargs+=4,C[gr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var t=yr.getStream(r);if(!t)throw new yr.ErrnoError(8);return t}},wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",_r={};function br(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function Er(r){return this.fromWireType(C[r>>2])}var kr={},Tr={},Cr={};function Pr(r){if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+r:r}function Sr(r,t){return r=Pr(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Dr(r,t){var e=Sr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Fr=void 0;function Ar(r){throw new Fr(r)}function jr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ar("Mismatched type converter count");for(var o=0;o<r.length;++o)Wr(r[o],n[o])}r.forEach((function(r){Cr[r]=t}));var o=new Array(t.length),a=[],i=0;t.forEach(((r,t)=>{Tr.hasOwnProperty(r)?o[t]=Tr[r]:(a.push(r),kr.hasOwnProperty(r)||(kr[r]=[]),kr[r].push((()=>{o[t]=Tr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)}function Mr(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}var Or=void 0;function $r(r){for(var t="",e=r;E[e];)t+=Or[E[e++]];return t}var Rr=void 0;function xr(r){throw new Rr(r)}function Wr(r,t,e={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||xr('type "'+n+'" must have a positive integer typeid pointer'),Tr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;xr("Cannot register type '"+n+"' twice")}if(Tr[r]=t,delete Cr[r],kr.hasOwnProperty(r)){var o=kr[r];delete kr[r],o.forEach((r=>r()))}}function zr(r){if(!(this instanceof it))return!1;if(!(r instanceof it))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}function Br(r){xr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Ir=!1;function Nr(r){}function Lr(r){r.count.value-=1,0===r.count.value&&function(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}(r)}function Ur(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=Ur(r,t,e.baseClass);return null===n?null:e.downcast(n)}var Hr={};function Vr(){return Object.keys(Jr).length}function qr(){var r=[];for(var t in Jr)Jr.hasOwnProperty(t)&&r.push(Jr[t]);return r}var Gr=[];function Yr(){for(;Gr.length;){var r=Gr.pop();r.$$.deleteScheduled=!1,r.delete()}}var Kr=void 0;function Xr(r){Kr=r,Gr.length&&Kr&&Kr(Yr)}var Jr={};function Zr(r,t){return t=function(r,t){for(void 0===t&&xr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}(r,t),Jr[t]}function Qr(r,t){return t.ptrType&&t.ptr||Ar("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ar("Both smartPtrType and smartPtr must be specified"),t.count={value:1},tt(Object.create(r,{$$:{value:t}}))}function rt(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Zr(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Qr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Qr(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(t),s=Hr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=Ur(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Qr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):Qr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function tt(r){return"undefined"==typeof FinalizationRegistry?(tt=r=>r,r):(Ir=new FinalizationRegistry((r=>{Lr(r.$$)})),tt=r=>{var t=r.$$;if(t.smartPtr){var e={$$:t};Ir.register(r,e,r)}return r},Nr=r=>Ir.unregister(r),tt(r))}function et(){if(this.$$.ptr||Br(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,t=tt(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function nt(){this.$$.ptr||Br(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&xr("Object already scheduled for deletion"),Nr(this),Lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ot(){return!this.$$.ptr}function at(){return this.$$.ptr||Br(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&xr("Object already scheduled for deletion"),Gr.push(this),1===Gr.length&&Kr&&Kr(Yr),this.$$.deleteScheduled=!0,this}function it(){}function st(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||xr("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[t].overloadTable+")!"),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}}function ut(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&xr("Cannot register public name '"+r+"' twice"),st(o,r,r),o.hasOwnProperty(e)&&xr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function ct(r,t,e,n,o,a,i,s){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}function ft(r,t,e){for(;t!==e;)t.upcast||xr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function lt(r,t){if(null===t)return this.isReference&&xr("null is not a valid "+this.name),0;t.$$||xr('Cannot pass "'+xt(t)+'" as a '+this.name),t.$$.ptr||xr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function dt(r,t){var e;if(null===t)return this.isReference&&xr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||xr('Cannot pass "'+xt(t)+'" as a '+this.name),t.$$.ptr||xr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&xr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ft(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&xr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:xr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,Ot.toHandle((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:xr("Unsupporting sharing policy")}return e}function ht(r,t){if(null===t)return this.isReference&&xr("null is not a valid "+this.name),0;t.$$||xr('Cannot pass "'+xt(t)+'" as a '+this.name),t.$$.ptr||xr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&xr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function pt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function mt(r){this.rawDestructor&&this.rawDestructor(r)}function vt(r){null!==r&&r.delete()}function yt(r,t,e,n,o,a,i,s,u,c,f){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=dt:n?(this.toWireType=lt,this.destructorFunction=null):(this.toWireType=ht,this.destructorFunction=null)}function gt(r,t,e){o.hasOwnProperty(r)||Ar("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function wt(r,t,e){return r.includes("j")?function(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}(r,t,e):sr(t).apply(null,e)}function _t(r,t){var e,n,o,a=(r=$r(r)).includes("j")?(e=r,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),wt(e,n,o)}):sr(t);return"function"!=typeof a&&xr("unknown function pointer with signature "+r+": "+t),a}var bt=void 0;function Et(r){var t=ge(r),e=$r(t);return me(t),e}function kt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Tr[t]||(Cr[t]?Cr[t].forEach(r):(e.push(t),n[t]=!0))})),new bt(r+": "+e.map(Et).join([", "]))}function Tt(r,t){for(var e=[],n=0;n<r;n++)e.push(P[t+4*n>>2]);return e}function Ct(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=Sr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function Pt(r,t,e,n,o){var a=t.length;a<2&&xr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==t[1]&&null!==e,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",l="";for(u=0;u<a-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+Pr(r)+"("+f+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var h=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[xr,n,o,br,t[0],t[1]];for(i&&(d+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<a-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+t[u+2].name+"\n",p.push("argType"+u),m.push(t[u+2]);if(i&&(l="thisWired"+(l.length>0?", ":"")+l),d+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)d+="runDestructors(destructors);\n";else for(u=i?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",p.push(v+"_dtor"),m.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",p.push(d),Ct(Function,p).apply(null,m)}function St(r,t,e){return r instanceof Object||xr(e+' with invalid "this": '+r),r instanceof t.registeredClass.constructor||xr(e+' incompatible with "this" of type '+r.constructor.name),r.$$.ptr||xr("cannot call emscripten binding method "+e+" on deleted object"),ft(r.$$.ptr,r.$$.ptrType.registeredClass,t.registeredClass)}var Dt=[],Ft=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function At(r){r>4&&0==--Ft[r].refcount&&(Ft[r]=void 0,Dt.push(r))}function jt(){for(var r=0,t=5;t<Ft.length;++t)void 0!==Ft[t]&&++r;return r}function Mt(){for(var r=5;r<Ft.length;++r)if(void 0!==Ft[r])return Ft[r];return null}var Ot={toValue:r=>(r||xr("Cannot use deleted val. handle = "+r),Ft[r].value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Dt.length?Dt.pop():Ft.length;return Ft[t]={refcount:1,value:r},t}}};function $t(r,t,e){switch(t){case 0:return function(r){var t=e?b:E;return this.fromWireType(t[r])};case 1:return function(r){var t=e?k:T;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?C:P;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function Rt(r,t){var e=Tr[r];return void 0===e&&xr(t+" has unknown type "+Et(r)),e}function xt(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function Wt(r,t){switch(t){case 2:return function(r){return this.fromWireType(S[r>>2])};case 3:return function(r){return this.fromWireType(D[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function zt(r,t,e){switch(t){case 0:return e?function(r){return b[r]}:function(r){return E[r]};case 1:return e?function(r){return k[r>>1]}:function(r){return T[r>>1]};case 2:return e?function(r){return C[r>>2]}:function(r){return P[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}var Bt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function It(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&T[n];)++n;if((e=n<<1)-r>32&&Bt)return Bt.decode(E.subarray(r,e));for(var a="",i=0;!(i>=t/2);++i){var s=k[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Nt(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);k[t>>1]=i,t+=2}return k[t>>1]=0,t-n}function Lt(r){return 2*r.length}function Ut(r,t){for(var e=0,n="";!(e>=t/4);){var o=C[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n}function Ht(r,t,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),C[t>>2]=i,(t+=4)+4>o)break}return C[t>>2]=0,t-n}function Vt(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t}var qt={};function Gt(r){var t=qt[r];return void 0===t?$r(r):t}var Yt=[];function Kt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Xt=[];function Jt(r){var t=$(r)+1,e=pe(t);return e&&M(r,b,e,t),e}var Zt,Qt=[];function re(r){try{return v.grow(r-_.byteLength+65535>>>16),R(v.buffer),1}catch(r){}}Zt=()=>performance.now();var te={};function ee(){if(!ee.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var t in te)void 0===te[t]?delete r[t]:r[t]=te[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ee.strings=e}return ee.strings}function ne(r){y||(o.onExit&&o.onExit(r),g=!0),l(r,new Q(r))}var oe=function(r,t){ne(r)};function ae(r){return r%4==0&&(r%100!=0||r%400==0)}var ie=[31,29,31,30,31,30,31,31,30,31,30,31],se=[31,28,31,30,31,30,31,31,30,31,30,31];function ue(r,t,e,n){var o=C[n+40>>2],a={tm_sec:C[n>>2],tm_min:C[n+4>>2],tm_hour:C[n+8>>2],tm_mday:C[n+12>>2],tm_mon:C[n+16>>2],tm_year:C[n+20>>2],tm_wday:C[n+24>>2],tm_yday:C[n+28>>2],tm_isdst:C[n+32>>2],tm_gmtoff:C[n+36>>2],tm_zone:o?j(o):""},i=j(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function h(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function p(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function m(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=ae(e.getFullYear()),o=e.getMonth(),a=(n?ie:se)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=p(e),a=p(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return m(r).toString().substring(2)},"%G":function(r){return m(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(ae(r.tm_year+1900)?ie:se,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(r){var t=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&t++,t){if(53==t){var e=(r.tm_wday+371-r.tm_yday)%7;4==e||3==e&&ae(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ae(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var y=hr(i=i.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(r,t){b.set(r,t)}(y,r),y.length-1)}var ce=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=yr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},fe=365,le=146;Object.defineProperties(ce.prototype,{read:{get:function(){return(this.mode&fe)===fe},set:function(r){r?this.mode|=fe:this.mode&=-366}},write:{get:function(){return(this.mode&le)===le},set:function(r){r?this.mode|=le:this.mode&=-147}},isFolder:{get:function(){return yr.isDir(this.mode)}},isDevice:{get:function(){return yr.isChrdev(this.mode)}}}),yr.FSNode=ce,yr.staticInit(),Fr=o.InternalError=Dr(Error,"InternalError"),function(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);Or=r}(),Rr=o.BindingError=Dr(Error,"BindingError"),it.prototype.isAliasOf=zr,it.prototype.clone=et,it.prototype.delete=nt,it.prototype.isDeleted=ot,it.prototype.deleteLater=at,o.getInheritedInstanceCount=Vr,o.getLiveInheritedInstances=qr,o.flushPendingDeletes=Yr,o.setDelayFunction=Xr,yt.prototype.getPointee=pt,yt.prototype.destructor=mt,yt.prototype.argPackAdvance=8,yt.prototype.readValueFromPointer=Er,yt.prototype.deleteObject=vt,yt.prototype.fromWireType=rt,bt=o.UnboundTypeError=Dr(Error,"UnboundTypeError"),o.count_emval_handles=jt,o.get_first_emval=Mt;var de,he={k:function(r){return pe(r+24)+24},w:function(r){var t=new or(r);return t.get_caught()||(t.set_caught(!0),nr--),t.set_rethrown(!1),tr.push(t),er(t),t.get_exception_ptr()},rb:function(r){throw m("Unexpected exception thrown, this is not properly supported - aborting"),g=!0,r},ub:function(){if(!tr.length)return 0;var r=tr[tr.length-1];return er(r),r.excPtr},Ca:function(r){r&&ur(new or(r))},A:function(){_e(0),ur(tr.pop()),cr=0},a:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},g:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},H:function(){var r=cr;if(!r)return ye(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ye(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(ke(o,e,a))return ye(o),r}return ye(e),r},n:ar,Ba:function(r){r&&er(new or(r))},ua:fr,tb:function(r){if(r){var t=new or(r);tr.push(t),t.set_rethrown(!0),fr()}},q:function(r,t,e){throw new or(r).init(t,e),cr=r,nr++,r},vb:function(){return nr},c:function(r){throw cr||(cr=r),r},zb:function(r,t,e,n,o){try{for(var a=0,i=t?C[t>>2]:0,s=t?C[t+4>>2]:0,u=e?C[e>>2]:0,c=e?C[e+4>>2]:0,f=n?C[n>>2]:0,l=n?C[n+4>>2]:0,d=0,h=0,p=0,m=0,v=0,y=0,g=(t?C[t>>2]:0)|(e?C[e>>2]:0)|(n?C[n>>2]:0),w=(t?C[t+4>>2]:0)|(e?C[e+4>>2]:0)|(n?C[n+4>>2]:0),_=function(r,t,e,n){return r<32?t&n:e&n},b=0;b<r;b++){var E=1<<b%32;if(_(b,g,w,E)){var k=gr.getStreamFromFD(b),T=gr.DEFAULT_POLLMASK;k.stream_ops.poll&&(T=k.stream_ops.poll(k)),1&T&&_(b,i,s,E)&&(b<32?d|=E:h|=E,a++),4&T&&_(b,u,c,E)&&(b<32?p|=E:m|=E,a++),2&T&&_(b,f,l,E)&&(b<32?v|=E:y|=E,a++)}}return t&&(C[t>>2]=d,C[t+4>>2]=h),e&&(C[e>>2]=p,C[e+4>>2]=m),n&&(C[n>>2]=v,C[n+4>>2]=y),a}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Ea:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 0:return(o=gr.get())<0?-28:yr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=gr.get();return n.flags|=o,0;case 5:return o=gr.get(),k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,C[ve()>>2]=a,-1}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}var a},Gb:function(r,t){try{var e=gr.getStreamFromFD(r);return gr.doStat(yr.stat,e.path,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Hb:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=gr.get();return C[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=gr.get(),yr.ioctl(n,t,o);default:return-28}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Eb:function(r,t,e,n){try{t=gr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=gr.calculateAt(r,t,a),gr.doStat(o?yr.lstat:yr.stat,t,e)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Fa:function(r,t,e,n){gr.varargs=n;try{t=gr.getStr(t),t=gr.calculateAt(r,t);var o=n?gr.get():0;return yr.open(t,e,o).fd}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Ab:function(r){try{return r=gr.getStr(r),yr.rmdir(r),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Fb:function(r,t){try{return r=gr.getStr(r),gr.doStat(yr.stat,r,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Bb:function(r,t,e){try{return t=gr.getStr(t),t=gr.calculateAt(r,t),0===e?yr.unlink(t):512===e?yr.rmdir(t):K("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Mb:function(r){},Ob:function(r,t){K(wr)},Nb:function(r,t){K(wr)},db:function(r){var t=_r[r];delete _r[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;jr([r],o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType))),(r=>{var a={};return o.forEach(((t,e)=>{var n=t.fieldName,i=r[e],s=t.getter,u=t.getterContext,c=r[e+o.length],f=t.setter,l=t.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,t)=>{var e=[];f(l,r,c.toWireType(e,t)),br(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in a)t[e]=a[e].read(r);return n(r),t},toWireType:function(r,t){for(var o in a)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var i=e();for(o in a)a[o].write(i,t[o]);return null!==r&&r.push(n,i),i},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:n}]}))},nb:function(r,t,e,n,o){},Ga:function(r,t,e,n,o){var a=Mr(e);Wr(r,{name:t=$r(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=b;else if(2===e)n=k;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=C}return this.fromWireType(n[r>>a])},destructorFunction:null})},J:function(r,t,e,n,o,a,i,s,u,c,f,l,d){f=$r(f),a=_t(o,a),s&&(s=_t(i,s)),c&&(c=_t(u,c)),d=_t(l,d);var h=Pr(f);ut(h,(function(){kt("Cannot construct "+f+" due to unbound types",[n])})),jr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:it.prototype;var i=Sr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new Rr("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Rr(f+" has no accessible constructor");var r=l.constructor_body[arguments.length];if(void 0===r)throw new Rr("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var l=new ct(f,i,u,d,e,a,s,c),p=new yt(f,l,!0,!1,!1),m=new yt(f+"*",l,!1,!1,!1),v=new yt(f+" const*",l,!1,!0,!1);return Hr[r]={pointerType:m,constPointerType:v},gt(h,i),[p,m,v]}))},hb:function(r,t,e,n,o,a){w(t>0);var i=Tt(t,e);o=_t(n,o),jr([],[r],(function(r){var e="constructor "+(r=r[0]).name;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new Rr("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+r.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return r.registeredClass.constructor_body[t-1]=()=>{kt("Cannot construct "+r.name+" due to unbound types",i)},jr([],i,(function(n){return n.splice(1,0,null),r.registeredClass.constructor_body[t-1]=Pt(e,n,null,o,a),[]})),[]}))},gb:function(r,t,e,n,o,a,i,s){var u=Tt(e,n);t=$r(t),a=_t(o,a),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){kt("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(st(c,t,n),c[t].overloadTable[e-2]=o),jr([],u,(function(o){var s=Pt(n,o,r,a,i);return void 0===c[t].overloadTable?(s.argCount=e-2,c[t]=s):c[t].overloadTable[e-2]=s,[]})),[]}))},F:function(r,t,e,n,o,a,i,s,u,c){t=$r(t),o=_t(n,o),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t,f={get:function(){kt("Cannot access "+n+" due to unbound types",[e,i])},enumerable:!0,configurable:!0};return f.set=u?()=>{kt("Cannot access "+n+" due to unbound types",[e,i])}:r=>{xr(n+" is a read-only property")},Object.defineProperty(r.registeredClass.instancePrototype,t,f),jr([],u?[e,i]:[e],(function(e){var i=e[0],f={get:function(){var t=St(this,r,n+" getter");return i.fromWireType(o(a,t))},enumerable:!0};if(u){u=_t(s,u);var l=e[1];f.set=function(t){var e=St(this,r,n+" setter"),o=[];u(c,e,l.toWireType(o,t)),br(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,t,f),[]})),[]}))},Pb:function(r,t){Wr(r,{name:t=$r(t),fromWireType:function(r){var t=Ot.toValue(r);return At(r),t},toWireType:function(r,t){return Ot.toHandle(t)},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:null})},ya:function(r,t,e,n){var o=Mr(e);function a(){}t=$r(t),a.values={},Wr(r,{name:t,constructor:a,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:$t(t,o,n),destructorFunction:null}),ut(t,a)},z:function(r,t,e){var n=Rt(r,"enum");t=$r(t);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:Sr(n.name+"_"+t,(function(){}))}});o.values[e]=a,o[t]=a},ra:function(r,t,e){var n=Mr(e);Wr(r,{name:t=$r(t),fromWireType:function(r){return r},toWireType:function(r,t){return t},argPackAdvance:8,readValueFromPointer:Wt(t,n),destructorFunction:null})},ca:function(r,t,e,n,o,a){var i=Tt(t,e);r=$r(r),o=_t(n,o),ut(r,(function(){kt("Cannot call "+r+" due to unbound types",i)}),t-1),jr([],i,(function(e){var n=[e[0],null].concat(e.slice(1));return gt(r,Pt(r,n,null,o,a),t-1),[]}))},L:function(r,t,e,n,o){t=$r(t),-1===o&&(o=4294967295);var a=Mr(e),i=r=>r;if(0===n){var s=32-8*e;i=r=>r<<s>>>s}var u=t.includes("unsigned");Wr(r,{name:t,fromWireType:i,toWireType:u?function(r,t){return this.name,t>>>0}:function(r,t){return this.name,t},argPackAdvance:8,readValueFromPointer:zt(t,a,0!==n),destructorFunction:null})},E:function(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=P,e=t[r>>=2],o=t[r+1];return new n(_,o,e)}Wr(r,{name:e=$r(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},qa:function(r,t){var e="std::string"===(t=$r(t));Wr(r,{name:t,fromWireType:function(r){var t,n=P[r>>2],o=r+4;if(e)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=j(a,s-a);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);t=c.join("")}return me(r),t},toWireType:function(r,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||xr("Cannot pass non-string to std::string"),n=e&&o?$(t):t.length;var a=pe(4+n+1),i=a+4;if(P[a>>2]=n,e&&o)O(t,i,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(me(i),xr("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=t[s];return null!==r&&r.push(me,a),a},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){me(r)}})},oa:function(r,t,e){var n,o,a,i,s;e=$r(e),2===t?(n=It,o=Nt,i=Lt,a=()=>T,s=1):4===t&&(n=Ut,o=Ht,i=Vt,a=()=>P,s=2),Wr(r,{name:e,fromWireType:function(r){for(var e,o=P[r>>2],i=a(),u=r+4,c=0;c<=o;++c){var f=r+4+c*t;if(c==o||0==i[f>>s]){var l=n(u,f-u);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),u=f+t}}return me(r),e},toWireType:function(r,n){"string"!=typeof n&&xr("Cannot pass non-string to C++ string type "+e);var a=i(n),u=pe(4+a+t);return P[u>>2]=a>>s,o(n,u+4,a+t),null!==r&&r.push(me,u),u},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){me(r)}})},pa:function(r,t,e,n,o,a){_r[r]={name:$r(t),rawConstructor:_t(e,n),rawDestructor:_t(o,a),fields:[]}},ba:function(r,t,e,n,o,a,i,s,u,c){_r[r].fields.push({fieldName:$r(t),getterReturnType:e,getter:_t(n,o),getterContext:a,setterArgumentType:i,setter:_t(s,u),setterContext:c})},Ha:function(r,t){Wr(r,{isVoid:!0,name:t=$r(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})},Ib:function(){return!0},wb:function(){throw 1/0},fa:function(r,t,e){r=Ot.toValue(r),t=Rt(t,"emval::as");var n=[],o=Ot.toHandle(n);return P[e>>2]=o,t.toWireType(n,r)},xa:function(r,t,e,n,o){return(r=Yt[r])(t=Ot.toValue(t),e=Gt(e),function(r){var t=[];return P[r>>2]=Ot.toHandle(t),t}(n),o)},Za:function(r,t,e,n){(r=Yt[r])(t=Ot.toValue(t),e=Gt(e),null,n)},ma:At,ia:function(r){return 0===r?Ot.toHandle(Kt()):(r=Gt(r),Ot.toHandle(Kt()[r]))},ha:function(r,t){var e=function(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=Rt(P[t+4*n>>2],"parameter "+n);return e}(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",a=Xt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<r-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(e[1+c]);var f="return function "+Pr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",l=0;for(c=0;c<r-1;++c)f+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=e[c+1].argPackAdvance;for(f+=" var rv = handle[name]("+u+");\n",c=0;c<r-1;++c)e[c+1].deleteObject&&(f+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(f+=" return retType.toWireType(destructors, rv);\n"),f+="};\n",i.push(f);var d,h,p=Ct(Function,i).apply(null,s);return d=p,h=Yt.length,Yt.push(d),a=h,Xt[o]=a,a},ab:function(r,t){return r=Ot.toValue(r),t=Ot.toValue(t),Ot.toHandle(r[t])},O:function(r){r>4&&(Ft[r].refcount+=1)},_a:function(r,t){return(r=Ot.toValue(r))instanceof(t=Ot.toValue(t))},$a:function(r){return"string"==typeof(r=Ot.toValue(r))},wa:function(){return Ot.toHandle([])},ga:function(r){return Ot.toHandle(Gt(r))},bb:function(r){br(Ot.toValue(r)),At(r)},va:function(r,t){var e=(r=Rt(r,"_emval_take_value")).readValueFromPointer(t);return Ot.toHandle(e)},Jb:function(r,t){var e,n=new Date(1e3*(P[(e=r)>>2]+4294967296*C[e+4>>2]));C[t>>2]=n.getSeconds(),C[t+4>>2]=n.getMinutes(),C[t+8>>2]=n.getHours(),C[t+12>>2]=n.getDate(),C[t+16>>2]=n.getMonth(),C[t+20>>2]=n.getFullYear()-1900,C[t+24>>2]=n.getDay();var o=new Date(n.getFullYear(),0,1),a=(n.getTime()-o.getTime())/864e5|0;C[t+28>>2]=a,C[t+36>>2]=-60*n.getTimezoneOffset();var i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),u=0|(i!=s&&n.getTimezoneOffset()==Math.min(s,i));C[t+32>>2]=u},Kb:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[r>>2]=60*u,C[t>>2]=Number(i!=s);var f=c(o),l=c(a),d=Jt(f),h=Jt(l);s<i?(P[e>>2]=d,P[e+4>>2]=h):(P[e>>2]=h,P[e+4>>2]=d)}(t,e,n))},p:function(){K("")},cb:function(r,t,e){var n=function(r,t){var e;for(Qt.length=0,t>>=2;e=E[r++];)t+=105!=e&t,Qt.push(105==e?C[t]:D[t++>>1]),++t;return Qt}(t,e);return Z[r].apply(null,n)},la:function(){return Date.now()},yb:function(){return 2147483648},ka:Zt,Lb:function(r,t,e){E.copyWithin(r,t,t+e)},xb:function(r){var t,e,n=E.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),re(Math.min(o,(t=Math.max(r,i))+((e=65536)-t%e)%e)))return!0}return!1},Cb:function(r,t){var e=0;return ee().forEach((function(n,o){var a=t+e;P[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)b[t++>>0]=r.charCodeAt(n);e||(b[t>>0]=0)}(n,a),e+=n.length+1})),0},Db:function(r,t){var e=ee();P[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),P[t>>2]=n,0},sa:oe,na:function(r){try{var t=gr.getStreamFromFD(r);return yr.close(t),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},Da:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=P[t>>2],s=P[t+4>>2];t+=8;var u=yr.read(r,b,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(gr.getStreamFromFD(r),t,e);return P[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},mb:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=gr.getStreamFromFD(r);return yr.llseek(i,a,n),I=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[o>>2]=I[0],C[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}var s,u},ja:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=P[t>>2],s=P[t+4>>2];t+=8;var u=yr.write(r,b,i,s,n);if(u<0)return-1;o+=u}return o}(gr.getStreamFromFD(r),t,e);return P[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},fb:function(){return Jt(location.toString())},eb:function(){return Jt((r=Oe,self[r(443,"lZMa")][r(442,"tNB3")]()));var r},Na:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},Ra:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},B:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Ka:function(r,t,e,n,o,a,i,s){var u=be();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},s:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},C:function(r,t,e){var n=be();try{return sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},K:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Pa:function(r,t,e,n,o){var a=be();try{return sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},x:function(r){var t=be();try{return sr(r)()}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},f:function(r,t){var e=be();try{return sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},d:function(r,t,e){var n=be();try{return sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},Va:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},j:function(r,t,e,n){var o=be();try{return sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},m:function(r,t,e,n,o){var a=be();try{return sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Aa:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},r:function(r,t,e,n,o,a){var i=be();try{return sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},y:function(r,t,e,n,o,a,i){var s=be();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},za:function(r,t,e,n,o,a,i,s){var u=be();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},ta:function(r,t,e,n,o,a,i,s,u){var c=be();try{return sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},Ia:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{return sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},aa:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=be();try{return sr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(r){if(Ee(d),r!==r+0)throw r;_e(1,0)}},jb:function(r,t,e,n,o,a,i){var s=be();try{return Ae(r,t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},pb:function(r,t,e,n){var o=be();try{return Se(r,t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},lb:function(r){var t=be();try{return De(r)}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},qb:function(r,t){var e=be();try{return Ce(r,t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},kb:function(r,t,e){var n=be();try{return Fe(r,t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},ib:function(r,t,e,n,o){var a=be();try{return je(r,t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},l:function(r){var t=be();try{sr(r)()}catch(r){if(Ee(t),r!==r+0)throw r;_e(1,0)}},h:function(r,t){var e=be();try{sr(r)(t)}catch(r){if(Ee(e),r!==r+0)throw r;_e(1,0)}},X:function(r,t,e){var n=be();try{sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},b:function(r,t,e){var n=be();try{sr(r)(t,e)}catch(r){if(Ee(n),r!==r+0)throw r;_e(1,0)}},R:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},Qa:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},U:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},ea:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},I:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},N:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Ta:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},e:function(r,t,e,n){var o=be();try{sr(r)(t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},D:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},La:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},M:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},G:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},T:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},Ma:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},da:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Ua:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},i:function(r,t,e,n,o){var a=be();try{sr(r)(t,e,n,o)}catch(r){if(Ee(a),r!==r+0)throw r;_e(1,0)}},Xa:function(r,t,e,n,o,a,i,s,u){var c=be();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},P:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Q:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},o:function(r,t,e,n,o,a){var i=be();try{sr(r)(t,e,n,o,a)}catch(r){if(Ee(i),r!==r+0)throw r;_e(1,0)}},Wa:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},u:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},Sa:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},t:function(r,t,e,n,o,a,i){var s=be();try{sr(r)(t,e,n,o,a,i)}catch(r){if(Ee(s),r!==r+0)throw r;_e(1,0)}},V:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},Ja:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},v:function(r,t,e,n,o,a,i,s){var u=be();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(Ee(u),r!==r+0)throw r;_e(1,0)}},W:function(r,t,e,n,o,a,i,s,u){var c=be();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(Ee(c),r!==r+0)throw r;_e(1,0)}},Y:function(r,t,e,n,o,a,i,s,u,c){var f=be();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(Ee(f),r!==r+0)throw r;_e(1,0)}},S:function(r,t,e,n,o,a,i,s,u,c,f){var l=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f)}catch(r){if(Ee(l),r!==r+0)throw r;_e(1,0)}},Oa:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(r){if(Ee(d),r!==r+0)throw r;_e(1,0)}},Z:function(r,t,e,n,o,a,i,s,u,c,f,l,d){var h=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l,d)}catch(r){if(Ee(h),r!==r+0)throw r;_e(1,0)}},$:function(r,t,e,n,o,a,i,s,u,c,f,l,d,h,p,m){var v=be();try{sr(r)(t,e,n,o,a,i,s,u,c,f,l,d,h,p,m)}catch(r){if(Ee(v),r!==r+0)throw r;_e(1,0)}},ob:function(r,t,e,n){var o=be();try{Pe(r,t,e,n)}catch(r){if(Ee(o),r!==r+0)throw r;_e(1,0)}},_:function(r){return r},Ya:ue,sb:function(r,t,e,n,o){return ue(r,t,e,n)}},pe=(function(){var r={a:he};function t(r,t){var e,n=r.exports;o.asm=n,R((v=o.asm.Qb).buffer),x=o.asm.Tb,e=o.asm.Rb,L.unshift(e),Y()}function n(r){t(r.instance)}function a(t){return(h||"function"!=typeof fetch?Promise.resolve().then((function(){return J(W)})):fetch(W,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+W+"'";return r.arrayBuffer()})).catch((function(){return J(W)}))).then((function(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){m("failed to asynchronously prepare wasm: "+r),K(r)}))}if(G(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){m("Module.instantiateWasm callback failed with error: "+r),e(r)}(h||"function"!=typeof WebAssembly.instantiateStreaming||X(W)||"function"!=typeof fetch?a(n):fetch(W,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(n,(function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(e)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Rb).apply(null,arguments)},o._malloc=function(){return(pe=o._malloc=o.asm.Sb).apply(null,arguments)}),me=o._free=function(){return(me=o._free=o.asm.Ub).apply(null,arguments)},ve=o.___errno_location=function(){return(ve=o.___errno_location=o.asm.Vb).apply(null,arguments)},ye=o.setTempRet0=function(){return(ye=o.setTempRet0=o.asm.Wb).apply(null,arguments)},ge=o.___getTypeName=function(){return(ge=o.___getTypeName=o.asm.Xb).apply(null,arguments)},we=(o.__embind_initialize_bindings=function(){return(o.__embind_initialize_bindings=o.asm.Yb).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(we=o._emscripten_builtin_memalign=o.asm.Zb).apply(null,arguments)}),_e=o._setThrew=function(){return(_e=o._setThrew=o.asm._b).apply(null,arguments)},be=o.stackSave=function(){return(be=o.stackSave=o.asm.$b).apply(null,arguments)},Ee=o.stackRestore=function(){return(Ee=o.stackRestore=o.asm.ac).apply(null,arguments)},ke=o.___cxa_can_catch=function(){return(ke=o.___cxa_can_catch=o.asm.bc).apply(null,arguments)},Te=o.___cxa_is_pointer_type=function(){return(Te=o.___cxa_is_pointer_type=o.asm.cc).apply(null,arguments)},Ce=o.dynCall_ji=function(){return(Ce=o.dynCall_ji=o.asm.dc).apply(null,arguments)},Pe=o.dynCall_vij=function(){return(Pe=o.dynCall_vij=o.asm.ec).apply(null,arguments)},Se=o.dynCall_iij=function(){return(Se=o.dynCall_iij=o.asm.fc).apply(null,arguments)},De=(o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm.gc).apply(null,arguments)},o.dynCall_iiiijj=function(){return(o.dynCall_iiiijj=o.asm.hc).apply(null,arguments)},o.dynCall_viijj=function(){return(o.dynCall_viijj=o.asm.ic).apply(null,arguments)},o.dynCall_viiijjjj=function(){return(o.dynCall_viiijjjj=o.asm.jc).apply(null,arguments)},o.dynCall_jjj=function(){return(o.dynCall_jjj=o.asm.kc).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.lc).apply(null,arguments)},o.dynCall_j=function(){return(De=o.dynCall_j=o.asm.mc).apply(null,arguments)}),Fe=o.dynCall_jii=function(){return(Fe=o.dynCall_jii=o.asm.nc).apply(null,arguments)},Ae=o.dynCall_iiiiij=function(){return(Ae=o.dynCall_iiiiij=o.asm.oc).apply(null,arguments)},je=o.dynCall_jiiii=function(){return(je=o.dynCall_jiiii=o.asm.pc).apply(null,arguments)};function Me(r){function e(){de||(de=!0,o.calledRun=!0,g||(o.noFSInit||yr.init.initialized||yr.init(),yr.ignorePermissions=!1,pr.init(),rr(L),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),U.unshift(r);var r;rr(U)}()))}r=r||c,H>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;rr(N)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.qc).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.rc).apply(null,arguments)},o.___start_em_js=1011652,o.___stop_em_js=1011760,o.UTF8ToString=j,o.stringToUTF8=O,o.lengthBytesUTF8=$,o.allocateUTF8=Jt,q=function r(){de||Me(),de||(q=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Oe(r,t){var e=$e();return Oe=function(t,n){var o=e[t-=423];if(void 0===Oe.JqpwnC){var a=function(r){for(var t,e,n="",o="",a=0,i=0;e=r.charAt(i++);~e&&(t=a%4?64*t+e:e,a++%4)?n+=String.fromCharCode(255&t>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,t){var e,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+t.charCodeAt(n%t.length))%256,e=o[n],o[n]=o[i],o[i]=e;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,e=o[n],o[n]=o[i],o[i]=e,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Oe.EbfkjV=i,r=arguments,Oe.JqpwnC=!0}var s=e[0],u=t+s,c=r[u];return c?o=c:(void 0===Oe.cJbZSj&&(Oe.cJbZSj=!0),o=Oe.EbfkjV(o,n),r[u]=o),o},Oe(r,t)}function $e(){var r=["W4lcMwK8twdcMbi","pmkdChRdI8ksW7RcTW","W5NdSCkfoCk0sSo1cmk8cJ7cMJK","A8o9W7FdOmoVW4ldHXXgd8k2WOfe","kCo3W7JdLvNcMZdcKSov","h23cNSkxs8oRW60/aCoKW7K","gmoXWRhcLbWQzwBcHG","W4y2wYRcJmk1W5RdImo1WReyp8kIW7G","kCoZW77cNtRdObZcMComWQldMCkF","W65pW5WiW6TXW5VdS8kx","gf4NWRXfWO7cRt7dRaK","cZ9AcfVdRSosqSoLmmkfqq","W54klSoBW6TyEmomDmkLardcTq","W5GglCoyWO8ilmoCwSkp","i3HQWQ3dRr0IW67dIW","ySoYWRVcL8oMB3KUW7GzWQK4","W7ursCousCk9WRBcGCk0bZy","WOtdGq5+dtRdJKuLW43dUSkqW7Kv","WPHCW6RcSGbGq8kqWOnBWOj8","Bmo/W7dcG8kFWOtcNrvi","W4RcOZT8oSo1emkTWRJcH2WgWRa","smoHs1ZdMX/cGSoYiG","WRRcTqeKtCksWOPloG","W5/dSmkeDmoEiCkioCkl"];return($e=function(){return r})()}Me(),function(r,t){for(var e=Oe,n=r();;)try{if(895856==parseInt(e(439,"@w(M"))/1*(parseInt(e(428,"KVdy"))/2)+parseInt(e(445,")2(U"))/3+parseInt(e(430,"FzSg"))/4+-parseInt(e(436,"Mqcv"))/5*(parseInt(e(427,"i2x3"))/6)+-parseInt(e(423,"b^(a"))/7*(-parseInt(e(437,")2(U"))/8)+-parseInt(e(426,"fOXJ"))/9*(-parseInt(e(446,"fOXJ"))/10)+-parseInt(e(425,"LqP5"))/11)break;n.push(n.shift())}catch(r){n.push(n.shift())}}($e);var ighnua,Re=(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}),xe=Re(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(xe)};return r()}));return xe(),r.ready});r.exports=o}]);
|
|
Binary file
|
|
Binary file
|