scanbot-web-sdk 8.1.0 → 8.1.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.
Files changed (25) hide show
  1. package/@types/ui2/document/model/document-detection-ui-result.d.ts +1 -0
  2. package/bundle/ScanbotSDK.min.js +3 -3
  3. package/bundle/ScanbotSDK.ui2.min.js +2 -2
  4. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  5. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  6. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  7. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  8. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  9. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  10. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  11. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  12. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  13. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  14. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  15. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  16. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  17. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  18. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  19. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  20. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  21. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  22. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  23. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  24. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  25. package/package.json +1 -1
@@ -1 +1 @@
1
- (()=>{var t={60:(t,e,r)=>{var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,o,a=t;a.ready=new Promise(((t,r)=>{e=t,o=r}));var i,s,c,u=Object.assign({},a),l="./this.program",d=(t,e)=>{throw e},h="";h=self.location.href,n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},c=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)};var f,p=a.print||console.log.bind(console),v=a.printErr||console.error.bind(console);Object.assign(a,u),u=null,a.arguments&&a.arguments,a.thisProgram&&(l=a.thisProgram),a.quit&&(d=a.quit),a.wasmBinary&&(f=a.wasmBinary);var m,y=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&N("no native wasm support detected");var g,w,b,E,_,C,M,k,$,S=!1;function P(){var t=m.buffer;a.HEAP8=g=new Int8Array(t),a.HEAP16=b=new Int16Array(t),a.HEAPU8=w=new Uint8Array(t),a.HEAPU16=E=new Uint16Array(t),a.HEAP32=_=new Int32Array(t),a.HEAPU32=C=new Uint32Array(t),a.HEAPF32=M=new Float32Array(t),a.HEAPF64=k=new Float64Array(t)}var j,F,T,D,W=[],A=[],x=[],O=0,I=null,R=null;function z(t){O++,a.monitorRunDependencies&&a.monitorRunDependencies(O)}function U(t){if(O--,a.monitorRunDependencies&&a.monitorRunDependencies(O),0==O&&(null!==I&&(clearInterval(I),I=null),R)){var e=R;R=null,e()}}function N(t){a.onAbort&&a.onAbort(t),v(t="Aborted("+t+")"),S=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function B(t){return t.startsWith("data:application/octet-stream;base64,")}function H(t){if(t==j&&f)return new Uint8Array(f);if(c)return c(t);throw"both async and sync fetching of the wasm failed"}function L(t,e,r){return function(t){return f||"function"!=typeof fetch?Promise.resolve().then((()=>H(t))):fetch(t,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((()=>H(t)))}(t).then((t=>WebAssembly.instantiate(t,e))).then((t=>t)).then(r,(t=>{v(`failed to asynchronously prepare wasm: ${t}`),N(t)}))}B(j="ScanbotSDK.Asm-simd.wasm")||(F=j,j=a.locateFile?a.locateFile(F,h):h+F);var Y={8332784:t=>vr(function(){return this[J(t)].toString()}.apply(function(){return this}.call(void 0))),8332912:t=>String.fromCharCode(t).toUpperCase().charCodeAt(0),8332972:t=>String.fromCharCode(t).toLowerCase().charCodeAt(0),8333032:(t,e)=>{var r=J(t,e).toUpperCase(),n=st(r)+1,o=_r(n);return wt(r,o,n),o}};function V(t){this.name="ExitStatus",this.message=`Program terminated with exit(${t})`,this.status=t}var q=t=>{for(;t.length>0;)t.shift()(a)},Q="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,G=(t,e,r)=>{for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&Q)return Q.decode(t.subarray(e,o));for(var a="";e<o;){var i=t[e++];if(128&i){var s=63&t[e++];if(192!=(224&i)){var c=63&t[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|c:(7&i)<<18|s<<12|c<<6|63&t[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},J=(t,e)=>t?G(w,t,e):"",K=[],X=0,Z=0;function tt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){C[this.ptr+4>>2]=t},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(t){C[this.ptr+8>>2]=t},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,g[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=g[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,g[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=g[this.ptr+13>>0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){C[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ar(this.get_type()))return C[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var et=t=>{var e=Z;if(!e)return kr(0),0;var r=new tt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return kr(0),e;for(var o in t){var a=t[o];if(0===a||a===n)break;var i=r.ptr+16;if(Wr(a,n,i))return kr(a),e}return kr(n),e},rt=()=>{var t=K.pop();t||N("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(K.push(t),t.set_rethrown(!0),t.set_caught(!1),X++),Z=e},nt={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=nt.isAbs(t),r="/"===t.substr(-1);return(t=nt.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=nt.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=nt.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments);return nt.normalize(t.join("/"))},join2:(t,e)=>nt.normalize(t+"/"+e)},ot=t=>(ot=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return t=>crypto.getRandomValues(t);N("initRandomDevice")})())(t),at={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:mt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=nt.isAbs(n)}return(e?"/":"")+(t=nt.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=at.resolve(t).substr(1),e=at.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var c=[];for(s=i;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(i))).join("/")}},it=[],st=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},ct=(t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++i)),s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o};function ut(t,e,r){var n=r>0?r:st(t)+1,o=new Array(n),a=ct(t,o,0,o.length);return e&&(o.length=a),o}var lt={ttys:[],init(){},shutdown(){},register(t,e){lt.ttys[t]={input:[],output:[],ops:e},mt.registerDevice(t,lt.stream_ops)},stream_ops:{open(t){var e=lt.ttys[t.node.rdev];if(!e)throw new mt.ErrnoError(43);t.tty=e,t.seekable=!1},close(t){t.tty.ops.fsync(t.tty)},fsync(t){t.tty.ops.fsync(t.tty)},read(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new mt.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new mt.ErrnoError(29)}if(void 0===s&&0===a)throw new mt.ErrnoError(6);if(null==s)break;a++,e[r+i]=s}return a&&(t.node.timestamp=Date.now()),a},write(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new mt.ErrnoError(60);try{for(var a=0;a<n;a++)t.tty.ops.put_char(t.tty,e[r+a])}catch(t){throw new mt.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:t=>(()=>{if(!it.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;it=ut(t,!0)}return it.shift()})(),put_char(t,e){null===e||10===e?(p(G(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){t.output&&t.output.length>0&&(p(G(t.output,0)),t.output=[])},ioctl_tcgets:t=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(t,e,r)=>0,ioctl_tiocgwinsz:t=>[24,80]},default_tty1_ops:{put_char(t,e){null===e||10===e?(v(G(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){t.output&&t.output.length>0&&(v(G(t.output,0)),t.output=[])}}},dt=t=>{t=((t,e)=>Math.ceil(t/e)*e)(t,65536);var e=Sr(65536,t);return e?((t,e)=>(w.fill(0,t,t+e),t))(e,t):0},ht={ops_table:null,mount:t=>ht.createNode(null,"/",16895,0),createNode(t,e,r,n){if(mt.isBlkdev(r)||mt.isFIFO(r))throw new mt.ErrnoError(63);ht.ops_table||(ht.ops_table={dir:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,lookup:ht.node_ops.lookup,mknod:ht.node_ops.mknod,rename:ht.node_ops.rename,unlink:ht.node_ops.unlink,rmdir:ht.node_ops.rmdir,readdir:ht.node_ops.readdir,symlink:ht.node_ops.symlink},stream:{llseek:ht.stream_ops.llseek}},file:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:{llseek:ht.stream_ops.llseek,read:ht.stream_ops.read,write:ht.stream_ops.write,allocate:ht.stream_ops.allocate,mmap:ht.stream_ops.mmap,msync:ht.stream_ops.msync}},link:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,readlink:ht.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:mt.chrdev_stream_ops}});var o=mt.createNode(t,e,r,n);return mt.isDir(o.mode)?(o.node_ops=ht.ops_table.dir.node,o.stream_ops=ht.ops_table.dir.stream,o.contents={}):mt.isFile(o.mode)?(o.node_ops=ht.ops_table.file.node,o.stream_ops=ht.ops_table.file.stream,o.usedBytes=0,o.contents=null):mt.isLink(o.mode)?(o.node_ops=ht.ops_table.link.node,o.stream_ops=ht.ops_table.link.stream):mt.isChrdev(o.mode)&&(o.node_ops=ht.ops_table.chrdev.node,o.stream_ops=ht.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:t=>t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0),expandFileStorage(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr(t){var e={};return e.dev=mt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,mt.isDir(t.mode)?e.size=4096:mt.isFile(t.mode)?e.size=t.usedBytes:mt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ht.resizeFileStorage(t,e.size)},lookup(t,e){throw mt.genericErrors[44]},mknod:(t,e,r,n)=>ht.createNode(t,e,r,n),rename(t,e,r){if(mt.isDir(t.mode)){var n;try{n=mt.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new mt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir(t,e){var r=mt.lookupNode(t,e);for(var n in r.contents)throw new mt.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink(t,e,r){var n=ht.createNode(t,e,41471,0);return n.link=r,n},readlink(t){if(!mt.isLink(t.mode))throw new mt.ErrnoError(28);return t.link}},stream_ops:{read(t,e,r,n,o){var a=t.node.contents;if(o>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),r);else for(var s=0;s<i;s++)e[r+s]=a[o+s];return i},write(t,e,r,n,o,a){if(e.buffer===g.buffer&&(a=!1),!n)return 0;var i=t.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(r,r+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(r,r+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(r,r+n),o),n}if(ht.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[r+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&mt.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new mt.ErrnoError(28);return n},allocate(t,e,r){ht.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap(t,e,r,n,o){if(!mt.isFile(t.node.mode))throw new mt.ErrnoError(43);var a,i,s=t.node.contents;if(2&o||s.buffer!==g.buffer){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),i=!0,!(a=dt(e)))throw new mt.ErrnoError(48);g.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(t,e,r,n,o)=>(ht.stream_ops.write(t,e,0,n,r,!1),0)}},ft=(t,e,r,n)=>{var o=n?"":`al ${t}`;s(t,(r=>{var n;n=`Loading data file "${t}" failed (no arrayBuffer).`,r||N(n),e(new Uint8Array(r)),o&&U()}),(e=>{if(!r)throw`Loading data file "${t}" failed.`;r()})),o&&z()},pt=a.preloadPlugins||[],vt=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},mt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(t,e={}){if(!(t=at.resolve(t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new mt.ErrnoError(32);for(var r=t.split("/").filter((t=>!!t)),n=mt.root,o="/",a=0;a<r.length;a++){var i=a===r.length-1;if(i&&e.parent)break;if(n=mt.lookupNode(n,r[a]),o=nt.join2(o,r[a]),mt.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;mt.isLink(n.mode);){var c=mt.readlink(o);if(o=at.resolve(nt.dirname(o),c),n=mt.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new mt.ErrnoError(32)}}return{path:o,node:n}},getPath(t){for(var e;;){if(mt.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?`${r}/${e}`:r+e:r}e=e?`${t.name}/${e}`:t.name,t=t.parent}},hashName(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%mt.nameTable.length},hashAddNode(t){var e=mt.hashName(t.parent.id,t.name);t.name_next=mt.nameTable[e],mt.nameTable[e]=t},hashRemoveNode(t){var e=mt.hashName(t.parent.id,t.name);if(mt.nameTable[e]===t)mt.nameTable[e]=t.name_next;else for(var r=mt.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode(t,e){var r=mt.mayLookup(t);if(r)throw new mt.ErrnoError(r,t);for(var n=mt.hashName(t.id,e),o=mt.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===e)return o}return mt.lookup(t,e)},createNode(t,e,r,n){var o=new mt.FSNode(t,e,r,n);return mt.hashAddNode(o),o},destroyNode(t){mt.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagsToPermissionString(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>mt.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup(t){var e=mt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate(t,e){try{return mt.lookupNode(t,e),20}catch(t){}return mt.nodePermissions(t,"wx")},mayDelete(t,e,r){var n;try{n=mt.lookupNode(t,e)}catch(t){return t.errno}var o=mt.nodePermissions(t,"wx");if(o)return o;if(r){if(!mt.isDir(n.mode))return 54;if(mt.isRoot(n)||mt.getPath(n)===mt.cwd())return 10}else if(mt.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?mt.isLink(t.mode)?32:mt.isDir(t.mode)&&("r"!==mt.flagsToPermissionString(e)||512&e)?31:mt.nodePermissions(t,mt.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var t=0;t<=mt.MAX_OPEN_FDS;t++)if(!mt.streams[t])return t;throw new mt.ErrnoError(33)},getStreamChecked(t){var e=mt.getStream(t);if(!e)throw new mt.ErrnoError(8);return e},getStream:t=>mt.streams[t],createStream:(t,e=-1)=>(mt.FSStream||(mt.FSStream=function(){this.shared={}},mt.FSStream.prototype={},Object.defineProperties(mt.FSStream.prototype,{object:{get(){return this.node},set(t){this.node=t}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(t){this.shared.flags=t}},position:{get(){return this.shared.position},set(t){this.shared.position=t}}})),t=Object.assign(new mt.FSStream,t),-1==e&&(e=mt.nextfd()),t.fd=e,mt.streams[e]=t,t),closeStream(t){mt.streams[t]=null},chrdev_stream_ops:{open(t){var e=mt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek(){throw new mt.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice(t,e){mt.devices[t]={stream_ops:e}},getDevice:t=>mt.devices[t],getMounts(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs(t,e){"function"==typeof t&&(e=t,t=!1),mt.syncFSRequests++,mt.syncFSRequests>1&&v(`warning: ${mt.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=mt.getMounts(mt.root.mount),n=0;function o(t){return mt.syncFSRequests--,e(t)}function a(t){if(t)return a.errored?void 0:(a.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)}))},mount(t,e,r){var n,o="/"===r,a=!r;if(o&&mt.root)throw new mt.ErrnoError(10);if(!o&&!a){var i=mt.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,mt.isMountpoint(n))throw new mt.ErrnoError(10);if(!mt.isDir(n.mode))throw new mt.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},c=t.mount(s);return c.mount=s,s.root=c,o?mt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount(t){var e=mt.lookupPath(t,{follow_mount:!1});if(!mt.isMountpoint(e.node))throw new mt.ErrnoError(28);var r=e.node,n=r.mounted,o=mt.getMounts(n);Object.keys(mt.nameTable).forEach((t=>{for(var e=mt.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&&mt.destroyNode(e),e=r}})),r.mounted=null;var a=r.mount.mounts.indexOf(n);r.mount.mounts.splice(a,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod(t,e,r){var n=mt.lookupPath(t,{parent:!0}).node,o=nt.basename(t);if(!o||"."===o||".."===o)throw new mt.ErrnoError(28);var a=mt.mayCreate(n,o);if(a)throw new mt.ErrnoError(a);if(!n.node_ops.mknod)throw new mt.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,mt.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,mt.mknod(t,e,0)),mkdirTree(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{mt.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>("undefined"==typeof r&&(r=e,e=438),e|=8192,mt.mknod(t,e,r)),symlink(t,e){if(!at.resolve(t))throw new mt.ErrnoError(44);var r=mt.lookupPath(e,{parent:!0}).node;if(!r)throw new mt.ErrnoError(44);var n=nt.basename(e),o=mt.mayCreate(r,n);if(o)throw new mt.ErrnoError(o);if(!r.node_ops.symlink)throw new mt.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename(t,e){var r,n,o=nt.dirname(t),a=nt.dirname(e),i=nt.basename(t),s=nt.basename(e);if(r=mt.lookupPath(t,{parent:!0}).node,n=mt.lookupPath(e,{parent:!0}).node,!r||!n)throw new mt.ErrnoError(44);if(r.mount!==n.mount)throw new mt.ErrnoError(75);var c,u=mt.lookupNode(r,i),l=at.relative(t,a);if("."!==l.charAt(0))throw new mt.ErrnoError(28);if("."!==(l=at.relative(e,o)).charAt(0))throw new mt.ErrnoError(55);try{c=mt.lookupNode(n,s)}catch(t){}if(u!==c){var d=mt.isDir(u.mode),h=mt.mayDelete(r,i,d);if(h)throw new mt.ErrnoError(h);if(h=c?mt.mayDelete(n,s,d):mt.mayCreate(n,s))throw new mt.ErrnoError(h);if(!r.node_ops.rename)throw new mt.ErrnoError(63);if(mt.isMountpoint(u)||c&&mt.isMountpoint(c))throw new mt.ErrnoError(10);if(n!==r&&(h=mt.nodePermissions(r,"w")))throw new mt.ErrnoError(h);mt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(t){throw t}finally{mt.hashAddNode(u)}}},rmdir(t){var e=mt.lookupPath(t,{parent:!0}).node,r=nt.basename(t),n=mt.lookupNode(e,r),o=mt.mayDelete(e,r,!0);if(o)throw new mt.ErrnoError(o);if(!e.node_ops.rmdir)throw new mt.ErrnoError(63);if(mt.isMountpoint(n))throw new mt.ErrnoError(10);e.node_ops.rmdir(e,r),mt.destroyNode(n)},readdir(t){var e=mt.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new mt.ErrnoError(54);return e.node_ops.readdir(e)},unlink(t){var e=mt.lookupPath(t,{parent:!0}).node;if(!e)throw new mt.ErrnoError(44);var r=nt.basename(t),n=mt.lookupNode(e,r),o=mt.mayDelete(e,r,!1);if(o)throw new mt.ErrnoError(o);if(!e.node_ops.unlink)throw new mt.ErrnoError(63);if(mt.isMountpoint(n))throw new mt.ErrnoError(10);e.node_ops.unlink(e,r),mt.destroyNode(n)},readlink(t){var e=mt.lookupPath(t).node;if(!e)throw new mt.ErrnoError(44);if(!e.node_ops.readlink)throw new mt.ErrnoError(28);return at.resolve(mt.getPath(e.parent),e.node_ops.readlink(e))},stat(t,e){var r=mt.lookupPath(t,{follow:!e}).node;if(!r)throw new mt.ErrnoError(44);if(!r.node_ops.getattr)throw new mt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>mt.stat(t,!0),chmod(t,e,r){var n;if(!(n="string"==typeof t?mt.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(t,e){mt.chmod(t,e,!0)},fchmod(t,e){var r=mt.getStreamChecked(t);mt.chmod(r.node,e)},chown(t,e,r,n){var o;if(!(o="string"==typeof t?mt.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(t,e,r){mt.chown(t,e,r,!0)},fchown(t,e,r){var n=mt.getStreamChecked(t);mt.chown(n.node,e,r)},truncate(t,e){if(e<0)throw new mt.ErrnoError(28);var r;if(!(r="string"==typeof t?mt.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);if(mt.isDir(r.mode))throw new mt.ErrnoError(31);if(!mt.isFile(r.mode))throw new mt.ErrnoError(28);var n=mt.nodePermissions(r,"w");if(n)throw new mt.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate(t,e){var r=mt.getStreamChecked(t);if(0==(2097155&r.flags))throw new mt.ErrnoError(28);mt.truncate(r.node,e)},utime(t,e,r){var n=mt.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open(t,e,r){if(""===t)throw new mt.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(e="string"==typeof e?(t=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${t}`);return e})(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=nt.normalize(t);try{n=mt.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new mt.ErrnoError(20)}else n=mt.mknod(t,r,0),o=!0;if(!n)throw new mt.ErrnoError(44);if(mt.isChrdev(n.mode)&&(e&=-513),65536&e&&!mt.isDir(n.mode))throw new mt.ErrnoError(54);if(!o){var i=mt.mayOpen(n,e);if(i)throw new mt.ErrnoError(i)}512&e&&!o&&mt.truncate(n,0),e&=-131713;var s=mt.createStream({node:n,path:mt.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!a.logReadFiles||1&e||(mt.readFiles||(mt.readFiles={}),t in mt.readFiles||(mt.readFiles[t]=1)),s},close(t){if(mt.isClosed(t))throw new mt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{mt.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek(t,e,r){if(mt.isClosed(t))throw new mt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new mt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new mt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read(t,e,r,n,o){if(n<0||o<0)throw new mt.ErrnoError(28);if(mt.isClosed(t))throw new mt.ErrnoError(8);if(1==(2097155&t.flags))throw new mt.ErrnoError(8);if(mt.isDir(t.node.mode))throw new mt.ErrnoError(31);if(!t.stream_ops.read)throw new mt.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!t.seekable)throw new mt.ErrnoError(70)}else o=t.position;var i=t.stream_ops.read(t,e,r,n,o);return a||(t.position+=i),i},write(t,e,r,n,o,a){if(n<0||o<0)throw new mt.ErrnoError(28);if(mt.isClosed(t))throw new mt.ErrnoError(8);if(0==(2097155&t.flags))throw new mt.ErrnoError(8);if(mt.isDir(t.node.mode))throw new mt.ErrnoError(31);if(!t.stream_ops.write)throw new mt.ErrnoError(28);t.seekable&&1024&t.flags&&mt.llseek(t,0,2);var i="undefined"!=typeof o;if(i){if(!t.seekable)throw new mt.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,a);return i||(t.position+=s),s},allocate(t,e,r){if(mt.isClosed(t))throw new mt.ErrnoError(8);if(e<0||r<=0)throw new mt.ErrnoError(28);if(0==(2097155&t.flags))throw new mt.ErrnoError(8);if(!mt.isFile(t.node.mode)&&!mt.isDir(t.node.mode))throw new mt.ErrnoError(43);if(!t.stream_ops.allocate)throw new mt.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap(t,e,r,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new mt.ErrnoError(2);if(1==(2097155&t.flags))throw new mt.ErrnoError(2);if(!t.stream_ops.mmap)throw new mt.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl(t,e,r){if(!t.stream_ops.ioctl)throw new mt.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile(t,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var r,n=mt.open(t,e.flags),o=mt.stat(t).size,a=new Uint8Array(o);return mt.read(n,a,0,o,0),"utf8"===e.encoding?r=G(a,0):"binary"===e.encoding&&(r=a),mt.close(n),r},writeFile(t,e,r={}){r.flags=r.flags||577;var n=mt.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(st(e)+1),a=ct(e,o,0,o.length);mt.write(n,o,0,a,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");mt.write(n,e,0,e.byteLength,void 0,r.canOwn)}mt.close(n)},cwd:()=>mt.currentPath,chdir(t){var e=mt.lookupPath(t,{follow:!0});if(null===e.node)throw new mt.ErrnoError(44);if(!mt.isDir(e.node.mode))throw new mt.ErrnoError(54);var r=mt.nodePermissions(e.node,"x");if(r)throw new mt.ErrnoError(r);mt.currentPath=e.path},createDefaultDirectories(){mt.mkdir("/tmp"),mt.mkdir("/home"),mt.mkdir("/home/web_user")},createDefaultDevices(){mt.mkdir("/dev"),mt.registerDevice(mt.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),mt.mkdev("/dev/null",mt.makedev(1,3)),lt.register(mt.makedev(5,0),lt.default_tty_ops),lt.register(mt.makedev(6,0),lt.default_tty1_ops),mt.mkdev("/dev/tty",mt.makedev(5,0)),mt.mkdev("/dev/tty1",mt.makedev(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(e=ot(t).byteLength),t[--e]);mt.createDevice("/dev","random",r),mt.createDevice("/dev","urandom",r),mt.mkdir("/dev/shm"),mt.mkdir("/dev/shm/tmp")},createSpecialDirectories(){mt.mkdir("/proc");var t=mt.mkdir("/proc/self");mt.mkdir("/proc/self/fd"),mt.mount({mount(){var e=mt.createNode(t,"fd",16895,73);return e.node_ops={lookup(t,e){var r=+e,n=mt.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){a.stdin?mt.createDevice("/dev","stdin",a.stdin):mt.symlink("/dev/tty","/dev/stdin"),a.stdout?mt.createDevice("/dev","stdout",null,a.stdout):mt.symlink("/dev/tty","/dev/stdout"),a.stderr?mt.createDevice("/dev","stderr",null,a.stderr):mt.symlink("/dev/tty1","/dev/stderr"),mt.open("/dev/stdin",0),mt.open("/dev/stdout",1),mt.open("/dev/stderr",1)},ensureErrnoError(){mt.ErrnoError||(mt.ErrnoError=function(t,e){this.name="ErrnoError",this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},mt.ErrnoError.prototype=new Error,mt.ErrnoError.prototype.constructor=mt.ErrnoError,[44].forEach((t=>{mt.genericErrors[t]=new mt.ErrnoError(t),mt.genericErrors[t].stack="<generic error, no stack>"})))},staticInit(){mt.ensureErrnoError(),mt.nameTable=new Array(4096),mt.mount(ht,{},"/"),mt.createDefaultDirectories(),mt.createDefaultDevices(),mt.createSpecialDirectories(),mt.filesystems={MEMFS:ht}},init(t,e,r){mt.init.initialized=!0,mt.ensureErrnoError(),a.stdin=t||a.stdin,a.stdout=e||a.stdout,a.stderr=r||a.stderr,mt.createStandardStreams()},quit(){mt.init.initialized=!1;for(var t=0;t<mt.streams.length;t++){var e=mt.streams[t];e&&mt.close(e)}},findObject(t,e){var r=mt.analyzePath(t,e);return r.exists?r.object:null},analyzePath(t,e){try{t=(n=mt.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=mt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=nt.basename(t),n=mt.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath(t,e,r,n){t="string"==typeof t?t:mt.getPath(t);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=nt.join2(t,a);try{mt.mkdir(i)}catch(t){}t=i}}return i},createFile(t,e,r,n,o){var a=nt.join2("string"==typeof t?t:mt.getPath(t),e),i=vt(n,o);return mt.create(a,i)},createDataFile(t,e,r,n,o,a){var i=e;t&&(t="string"==typeof t?t:mt.getPath(t),i=e?nt.join2(t,e):t);var s=vt(n,o),c=mt.create(i,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}mt.chmod(c,146|s);var h=mt.open(c,577);mt.write(h,r,0,r.length,0,a),mt.close(h),mt.chmod(c,s)}return c},createDevice(t,e,r,n){var o=nt.join2("string"==typeof t?t:mt.getPath(t),e),a=vt(!!r,!!n);mt.createDevice.major||(mt.createDevice.major=64);var i=mt.makedev(mt.createDevice.major++,0);return mt.registerDevice(i,{open(t){t.seekable=!1},close(t){n&&n.buffer&&n.buffer.length&&n(10)},read(t,e,n,o,a){for(var i=0,s=0;s<o;s++){var c;try{c=r()}catch(t){throw new mt.ErrnoError(29)}if(void 0===c&&0===i)throw new mt.ErrnoError(6);if(null==c)break;i++,e[n+s]=c}return i&&(t.node.timestamp=Date.now()),i},write(t,e,r,o,a){for(var i=0;i<o;i++)try{n(e[r+i])}catch(t){throw new mt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),i}}),mt.mkdev(o,a,i)},forceLoadFile(t){if(t.isDevice||t.isFolder||t.link||t.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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=ut(i(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new mt.ErrnoError(29)}},createLazyFile(t,e,r,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},a.prototype.setDataGetter=function(t){this.getter=t},a.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=this;s.setDataGetter((t=>{var e=t*i,o=(t+1)*i-1;if(o=Math.min(o,n-1),"undefined"==typeof s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==i&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ut(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!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:r};var c=mt.createFile(t,e,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(t,e,r,n,o){var a=t.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[r+s]=a[o+s];else for(s=0;s<i;s++)e[r+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((t=>{var e=c.stream_ops[t];u[t]=function(){return mt.forceLoadFile(c),e.apply(null,arguments)}})),u.read=(t,e,r,n,o)=>(mt.forceLoadFile(c),l(t,e,r,n,o)),u.mmap=(t,e,r,n,o)=>{mt.forceLoadFile(c);var a=dt(e);if(!a)throw new mt.ErrnoError(48);return l(t,g,a,e,r),{ptr:a,allocated:!0}},c.stream_ops=u,c}},yt={DEFAULT_POLLMASK:5,calculateAt(t,e,r){if(nt.isAbs(e))return e;var n;if(n=-100===t?mt.cwd():yt.getStreamFromFD(t).path,0==e.length){if(!r)throw new mt.ErrnoError(44);return n}return nt.join2(n,e)},doStat(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&nt.normalize(e)!==nt.normalize(mt.getPath(t.node)))return-54;throw t}_[r>>2]=n.dev,_[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,_[r+12>>2]=n.uid,_[r+16>>2]=n.gid,_[r+20>>2]=n.rdev,D=[n.size>>>0,(T=n.size,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+24>>2]=D[0],_[r+28>>2]=D[1],_[r+32>>2]=4096,_[r+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return D=[Math.floor(o/1e3)>>>0,(T=Math.floor(o/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+40>>2]=D[0],_[r+44>>2]=D[1],C[r+48>>2]=o%1e3*1e3,D=[Math.floor(a/1e3)>>>0,(T=Math.floor(a/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+56>>2]=D[0],_[r+60>>2]=D[1],C[r+64>>2]=a%1e3*1e3,D=[Math.floor(i/1e3)>>>0,(T=Math.floor(i/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+72>>2]=D[0],_[r+76>>2]=D[1],C[r+80>>2]=i%1e3*1e3,D=[n.ino>>>0,(T=n.ino,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+88>>2]=D[0],_[r+92>>2]=D[1],0},doMsync(t,e,r,n,o){if(!mt.isFile(e.node.mode))throw new mt.ErrnoError(43);if(2&n)return 0;var a=w.slice(t,t+r);mt.msync(e,a,o,r,n)},varargs:void 0,get(){var t=_[yt.varargs>>2];return yt.varargs+=4,t},getp:()=>yt.get(),getStr:t=>J(t),getStreamFromFD:t=>mt.getStreamChecked(t)},gt=(t,e)=>e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN,wt=(t,e,r)=>ct(t,w,e,r),bt=void 0,Et=t=>{for(var e="",r=t;w[r];)e+=bt[w[r++]];return e},_t={},Ct={},Mt={},kt=void 0,$t=t=>{throw new kt(t)},St=void 0,Pt=t=>{throw new St(t)},jt=(t,e,r)=>{function n(e){var n=r(e);n.length!==t.length&&Pt("Mismatched type converter count");for(var o=0;o<t.length;++o)Ft(t[o],n[o])}t.forEach((function(t){Mt[t]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((t,e)=>{Ct.hasOwnProperty(t)?o[e]=Ct[t]:(a.push(t),_t.hasOwnProperty(t)||(_t[t]=[]),_t[t].push((()=>{o[e]=Ct[t],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Ft(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(t,e,r={}){var n=e.name;if(t||$t(`type "${n}" must have a positive integer typeid pointer`),Ct.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;$t(`Cannot register type '${n}' twice`)}if(Ct[t]=e,delete Mt[t],_t.hasOwnProperty(t)){var o=_t[t];delete _t[t],o.forEach((t=>t()))}}(t,e,r)}function Tt(t){if(!(this instanceof Zt))return!1;if(!(t instanceof Zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}var Dt=t=>{$t(t.$$.ptrType.registeredClass.name+" instance already deleted")},Wt=!1,At=t=>{},xt=t=>{t.count.value-=1,0===t.count.value&&(t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)})(t)},Ot=(t,e,r)=>{if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ot(t,e,r.baseClass);return null===n?null:r.downcast(n)},It={},Rt=()=>Object.keys(Lt).length,zt=()=>{var t=[];for(var e in Lt)Lt.hasOwnProperty(e)&&t.push(Lt[e]);return t},Ut=[],Nt=()=>{for(;Ut.length;){var t=Ut.pop();t.$$.deleteScheduled=!1,t.delete()}},Bt=void 0,Ht=t=>{Bt=t,Ut.length&&Bt&&Bt(Nt)},Lt={},Yt=(t,e)=>(e=((t,e)=>{for(void 0===e&&$t("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e})(t,e),Lt[e]),Vt=(t,e)=>(e.ptrType&&e.ptr||Pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&Pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Qt(Object.create(t,{$$:{value:e}})));function qt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Yt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Vt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Vt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,i=this.registeredClass.getActualType(e),s=It[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var c=Ot(e,this.registeredClass,a.registeredClass);return null===c?o.call(this):this.isSmartPointer?Vt(a.registeredClass.instancePrototype,{ptrType:a,ptr:c,smartPtrType:this,smartPtr:t}):Vt(a.registeredClass.instancePrototype,{ptrType:a,ptr:c})}var Qt=t=>"undefined"==typeof FinalizationRegistry?(Qt=t=>t,t):(Wt=new FinalizationRegistry((t=>{xt(t.$$)})),Qt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Wt.register(t,r,t)}return t},At=t=>Wt.unregister(t),Qt(t));function Gt(){if(this.$$.ptr||Dt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Qt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Jt(){this.$$.ptr||Dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$t("Object already scheduled for deletion"),At(this),xt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Kt(){return!this.$$.ptr}function Xt(){return this.$$.ptr||Dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$t("Object already scheduled for deletion"),Ut.push(this),1===Ut.length&&Bt&&Bt(Nt),this.$$.deleteScheduled=!0,this}function Zt(){}var te=t=>{if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${t}`:t};function ee(t,e){return{[t=te(t)]:function(){return e.apply(this,arguments)}}[t]}var re=(t,e,r)=>{if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||$t(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},ne=(t,e,r)=>{a.hasOwnProperty(t)?((void 0===r||void 0!==a[t].overloadTable&&void 0!==a[t].overloadTable[r])&&$t(`Cannot register public name '${t}' twice`),re(a,t,t),a.hasOwnProperty(r)&&$t(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),a[t].overloadTable[r]=e):(a[t]=e,void 0!==r&&(a[t].numArguments=r))};function oe(t,e,r,n,o,a,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var ae=(t,e,r)=>{for(;e!==r;)e.upcast||$t(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function ie(t,e){if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass;return ae(e.$$.ptr,r,this.registeredClass)}function se(t,e){var r;if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&$t(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=ae(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&$t("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:$t(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,Pe.toHandle((()=>o.delete()))),null!==t&&t.push(this.rawDestructor,r)}break;default:$t("Unsupporting sharing policy")}return r}function ce(t,e){if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&$t(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass;return ae(e.$$.ptr,r,this.registeredClass)}function ue(t){return this.fromWireType(C[t>>2])}function le(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function de(t){this.rawDestructor&&this.rawDestructor(t)}var he=t=>{null!==t&&t.delete()};function fe(t,e,r,n,o,a,i,s,c,u,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=se:n?(this.toWireType=ie,this.destructorFunction=null):(this.toWireType=ce,this.destructorFunction=null)}var pe=(t,e,r)=>{a.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),void 0!==a[t].overloadTable&&void 0!==r?a[t].overloadTable[r]=e:(a[t]=e,a[t].argCount=r)},ve=t=>$.get(t),me=(t,e,r)=>t.includes("j")?((t,e,r)=>{var n=a["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)})(t,e,r):ve(e).apply(null,r),ye=(t,e)=>{var r,n,o,a=(t=Et(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),me(r,n,o)}):ve(e);return"function"!=typeof a&&$t(`unknown function pointer with signature ${t}: ${e}`),a},ge=void 0,we=t=>{var e=$r(t),r=Et(e);return Cr(e),r},be=(t,e)=>{var r=[],n={};throw e.forEach((function t(e){n[e]||Ct[e]||(Mt[e]?Mt[e].forEach(t):(r.push(e),n[e]=!0))})),new ge(`${t}: `+r.map(we).join([", "]))},Ee=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function _e(t,e,r,n,o,a){var i=e.length;i<2&&$t("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==r,c=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){c=!0;break}var l="void"!==e[0].name,d=i-2,h=new Array(d),f=[],p=[];return function(){var r;arguments.length!==d&&$t(`function ${t} called with ${arguments.length} arguments, expected ${d}`),p.length=0,f.length=s?2:1,f[0]=o,s&&(r=e[1].toWireType(p,this),f[1]=r);for(var a=0;a<d;++a)h[a]=e[a+2].toWireType(p,arguments[a]),f.push(h[a]);var i=n.apply(null,f);function u(t){if(c)Ee(p);else for(var n=s?1:2;n<e.length;n++){var o=1===n?r:h[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(o)}if(l)return e[0].fromWireType(t)}return u(i)}}var Ce=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(C[e+4*n>>2]);return r};function Me(){this.allocated=[void 0],this.freelist=[]}var ke=new Me,$e=t=>{t>=ke.reserved&&0==--ke.get(t).refcount&&ke.free(t)},Se=()=>{for(var t=0,e=ke.reserved;e<ke.allocated.length;++e)void 0!==ke.allocated[e]&&++t;return t},Pe={toValue:t=>(t||$t("Cannot use deleted val. handle = "+t),ke.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ke.allocate({refcount:1,value:t})}}};function je(t){return this.fromWireType(_[t>>2])}var Fe,Te=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t},De=(t,e)=>{switch(e){case 4:return function(t){return this.fromWireType(M[t>>2])};case 8:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},We=(t,e,r)=>{switch(e){case 1:return r?t=>g[t>>0]:t=>w[t>>0];case 2:return r?t=>b[t>>1]:t=>E[t>>1];case 4:return r?t=>_[t>>2]:t=>C[t>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ae="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,xe=(t,e)=>{for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((r=n<<1)-t>32&&Ae)return Ae.decode(w.subarray(t,r));for(var a="",i=0;!(i>=e/2);++i){var s=b[t+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Oe=(t,e,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,a=0;a<o;++a){var i=t.charCodeAt(a);b[e>>1]=i,e+=2}return b[e>>1]=0,e-n},Ie=t=>2*t.length,Re=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},ze=(t,e,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,a=0;a<t.length;++a){var i=t.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&t.charCodeAt(++a)),_[e>>2]=i,(e+=4)+4>o)break}return _[e>>2]=0,e-n},Ue=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Ne=(t,e)=>{var r=Ct[t];return void 0===r&&$t(e+" has unknown type "+we(t)),r},Be={},He=t=>{var e=Be[t];return void 0===e?Et(t):e},Le=[],Ye=()=>{if("object"==typeof globalThis)return globalThis;function t(t){t.$$$embind_global$$$=t;var e="object"==typeof $$$embind_global$$$&&t.$$$embind_global$$$==t;return e||delete t.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof r.g&&t(r.g)?$$$embind_global$$$=r.g:"object"==typeof self&&t(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},Ve=[],qe=t=>t%4==0&&(t%100!=0||t%400==0),Qe=[0,31,60,91,121,152,182,213,244,274,305,335],Ge=[0,31,59,90,120,151,181,212,243,273,304,334],Je=t=>(qe(t.getFullYear())?Qe:Ge)[t.getMonth()]+t.getDate()-1,Ke=t=>{var e=st(t)+1,r=_r(e);return r&&wt(t,r,e),r},Xe=[],Ze=(t,e,r)=>{var n=((t,e)=>{var r;for(Xe.length=0;r=w[t++];)e+=105!=r&&e%8?4:0,Xe.push(105==r?_[e>>2]:k[e>>3]),e+=105==r?4:8;return Xe})(e,r);return Y[t].apply(null,n)};Fe=()=>performance.now();var tr,er,rr,nr=t=>{N("OOM")},or=t=>{var e=(t-m.buffer.byteLength+65535)/65536;try{return m.grow(e),P(),1}catch(t){}},ar={},ir=()=>{if(!ir.strings){var t={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",_:l||"./this.program"};for(var e in ar)void 0===ar[e]?delete t[e]:t[e]=ar[e];var r=[];for(var e in t)r.push(`${e}=${t[e]}`);ir.strings=r}return ir.strings},sr=t=>{y||(a.onExit&&a.onExit(t),S=!0),d(t,new V(t))},cr=(t,e)=>{sr(t)},ur=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},lr=[31,29,31,30,31,30,31,31,30,31,30,31],dr=[31,28,31,30,31,30,31,31,30,31,30,31],hr=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=qe(r.getFullYear()),o=r.getMonth(),a=(n?lr:dr)[o];if(!(e>a-r.getDate()))return r.setDate(r.getDate()+e),r;e-=a-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},fr=(t,e,r,n)=>{var o=C[n+40>>2],a={tm_sec:_[n>>2],tm_min:_[n+4>>2],tm_hour:_[n+8>>2],tm_mday:_[n+12>>2],tm_mon:_[n+16>>2],tm_year:_[n+20>>2],tm_wday:_[n+24>>2],tm_yday:_[n+28>>2],tm_isdst:_[n+32>>2],tm_gmtoff:_[n+36>>2],tm_zone:o?J(o):""},i=J(r),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 c in s)i=i.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function h(t,e){return d(t,e,"0")}function f(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function p(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function v(t){var e=hr(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=p(r),a=p(n);return f(o,e)<=0?f(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var m={"%a":t=>u[t.tm_wday].substring(0,3),"%A":t=>u[t.tm_wday],"%b":t=>l[t.tm_mon].substring(0,3),"%B":t=>l[t.tm_mon],"%C":t=>h((t.tm_year+1900)/100|0,2),"%d":t=>h(t.tm_mday,2),"%e":t=>d(t.tm_mday,2," "),"%g":t=>v(t).toString().substring(2),"%G":t=>v(t),"%H":t=>h(t.tm_hour,2),"%I":t=>{var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),h(e,2)},"%j":t=>h(t.tm_mday+ur(qe(t.tm_year+1900)?lr:dr,t.tm_mon-1),3),"%m":t=>h(t.tm_mon+1,2),"%M":t=>h(t.tm_min,2),"%n":()=>"\n","%p":t=>t.tm_hour>=0&&t.tm_hour<12?"AM":"PM","%S":t=>h(t.tm_sec,2),"%t":()=>"\t","%u":t=>t.tm_wday||7,"%U":t=>{var e=t.tm_yday+7-t.tm_wday;return h(Math.floor(e/7),2)},"%V":t=>{var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(53==e){var r=(t.tm_wday+371-t.tm_yday)%7;4==r||3==r&&qe(t.tm_year)||(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&qe(t.tm_year%400-1))&&e++}return h(e,2)},"%w":t=>t.tm_wday,"%W":t=>{var e=t.tm_yday+7-(t.tm_wday+6)%7;return h(Math.floor(e/7),2)},"%y":t=>(t.tm_year+1900).toString().substring(2),"%Y":t=>t.tm_year+1900,"%z":t=>{var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":t=>t.tm_zone,"%%":()=>"%"};for(var c in i=i.replace(/%%/g,"\0\0"),m)i.includes(c)&&(i=i.replace(new RegExp(c,"g"),m[c](a)));var y,w,b=ut(i=i.replace(/\0\0/g,"%"),!1);return b.length>e?0:(y=b,w=t,g.set(y,w),b.length-1)},pr=t=>parseInt(t),vr=Ke,mr=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=mt.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},yr=365,gr=146;Object.defineProperties(mr.prototype,{read:{get:function(){return(this.mode&yr)===yr},set:function(t){t?this.mode|=yr:this.mode&=-366}},write:{get:function(){return(this.mode&gr)===gr},set:function(t){t?this.mode|=gr:this.mode&=-147}},isFolder:{get:function(){return mt.isDir(this.mode)}},isDevice:{get:function(){return mt.isChrdev(this.mode)}}}),mt.FSNode=mr,mt.createPreloadedFile=(t,e,r,n,o,a,i,s,c,u)=>{var l=e?at.resolve(nt.join2(t,e)):t;function d(r){function d(r){u&&u(),s||mt.createDataFile(t,e,r,n,o,c),a&&a(),U()}((t,e,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return pt.forEach((a=>{o||a.canHandle(e)&&(a.handle(t,e,r,n),o=!0)})),o})(r,l,d,(()=>{i&&i(),U()}))||d(r)}z(),"string"==typeof r?ft(r,(t=>d(t)),i):d(r)},mt.staticInit(),(()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);bt=t})(),kt=a.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},St=a.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Zt.prototype.isAliasOf=Tt,Zt.prototype.clone=Gt,Zt.prototype.delete=Jt,Zt.prototype.isDeleted=Kt,Zt.prototype.deleteLater=Xt,a.getInheritedInstanceCount=Rt,a.getLiveInheritedInstances=zt,a.flushPendingDeletes=Nt,a.setDelayFunction=Ht,fe.prototype.getPointee=le,fe.prototype.destructor=de,fe.prototype.argPackAdvance=8,fe.prototype.readValueFromPointer=ue,fe.prototype.deleteObject=he,fe.prototype.fromWireType=qt,ge=a.UnboundTypeError=(tr=Error,(rr=ee(er="UnboundTypeError",(function(t){this.name=er,this.message=t;var e=new Error(t).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(tr.prototype),rr.prototype.constructor=rr,rr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},rr),Object.assign(Me.prototype,{get(t){return this.allocated[t]},has(t){return void 0!==this.allocated[t]},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}}),ke.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ke.reserved=ke.allocated.length,a.count_emval_handles=Se;var wr,br={o:(t,e,r,n)=>{N(`Assertion failed: ${J(t)}, at: `+[e?J(e):"unknown filename",r,n?J(n):"unknown function"])},w:t=>{var e=new tt(t);return e.get_caught()||(e.set_caught(!0),X--),e.set_rethrown(!1),K.push(e),Dr(e.excPtr),e.get_exception_ptr()},$b:()=>{if(!K.length)return 0;var t=K[K.length-1];return Dr(t.excPtr),t.excPtr},y:()=>{Pr(0,0);var t=K.pop();Tr(t.excPtr),Z=0},a:()=>et([]),i:t=>et([t]),v:(t,e)=>et([t,e]),Ka:rt,_b:t=>{if(t){var e=new tt(t);K.push(e),e.set_rethrown(!0),rt()}},q:(t,e,r)=>{throw new tt(t).init(e,r),X++,Z=t},ac:()=>X,c:t=>{throw Z||(Z=t),Z},fc:function(t,e,r,n,o){try{for(var a=0,i=e?_[e>>2]:0,s=e?_[e+4>>2]:0,c=r?_[r>>2]:0,u=r?_[r+4>>2]:0,l=n?_[n>>2]:0,d=n?_[n+4>>2]:0,h=0,f=0,p=0,v=0,m=0,y=0,g=(e?_[e>>2]:0)|(r?_[r>>2]:0)|(n?_[n>>2]:0),w=(e?_[e+4>>2]:0)|(r?_[r+4>>2]:0)|(n?_[n+4>>2]:0),b=function(t,e,r,n){return t<32?e&n:r&n},E=0;E<t;E++){var C=1<<E%32;if(b(E,g,w,C)){var M=yt.getStreamFromFD(E),k=yt.DEFAULT_POLLMASK;if(M.stream_ops.poll){var $=-1;o&&($=1e3*((e?_[o>>2]:0)+(e?_[o+8>>2]:0)/1e6)),k=M.stream_ops.poll(M,$)}1&k&&b(E,i,s,C)&&(E<32?h|=C:f|=C,a++),4&k&&b(E,c,u,C)&&(E<32?p|=C:v|=C,a++),2&k&&b(E,l,d,C)&&(E<32?m|=C:y|=C,a++)}}return e&&(_[e>>2]=h,_[e+4>>2]=f),r&&(_[r>>2]=p,_[r+4>>2]=v),n&&(_[n>>2]=m,_[n+4>>2]=y),a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Vb:function(t,e){try{return t=yt.getStr(t),mt.chmod(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Wb:function(t,e){try{return mt.fchmod(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},db:function(t,e,r){yt.varargs=r;try{var n=yt.getStreamFromFD(t);switch(e){case 0:if((o=yt.get())<0)return-28;for(;mt.streams[o];)o++;return mt.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=yt.get();return n.flags|=o,0;case 5:return o=yt.getp(),b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,_[Mr()>>2]=a,-1}}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}var a},oc:function(t,e){try{var r=yt.getStreamFromFD(t);return yt.doStat(mt.stat,r.path,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},zb:function(t,e,r){var n=gt(e,r);try{return isNaN(n)?61:(mt.ftruncate(t,n),0)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Zb:function(t,e){try{if(0===e)return-28;var r=mt.cwd(),n=st(r)+1;return e<n?-68:(wt(r,t,e),n)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Xb:function(t,e,r){try{var n=yt.getStreamFromFD(t);n.getdents||(n.getdents=mt.readdir(n.path));for(var o=280,a=0,i=mt.llseek(n,0,1),s=Math.floor(i/o);s<n.getdents.length&&a+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.node.id,u=4;else if(".."===l)c=mt.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=mt.lookupNode(n.node,l);c=d.id,u=mt.isChrdev(d.mode)?2:mt.isDir(d.mode)?4:mt.isLink(d.mode)?10:8}D=[c>>>0,(T=c,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+a>>2]=D[0],_[e+a+4>>2]=D[1],D=[(s+1)*o>>>0,(T=(s+1)*o,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+a+8>>2]=D[0],_[e+a+12>>2]=D[1],b[e+a+16>>1]=280,g[e+a+18>>0]=u,wt(l,e+a+19,256),a+=o,s+=1}return mt.llseek(n,s*o,0),a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},pc:function(t,e,r){yt.varargs=r;try{var n=yt.getStreamFromFD(t);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=yt.getp();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)g[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=yt.getp();var s=_[a>>2],c=_[a+4>>2],u=_[a+8>>2],l=_[a+12>>2],d=[];for(i=0;i<32;i++)d.push(g[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:s,c_oflag:c,c_cflag:u,c_lflag:l,c_cc:d})}return 0;case 21519:return n.tty?(a=yt.getp(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=yt.getp(),mt.ioctl(n,e,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var h=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=yt.getp(),b[a>>1]=h[0],b[a+2>>1]=h[1]}return 0;default:return-28}}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},lc:function(t,e){try{return t=yt.getStr(t),yt.doStat(mt.lstat,t,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},ic:function(t,e,r){try{return e=yt.getStr(e),e=yt.calculateAt(t,e),"/"===(e=nt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),mt.mkdir(e,r,0),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},mc:function(t,e,r,n){try{e=yt.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=yt.calculateAt(t,e,a),yt.doStat(o?mt.lstat:mt.stat,e,r)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},eb:function(t,e,r,n){yt.varargs=n;try{e=yt.getStr(e),e=yt.calculateAt(t,e);var o=n?yt.get():0;return mt.open(e,r,o).fd}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Yb:function(t,e,r,n){try{if(e=yt.getStr(e),e=yt.calculateAt(t,e),n<=0)return-28;var o=mt.readlink(e),a=Math.min(n,st(o)),i=g[r+a];return wt(o,r,n+1),g[r+a]=i,a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},gc:function(t){try{return t=yt.getStr(t),mt.rmdir(t),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},nc:function(t,e){try{return t=yt.getStr(t),yt.doStat(mt.stat,t,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Ub:function(t,e){try{return t=yt.getStr(t),e=yt.getStr(e),mt.symlink(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},hc:function(t,e,r){try{return e=yt.getStr(e),e=yt.calculateAt(t,e),0===r?mt.unlink(e):512===r?mt.rmdir(e):N("Invalid flags passed to unlinkat"),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Kb:(t,e,r,n,o)=>{},tc:(t,e,r,n)=>{Ft(t,{name:e=Et(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:n},argPackAdvance:8,readValueFromPointer:function(t){return this.fromWireType(w[t])},destructorFunction:null})},Y:(t,e,r,n,o,a,i,s,c,u,l,d,h)=>{l=Et(l),a=ye(o,a),s&&(s=ye(i,s)),u&&(u=ye(c,u)),h=ye(d,h);var f=te(l);ne(f,(function(){be(`Cannot construct ${l} due to unbound types`,[n])})),jt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Zt.prototype;var i=ee(f,(function(){if(Object.getPrototypeOf(this)!==c)throw new kt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new kt(l+" has no accessible constructor");var t=d.constructor_body[arguments.length];if(void 0===t)throw new kt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:i}});i.prototype=c;var d=new oe(l,i,c,h,r,a,s,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new fe(l,d,!0,!1,!1),v=new fe(l+"*",d,!1,!1,!1),m=new fe(l+" const*",d,!1,!0,!1);return It[t]={pointerType:v,constPointerType:m},pe(f,i),[p,v,m]}))},X:(t,e,r,n,o,a,i,s)=>{var c=Ce(r,n);e=Et(e),a=ye(o,a),jt([],[t],(function(t){var n=`${(t=t[0]).name}.${e}`;function o(){be(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]);var s=t.registeredClass.constructor;return void 0===s[e]?(o.argCount=r-1,s[e]=o):(re(s,e,n),s[e].overloadTable[r-1]=o),jt([],c,(function(o){var c=[o[0],null].concat(o.slice(1)),u=_e(n,c,null,a,i);if(void 0===s[e].overloadTable?(u.argCount=r-1,s[e]=u):s[e].overloadTable[r-1]=u,t.registeredClass.__derivedClasses)for(const r of t.registeredClass.__derivedClasses)r.constructor.hasOwnProperty(e)||(r.constructor[e]=u);return[]})),[]}))},K:(t,e,r,n,o,a,i,s,c)=>{var u=Ce(r,n);e=Et(e),a=ye(o,a),jt([],[t],(function(t){var n=`${(t=t[0]).name}.${e}`;function o(){be(`Cannot call ${n} due to unbound types`,u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(re(c,e,n),c[e].overloadTable[r-2]=o),jt([],u,(function(o){var s=_e(n,o,t,a,i);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},sc:(t,e)=>{Ft(t,{name:e=Et(e),fromWireType:t=>{var e=Pe.toValue(t);return $e(t),e},toWireType:(t,e)=>Pe.toHandle(e),argPackAdvance:8,readValueFromPointer:je,destructorFunction:null})},gb:(t,e,r)=>{Ft(t,{name:e=Et(e),fromWireType:t=>t,toWireType:(t,e)=>e,argPackAdvance:8,readValueFromPointer:De(e,r),destructorFunction:null})},va:(t,e,r,n,o,a,i)=>{var s=Ce(e,r);t=Et(t),o=ye(n,o),ne(t,(function(){be(`Cannot call ${t} due to unbound types`,s)}),e-1),jt([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return pe(t,_e(t,n,null,o,a),e-1),[]}))},ga:(t,e,r,n,o)=>{e=Et(e),-1===o&&(o=4294967295);var a=t=>t;if(0===n){var i=32-8*r;a=t=>t<<i>>>i}var s=e.includes("unsigned");Ft(t,{name:e,fromWireType:a,toWireType:s?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:We(e,r,0!==n),destructorFunction:null})},U:(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=C[t>>2],r=C[t+4>>2];return new n(g.buffer,r,e)}Ft(t,{name:r=Et(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},fb:(t,e)=>{var r="std::string"===(e=Et(e));Ft(t,{name:e,fromWireType:t=>{var e,n=C[t>>2],o=t+4;if(r)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==w[s]){var c=J(a,s-a);void 0===e?e=c:(e+=String.fromCharCode(0),e+=c),a=s+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(w[o+i]);e=u.join("")}return Cr(t),e},toWireType:(t,e)=>{var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||$t("Cannot pass non-string to std::string"),n=r&&o?st(e):e.length;var a=_r(4+n+1),i=a+4;if(C[a>>2]=n,r&&o)wt(e,i,n+1);else if(o)for(var s=0;s<n;++s){var c=e.charCodeAt(s);c>255&&(Cr(i),$t("String has UTF-16 code units that do not fit in 8 bits")),w[i+s]=c}else for(s=0;s<n;++s)w[i+s]=e[s];return null!==t&&t.push(Cr,a),a},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:t=>Cr(t)})},Pa:(t,e,r)=>{var n,o,a,i,s;r=Et(r),2===e?(n=xe,o=Oe,i=Ie,a=()=>E,s=1):4===e&&(n=Re,o=ze,i=Ue,a=()=>C,s=2),Ft(t,{name:r,fromWireType:t=>{for(var r,o=C[t>>2],i=a(),c=t+4,u=0;u<=o;++u){var l=t+4+u*e;if(u==o||0==i[l>>s]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+e}}return Cr(t),r},toWireType:(t,n)=>{"string"!=typeof n&&$t(`Cannot pass non-string to C++ string type ${r}`);var a=i(n),c=_r(4+a+e);return C[c>>2]=a>>s,o(n,c+4,a+e),null!==t&&t.push(Cr,c),c},argPackAdvance:8,readValueFromPointer:je,destructorFunction:t=>Cr(t)})},uc:(t,e)=>{Ft(t,{isVoid:!0,name:e=Et(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(t,e)=>{}})},qc:()=>!0,bc:()=>{throw 1/0},wa:(t,e,r)=>{t=Pe.toValue(t),e=Ne(e,"emval::as");var n=[],o=Pe.toHandle(n);return C[r>>2]=o,e.toWireType(n,t)},Da:(t,e,r,n,o)=>(t=Le[t])(e=Pe.toValue(e),r=He(r),(t=>{var e=[];return C[t>>2]=Pe.toHandle(e),e})(n),o),Ma:(t,e,r,n)=>{(t=Le[t])(e=Pe.toValue(e),r=He(r),null,n)},vc:$e,Na:t=>0===t?Pe.toHandle(Ye()):(t=He(t),Pe.toHandle(Ye()[t])),ma:(t,e)=>{var r=((t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=Ne(C[e+4*n>>2],"parameter "+n);return r})(t,e),n=r[0],o=n.name+"_$"+r.slice(1).map((function(t){return t.name})).join("_")+"$",a=Ve[o];if(void 0!==a)return a;var i,s,c=new Array(t-1);return i=(e,o,a,i)=>{for(var s=0,u=0;u<t-1;++u)c[u]=r[u+1].readValueFromPointer(i+s),s+=r[u+1].argPackAdvance;var l=e[o].apply(e,c);for(u=0;u<t-1;++u)r[u+1].deleteObject&&r[u+1].deleteObject(c[u]);if(!n.isVoid)return n.toWireType(a,l)},s=Le.length,Le.push(i),a=s,Ve[o]=a,a},yb:(t,e)=>(t=Pe.toValue(t),e=Pe.toValue(e),Pe.toHandle(t[e])),u:t=>{t>4&&(ke.get(t).refcount+=1)},wb:(t,e)=>(t=Pe.toValue(t))instanceof(e=Pe.toValue(e)),ya:t=>"number"==typeof(t=Pe.toValue(t)),M:t=>"string"==typeof(t=Pe.toValue(t)),P:()=>Pe.toHandle([]),Q:t=>Pe.toHandle(He(t)),x:()=>Pe.toHandle({}),xb:t=>{var e=Pe.toValue(t);Ee(e),$e(t)},Ec:(t,e,r)=>{t=Pe.toValue(t),e=Pe.toValue(e),r=Pe.toValue(r),t[e]=r},ea:(t,e)=>{var r=(t=Ne(t,"_emval_take_value")).readValueFromPointer(e);return Pe.toHandle(r)},z:t=>(t=Pe.toValue(t),Pe.toHandle(typeof t)),Gb:function(t,e,r){var n=gt(t,e),o=new Date(1e3*n);_[r>>2]=o.getUTCSeconds(),_[r+4>>2]=o.getUTCMinutes(),_[r+8>>2]=o.getUTCHours(),_[r+12>>2]=o.getUTCDate(),_[r+16>>2]=o.getUTCMonth(),_[r+20>>2]=o.getUTCFullYear()-1900,_[r+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-a)/864e5|0;_[r+28>>2]=i},Hb:function(t,e,r){var n=gt(t,e),o=new Date(1e3*n);_[r>>2]=o.getSeconds(),_[r+4>>2]=o.getMinutes(),_[r+8>>2]=o.getHours(),_[r+12>>2]=o.getDate(),_[r+16>>2]=o.getMonth(),_[r+20>>2]=o.getFullYear()-1900,_[r+24>>2]=o.getDay();var a=0|Je(o);_[r+28>>2]=a,_[r+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=i.getTimezoneOffset(),u=0|(s!=c&&o.getTimezoneOffset()==Math.min(c,s));_[r+32>>2]=u},Ib:function(t){var e=(()=>{var e=new Date(_[t+20>>2]+1900,_[t+16>>2],_[t+12>>2],_[t+8>>2],_[t+4>>2],_[t>>2],0),r=_[t+32>>2],n=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(r<0)_[t+32>>2]=Number(a!=i&&s==n);else if(r>0!=(s==n)){var c=Math.max(i,a),u=r>0?s:c;e.setTime(e.getTime()+6e4*(u-n))}_[t+24>>2]=e.getDay();var l=0|Je(e);return _[t+28>>2]=l,_[t>>2]=e.getSeconds(),_[t+4>>2]=e.getMinutes(),_[t+8>>2]=e.getHours(),_[t+12>>2]=e.getDate(),_[t+16>>2]=e.getMonth(),_[t+20>>2]=e.getYear(),e.getTime()/1e3})();return kr((T=e,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)),e>>>0},Eb:function(t,e,r,n,o,a,i,s){var c=gt(o,a);try{if(isNaN(c))return 61;var u=yt.getStreamFromFD(n),l=mt.mmap(u,t,c,e,r),d=l.ptr;return _[i>>2]=l.allocated,C[s>>2]=d,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Fb:function(t,e,r,n,o,a,i){var s=gt(a,i);try{if(isNaN(s))return 61;var c=yt.getStreamFromFD(o);2&r&&yt.doMsync(t,c,e,n,s),mt.munmap(c)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},dc:(t,e,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),c=Math.max(i,s);function u(t){var e=t.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}C[t>>2]=60*c,_[e>>2]=Number(i!=s);var l=u(o),d=u(a),h=Ke(l),f=Ke(d);s<i?(C[r>>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},N:()=>{N("")},La:(t,e,r)=>Ze(t,e,r),za:()=>Date.now(),ec:()=>2147483648,Aa:Fe,rc:(t,e,r)=>w.copyWithin(t,e,e+r),cc:t=>{var e=w.length,r=2147483648;(t>>>=0)>r&&nr();for(var n,o,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,t+100663296);var s=Math.min(r,(n=Math.max(t,i))+((o=65536)-n%o)%o);if(or(s))return!0}nr()},jc:(t,e)=>{var r=0;return ir().forEach(((n,o)=>{var a=e+r;C[t+4*o>>2]=a,((t,e)=>{for(var r=0;r<t.length;++r)g[e++>>0]=t.charCodeAt(r);g[e>>0]=0})(n,a),r+=n.length+1})),0},kc:(t,e)=>{var r=ir();C[t>>2]=r.length;var n=0;return r.forEach((t=>n+=t.length+1)),C[e>>2]=n,0},wc:cr,Ga:function(t){try{var e=yt.getStreamFromFD(t);return mt.close(e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},bb:function(t,e){try{var r=yt.getStreamFromFD(t),n=r.tty?2:mt.isDir(r.mode)?3:mt.isLink(r.mode)?7:4;return g[e>>0]=n,b[e+2>>1]=0,D=[0,(T=0,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+8>>2]=D[0],_[e+12>>2]=D[1],D=[0,(T=0,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+16>>2]=D[0],_[e+20>>2]=D[1],0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},cb:function(t,e,r,n){try{var o=((t,e,r,n)=>{for(var o=0,a=0;a<r;a++){var i=C[e>>2],s=C[e+4>>2];e+=8;var c=mt.read(t,g,i,s,n);if(c<0)return-1;if(o+=c,c<s)break;"undefined"!=typeof n&&(n+=c)}return o})(yt.getStreamFromFD(t),e,r);return C[n>>2]=o,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},Jb:function(t,e,r,n,o){var a=gt(e,r);try{if(isNaN(a))return 61;var i=yt.getStreamFromFD(t);return mt.llseek(i,a,n),D=[i.position>>>0,(T=i.position,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[o>>2]=D[0],_[o+4>>2]=D[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},Oa:function(t,e,r,n){try{var o=((t,e,r,n)=>{for(var o=0,a=0;a<r;a++){var i=C[e>>2],s=C[e+4>>2];e+=8;var c=mt.write(t,g,i,s,n);if(c<0)return-1;o+=c,"undefined"!=typeof n&&(n+=c)}return o})(yt.getStreamFromFD(t),e,r);return C[n>>2]=o,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},vb:function(){return vr(location.toString())},Tb:(t,e)=>(ot(w.subarray(t,t+e)),0),ub:function(){return vr((t=Gr,self[t(412,"y4Mj")][t(419,"8oJ1")]()));var t},W:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},rb:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},R:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},ca:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},J:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ra:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},r:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},C:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Z:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},sa:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},t:function(t){var e=jr();try{return ve(t)()}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},h:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},Oc:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},ib:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Fc:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ic:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Gc:function(t,e,r,n,o,a,i,s){var c=jr();try{return ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Nc:function(t,e,r,n,o,a,i,s,c){var u=jr();try{return ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},b:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Ua:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},tb:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},e:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},oa:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},lb:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},k:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},ab:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},kb:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},n:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ob:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},F:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},ba:function(t,e,r,n,o,a,i,s){var c=jr();try{return ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},ta:function(t,e,r,n,o,a,i,s,c){var u=jr();try{return ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},I:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},Dc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},Fa:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},Bb:function(t,e,r,n,o,a,i){var s=jr();try{return Yr(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Pb:function(t,e,r,n){var o=jr();try{return zr(t,e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Qb:function(t,e,r,n,o){var a=jr();try{return Rr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Db:function(t){var e=jr();try{return Hr(t)}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},Sb:function(t,e){var r=jr();try{return xr(t,e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},Cb:function(t,e,r){var n=jr();try{return Lr(t,e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Ob:function(t,e,r,n){var o=jr();try{return Ur(t,e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ab:function(t,e,r,n,o){var a=jr();try{return Vr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},l:function(t){var e=jr();try{ve(t)()}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},f:function(t,e){var r=jr();try{ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},xa:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Sa:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Cc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ca:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Za:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},d:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},G:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ja:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Ha:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},jb:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Jc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ba:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},V:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ta:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Qc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},O:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},ja:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Hc:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Mc:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},Xa:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},ka:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Va:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ya:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},g:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},la:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},B:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ua:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Lc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},H:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},fa:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},L:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},pa:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Rc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},aa:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Sc:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Wa:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},nb:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},j:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Qa:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},xc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ia:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},T:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ia:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},$:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},m:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Pc:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},E:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},sb:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},da:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},_a:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},p:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},$a:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},mb:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Bc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},pb:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},ra:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},s:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ac:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},zc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},A:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},S:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},ha:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},qb:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},qa:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p){var v=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p)}catch(t){if(Fr(v),t!==t+0)throw t;Pr(1,0)}},Kc:function(t,e,r,n,o,a,i,s,c,u,l,d,h){var f=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h)}catch(t){if(Fr(f),t!==t+0)throw t;Pr(1,0)}},na:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p){var v=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p)}catch(t){if(Fr(v),t!==t+0)throw t;Pr(1,0)}},Ea:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p,v){var m=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p,v)}catch(t){if(Fr(m),t!==t+0)throw t;Pr(1,0)}},Rb:function(t,e,r,n,o,a,i){var s=jr();try{Ir(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Lb:function(t,e,r,n,o,a,i,s,c){var u=jr();try{Br(t,e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},Nb:function(t,e,r,n,o,a,i){var s=jr();try{Or(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Mb:function(t,e,r,n,o){var a=jr();try{Nr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},D:t=>t,hb:fr,_:(t,e,r,n,o)=>fr(t,e,r,n),yc:(t,e,r)=>{for(var n=J(e),o="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,i=o.length;a<i;++a)n=n.replace(new RegExp("\\"+o[a],"g"),"\\"+o[a]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var c in s)n=n.replace(c,s[c]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var l in u)n=n.replace(l,"("+l+u[l]+")");var d=[];for(a=n.indexOf("%");a>=0;a=n.indexOf("%"))d.push(n[a+1]),n=n.replace(new RegExp("\\%"+n[a+1],"g"),"");var h=new RegExp("^"+n,"i").exec(J(t));if(h){var f,p=function(){function t(t,e,r){return"number"!=typeof t||isNaN(t)?e:t>=e?t<=r?t:r:e}return{year:t(_[r+20>>2]+1900,1970,9999),month:t(_[r+16>>2],0,11),day:t(_[r+12>>2],1,31),hour:t(_[r+8>>2],0,23),min:t(_[r+4>>2],0,59),sec:t(_[r>>2],0,59)}}(),v=t=>{var e=d.indexOf(t);if(e>=0)return h[e+1]};if((f=v("S"))&&(p.sec=pr(f)),(f=v("M"))&&(p.min=pr(f)),f=v("H"))p.hour=pr(f);else if(f=v("I")){var m=pr(f);(f=v("p"))&&(m+="P"===f.toUpperCase()[0]?12:0),p.hour=m}if(f=v("Y"))p.year=pr(f);else if(f=v("y")){var y=pr(f);(f=v("C"))?y+=100*pr(f):y+=y<69?2e3:1900,p.year=y}if((f=v("m"))?p.month=pr(f)-1:(f=v("b"))&&(p.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[f.substring(0,3).toUpperCase()]||0),f=v("d"))p.day=pr(f);else if(f=v("j"))for(var g=pr(f),w=qe(p.year),b=0;b<12;++b){var E=ur(w?lr:dr,b-1);g<=E+(w?lr:dr)[b]&&(p.day=g-E)}else if(f=v("a")){var C=f.substring(0,3).toUpperCase();if(f=v("U")){var M={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[C],k=pr(f);S=0===($=new Date(p.year,0,1)).getDay()?hr($,M+7*(k-1)):hr($,7-$.getDay()+M+7*(k-1)),p.day=S.getDate(),p.month=S.getMonth()}else if(f=v("W")){var $,S;M={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[C],k=pr(f),S=1===($=new Date(p.year,0,1)).getDay()?hr($,M+7*(k-1)):hr($,7-$.getDay()+1+M+7*(k-1)),p.day=S.getDate(),p.month=S.getMonth()}}var P=new Date(p.year,p.month,p.day,p.hour,p.min,p.sec,0);return _[r>>2]=P.getSeconds(),_[r+4>>2]=P.getMinutes(),_[r+8>>2]=P.getHours(),_[r+12>>2]=P.getDate(),_[r+16>>2]=P.getMonth(),_[r+20>>2]=P.getFullYear()-1900,_[r+24>>2]=P.getDay(),_[r+28>>2]=ur(qe(P.getFullYear())?lr:dr,P.getMonth()-1)+P.getDate()-1,_[r+32>>2]=0,t+ut(h[0]).length-1}return 0}},Er=function(){var t,e,r,n,i={a:br};function s(t,e){var r,n=t.exports;return m=(Er=n).Tc,P(),$=Er.Wc,r=Er.Uc,A.unshift(r),U(),n}if(z(),a.instantiateWasm)try{return a.instantiateWasm(i,s)}catch(t){v(`Module.instantiateWasm callback failed with error: ${t}`),o(t)}return(t=f,e=j,r=i,n=function(t){s(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||B(e)||"function"!=typeof fetch?L(e,r,n):fetch(e,{credentials:"same-origin"}).then((t=>WebAssembly.instantiateStreaming(t,r).then(n,(function(t){return v(`wasm streaming compile failed: ${t}`),v("falling back to ArrayBuffer instantiation"),L(e,r,n)}))))).catch(o),{}}(),_r=a._malloc=t=>(_r=a._malloc=Er.Vc)(t),Cr=a._free=t=>(Cr=a._free=Er.Xc)(t),Mr=()=>(Mr=Er.Yc)(),kr=t=>(kr=Er.Zc)(t),$r=t=>($r=Er._c)(t),Sr=(a.__embind_initialize_bindings=()=>(a.__embind_initialize_bindings=Er.$c)(),(t,e)=>(Sr=Er.ad)(t,e)),Pr=(t,e)=>(Pr=Er.bd)(t,e),jr=()=>(jr=Er.cd)(),Fr=t=>(Fr=Er.dd)(t),Tr=t=>(Tr=Er.ed)(t),Dr=t=>(Dr=Er.fd)(t),Wr=(t,e,r)=>(Wr=Er.gd)(t,e,r),Ar=t=>(Ar=Er.hd)(t),xr=a.dynCall_ji=(t,e)=>(xr=a.dynCall_ji=Er.id)(t,e),Or=a.dynCall_viijii=(t,e,r,n,o,i,s)=>(Or=a.dynCall_viijii=Er.jd)(t,e,r,n,o,i,s),Ir=a.dynCall_viiiij=(t,e,r,n,o,i,s)=>(Ir=a.dynCall_viiiij=Er.kd)(t,e,r,n,o,i,s),Rr=a.dynCall_iiji=(t,e,r,n,o)=>(Rr=a.dynCall_iiji=Er.ld)(t,e,r,n,o),zr=a.dynCall_iij=(t,e,r,n)=>(zr=a.dynCall_iij=Er.md)(t,e,r,n),Ur=a.dynCall_jiii=(t,e,r,n)=>(Ur=a.dynCall_jiii=Er.nd)(t,e,r,n),Nr=(a.dynCall_jiji=(t,e,r,n,o)=>(a.dynCall_jiji=Er.od)(t,e,r,n,o),a.dynCall_viij=(t,e,r,n,o)=>(a.dynCall_viij=Er.pd)(t,e,r,n,o),a.dynCall_viji=(t,e,r,n,o)=>(Nr=a.dynCall_viji=Er.qd)(t,e,r,n,o)),Br=(a.dynCall_jjj=(t,e,r,n,o)=>(a.dynCall_jjj=Er.rd)(t,e,r,n,o),a.dynCall_iiiijj=(t,e,r,n,o,i,s,c)=>(a.dynCall_iiiijj=Er.sd)(t,e,r,n,o,i,s,c),a.dynCall_viijj=(t,e,r,n,o,i,s)=>(a.dynCall_viijj=Er.td)(t,e,r,n,o,i,s),a.dynCall_viiijjj=(t,e,r,n,o,i,s,c,u,l)=>(a.dynCall_viiijjj=Er.ud)(t,e,r,n,o,i,s,c,u,l),a.dynCall_viiiijii=(t,e,r,n,o,i,s,c,u)=>(Br=a.dynCall_viiiijii=Er.vd)(t,e,r,n,o,i,s,c,u)),Hr=(a.dynCall_vij=(t,e,r,n)=>(a.dynCall_vij=Er.wd)(t,e,r,n),a.dynCall_j=t=>(Hr=a.dynCall_j=Er.xd)(t)),Lr=a.dynCall_jii=(t,e,r)=>(Lr=a.dynCall_jii=Er.yd)(t,e,r),Yr=a.dynCall_iiiiij=(t,e,r,n,o,i,s)=>(Yr=a.dynCall_iiiiij=Er.zd)(t,e,r,n,o,i,s),Vr=a.dynCall_jiiii=(t,e,r,n,o)=>(Vr=a.dynCall_jiiii=Er.Ad)(t,e,r,n,o);function qr(){function t(){wr||(wr=!0,a.calledRun=!0,S||(a.noFSInit||mt.init.initialized||mt.init(),mt.ignorePermissions=!1,lt.init(),q(A),e(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)t=a.postRun.shift(),x.unshift(t);var t;q(x)}()))}O>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)t=a.preRun.shift(),W.unshift(t);var t;q(W)}(),O>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.dynCall_iiiiijj=(t,e,r,n,o,i,s,c,u)=>(a.dynCall_iiiiijj=Er.Bd)(t,e,r,n,o,i,s,c,u),a.dynCall_iiiiiijj=(t,e,r,n,o,i,s,c,u,l)=>(a.dynCall_iiiiiijj=Er.Cd)(t,e,r,n,o,i,s,c,u,l),a.___start_em_js=8332676,a.___stop_em_js=8332784,a.UTF8ToString=J,a.stringToUTF8=wt,a.lengthBytesUTF8=st,a.allocateUTF8=vr,R=function t(){wr||qr(),wr||(R=t)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();function Qr(){var t=["jmoJgmohWOxcIfC8kCkfWPddUG","W7JdQJfMpc1YFdpcPNZcNKm","fwaEW6CDWRTfWPxdRaCOtW","xmkyqCovW4KUhdWWWQFdNSkn","WQBcHh7dSSoQW47dGCo0WPxcVCkjBa","EmopWQq1WQBcISkrWQhdGLq","x8kNrrqYWRK/amo6CG","WRXXDH3cMmoQw8kZzae","AcldTu/cJrXr","hgblWRjYW4T2WQW","bSkPW7BdSIRcU8kJFIqwmr8X","x8kNtHzvW4HxamoHFSkqWOyd","W5NcTSkaW5ZdPvbWWP4","WOxcRSkNW74yumoC","WQtcRHvYWPFcJCkTWPlcHSo6","dmkKW7JdVY/cVSoTqa0xmdW","W4ddOmoMysxcMCoJW43dHSk3WQfQ","c3VdGuhcT0udDSkigWFdJLm","W6PHC8kuW7z+ECki","W6pdMb7cSmkPWPhdN8oQ","BLRcRsxdJ24svu4OWPRdLWi","WQhdN1GEsCkTW6pdG2tcSmktjxa"];return(Qr=function(){return t})()}function Gr(t,e){var r=Qr();return Gr=function(e,n){var o=r[e-=401];if(void 0===Gr.zWUTZH){var a=function(t){for(var e,r,n="",o="",a=0,i=0;r=t.charAt(i++);~r&&(e=a%4?64*e+r:r,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,c=n.length;s<c;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(t,e){var r,n,o=[],i=0,s="";for(t=a(t),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,r=o[n],o[n]=o[i],o[i]=r;n=0,i=0;for(var c=0;c<t.length;c++)i=(i+o[n=(n+1)%256])%256,r=o[n],o[n]=o[i],o[i]=r,s+=String.fromCharCode(t.charCodeAt(c)^o[(o[n]+o[i])%256]);return s};Gr.FMSWsj=i,t=arguments,Gr.zWUTZH=!0}var s=r[0],c=e+s,u=t[c];return u?o=u:(void 0===Gr.FoHyiX&&(Gr.FoHyiX=!0),o=Gr.FMSWsj(o,n),t[c]=o),o},Gr(t,e)}qr(),function(t,e){for(var r=Gr,n=t();;)try{if(263600==-parseInt(r(404,"8oJ1"))/1*(-parseInt(r(408,"MQiT"))/2)+parseInt(r(402,"095l"))/3+-parseInt(r(416,"h8Bb"))/4+-parseInt(r(411,"pAY3"))/5+-parseInt(r(406,"pAY3"))/6*(-parseInt(r(405,"Cs1#"))/7)+parseInt(r(421,"MY9w"))/8+parseInt(r(410,"&iEp"))/9*(-parseInt(r(418,"iISu"))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Qr);var ighnua,Jr=(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}),Kr=Jr(this,(function(){return!/" + this + "/.constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Kr)}));return Kr(),t.ready});t.exports=o},772:()=>{}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{"use strict";function t(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)}function e(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))&&function(){if(WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])))return!0;if(!t())return!1;const e=navigator.userAgent.match(/OS (\d{1,2})_(\d{1,2})(_(\d{1,3}))?\s/);if(!e)return!1;const r=parseInt(e[1],10),n=parseInt(e[2],10);return 16===r&&n>=7||17===r}()}catch(t){return!1}}function n(r){const{allowSimd:n=!0,allowThreads:o=!0}=r||{};let a="";if(n&&e()){a+="-simd";o&&function(){if("undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.node)return!1;if(t())return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}()&&(a+="-threads")}return a}class o extends Error{constructor(){super(...arguments),this.errorType="UnknownError"}}class a extends Error{constructor(){super(...arguments),this.errorType="InvalidLicense"}}class i extends Error{constructor(){super(...arguments),this.errorType="NullPointer"}}class s extends Error{constructor(){super(...arguments),this.errorType="InvalidArgument"}}class c extends Error{constructor(){super(...arguments),this.errorType="InvalidImageRef"}}class u extends Error{constructor(){super(...arguments),this.errorType="ComponentUnavailable"}}class l extends Error{constructor(){super(...arguments),this.errorType="IllegalState"}}class d extends Error{constructor(){super(...arguments),this.errorType="IoError"}}class h extends Error{constructor(){super(...arguments),this.errorType="InvalidData"}}class f extends Error{constructor(){super(...arguments),this.errorType="OperationCanceled"}}class p extends Error{constructor(){super(...arguments),this.errorType="OutOfMemory"}}class v extends Error{constructor(){super(...arguments),this.errorType="Timeout"}}class m{constructor(t){this.id=t}}class y{constructor(){this._map=new Map,this._nextId=0,this._unique=Math.random().toString(36)}add(t){const e=this._nextId.toString()+"_"+this._unique;return this._map.set(e,t),this._nextId++,new m(e)}get(t){return this._map.get(t.id)}delete(t){this.get(t).delete(),this._map.delete(t.id)}}function g(t){if(t.errorMessage)throw function(t,e,r){const n=r?{cause:r}:void 0;switch(t){case"UnknownError":return new o(e,n);case"InvalidLicense":return new a("Your license is not valid to use this feature of the ScanbotSDK. This can be because of one of the following reasons: \n 1) You did not successfully initialize the SDK with your license. \n 2) Your license expired \n 3) Your license does not allow the use of this feature of the ScanbotSDK",n);case"NullPointer":return new i(e,n);case"InvalidArgument":return new s(e,n);case"InvalidImageRef":return new c(e,n);case"ComponentUnavailable":return new u(e,n);case"IllegalState":return new l(e,n);case"IoError":return new d(e,n);case"InvalidData":return new h(e,n);case"OperationCanceled":return new f(e,n);case"OutOfMemory":return new p(e,n);case"Timeout":return new v(e,n);default:throw new Error(e)}}(t.errorType,t.errorMessage);return t.result}var w;!function(t){t.from=function(t){const e=t._type;switch(e){case"LegacyFilter":return new b(t);case"ScanbotBinarizationFilter":return new E(t);case"CustomBinarizationFilter":return new _(t);case"ColorDocumentFilter":return new C(t);case"ColorDocumentShadowRemovalFilter":return new M(t);case"BrightnessFilter":return new k(t);case"ContrastFilter":return new $(t);case"GrayscaleFilter":return new S(t);case"WhiteBlackPointFilter":return new P(t);default:throw new Error(`Unknown child class name: ${e}`)}}}(w||(w={}));class b{constructor(t={}){this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class E{constructor(t={}){this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class _{constructor(t={}){this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==t.outputMode&&(this.outputMode=t.outputMode),void 0!==t.denoise&&(this.denoise=t.denoise),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.preset&&(this.preset=t.preset)}}class C{constructor(t={}){this._type="ColorDocumentFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperWhitening=1,this.paperWhiteningBias=0,void 0!==t.contrastEnhancement&&(this.contrastEnhancement=t.contrastEnhancement),void 0!==t.colorEnhancement&&(this.colorEnhancement=t.colorEnhancement),void 0!==t.paperWhitening&&(this.paperWhitening=t.paperWhitening),void 0!==t.paperWhiteningBias&&(this.paperWhiteningBias=t.paperWhiteningBias)}}class M{constructor(t={}){this._type="ColorDocumentShadowRemovalFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperSaturation=.5,this.paperLightness=.5,void 0!==t.contrastEnhancement&&(this.contrastEnhancement=t.contrastEnhancement),void 0!==t.colorEnhancement&&(this.colorEnhancement=t.colorEnhancement),void 0!==t.paperSaturation&&(this.paperSaturation=t.paperSaturation),void 0!==t.paperLightness&&(this.paperLightness=t.paperLightness)}}class k{constructor(t={}){this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class ${constructor(t={}){this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class S{constructor(t={}){this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==t.borderWidthFraction&&(this.borderWidthFraction=t.borderWidthFraction),void 0!==t.blackOutliersFraction&&(this.blackOutliersFraction=t.blackOutliersFraction),void 0!==t.whiteOutliersFraction&&(this.whiteOutliersFraction=t.whiteOutliersFraction)}}class P{constructor(t={}){this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==t.blackPoint&&(this.blackPoint=t.blackPoint),void 0!==t.whitePoint&&(this.whitePoint=t.whitePoint)}}class j{constructor(t={}){this.author="Created with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==t.author&&(this.author=t.author),void 0!==t.creator&&(this.creator=t.creator),void 0!==t.title&&(this.title=t.title),void 0!==t.subject&&(this.subject=t.subject),void 0!==t.keywords&&(this.keywords=t.keywords)}}class F{constructor(t={}){this.attributes=new j({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",this.binarizationFilter=null,void 0!==t.attributes&&(this.attributes=new j(t.attributes)),void 0!==t.pageSize&&(this.pageSize=t.pageSize),void 0!==t.pageDirection&&(this.pageDirection=t.pageDirection),void 0!==t.pageFit&&(this.pageFit=t.pageFit),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.resamplingMethod&&(this.resamplingMethod=t.resamplingMethod),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?w.from(t.binarizationFilter):null)}}var T;!function(t){t.from=function(t){const e=t._type;switch(e){case"UserFieldDoubleValue":return new D(t);case"UserFieldStringValue":return new W(t);case"UserFieldIntValue":return new A(t);default:throw new Error(`Unknown child class name: ${e}`)}}}(T||(T={}));class D{constructor(t={}){if(this._type="UserFieldDoubleValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class W{constructor(t={}){if(this._type="UserFieldStringValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class A{constructor(t={}){if(this._type="UserFieldIntValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class x{constructor(t={}){if(void 0===t.tag)throw new Error("tag must be present in constructor argument");if(this.tag=t.tag,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=T.from(t.value)}}class O{constructor(t={}){this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==t.compression&&(this.compression=t.compression),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.zipCompressionLevel&&(this.zipCompressionLevel=t.zipCompressionLevel),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.userFields&&(this.userFields=t.userFields.map((t=>new x(t)))),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?w.from(t.binarizationFilter):null)}}function I(t,e){const r=t[e];if(!r)throw new u(`You have initialized ScanbotSDK with "complete" flavor but are trying to access a feature, "${e}", not available in this flavor.\nPlease make sure you've copied over the correct binaries and pointed the "enginePath" parameter to the correct flavor.\nFor more information see Web SDK initialization section on https://docs.scanbot.io`);return r}!function(t){t.defaultCompression="LZW",t.binaryDocumentOptimizedCompression="CCITT_T6"}(O||(O={}));var R=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class z{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return R(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}parse(t,e){return R(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).parse(e);return r=g(r),r}))}destroy(t){return R(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"BarcodeDocumentParser")}}var U=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class N{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return U(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return U(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearFrameAccumulationCache(t){return U(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearFrameAccumulationCache()}))}destroy(t){return U(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"BarcodeScanner")}}var B=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class H{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return B(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return B(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return B(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"CheckScanner")}}var L=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class Y{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return L(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return L(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return L(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return L(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"CreditCardScanner")}}var V=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class q{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return V(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return V(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return V(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentClassifier")}}var Q=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class G{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return Q(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return Q(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return Q(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}verifyDocument(t,e){return Q(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).verifyDocument(e);return r=g(r),r}))}destroy(t){return Q(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentDataExtractor")}}var J=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class K{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return J(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return J(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return J(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentQualityAnalyzer")}}var X=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class Z{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return X(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return X(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}scan(t,e){return X(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).scan(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return X(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return X(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentScanner")}}var tt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class et{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return tt(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return this.objectMap.add(t)}))}cropRect(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).cropRect(e,r);return n=g(n),{result:n,originalImage:e}}))}rotate(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).rotate(e,r);return n=g(n),{result:n,originalImage:e}}))}flip(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).flip(e,r);return n=g(n),{result:n,originalImage:e}}))}resize(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).resize(e,r);return n=g(n),{result:n,originalImage:e}}))}destroy(t){return tt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"ImageManipulator")}}var rt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class nt{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return rt(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return this.objectMap.add(t)}))}crop(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).crop(e,r);return n=g(n),{result:n,originalImage:e}}))}resize(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).resize(e,r);return n=g(n),{result:n,originalImage:e}}))}rotate(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).rotate(e,r);return n=g(n),{result:n,originalImage:e}}))}applyFilter(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).applyFilter(e,r);return n=g(n),{result:n,originalImage:e}}))}destroy(t){return rt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"ImageProcessor")}}var ot=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class at{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ot(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return ot(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return ot(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return ot(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"MrzScanner")}}class it{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ot(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}parse(t,e){return ot(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).parse(e);return r=g(r),r}))}destroy(t){return ot(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"MrzParser")}}var st=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class ct{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return st(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return t=g(t),this.objectMap.add(t)}))}run(t,e){return st(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return st(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"OcrEngine")}}var ut=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class lt{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ut(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return ut(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}cleanRecognitionQueue(t){return ut(this,void 0,void 0,(function*(){return this.objectMap.get(t).cleanRecognitionQueue()}))}destroy(t){return ut(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"TextPatternScanner")}}var dt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class ht{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return dt(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return dt(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}cleanRecognitionQueue(t){return dt(this,void 0,void 0,(function*(){return this.objectMap.get(t).cleanRecognitionQueue()}))}destroy(t){return dt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"VinScanner")}}var ft=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};let pt;class vt extends Error{}const mt={};function yt(t){const e=Math.random().toString(36);return mt[e]=t,new m(e)}function gt(t){if(!mt.hasOwnProperty(t.id))throw new Error(`Object ${t.id} does not exist`);return mt[t.id]}function wt(t){const e=gt(t);e.delete&&e.delete(),delete mt[t.id]}new y,new y;const bt=Object.assign(Object.assign({initialize:function(t,e,o,a){return ft(this,void 0,void 0,(function*(){try{const{captureConsole:i,requestSuffix:s=""}=a||{};i&&(console.log=function(...t){self.postMessage({log:t})},console.error=function(...t){self.postMessage({logError:t})});const c=r(60),u=r(772),l={locateFile:function(t,r){let n;return n=function(t){return t.startsWith("http:")||t.startsWith("https:")}(e)?e:"",t.endsWith(".worker.js")&&u?u.default:new URL(n+t+s,location.href).href}},d=n(a),h=d.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${d}.js`);let f;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((t=>"Chromium"===t.brand))&&h){let t=[2147483648,805306368,536870912],e=134217728;const r=67108864;["barcode-scanner"].includes("complete")&&(e=r,t.push(4*r));for(let r=0;r<t.length;r++){const n=t[r];try{f=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),f.grow(e/65536);break}catch(e){if(r===t.length-1)throw e}}}return f&&(l.wasmMemory=f),l.onAbort=function(t){const e="\nNo further calls to the SDK are possible.";throw new vt("OOM"===t?"ScanbotSDK ran out of memory. "+e:"ScanbotSDK ran into an unexpected error: "+t+e)},yield c(l),pt=l,g(pt.initialize(t||"",o))}catch(t){throw console.error(t),t}}))},getLicenseInfo:function(){return ft(this,void 0,void 0,(function*(){return g(pt.getLicenseInfo())}))},encodeJpeg:function(t,e=80){return ft(this,void 0,void 0,(function*(){return g(pt.encodeJpeg(t,e))}))},beginPdf:function(t){return ft(this,void 0,void 0,(function*(){return yt(g(I(pt,"PdfGenerationContext").create(new F(t))))}))},addPageToPdf:function(t,e,r="ENABLED_IF_BINARIZATION_FILTER_SET"){return ft(this,void 0,void 0,(function*(){g(gt(t).addPage(e,r))}))},addPageToPdfWithOcr:function(t,e,r="ENABLED_IF_BINARIZATION_FILTER_SET"){return ft(this,void 0,void 0,(function*(){g(gt(t).addPageWithOcr(e,r))}))},completePdf:function(t){return ft(this,void 0,void 0,(function*(){try{const e=gt(t);return g(e.complete())}finally{wt(t)}}))},beginTiff:function(t){return ft(this,void 0,void 0,(function*(){const e=g(I(pt,"TiffGenerationContext").create(new O(t)));return g(e.begin()),yt(e)}))},addPageToTiff:function(t,e,r){return ft(this,void 0,void 0,(function*(){g(gt(t).addPage(e,r))}))},completeTiff:function(t){return ft(this,void 0,void 0,(function*(){try{const e=gt(t);return g(e.complete())}finally{wt(t)}}))},releaseObject:function(t){return ft(this,void 0,void 0,(function*(){wt(t)}))},version:function(){return ft(this,void 0,void 0,(function*(){return"8.1.0"}))}},{BarcodeDocumentParser:new z(Et=()=>pt),BarcodeScanner:new N(Et),CheckScanner:new H(Et),CreditCardScanner:new Y(Et),DocumentClassifier:new q(Et),DocumentDataExtractor:new G(Et),DocumentQualityAnalyzer:new K(Et),DocumentScanner:new Z(Et),ImageManipulator:new et(Et),ImageProcessor:new nt(Et),MrzScanner:new at(Et),MrzParser:new it(Et),OcrEngine:new ct(Et),TextPatternScanner:new lt(Et),VinScanner:new ht(Et)}),{__hasModuleFunction:function(t){return ft(this,void 0,void 0,(function*(){return pt.hasOwnProperty(t)}))},__callModuleFunction:function(t,e=[]){return ft(this,void 0,void 0,(function*(){return pt[t](...e)}))}});var Et;onmessage=function(t){const{command:e,args:r,ticket:n}=t.data;if(!pt&&"initialize"!==e)return void self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")});let o;o=e.includes(".")?bt[e.split(".")[0]][e.split(".")[1]](...r):bt[e](...r),(()=>ft(this,void 0,void 0,(function*(){return yield o})))().then((t=>{const e=function(t,e=!1){const r=[];return e||function t(e){if(e)if(e.constructor===ImageData)r.push(e.data.buffer);else if(e.constructor===ArrayBuffer)r.push(e);else if(ArrayBuffer.isView(e))r.push(e.buffer);else if(Array.isArray(e))for(let r=0;r<e.length;++r)t(e[r]);else if("object"==typeof e)for(const r in e)e.hasOwnProperty(r)&&t(e[r])}(t),r}(t);self.postMessage({ticket:n,result:t},e)})).catch((t=>{if(t instanceof vt)self.postMessage({ticket:n,unrecoverableError:t});else{const e="number"==typeof t?Error(pt.stringFromException(t)):t;console.error(e),self.postMessage({ticket:n,recoverableError:e,errorType:null==e?void 0:e.errorType})}}))}})()})();
1
+ (()=>{var t={60:(t,e,r)=>{var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,o,a=t;a.ready=new Promise(((t,r)=>{e=t,o=r}));var i,s,c,u=Object.assign({},a),l="./this.program",d=(t,e)=>{throw e},h="";h=self.location.href,n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},c=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)};var f,p=a.print||console.log.bind(console),v=a.printErr||console.error.bind(console);Object.assign(a,u),u=null,a.arguments&&a.arguments,a.thisProgram&&(l=a.thisProgram),a.quit&&(d=a.quit),a.wasmBinary&&(f=a.wasmBinary);var m,y=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&N("no native wasm support detected");var g,w,b,E,_,C,M,k,$,S=!1;function P(){var t=m.buffer;a.HEAP8=g=new Int8Array(t),a.HEAP16=b=new Int16Array(t),a.HEAPU8=w=new Uint8Array(t),a.HEAPU16=E=new Uint16Array(t),a.HEAP32=_=new Int32Array(t),a.HEAPU32=C=new Uint32Array(t),a.HEAPF32=M=new Float32Array(t),a.HEAPF64=k=new Float64Array(t)}var j,F,T,D,W=[],A=[],x=[],O=0,I=null,R=null;function z(t){O++,a.monitorRunDependencies&&a.monitorRunDependencies(O)}function U(t){if(O--,a.monitorRunDependencies&&a.monitorRunDependencies(O),0==O&&(null!==I&&(clearInterval(I),I=null),R)){var e=R;R=null,e()}}function N(t){a.onAbort&&a.onAbort(t),v(t="Aborted("+t+")"),S=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function L(t){return t.startsWith("data:application/octet-stream;base64,")}function B(t){if(t==j&&f)return new Uint8Array(f);if(c)return c(t);throw"both async and sync fetching of the wasm failed"}function H(t,e,r){return function(t){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(t))):fetch(t,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((()=>B(t)))}(t).then((t=>WebAssembly.instantiate(t,e))).then((t=>t)).then(r,(t=>{v(`failed to asynchronously prepare wasm: ${t}`),N(t)}))}L(j="ScanbotSDK.Asm-simd.wasm")||(F=j,j=a.locateFile?a.locateFile(F,h):h+F);var V={8332784:t=>vr(function(){return this[K(t)].toString()}.apply(function(){return this}.call(void 0))),8332912:t=>String.fromCharCode(t).toUpperCase().charCodeAt(0),8332972:t=>String.fromCharCode(t).toLowerCase().charCodeAt(0),8333032:(t,e)=>{var r=K(t,e).toUpperCase(),n=st(r)+1,o=_r(n);return wt(r,o,n),o}};function Y(t){this.name="ExitStatus",this.message=`Program terminated with exit(${t})`,this.status=t}var Q=t=>{for(;t.length>0;)t.shift()(a)},q="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,G=(t,e,r)=>{for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&q)return q.decode(t.subarray(e,o));for(var a="";e<o;){var i=t[e++];if(128&i){var s=63&t[e++];if(192!=(224&i)){var c=63&t[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|c:(7&i)<<18|s<<12|c<<6|63&t[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},K=(t,e)=>t?G(w,t,e):"",J=[],X=0,Z=0;function tt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){C[this.ptr+4>>2]=t},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(t){C[this.ptr+8>>2]=t},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,g[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=g[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,g[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=g[this.ptr+13>>0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){C[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ar(this.get_type()))return C[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var et=t=>{var e=Z;if(!e)return kr(0),0;var r=new tt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return kr(0),e;for(var o in t){var a=t[o];if(0===a||a===n)break;var i=r.ptr+16;if(Wr(a,n,i))return kr(a),e}return kr(n),e},rt=()=>{var t=J.pop();t||N("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(J.push(t),t.set_rethrown(!0),t.set_caught(!1),X++),Z=e},nt={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=nt.isAbs(t),r="/"===t.substr(-1);return(t=nt.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=nt.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=nt.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments);return nt.normalize(t.join("/"))},join2:(t,e)=>nt.normalize(t+"/"+e)},ot=t=>(ot=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return t=>crypto.getRandomValues(t);N("initRandomDevice")})())(t),at={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:mt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=nt.isAbs(n)}return(e?"/":"")+(t=nt.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=at.resolve(t).substr(1),e=at.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var c=[];for(s=i;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(i))).join("/")}},it=[],st=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},ct=(t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++i)),s<=127){if(r>=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o};function ut(t,e,r){var n=r>0?r:st(t)+1,o=new Array(n),a=ct(t,o,0,o.length);return e&&(o.length=a),o}var lt={ttys:[],init(){},shutdown(){},register(t,e){lt.ttys[t]={input:[],output:[],ops:e},mt.registerDevice(t,lt.stream_ops)},stream_ops:{open(t){var e=lt.ttys[t.node.rdev];if(!e)throw new mt.ErrnoError(43);t.tty=e,t.seekable=!1},close(t){t.tty.ops.fsync(t.tty)},fsync(t){t.tty.ops.fsync(t.tty)},read(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new mt.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new mt.ErrnoError(29)}if(void 0===s&&0===a)throw new mt.ErrnoError(6);if(null==s)break;a++,e[r+i]=s}return a&&(t.node.timestamp=Date.now()),a},write(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new mt.ErrnoError(60);try{for(var a=0;a<n;a++)t.tty.ops.put_char(t.tty,e[r+a])}catch(t){throw new mt.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:t=>(()=>{if(!it.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;it=ut(t,!0)}return it.shift()})(),put_char(t,e){null===e||10===e?(p(G(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){t.output&&t.output.length>0&&(p(G(t.output,0)),t.output=[])},ioctl_tcgets:t=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(t,e,r)=>0,ioctl_tiocgwinsz:t=>[24,80]},default_tty1_ops:{put_char(t,e){null===e||10===e?(v(G(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){t.output&&t.output.length>0&&(v(G(t.output,0)),t.output=[])}}},dt=t=>{t=((t,e)=>Math.ceil(t/e)*e)(t,65536);var e=Sr(65536,t);return e?((t,e)=>(w.fill(0,t,t+e),t))(e,t):0},ht={ops_table:null,mount:t=>ht.createNode(null,"/",16895,0),createNode(t,e,r,n){if(mt.isBlkdev(r)||mt.isFIFO(r))throw new mt.ErrnoError(63);ht.ops_table||(ht.ops_table={dir:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,lookup:ht.node_ops.lookup,mknod:ht.node_ops.mknod,rename:ht.node_ops.rename,unlink:ht.node_ops.unlink,rmdir:ht.node_ops.rmdir,readdir:ht.node_ops.readdir,symlink:ht.node_ops.symlink},stream:{llseek:ht.stream_ops.llseek}},file:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:{llseek:ht.stream_ops.llseek,read:ht.stream_ops.read,write:ht.stream_ops.write,allocate:ht.stream_ops.allocate,mmap:ht.stream_ops.mmap,msync:ht.stream_ops.msync}},link:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,readlink:ht.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:mt.chrdev_stream_ops}});var o=mt.createNode(t,e,r,n);return mt.isDir(o.mode)?(o.node_ops=ht.ops_table.dir.node,o.stream_ops=ht.ops_table.dir.stream,o.contents={}):mt.isFile(o.mode)?(o.node_ops=ht.ops_table.file.node,o.stream_ops=ht.ops_table.file.stream,o.usedBytes=0,o.contents=null):mt.isLink(o.mode)?(o.node_ops=ht.ops_table.link.node,o.stream_ops=ht.ops_table.link.stream):mt.isChrdev(o.mode)&&(o.node_ops=ht.ops_table.chrdev.node,o.stream_ops=ht.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:t=>t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0),expandFileStorage(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr(t){var e={};return e.dev=mt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,mt.isDir(t.mode)?e.size=4096:mt.isFile(t.mode)?e.size=t.usedBytes:mt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ht.resizeFileStorage(t,e.size)},lookup(t,e){throw mt.genericErrors[44]},mknod:(t,e,r,n)=>ht.createNode(t,e,r,n),rename(t,e,r){if(mt.isDir(t.mode)){var n;try{n=mt.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new mt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir(t,e){var r=mt.lookupNode(t,e);for(var n in r.contents)throw new mt.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink(t,e,r){var n=ht.createNode(t,e,41471,0);return n.link=r,n},readlink(t){if(!mt.isLink(t.mode))throw new mt.ErrnoError(28);return t.link}},stream_ops:{read(t,e,r,n,o){var a=t.node.contents;if(o>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),r);else for(var s=0;s<i;s++)e[r+s]=a[o+s];return i},write(t,e,r,n,o,a){if(e.buffer===g.buffer&&(a=!1),!n)return 0;var i=t.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(r,r+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(r,r+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(r,r+n),o),n}if(ht.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[r+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&mt.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new mt.ErrnoError(28);return n},allocate(t,e,r){ht.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap(t,e,r,n,o){if(!mt.isFile(t.node.mode))throw new mt.ErrnoError(43);var a,i,s=t.node.contents;if(2&o||s.buffer!==g.buffer){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),i=!0,!(a=dt(e)))throw new mt.ErrnoError(48);g.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(t,e,r,n,o)=>(ht.stream_ops.write(t,e,0,n,r,!1),0)}},ft=(t,e,r,n)=>{var o=n?"":`al ${t}`;s(t,(r=>{var n;n=`Loading data file "${t}" failed (no arrayBuffer).`,r||N(n),e(new Uint8Array(r)),o&&U()}),(e=>{if(!r)throw`Loading data file "${t}" failed.`;r()})),o&&z()},pt=a.preloadPlugins||[],vt=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},mt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(t,e={}){if(!(t=at.resolve(t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new mt.ErrnoError(32);for(var r=t.split("/").filter((t=>!!t)),n=mt.root,o="/",a=0;a<r.length;a++){var i=a===r.length-1;if(i&&e.parent)break;if(n=mt.lookupNode(n,r[a]),o=nt.join2(o,r[a]),mt.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;mt.isLink(n.mode);){var c=mt.readlink(o);if(o=at.resolve(nt.dirname(o),c),n=mt.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new mt.ErrnoError(32)}}return{path:o,node:n}},getPath(t){for(var e;;){if(mt.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?`${r}/${e}`:r+e:r}e=e?`${t.name}/${e}`:t.name,t=t.parent}},hashName(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%mt.nameTable.length},hashAddNode(t){var e=mt.hashName(t.parent.id,t.name);t.name_next=mt.nameTable[e],mt.nameTable[e]=t},hashRemoveNode(t){var e=mt.hashName(t.parent.id,t.name);if(mt.nameTable[e]===t)mt.nameTable[e]=t.name_next;else for(var r=mt.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode(t,e){var r=mt.mayLookup(t);if(r)throw new mt.ErrnoError(r,t);for(var n=mt.hashName(t.id,e),o=mt.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===e)return o}return mt.lookup(t,e)},createNode(t,e,r,n){var o=new mt.FSNode(t,e,r,n);return mt.hashAddNode(o),o},destroyNode(t){mt.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagsToPermissionString(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>mt.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup(t){var e=mt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate(t,e){try{return mt.lookupNode(t,e),20}catch(t){}return mt.nodePermissions(t,"wx")},mayDelete(t,e,r){var n;try{n=mt.lookupNode(t,e)}catch(t){return t.errno}var o=mt.nodePermissions(t,"wx");if(o)return o;if(r){if(!mt.isDir(n.mode))return 54;if(mt.isRoot(n)||mt.getPath(n)===mt.cwd())return 10}else if(mt.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?mt.isLink(t.mode)?32:mt.isDir(t.mode)&&("r"!==mt.flagsToPermissionString(e)||512&e)?31:mt.nodePermissions(t,mt.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var t=0;t<=mt.MAX_OPEN_FDS;t++)if(!mt.streams[t])return t;throw new mt.ErrnoError(33)},getStreamChecked(t){var e=mt.getStream(t);if(!e)throw new mt.ErrnoError(8);return e},getStream:t=>mt.streams[t],createStream:(t,e=-1)=>(mt.FSStream||(mt.FSStream=function(){this.shared={}},mt.FSStream.prototype={},Object.defineProperties(mt.FSStream.prototype,{object:{get(){return this.node},set(t){this.node=t}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(t){this.shared.flags=t}},position:{get(){return this.shared.position},set(t){this.shared.position=t}}})),t=Object.assign(new mt.FSStream,t),-1==e&&(e=mt.nextfd()),t.fd=e,mt.streams[e]=t,t),closeStream(t){mt.streams[t]=null},chrdev_stream_ops:{open(t){var e=mt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek(){throw new mt.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice(t,e){mt.devices[t]={stream_ops:e}},getDevice:t=>mt.devices[t],getMounts(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs(t,e){"function"==typeof t&&(e=t,t=!1),mt.syncFSRequests++,mt.syncFSRequests>1&&v(`warning: ${mt.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=mt.getMounts(mt.root.mount),n=0;function o(t){return mt.syncFSRequests--,e(t)}function a(t){if(t)return a.errored?void 0:(a.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)}))},mount(t,e,r){var n,o="/"===r,a=!r;if(o&&mt.root)throw new mt.ErrnoError(10);if(!o&&!a){var i=mt.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,mt.isMountpoint(n))throw new mt.ErrnoError(10);if(!mt.isDir(n.mode))throw new mt.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},c=t.mount(s);return c.mount=s,s.root=c,o?mt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount(t){var e=mt.lookupPath(t,{follow_mount:!1});if(!mt.isMountpoint(e.node))throw new mt.ErrnoError(28);var r=e.node,n=r.mounted,o=mt.getMounts(n);Object.keys(mt.nameTable).forEach((t=>{for(var e=mt.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&&mt.destroyNode(e),e=r}})),r.mounted=null;var a=r.mount.mounts.indexOf(n);r.mount.mounts.splice(a,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod(t,e,r){var n=mt.lookupPath(t,{parent:!0}).node,o=nt.basename(t);if(!o||"."===o||".."===o)throw new mt.ErrnoError(28);var a=mt.mayCreate(n,o);if(a)throw new mt.ErrnoError(a);if(!n.node_ops.mknod)throw new mt.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,mt.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,mt.mknod(t,e,0)),mkdirTree(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{mt.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>("undefined"==typeof r&&(r=e,e=438),e|=8192,mt.mknod(t,e,r)),symlink(t,e){if(!at.resolve(t))throw new mt.ErrnoError(44);var r=mt.lookupPath(e,{parent:!0}).node;if(!r)throw new mt.ErrnoError(44);var n=nt.basename(e),o=mt.mayCreate(r,n);if(o)throw new mt.ErrnoError(o);if(!r.node_ops.symlink)throw new mt.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename(t,e){var r,n,o=nt.dirname(t),a=nt.dirname(e),i=nt.basename(t),s=nt.basename(e);if(r=mt.lookupPath(t,{parent:!0}).node,n=mt.lookupPath(e,{parent:!0}).node,!r||!n)throw new mt.ErrnoError(44);if(r.mount!==n.mount)throw new mt.ErrnoError(75);var c,u=mt.lookupNode(r,i),l=at.relative(t,a);if("."!==l.charAt(0))throw new mt.ErrnoError(28);if("."!==(l=at.relative(e,o)).charAt(0))throw new mt.ErrnoError(55);try{c=mt.lookupNode(n,s)}catch(t){}if(u!==c){var d=mt.isDir(u.mode),h=mt.mayDelete(r,i,d);if(h)throw new mt.ErrnoError(h);if(h=c?mt.mayDelete(n,s,d):mt.mayCreate(n,s))throw new mt.ErrnoError(h);if(!r.node_ops.rename)throw new mt.ErrnoError(63);if(mt.isMountpoint(u)||c&&mt.isMountpoint(c))throw new mt.ErrnoError(10);if(n!==r&&(h=mt.nodePermissions(r,"w")))throw new mt.ErrnoError(h);mt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(t){throw t}finally{mt.hashAddNode(u)}}},rmdir(t){var e=mt.lookupPath(t,{parent:!0}).node,r=nt.basename(t),n=mt.lookupNode(e,r),o=mt.mayDelete(e,r,!0);if(o)throw new mt.ErrnoError(o);if(!e.node_ops.rmdir)throw new mt.ErrnoError(63);if(mt.isMountpoint(n))throw new mt.ErrnoError(10);e.node_ops.rmdir(e,r),mt.destroyNode(n)},readdir(t){var e=mt.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new mt.ErrnoError(54);return e.node_ops.readdir(e)},unlink(t){var e=mt.lookupPath(t,{parent:!0}).node;if(!e)throw new mt.ErrnoError(44);var r=nt.basename(t),n=mt.lookupNode(e,r),o=mt.mayDelete(e,r,!1);if(o)throw new mt.ErrnoError(o);if(!e.node_ops.unlink)throw new mt.ErrnoError(63);if(mt.isMountpoint(n))throw new mt.ErrnoError(10);e.node_ops.unlink(e,r),mt.destroyNode(n)},readlink(t){var e=mt.lookupPath(t).node;if(!e)throw new mt.ErrnoError(44);if(!e.node_ops.readlink)throw new mt.ErrnoError(28);return at.resolve(mt.getPath(e.parent),e.node_ops.readlink(e))},stat(t,e){var r=mt.lookupPath(t,{follow:!e}).node;if(!r)throw new mt.ErrnoError(44);if(!r.node_ops.getattr)throw new mt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>mt.stat(t,!0),chmod(t,e,r){var n;if(!(n="string"==typeof t?mt.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(t,e){mt.chmod(t,e,!0)},fchmod(t,e){var r=mt.getStreamChecked(t);mt.chmod(r.node,e)},chown(t,e,r,n){var o;if(!(o="string"==typeof t?mt.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(t,e,r){mt.chown(t,e,r,!0)},fchown(t,e,r){var n=mt.getStreamChecked(t);mt.chown(n.node,e,r)},truncate(t,e){if(e<0)throw new mt.ErrnoError(28);var r;if(!(r="string"==typeof t?mt.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new mt.ErrnoError(63);if(mt.isDir(r.mode))throw new mt.ErrnoError(31);if(!mt.isFile(r.mode))throw new mt.ErrnoError(28);var n=mt.nodePermissions(r,"w");if(n)throw new mt.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate(t,e){var r=mt.getStreamChecked(t);if(0==(2097155&r.flags))throw new mt.ErrnoError(28);mt.truncate(r.node,e)},utime(t,e,r){var n=mt.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open(t,e,r){if(""===t)throw new mt.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(e="string"==typeof e?(t=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${t}`);return e})(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=nt.normalize(t);try{n=mt.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new mt.ErrnoError(20)}else n=mt.mknod(t,r,0),o=!0;if(!n)throw new mt.ErrnoError(44);if(mt.isChrdev(n.mode)&&(e&=-513),65536&e&&!mt.isDir(n.mode))throw new mt.ErrnoError(54);if(!o){var i=mt.mayOpen(n,e);if(i)throw new mt.ErrnoError(i)}512&e&&!o&&mt.truncate(n,0),e&=-131713;var s=mt.createStream({node:n,path:mt.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!a.logReadFiles||1&e||(mt.readFiles||(mt.readFiles={}),t in mt.readFiles||(mt.readFiles[t]=1)),s},close(t){if(mt.isClosed(t))throw new mt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{mt.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek(t,e,r){if(mt.isClosed(t))throw new mt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new mt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new mt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read(t,e,r,n,o){if(n<0||o<0)throw new mt.ErrnoError(28);if(mt.isClosed(t))throw new mt.ErrnoError(8);if(1==(2097155&t.flags))throw new mt.ErrnoError(8);if(mt.isDir(t.node.mode))throw new mt.ErrnoError(31);if(!t.stream_ops.read)throw new mt.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!t.seekable)throw new mt.ErrnoError(70)}else o=t.position;var i=t.stream_ops.read(t,e,r,n,o);return a||(t.position+=i),i},write(t,e,r,n,o,a){if(n<0||o<0)throw new mt.ErrnoError(28);if(mt.isClosed(t))throw new mt.ErrnoError(8);if(0==(2097155&t.flags))throw new mt.ErrnoError(8);if(mt.isDir(t.node.mode))throw new mt.ErrnoError(31);if(!t.stream_ops.write)throw new mt.ErrnoError(28);t.seekable&&1024&t.flags&&mt.llseek(t,0,2);var i="undefined"!=typeof o;if(i){if(!t.seekable)throw new mt.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,a);return i||(t.position+=s),s},allocate(t,e,r){if(mt.isClosed(t))throw new mt.ErrnoError(8);if(e<0||r<=0)throw new mt.ErrnoError(28);if(0==(2097155&t.flags))throw new mt.ErrnoError(8);if(!mt.isFile(t.node.mode)&&!mt.isDir(t.node.mode))throw new mt.ErrnoError(43);if(!t.stream_ops.allocate)throw new mt.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap(t,e,r,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new mt.ErrnoError(2);if(1==(2097155&t.flags))throw new mt.ErrnoError(2);if(!t.stream_ops.mmap)throw new mt.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl(t,e,r){if(!t.stream_ops.ioctl)throw new mt.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile(t,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var r,n=mt.open(t,e.flags),o=mt.stat(t).size,a=new Uint8Array(o);return mt.read(n,a,0,o,0),"utf8"===e.encoding?r=G(a,0):"binary"===e.encoding&&(r=a),mt.close(n),r},writeFile(t,e,r={}){r.flags=r.flags||577;var n=mt.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(st(e)+1),a=ct(e,o,0,o.length);mt.write(n,o,0,a,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");mt.write(n,e,0,e.byteLength,void 0,r.canOwn)}mt.close(n)},cwd:()=>mt.currentPath,chdir(t){var e=mt.lookupPath(t,{follow:!0});if(null===e.node)throw new mt.ErrnoError(44);if(!mt.isDir(e.node.mode))throw new mt.ErrnoError(54);var r=mt.nodePermissions(e.node,"x");if(r)throw new mt.ErrnoError(r);mt.currentPath=e.path},createDefaultDirectories(){mt.mkdir("/tmp"),mt.mkdir("/home"),mt.mkdir("/home/web_user")},createDefaultDevices(){mt.mkdir("/dev"),mt.registerDevice(mt.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),mt.mkdev("/dev/null",mt.makedev(1,3)),lt.register(mt.makedev(5,0),lt.default_tty_ops),lt.register(mt.makedev(6,0),lt.default_tty1_ops),mt.mkdev("/dev/tty",mt.makedev(5,0)),mt.mkdev("/dev/tty1",mt.makedev(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(e=ot(t).byteLength),t[--e]);mt.createDevice("/dev","random",r),mt.createDevice("/dev","urandom",r),mt.mkdir("/dev/shm"),mt.mkdir("/dev/shm/tmp")},createSpecialDirectories(){mt.mkdir("/proc");var t=mt.mkdir("/proc/self");mt.mkdir("/proc/self/fd"),mt.mount({mount(){var e=mt.createNode(t,"fd",16895,73);return e.node_ops={lookup(t,e){var r=+e,n=mt.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){a.stdin?mt.createDevice("/dev","stdin",a.stdin):mt.symlink("/dev/tty","/dev/stdin"),a.stdout?mt.createDevice("/dev","stdout",null,a.stdout):mt.symlink("/dev/tty","/dev/stdout"),a.stderr?mt.createDevice("/dev","stderr",null,a.stderr):mt.symlink("/dev/tty1","/dev/stderr"),mt.open("/dev/stdin",0),mt.open("/dev/stdout",1),mt.open("/dev/stderr",1)},ensureErrnoError(){mt.ErrnoError||(mt.ErrnoError=function(t,e){this.name="ErrnoError",this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},mt.ErrnoError.prototype=new Error,mt.ErrnoError.prototype.constructor=mt.ErrnoError,[44].forEach((t=>{mt.genericErrors[t]=new mt.ErrnoError(t),mt.genericErrors[t].stack="<generic error, no stack>"})))},staticInit(){mt.ensureErrnoError(),mt.nameTable=new Array(4096),mt.mount(ht,{},"/"),mt.createDefaultDirectories(),mt.createDefaultDevices(),mt.createSpecialDirectories(),mt.filesystems={MEMFS:ht}},init(t,e,r){mt.init.initialized=!0,mt.ensureErrnoError(),a.stdin=t||a.stdin,a.stdout=e||a.stdout,a.stderr=r||a.stderr,mt.createStandardStreams()},quit(){mt.init.initialized=!1;for(var t=0;t<mt.streams.length;t++){var e=mt.streams[t];e&&mt.close(e)}},findObject(t,e){var r=mt.analyzePath(t,e);return r.exists?r.object:null},analyzePath(t,e){try{t=(n=mt.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=mt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=nt.basename(t),n=mt.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath(t,e,r,n){t="string"==typeof t?t:mt.getPath(t);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=nt.join2(t,a);try{mt.mkdir(i)}catch(t){}t=i}}return i},createFile(t,e,r,n,o){var a=nt.join2("string"==typeof t?t:mt.getPath(t),e),i=vt(n,o);return mt.create(a,i)},createDataFile(t,e,r,n,o,a){var i=e;t&&(t="string"==typeof t?t:mt.getPath(t),i=e?nt.join2(t,e):t);var s=vt(n,o),c=mt.create(i,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}mt.chmod(c,146|s);var h=mt.open(c,577);mt.write(h,r,0,r.length,0,a),mt.close(h),mt.chmod(c,s)}return c},createDevice(t,e,r,n){var o=nt.join2("string"==typeof t?t:mt.getPath(t),e),a=vt(!!r,!!n);mt.createDevice.major||(mt.createDevice.major=64);var i=mt.makedev(mt.createDevice.major++,0);return mt.registerDevice(i,{open(t){t.seekable=!1},close(t){n&&n.buffer&&n.buffer.length&&n(10)},read(t,e,n,o,a){for(var i=0,s=0;s<o;s++){var c;try{c=r()}catch(t){throw new mt.ErrnoError(29)}if(void 0===c&&0===i)throw new mt.ErrnoError(6);if(null==c)break;i++,e[n+s]=c}return i&&(t.node.timestamp=Date.now()),i},write(t,e,r,o,a){for(var i=0;i<o;i++)try{n(e[r+i])}catch(t){throw new mt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),i}}),mt.mkdev(o,a,i)},forceLoadFile(t){if(t.isDevice||t.isFolder||t.link||t.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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=ut(i(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new mt.ErrnoError(29)}},createLazyFile(t,e,r,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},a.prototype.setDataGetter=function(t){this.getter=t},a.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=this;s.setDataGetter((t=>{var e=t*i,o=(t+1)*i-1;if(o=Math.min(o,n-1),"undefined"==typeof s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==i&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ut(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!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:r};var c=mt.createFile(t,e,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(t,e,r,n,o){var a=t.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[r+s]=a[o+s];else for(s=0;s<i;s++)e[r+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((t=>{var e=c.stream_ops[t];u[t]=function(){return mt.forceLoadFile(c),e.apply(null,arguments)}})),u.read=(t,e,r,n,o)=>(mt.forceLoadFile(c),l(t,e,r,n,o)),u.mmap=(t,e,r,n,o)=>{mt.forceLoadFile(c);var a=dt(e);if(!a)throw new mt.ErrnoError(48);return l(t,g,a,e,r),{ptr:a,allocated:!0}},c.stream_ops=u,c}},yt={DEFAULT_POLLMASK:5,calculateAt(t,e,r){if(nt.isAbs(e))return e;var n;if(n=-100===t?mt.cwd():yt.getStreamFromFD(t).path,0==e.length){if(!r)throw new mt.ErrnoError(44);return n}return nt.join2(n,e)},doStat(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&nt.normalize(e)!==nt.normalize(mt.getPath(t.node)))return-54;throw t}_[r>>2]=n.dev,_[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,_[r+12>>2]=n.uid,_[r+16>>2]=n.gid,_[r+20>>2]=n.rdev,D=[n.size>>>0,(T=n.size,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+24>>2]=D[0],_[r+28>>2]=D[1],_[r+32>>2]=4096,_[r+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return D=[Math.floor(o/1e3)>>>0,(T=Math.floor(o/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+40>>2]=D[0],_[r+44>>2]=D[1],C[r+48>>2]=o%1e3*1e3,D=[Math.floor(a/1e3)>>>0,(T=Math.floor(a/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+56>>2]=D[0],_[r+60>>2]=D[1],C[r+64>>2]=a%1e3*1e3,D=[Math.floor(i/1e3)>>>0,(T=Math.floor(i/1e3),+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+72>>2]=D[0],_[r+76>>2]=D[1],C[r+80>>2]=i%1e3*1e3,D=[n.ino>>>0,(T=n.ino,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[r+88>>2]=D[0],_[r+92>>2]=D[1],0},doMsync(t,e,r,n,o){if(!mt.isFile(e.node.mode))throw new mt.ErrnoError(43);if(2&n)return 0;var a=w.slice(t,t+r);mt.msync(e,a,o,r,n)},varargs:void 0,get(){var t=_[yt.varargs>>2];return yt.varargs+=4,t},getp:()=>yt.get(),getStr:t=>K(t),getStreamFromFD:t=>mt.getStreamChecked(t)},gt=(t,e)=>e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN,wt=(t,e,r)=>ct(t,w,e,r),bt=void 0,Et=t=>{for(var e="",r=t;w[r];)e+=bt[w[r++]];return e},_t={},Ct={},Mt={},kt=void 0,$t=t=>{throw new kt(t)},St=void 0,Pt=t=>{throw new St(t)},jt=(t,e,r)=>{function n(e){var n=r(e);n.length!==t.length&&Pt("Mismatched type converter count");for(var o=0;o<t.length;++o)Ft(t[o],n[o])}t.forEach((function(t){Mt[t]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((t,e)=>{Ct.hasOwnProperty(t)?o[e]=Ct[t]:(a.push(t),_t.hasOwnProperty(t)||(_t[t]=[]),_t[t].push((()=>{o[e]=Ct[t],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Ft(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(t,e,r={}){var n=e.name;if(t||$t(`type "${n}" must have a positive integer typeid pointer`),Ct.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;$t(`Cannot register type '${n}' twice`)}if(Ct[t]=e,delete Mt[t],_t.hasOwnProperty(t)){var o=_t[t];delete _t[t],o.forEach((t=>t()))}}(t,e,r)}function Tt(t){if(!(this instanceof Zt))return!1;if(!(t instanceof Zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}var Dt=t=>{$t(t.$$.ptrType.registeredClass.name+" instance already deleted")},Wt=!1,At=t=>{},xt=t=>{t.count.value-=1,0===t.count.value&&(t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)})(t)},Ot=(t,e,r)=>{if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ot(t,e,r.baseClass);return null===n?null:r.downcast(n)},It={},Rt=()=>Object.keys(Ht).length,zt=()=>{var t=[];for(var e in Ht)Ht.hasOwnProperty(e)&&t.push(Ht[e]);return t},Ut=[],Nt=()=>{for(;Ut.length;){var t=Ut.pop();t.$$.deleteScheduled=!1,t.delete()}},Lt=void 0,Bt=t=>{Lt=t,Ut.length&&Lt&&Lt(Nt)},Ht={},Vt=(t,e)=>(e=((t,e)=>{for(void 0===e&&$t("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e})(t,e),Ht[e]),Yt=(t,e)=>(e.ptrType&&e.ptr||Pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&Pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},qt(Object.create(t,{$$:{value:e}})));function Qt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Vt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Yt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Yt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,i=this.registeredClass.getActualType(e),s=It[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var c=Ot(e,this.registeredClass,a.registeredClass);return null===c?o.call(this):this.isSmartPointer?Yt(a.registeredClass.instancePrototype,{ptrType:a,ptr:c,smartPtrType:this,smartPtr:t}):Yt(a.registeredClass.instancePrototype,{ptrType:a,ptr:c})}var qt=t=>"undefined"==typeof FinalizationRegistry?(qt=t=>t,t):(Wt=new FinalizationRegistry((t=>{xt(t.$$)})),qt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Wt.register(t,r,t)}return t},At=t=>Wt.unregister(t),qt(t));function Gt(){if(this.$$.ptr||Dt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=qt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Kt(){this.$$.ptr||Dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$t("Object already scheduled for deletion"),At(this),xt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Jt(){return!this.$$.ptr}function Xt(){return this.$$.ptr||Dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$t("Object already scheduled for deletion"),Ut.push(this),1===Ut.length&&Lt&&Lt(Nt),this.$$.deleteScheduled=!0,this}function Zt(){}var te=t=>{if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${t}`:t};function ee(t,e){return{[t=te(t)]:function(){return e.apply(this,arguments)}}[t]}var re=(t,e,r)=>{if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||$t(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},ne=(t,e,r)=>{a.hasOwnProperty(t)?((void 0===r||void 0!==a[t].overloadTable&&void 0!==a[t].overloadTable[r])&&$t(`Cannot register public name '${t}' twice`),re(a,t,t),a.hasOwnProperty(r)&&$t(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),a[t].overloadTable[r]=e):(a[t]=e,void 0!==r&&(a[t].numArguments=r))};function oe(t,e,r,n,o,a,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var ae=(t,e,r)=>{for(;e!==r;)e.upcast||$t(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function ie(t,e){if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass;return ae(e.$$.ptr,r,this.registeredClass)}function se(t,e){var r;if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&$t(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=ae(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&$t("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:$t(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,Pe.toHandle((()=>o.delete()))),null!==t&&t.push(this.rawDestructor,r)}break;default:$t("Unsupporting sharing policy")}return r}function ce(t,e){if(null===e)return this.isReference&&$t(`null is not a valid ${this.name}`),0;e.$$||$t(`Cannot pass "${Te(e)}" as a ${this.name}`),e.$$.ptr||$t(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&$t(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass;return ae(e.$$.ptr,r,this.registeredClass)}function ue(t){return this.fromWireType(C[t>>2])}function le(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function de(t){this.rawDestructor&&this.rawDestructor(t)}var he=t=>{null!==t&&t.delete()};function fe(t,e,r,n,o,a,i,s,c,u,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=se:n?(this.toWireType=ie,this.destructorFunction=null):(this.toWireType=ce,this.destructorFunction=null)}var pe=(t,e,r)=>{a.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),void 0!==a[t].overloadTable&&void 0!==r?a[t].overloadTable[r]=e:(a[t]=e,a[t].argCount=r)},ve=t=>$.get(t),me=(t,e,r)=>t.includes("j")?((t,e,r)=>{var n=a["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)})(t,e,r):ve(e).apply(null,r),ye=(t,e)=>{var r,n,o,a=(t=Et(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),me(r,n,o)}):ve(e);return"function"!=typeof a&&$t(`unknown function pointer with signature ${t}: ${e}`),a},ge=void 0,we=t=>{var e=$r(t),r=Et(e);return Cr(e),r},be=(t,e)=>{var r=[],n={};throw e.forEach((function t(e){n[e]||Ct[e]||(Mt[e]?Mt[e].forEach(t):(r.push(e),n[e]=!0))})),new ge(`${t}: `+r.map(we).join([", "]))},Ee=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function _e(t,e,r,n,o,a){var i=e.length;i<2&&$t("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==r,c=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){c=!0;break}var l="void"!==e[0].name,d=i-2,h=new Array(d),f=[],p=[];return function(){var r;arguments.length!==d&&$t(`function ${t} called with ${arguments.length} arguments, expected ${d}`),p.length=0,f.length=s?2:1,f[0]=o,s&&(r=e[1].toWireType(p,this),f[1]=r);for(var a=0;a<d;++a)h[a]=e[a+2].toWireType(p,arguments[a]),f.push(h[a]);var i=n.apply(null,f);function u(t){if(c)Ee(p);else for(var n=s?1:2;n<e.length;n++){var o=1===n?r:h[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(o)}if(l)return e[0].fromWireType(t)}return u(i)}}var Ce=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(C[e+4*n>>2]);return r};function Me(){this.allocated=[void 0],this.freelist=[]}var ke=new Me,$e=t=>{t>=ke.reserved&&0==--ke.get(t).refcount&&ke.free(t)},Se=()=>{for(var t=0,e=ke.reserved;e<ke.allocated.length;++e)void 0!==ke.allocated[e]&&++t;return t},Pe={toValue:t=>(t||$t("Cannot use deleted val. handle = "+t),ke.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ke.allocate({refcount:1,value:t})}}};function je(t){return this.fromWireType(_[t>>2])}var Fe,Te=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t},De=(t,e)=>{switch(e){case 4:return function(t){return this.fromWireType(M[t>>2])};case 8:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},We=(t,e,r)=>{switch(e){case 1:return r?t=>g[t>>0]:t=>w[t>>0];case 2:return r?t=>b[t>>1]:t=>E[t>>1];case 4:return r?t=>_[t>>2]:t=>C[t>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ae="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,xe=(t,e)=>{for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((r=n<<1)-t>32&&Ae)return Ae.decode(w.subarray(t,r));for(var a="",i=0;!(i>=e/2);++i){var s=b[t+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Oe=(t,e,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,a=0;a<o;++a){var i=t.charCodeAt(a);b[e>>1]=i,e+=2}return b[e>>1]=0,e-n},Ie=t=>2*t.length,Re=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},ze=(t,e,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,a=0;a<t.length;++a){var i=t.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&t.charCodeAt(++a)),_[e>>2]=i,(e+=4)+4>o)break}return _[e>>2]=0,e-n},Ue=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Ne=(t,e)=>{var r=Ct[t];return void 0===r&&$t(e+" has unknown type "+we(t)),r},Le={},Be=t=>{var e=Le[t];return void 0===e?Et(t):e},He=[],Ve=()=>{if("object"==typeof globalThis)return globalThis;function t(t){t.$$$embind_global$$$=t;var e="object"==typeof $$$embind_global$$$&&t.$$$embind_global$$$==t;return e||delete t.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof r.g&&t(r.g)?$$$embind_global$$$=r.g:"object"==typeof self&&t(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},Ye=[],Qe=t=>t%4==0&&(t%100!=0||t%400==0),qe=[0,31,60,91,121,152,182,213,244,274,305,335],Ge=[0,31,59,90,120,151,181,212,243,273,304,334],Ke=t=>(Qe(t.getFullYear())?qe:Ge)[t.getMonth()]+t.getDate()-1,Je=t=>{var e=st(t)+1,r=_r(e);return r&&wt(t,r,e),r},Xe=[],Ze=(t,e,r)=>{var n=((t,e)=>{var r;for(Xe.length=0;r=w[t++];)e+=105!=r&&e%8?4:0,Xe.push(105==r?_[e>>2]:k[e>>3]),e+=105==r?4:8;return Xe})(e,r);return V[t].apply(null,n)};Fe=()=>performance.now();var tr,er,rr,nr=t=>{N("OOM")},or=t=>{var e=(t-m.buffer.byteLength+65535)/65536;try{return m.grow(e),P(),1}catch(t){}},ar={},ir=()=>{if(!ir.strings){var t={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",_:l||"./this.program"};for(var e in ar)void 0===ar[e]?delete t[e]:t[e]=ar[e];var r=[];for(var e in t)r.push(`${e}=${t[e]}`);ir.strings=r}return ir.strings},sr=t=>{y||(a.onExit&&a.onExit(t),S=!0),d(t,new Y(t))},cr=(t,e)=>{sr(t)},ur=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},lr=[31,29,31,30,31,30,31,31,30,31,30,31],dr=[31,28,31,30,31,30,31,31,30,31,30,31],hr=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Qe(r.getFullYear()),o=r.getMonth(),a=(n?lr:dr)[o];if(!(e>a-r.getDate()))return r.setDate(r.getDate()+e),r;e-=a-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},fr=(t,e,r,n)=>{var o=C[n+40>>2],a={tm_sec:_[n>>2],tm_min:_[n+4>>2],tm_hour:_[n+8>>2],tm_mday:_[n+12>>2],tm_mon:_[n+16>>2],tm_year:_[n+20>>2],tm_wday:_[n+24>>2],tm_yday:_[n+28>>2],tm_isdst:_[n+32>>2],tm_gmtoff:_[n+36>>2],tm_zone:o?K(o):""},i=K(r),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 c in s)i=i.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function h(t,e){return d(t,e,"0")}function f(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function p(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function v(t){var e=hr(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=p(r),a=p(n);return f(o,e)<=0?f(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var m={"%a":t=>u[t.tm_wday].substring(0,3),"%A":t=>u[t.tm_wday],"%b":t=>l[t.tm_mon].substring(0,3),"%B":t=>l[t.tm_mon],"%C":t=>h((t.tm_year+1900)/100|0,2),"%d":t=>h(t.tm_mday,2),"%e":t=>d(t.tm_mday,2," "),"%g":t=>v(t).toString().substring(2),"%G":t=>v(t),"%H":t=>h(t.tm_hour,2),"%I":t=>{var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),h(e,2)},"%j":t=>h(t.tm_mday+ur(Qe(t.tm_year+1900)?lr:dr,t.tm_mon-1),3),"%m":t=>h(t.tm_mon+1,2),"%M":t=>h(t.tm_min,2),"%n":()=>"\n","%p":t=>t.tm_hour>=0&&t.tm_hour<12?"AM":"PM","%S":t=>h(t.tm_sec,2),"%t":()=>"\t","%u":t=>t.tm_wday||7,"%U":t=>{var e=t.tm_yday+7-t.tm_wday;return h(Math.floor(e/7),2)},"%V":t=>{var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(53==e){var r=(t.tm_wday+371-t.tm_yday)%7;4==r||3==r&&Qe(t.tm_year)||(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&Qe(t.tm_year%400-1))&&e++}return h(e,2)},"%w":t=>t.tm_wday,"%W":t=>{var e=t.tm_yday+7-(t.tm_wday+6)%7;return h(Math.floor(e/7),2)},"%y":t=>(t.tm_year+1900).toString().substring(2),"%Y":t=>t.tm_year+1900,"%z":t=>{var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":t=>t.tm_zone,"%%":()=>"%"};for(var c in i=i.replace(/%%/g,"\0\0"),m)i.includes(c)&&(i=i.replace(new RegExp(c,"g"),m[c](a)));var y,w,b=ut(i=i.replace(/\0\0/g,"%"),!1);return b.length>e?0:(y=b,w=t,g.set(y,w),b.length-1)},pr=t=>parseInt(t),vr=Je,mr=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=mt.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},yr=365,gr=146;Object.defineProperties(mr.prototype,{read:{get:function(){return(this.mode&yr)===yr},set:function(t){t?this.mode|=yr:this.mode&=-366}},write:{get:function(){return(this.mode&gr)===gr},set:function(t){t?this.mode|=gr:this.mode&=-147}},isFolder:{get:function(){return mt.isDir(this.mode)}},isDevice:{get:function(){return mt.isChrdev(this.mode)}}}),mt.FSNode=mr,mt.createPreloadedFile=(t,e,r,n,o,a,i,s,c,u)=>{var l=e?at.resolve(nt.join2(t,e)):t;function d(r){function d(r){u&&u(),s||mt.createDataFile(t,e,r,n,o,c),a&&a(),U()}((t,e,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return pt.forEach((a=>{o||a.canHandle(e)&&(a.handle(t,e,r,n),o=!0)})),o})(r,l,d,(()=>{i&&i(),U()}))||d(r)}z(),"string"==typeof r?ft(r,(t=>d(t)),i):d(r)},mt.staticInit(),(()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);bt=t})(),kt=a.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},St=a.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Zt.prototype.isAliasOf=Tt,Zt.prototype.clone=Gt,Zt.prototype.delete=Kt,Zt.prototype.isDeleted=Jt,Zt.prototype.deleteLater=Xt,a.getInheritedInstanceCount=Rt,a.getLiveInheritedInstances=zt,a.flushPendingDeletes=Nt,a.setDelayFunction=Bt,fe.prototype.getPointee=le,fe.prototype.destructor=de,fe.prototype.argPackAdvance=8,fe.prototype.readValueFromPointer=ue,fe.prototype.deleteObject=he,fe.prototype.fromWireType=Qt,ge=a.UnboundTypeError=(tr=Error,(rr=ee(er="UnboundTypeError",(function(t){this.name=er,this.message=t;var e=new Error(t).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(tr.prototype),rr.prototype.constructor=rr,rr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},rr),Object.assign(Me.prototype,{get(t){return this.allocated[t]},has(t){return void 0!==this.allocated[t]},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}}),ke.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ke.reserved=ke.allocated.length,a.count_emval_handles=Se;var wr,br={o:(t,e,r,n)=>{N(`Assertion failed: ${K(t)}, at: `+[e?K(e):"unknown filename",r,n?K(n):"unknown function"])},w:t=>{var e=new tt(t);return e.get_caught()||(e.set_caught(!0),X--),e.set_rethrown(!1),J.push(e),Dr(e.excPtr),e.get_exception_ptr()},$b:()=>{if(!J.length)return 0;var t=J[J.length-1];return Dr(t.excPtr),t.excPtr},y:()=>{Pr(0,0);var t=J.pop();Tr(t.excPtr),Z=0},a:()=>et([]),i:t=>et([t]),v:(t,e)=>et([t,e]),Ka:rt,_b:t=>{if(t){var e=new tt(t);J.push(e),e.set_rethrown(!0),rt()}},q:(t,e,r)=>{throw new tt(t).init(e,r),X++,Z=t},ac:()=>X,c:t=>{throw Z||(Z=t),Z},fc:function(t,e,r,n,o){try{for(var a=0,i=e?_[e>>2]:0,s=e?_[e+4>>2]:0,c=r?_[r>>2]:0,u=r?_[r+4>>2]:0,l=n?_[n>>2]:0,d=n?_[n+4>>2]:0,h=0,f=0,p=0,v=0,m=0,y=0,g=(e?_[e>>2]:0)|(r?_[r>>2]:0)|(n?_[n>>2]:0),w=(e?_[e+4>>2]:0)|(r?_[r+4>>2]:0)|(n?_[n+4>>2]:0),b=function(t,e,r,n){return t<32?e&n:r&n},E=0;E<t;E++){var C=1<<E%32;if(b(E,g,w,C)){var M=yt.getStreamFromFD(E),k=yt.DEFAULT_POLLMASK;if(M.stream_ops.poll){var $=-1;o&&($=1e3*((e?_[o>>2]:0)+(e?_[o+8>>2]:0)/1e6)),k=M.stream_ops.poll(M,$)}1&k&&b(E,i,s,C)&&(E<32?h|=C:f|=C,a++),4&k&&b(E,c,u,C)&&(E<32?p|=C:v|=C,a++),2&k&&b(E,l,d,C)&&(E<32?m|=C:y|=C,a++)}}return e&&(_[e>>2]=h,_[e+4>>2]=f),r&&(_[r>>2]=p,_[r+4>>2]=v),n&&(_[n>>2]=m,_[n+4>>2]=y),a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Vb:function(t,e){try{return t=yt.getStr(t),mt.chmod(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Wb:function(t,e){try{return mt.fchmod(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},db:function(t,e,r){yt.varargs=r;try{var n=yt.getStreamFromFD(t);switch(e){case 0:if((o=yt.get())<0)return-28;for(;mt.streams[o];)o++;return mt.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=yt.get();return n.flags|=o,0;case 5:return o=yt.getp(),b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,_[Mr()>>2]=a,-1}}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}var a},oc:function(t,e){try{var r=yt.getStreamFromFD(t);return yt.doStat(mt.stat,r.path,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},zb:function(t,e,r){var n=gt(e,r);try{return isNaN(n)?61:(mt.ftruncate(t,n),0)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Zb:function(t,e){try{if(0===e)return-28;var r=mt.cwd(),n=st(r)+1;return e<n?-68:(wt(r,t,e),n)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Xb:function(t,e,r){try{var n=yt.getStreamFromFD(t);n.getdents||(n.getdents=mt.readdir(n.path));for(var o=280,a=0,i=mt.llseek(n,0,1),s=Math.floor(i/o);s<n.getdents.length&&a+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.node.id,u=4;else if(".."===l)c=mt.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=mt.lookupNode(n.node,l);c=d.id,u=mt.isChrdev(d.mode)?2:mt.isDir(d.mode)?4:mt.isLink(d.mode)?10:8}D=[c>>>0,(T=c,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+a>>2]=D[0],_[e+a+4>>2]=D[1],D=[(s+1)*o>>>0,(T=(s+1)*o,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+a+8>>2]=D[0],_[e+a+12>>2]=D[1],b[e+a+16>>1]=280,g[e+a+18>>0]=u,wt(l,e+a+19,256),a+=o,s+=1}return mt.llseek(n,s*o,0),a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},pc:function(t,e,r){yt.varargs=r;try{var n=yt.getStreamFromFD(t);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=yt.getp();_[a>>2]=o.c_iflag||0,_[a+4>>2]=o.c_oflag||0,_[a+8>>2]=o.c_cflag||0,_[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)g[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=yt.getp();var s=_[a>>2],c=_[a+4>>2],u=_[a+8>>2],l=_[a+12>>2],d=[];for(i=0;i<32;i++)d.push(g[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:s,c_oflag:c,c_cflag:u,c_lflag:l,c_cc:d})}return 0;case 21519:return n.tty?(a=yt.getp(),_[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=yt.getp(),mt.ioctl(n,e,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var h=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=yt.getp(),b[a>>1]=h[0],b[a+2>>1]=h[1]}return 0;default:return-28}}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},lc:function(t,e){try{return t=yt.getStr(t),yt.doStat(mt.lstat,t,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},ic:function(t,e,r){try{return e=yt.getStr(e),e=yt.calculateAt(t,e),"/"===(e=nt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),mt.mkdir(e,r,0),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},mc:function(t,e,r,n){try{e=yt.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=yt.calculateAt(t,e,a),yt.doStat(o?mt.lstat:mt.stat,e,r)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},eb:function(t,e,r,n){yt.varargs=n;try{e=yt.getStr(e),e=yt.calculateAt(t,e);var o=n?yt.get():0;return mt.open(e,r,o).fd}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Yb:function(t,e,r,n){try{if(e=yt.getStr(e),e=yt.calculateAt(t,e),n<=0)return-28;var o=mt.readlink(e),a=Math.min(n,st(o)),i=g[r+a];return wt(o,r,n+1),g[r+a]=i,a}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},gc:function(t){try{return t=yt.getStr(t),mt.rmdir(t),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},nc:function(t,e){try{return t=yt.getStr(t),yt.doStat(mt.stat,t,e)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Ub:function(t,e){try{return t=yt.getStr(t),e=yt.getStr(e),mt.symlink(t,e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},hc:function(t,e,r){try{return e=yt.getStr(e),e=yt.calculateAt(t,e),0===r?mt.unlink(e):512===r?mt.rmdir(e):N("Invalid flags passed to unlinkat"),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Kb:(t,e,r,n,o)=>{},tc:(t,e,r,n)=>{Ft(t,{name:e=Et(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:n},argPackAdvance:8,readValueFromPointer:function(t){return this.fromWireType(w[t])},destructorFunction:null})},Y:(t,e,r,n,o,a,i,s,c,u,l,d,h)=>{l=Et(l),a=ye(o,a),s&&(s=ye(i,s)),u&&(u=ye(c,u)),h=ye(d,h);var f=te(l);ne(f,(function(){be(`Cannot construct ${l} due to unbound types`,[n])})),jt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Zt.prototype;var i=ee(f,(function(){if(Object.getPrototypeOf(this)!==c)throw new kt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new kt(l+" has no accessible constructor");var t=d.constructor_body[arguments.length];if(void 0===t)throw new kt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:i}});i.prototype=c;var d=new oe(l,i,c,h,r,a,s,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new fe(l,d,!0,!1,!1),v=new fe(l+"*",d,!1,!1,!1),m=new fe(l+" const*",d,!1,!0,!1);return It[t]={pointerType:v,constPointerType:m},pe(f,i),[p,v,m]}))},X:(t,e,r,n,o,a,i,s)=>{var c=Ce(r,n);e=Et(e),a=ye(o,a),jt([],[t],(function(t){var n=`${(t=t[0]).name}.${e}`;function o(){be(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]);var s=t.registeredClass.constructor;return void 0===s[e]?(o.argCount=r-1,s[e]=o):(re(s,e,n),s[e].overloadTable[r-1]=o),jt([],c,(function(o){var c=[o[0],null].concat(o.slice(1)),u=_e(n,c,null,a,i);if(void 0===s[e].overloadTable?(u.argCount=r-1,s[e]=u):s[e].overloadTable[r-1]=u,t.registeredClass.__derivedClasses)for(const r of t.registeredClass.__derivedClasses)r.constructor.hasOwnProperty(e)||(r.constructor[e]=u);return[]})),[]}))},K:(t,e,r,n,o,a,i,s,c)=>{var u=Ce(r,n);e=Et(e),a=ye(o,a),jt([],[t],(function(t){var n=`${(t=t[0]).name}.${e}`;function o(){be(`Cannot call ${n} due to unbound types`,u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(re(c,e,n),c[e].overloadTable[r-2]=o),jt([],u,(function(o){var s=_e(n,o,t,a,i);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},sc:(t,e)=>{Ft(t,{name:e=Et(e),fromWireType:t=>{var e=Pe.toValue(t);return $e(t),e},toWireType:(t,e)=>Pe.toHandle(e),argPackAdvance:8,readValueFromPointer:je,destructorFunction:null})},gb:(t,e,r)=>{Ft(t,{name:e=Et(e),fromWireType:t=>t,toWireType:(t,e)=>e,argPackAdvance:8,readValueFromPointer:De(e,r),destructorFunction:null})},va:(t,e,r,n,o,a,i)=>{var s=Ce(e,r);t=Et(t),o=ye(n,o),ne(t,(function(){be(`Cannot call ${t} due to unbound types`,s)}),e-1),jt([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return pe(t,_e(t,n,null,o,a),e-1),[]}))},ga:(t,e,r,n,o)=>{e=Et(e),-1===o&&(o=4294967295);var a=t=>t;if(0===n){var i=32-8*r;a=t=>t<<i>>>i}var s=e.includes("unsigned");Ft(t,{name:e,fromWireType:a,toWireType:s?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:We(e,r,0!==n),destructorFunction:null})},U:(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=C[t>>2],r=C[t+4>>2];return new n(g.buffer,r,e)}Ft(t,{name:r=Et(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},fb:(t,e)=>{var r="std::string"===(e=Et(e));Ft(t,{name:e,fromWireType:t=>{var e,n=C[t>>2],o=t+4;if(r)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==w[s]){var c=K(a,s-a);void 0===e?e=c:(e+=String.fromCharCode(0),e+=c),a=s+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(w[o+i]);e=u.join("")}return Cr(t),e},toWireType:(t,e)=>{var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||$t("Cannot pass non-string to std::string"),n=r&&o?st(e):e.length;var a=_r(4+n+1),i=a+4;if(C[a>>2]=n,r&&o)wt(e,i,n+1);else if(o)for(var s=0;s<n;++s){var c=e.charCodeAt(s);c>255&&(Cr(i),$t("String has UTF-16 code units that do not fit in 8 bits")),w[i+s]=c}else for(s=0;s<n;++s)w[i+s]=e[s];return null!==t&&t.push(Cr,a),a},argPackAdvance:8,readValueFromPointer:ue,destructorFunction:t=>Cr(t)})},Pa:(t,e,r)=>{var n,o,a,i,s;r=Et(r),2===e?(n=xe,o=Oe,i=Ie,a=()=>E,s=1):4===e&&(n=Re,o=ze,i=Ue,a=()=>C,s=2),Ft(t,{name:r,fromWireType:t=>{for(var r,o=C[t>>2],i=a(),c=t+4,u=0;u<=o;++u){var l=t+4+u*e;if(u==o||0==i[l>>s]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+e}}return Cr(t),r},toWireType:(t,n)=>{"string"!=typeof n&&$t(`Cannot pass non-string to C++ string type ${r}`);var a=i(n),c=_r(4+a+e);return C[c>>2]=a>>s,o(n,c+4,a+e),null!==t&&t.push(Cr,c),c},argPackAdvance:8,readValueFromPointer:je,destructorFunction:t=>Cr(t)})},uc:(t,e)=>{Ft(t,{isVoid:!0,name:e=Et(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(t,e)=>{}})},qc:()=>!0,bc:()=>{throw 1/0},wa:(t,e,r)=>{t=Pe.toValue(t),e=Ne(e,"emval::as");var n=[],o=Pe.toHandle(n);return C[r>>2]=o,e.toWireType(n,t)},Da:(t,e,r,n,o)=>(t=He[t])(e=Pe.toValue(e),r=Be(r),(t=>{var e=[];return C[t>>2]=Pe.toHandle(e),e})(n),o),Ma:(t,e,r,n)=>{(t=He[t])(e=Pe.toValue(e),r=Be(r),null,n)},vc:$e,Na:t=>0===t?Pe.toHandle(Ve()):(t=Be(t),Pe.toHandle(Ve()[t])),ma:(t,e)=>{var r=((t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=Ne(C[e+4*n>>2],"parameter "+n);return r})(t,e),n=r[0],o=n.name+"_$"+r.slice(1).map((function(t){return t.name})).join("_")+"$",a=Ye[o];if(void 0!==a)return a;var i,s,c=new Array(t-1);return i=(e,o,a,i)=>{for(var s=0,u=0;u<t-1;++u)c[u]=r[u+1].readValueFromPointer(i+s),s+=r[u+1].argPackAdvance;var l=e[o].apply(e,c);for(u=0;u<t-1;++u)r[u+1].deleteObject&&r[u+1].deleteObject(c[u]);if(!n.isVoid)return n.toWireType(a,l)},s=He.length,He.push(i),a=s,Ye[o]=a,a},yb:(t,e)=>(t=Pe.toValue(t),e=Pe.toValue(e),Pe.toHandle(t[e])),u:t=>{t>4&&(ke.get(t).refcount+=1)},wb:(t,e)=>(t=Pe.toValue(t))instanceof(e=Pe.toValue(e)),ya:t=>"number"==typeof(t=Pe.toValue(t)),M:t=>"string"==typeof(t=Pe.toValue(t)),P:()=>Pe.toHandle([]),Q:t=>Pe.toHandle(Be(t)),x:()=>Pe.toHandle({}),xb:t=>{var e=Pe.toValue(t);Ee(e),$e(t)},Ec:(t,e,r)=>{t=Pe.toValue(t),e=Pe.toValue(e),r=Pe.toValue(r),t[e]=r},ea:(t,e)=>{var r=(t=Ne(t,"_emval_take_value")).readValueFromPointer(e);return Pe.toHandle(r)},z:t=>(t=Pe.toValue(t),Pe.toHandle(typeof t)),Gb:function(t,e,r){var n=gt(t,e),o=new Date(1e3*n);_[r>>2]=o.getUTCSeconds(),_[r+4>>2]=o.getUTCMinutes(),_[r+8>>2]=o.getUTCHours(),_[r+12>>2]=o.getUTCDate(),_[r+16>>2]=o.getUTCMonth(),_[r+20>>2]=o.getUTCFullYear()-1900,_[r+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-a)/864e5|0;_[r+28>>2]=i},Hb:function(t,e,r){var n=gt(t,e),o=new Date(1e3*n);_[r>>2]=o.getSeconds(),_[r+4>>2]=o.getMinutes(),_[r+8>>2]=o.getHours(),_[r+12>>2]=o.getDate(),_[r+16>>2]=o.getMonth(),_[r+20>>2]=o.getFullYear()-1900,_[r+24>>2]=o.getDay();var a=0|Ke(o);_[r+28>>2]=a,_[r+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=i.getTimezoneOffset(),u=0|(s!=c&&o.getTimezoneOffset()==Math.min(c,s));_[r+32>>2]=u},Ib:function(t){var e=(()=>{var e=new Date(_[t+20>>2]+1900,_[t+16>>2],_[t+12>>2],_[t+8>>2],_[t+4>>2],_[t>>2],0),r=_[t+32>>2],n=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(r<0)_[t+32>>2]=Number(a!=i&&s==n);else if(r>0!=(s==n)){var c=Math.max(i,a),u=r>0?s:c;e.setTime(e.getTime()+6e4*(u-n))}_[t+24>>2]=e.getDay();var l=0|Ke(e);return _[t+28>>2]=l,_[t>>2]=e.getSeconds(),_[t+4>>2]=e.getMinutes(),_[t+8>>2]=e.getHours(),_[t+12>>2]=e.getDate(),_[t+16>>2]=e.getMonth(),_[t+20>>2]=e.getYear(),e.getTime()/1e3})();return kr((T=e,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)),e>>>0},Eb:function(t,e,r,n,o,a,i,s){var c=gt(o,a);try{if(isNaN(c))return 61;var u=yt.getStreamFromFD(n),l=mt.mmap(u,t,c,e,r),d=l.ptr;return _[i>>2]=l.allocated,C[s>>2]=d,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},Fb:function(t,e,r,n,o,a,i){var s=gt(a,i);try{if(isNaN(s))return 61;var c=yt.getStreamFromFD(o);2&r&&yt.doMsync(t,c,e,n,s),mt.munmap(c)}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return-t.errno}},dc:(t,e,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),c=Math.max(i,s);function u(t){var e=t.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}C[t>>2]=60*c,_[e>>2]=Number(i!=s);var l=u(o),d=u(a),h=Je(l),f=Je(d);s<i?(C[r>>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},N:()=>{N("")},La:(t,e,r)=>Ze(t,e,r),za:()=>Date.now(),ec:()=>2147483648,Aa:Fe,rc:(t,e,r)=>w.copyWithin(t,e,e+r),cc:t=>{var e=w.length,r=2147483648;(t>>>=0)>r&&nr();for(var n,o,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,t+100663296);var s=Math.min(r,(n=Math.max(t,i))+((o=65536)-n%o)%o);if(or(s))return!0}nr()},jc:(t,e)=>{var r=0;return ir().forEach(((n,o)=>{var a=e+r;C[t+4*o>>2]=a,((t,e)=>{for(var r=0;r<t.length;++r)g[e++>>0]=t.charCodeAt(r);g[e>>0]=0})(n,a),r+=n.length+1})),0},kc:(t,e)=>{var r=ir();C[t>>2]=r.length;var n=0;return r.forEach((t=>n+=t.length+1)),C[e>>2]=n,0},wc:cr,Ga:function(t){try{var e=yt.getStreamFromFD(t);return mt.close(e),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},bb:function(t,e){try{var r=yt.getStreamFromFD(t),n=r.tty?2:mt.isDir(r.mode)?3:mt.isLink(r.mode)?7:4;return g[e>>0]=n,b[e+2>>1]=0,D=[0,(T=0,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+8>>2]=D[0],_[e+12>>2]=D[1],D=[0,(T=0,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[e+16>>2]=D[0],_[e+20>>2]=D[1],0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},cb:function(t,e,r,n){try{var o=((t,e,r,n)=>{for(var o=0,a=0;a<r;a++){var i=C[e>>2],s=C[e+4>>2];e+=8;var c=mt.read(t,g,i,s,n);if(c<0)return-1;if(o+=c,c<s)break;"undefined"!=typeof n&&(n+=c)}return o})(yt.getStreamFromFD(t),e,r);return C[n>>2]=o,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},Jb:function(t,e,r,n,o){var a=gt(e,r);try{if(isNaN(a))return 61;var i=yt.getStreamFromFD(t);return mt.llseek(i,a,n),D=[i.position>>>0,(T=i.position,+Math.abs(T)>=1?T>0?+Math.floor(T/4294967296)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)],_[o>>2]=D[0],_[o+4>>2]=D[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},Oa:function(t,e,r,n){try{var o=((t,e,r,n)=>{for(var o=0,a=0;a<r;a++){var i=C[e>>2],s=C[e+4>>2];e+=8;var c=mt.write(t,g,i,s,n);if(c<0)return-1;o+=c,"undefined"!=typeof n&&(n+=c)}return o})(yt.getStreamFromFD(t),e,r);return C[n>>2]=o,0}catch(t){if("undefined"==typeof mt||"ErrnoError"!==t.name)throw t;return t.errno}},vb:function(){return vr(location.toString())},Tb:(t,e)=>(ot(w.subarray(t,t+e)),0),ub:function(){return vr((t=qr,self[t(128,"e2(U")][t(131,"e2(U")]()));var t},W:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},rb:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},R:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},ca:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},J:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ra:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},r:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},C:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Z:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},sa:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},t:function(t){var e=jr();try{return ve(t)()}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},h:function(t,e){var r=jr();try{return ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},Oc:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},ib:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Fc:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ic:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Gc:function(t,e,r,n,o,a,i,s){var c=jr();try{return ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Nc:function(t,e,r,n,o,a,i,s,c){var u=jr();try{return ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},b:function(t,e,r){var n=jr();try{return ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Ua:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},tb:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},e:function(t,e,r,n){var o=jr();try{return ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},oa:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},lb:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},k:function(t,e,r,n,o){var a=jr();try{return ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},ab:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},kb:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},n:function(t,e,r,n,o,a){var i=jr();try{return ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ob:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},F:function(t,e,r,n,o,a,i){var s=jr();try{return ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},ba:function(t,e,r,n,o,a,i,s){var c=jr();try{return ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},ta:function(t,e,r,n,o,a,i,s,c){var u=jr();try{return ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},I:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},Dc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},Fa:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{return ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},Bb:function(t,e,r,n,o,a,i){var s=jr();try{return Vr(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Pb:function(t,e,r,n){var o=jr();try{return zr(t,e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Qb:function(t,e,r,n,o){var a=jr();try{return Rr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Db:function(t){var e=jr();try{return Br(t)}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},Sb:function(t,e){var r=jr();try{return xr(t,e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},Cb:function(t,e,r){var n=jr();try{return Hr(t,e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Ob:function(t,e,r,n){var o=jr();try{return Ur(t,e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ab:function(t,e,r,n,o){var a=jr();try{return Yr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},l:function(t){var e=jr();try{ve(t)()}catch(t){if(Fr(e),t!==t+0)throw t;Pr(1,0)}},f:function(t,e){var r=jr();try{ve(t)(e)}catch(t){if(Fr(r),t!==t+0)throw t;Pr(1,0)}},xa:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Sa:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Cc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ca:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},Za:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},d:function(t,e,r){var n=jr();try{ve(t)(e,r)}catch(t){if(Fr(n),t!==t+0)throw t;Pr(1,0)}},G:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},Ja:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Ha:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},jb:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Jc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ba:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},V:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ta:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Qc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},O:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},ja:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Hc:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Mc:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},Xa:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},ka:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Va:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ya:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},g:function(t,e,r,n){var o=jr();try{ve(t)(e,r,n)}catch(t){if(Fr(o),t!==t+0)throw t;Pr(1,0)}},la:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},B:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ua:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Lc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},H:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},fa:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},L:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},pa:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Rc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},aa:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Sc:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Wa:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},nb:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},j:function(t,e,r,n,o){var a=jr();try{ve(t)(e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},Qa:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},xc:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ia:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},T:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},ia:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},$:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},m:function(t,e,r,n,o,a){var i=jr();try{ve(t)(e,r,n,o,a)}catch(t){if(Fr(i),t!==t+0)throw t;Pr(1,0)}},Pc:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},E:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},sb:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},da:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},_a:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},p:function(t,e,r,n,o,a,i){var s=jr();try{ve(t)(e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},$a:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},mb:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Bc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},pb:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},ra:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},s:function(t,e,r,n,o,a,i,s){var c=jr();try{ve(t)(e,r,n,o,a,i,s)}catch(t){if(Fr(c),t!==t+0)throw t;Pr(1,0)}},Ac:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},zc:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},A:function(t,e,r,n,o,a,i,s,c){var u=jr();try{ve(t)(e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},S:function(t,e,r,n,o,a,i,s,c,u){var l=jr();try{ve(t)(e,r,n,o,a,i,s,c,u)}catch(t){if(Fr(l),t!==t+0)throw t;Pr(1,0)}},ha:function(t,e,r,n,o,a,i,s,c,u,l){var d=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l)}catch(t){if(Fr(d),t!==t+0)throw t;Pr(1,0)}},qb:function(t,e,r,n,o,a,i,s,c,u,l,d){var h=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d)}catch(t){if(Fr(h),t!==t+0)throw t;Pr(1,0)}},qa:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p){var v=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p)}catch(t){if(Fr(v),t!==t+0)throw t;Pr(1,0)}},Kc:function(t,e,r,n,o,a,i,s,c,u,l,d,h){var f=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h)}catch(t){if(Fr(f),t!==t+0)throw t;Pr(1,0)}},na:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p){var v=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p)}catch(t){if(Fr(v),t!==t+0)throw t;Pr(1,0)}},Ea:function(t,e,r,n,o,a,i,s,c,u,l,d,h,f,p,v){var m=jr();try{ve(t)(e,r,n,o,a,i,s,c,u,l,d,h,f,p,v)}catch(t){if(Fr(m),t!==t+0)throw t;Pr(1,0)}},Rb:function(t,e,r,n,o,a,i){var s=jr();try{Ir(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Lb:function(t,e,r,n,o,a,i,s,c){var u=jr();try{Lr(t,e,r,n,o,a,i,s,c)}catch(t){if(Fr(u),t!==t+0)throw t;Pr(1,0)}},Nb:function(t,e,r,n,o,a,i){var s=jr();try{Or(t,e,r,n,o,a,i)}catch(t){if(Fr(s),t!==t+0)throw t;Pr(1,0)}},Mb:function(t,e,r,n,o){var a=jr();try{Nr(t,e,r,n,o)}catch(t){if(Fr(a),t!==t+0)throw t;Pr(1,0)}},D:t=>t,hb:fr,_:(t,e,r,n,o)=>fr(t,e,r,n),yc:(t,e,r)=>{for(var n=K(e),o="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,i=o.length;a<i;++a)n=n.replace(new RegExp("\\"+o[a],"g"),"\\"+o[a]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var c in s)n=n.replace(c,s[c]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var l in u)n=n.replace(l,"("+l+u[l]+")");var d=[];for(a=n.indexOf("%");a>=0;a=n.indexOf("%"))d.push(n[a+1]),n=n.replace(new RegExp("\\%"+n[a+1],"g"),"");var h=new RegExp("^"+n,"i").exec(K(t));if(h){var f,p=function(){function t(t,e,r){return"number"!=typeof t||isNaN(t)?e:t>=e?t<=r?t:r:e}return{year:t(_[r+20>>2]+1900,1970,9999),month:t(_[r+16>>2],0,11),day:t(_[r+12>>2],1,31),hour:t(_[r+8>>2],0,23),min:t(_[r+4>>2],0,59),sec:t(_[r>>2],0,59)}}(),v=t=>{var e=d.indexOf(t);if(e>=0)return h[e+1]};if((f=v("S"))&&(p.sec=pr(f)),(f=v("M"))&&(p.min=pr(f)),f=v("H"))p.hour=pr(f);else if(f=v("I")){var m=pr(f);(f=v("p"))&&(m+="P"===f.toUpperCase()[0]?12:0),p.hour=m}if(f=v("Y"))p.year=pr(f);else if(f=v("y")){var y=pr(f);(f=v("C"))?y+=100*pr(f):y+=y<69?2e3:1900,p.year=y}if((f=v("m"))?p.month=pr(f)-1:(f=v("b"))&&(p.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[f.substring(0,3).toUpperCase()]||0),f=v("d"))p.day=pr(f);else if(f=v("j"))for(var g=pr(f),w=Qe(p.year),b=0;b<12;++b){var E=ur(w?lr:dr,b-1);g<=E+(w?lr:dr)[b]&&(p.day=g-E)}else if(f=v("a")){var C=f.substring(0,3).toUpperCase();if(f=v("U")){var M={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[C],k=pr(f);S=0===($=new Date(p.year,0,1)).getDay()?hr($,M+7*(k-1)):hr($,7-$.getDay()+M+7*(k-1)),p.day=S.getDate(),p.month=S.getMonth()}else if(f=v("W")){var $,S;M={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[C],k=pr(f),S=1===($=new Date(p.year,0,1)).getDay()?hr($,M+7*(k-1)):hr($,7-$.getDay()+1+M+7*(k-1)),p.day=S.getDate(),p.month=S.getMonth()}}var P=new Date(p.year,p.month,p.day,p.hour,p.min,p.sec,0);return _[r>>2]=P.getSeconds(),_[r+4>>2]=P.getMinutes(),_[r+8>>2]=P.getHours(),_[r+12>>2]=P.getDate(),_[r+16>>2]=P.getMonth(),_[r+20>>2]=P.getFullYear()-1900,_[r+24>>2]=P.getDay(),_[r+28>>2]=ur(Qe(P.getFullYear())?lr:dr,P.getMonth()-1)+P.getDate()-1,_[r+32>>2]=0,t+ut(h[0]).length-1}return 0}},Er=function(){var t,e,r,n,i={a:br};function s(t,e){var r,n=t.exports;return m=(Er=n).Tc,P(),$=Er.Wc,r=Er.Uc,A.unshift(r),U(),n}if(z(),a.instantiateWasm)try{return a.instantiateWasm(i,s)}catch(t){v(`Module.instantiateWasm callback failed with error: ${t}`),o(t)}return(t=f,e=j,r=i,n=function(t){s(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||L(e)||"function"!=typeof fetch?H(e,r,n):fetch(e,{credentials:"same-origin"}).then((t=>WebAssembly.instantiateStreaming(t,r).then(n,(function(t){return v(`wasm streaming compile failed: ${t}`),v("falling back to ArrayBuffer instantiation"),H(e,r,n)}))))).catch(o),{}}(),_r=a._malloc=t=>(_r=a._malloc=Er.Vc)(t),Cr=a._free=t=>(Cr=a._free=Er.Xc)(t),Mr=()=>(Mr=Er.Yc)(),kr=t=>(kr=Er.Zc)(t),$r=t=>($r=Er._c)(t),Sr=(a.__embind_initialize_bindings=()=>(a.__embind_initialize_bindings=Er.$c)(),(t,e)=>(Sr=Er.ad)(t,e)),Pr=(t,e)=>(Pr=Er.bd)(t,e),jr=()=>(jr=Er.cd)(),Fr=t=>(Fr=Er.dd)(t),Tr=t=>(Tr=Er.ed)(t),Dr=t=>(Dr=Er.fd)(t),Wr=(t,e,r)=>(Wr=Er.gd)(t,e,r),Ar=t=>(Ar=Er.hd)(t),xr=a.dynCall_ji=(t,e)=>(xr=a.dynCall_ji=Er.id)(t,e),Or=a.dynCall_viijii=(t,e,r,n,o,i,s)=>(Or=a.dynCall_viijii=Er.jd)(t,e,r,n,o,i,s),Ir=a.dynCall_viiiij=(t,e,r,n,o,i,s)=>(Ir=a.dynCall_viiiij=Er.kd)(t,e,r,n,o,i,s),Rr=a.dynCall_iiji=(t,e,r,n,o)=>(Rr=a.dynCall_iiji=Er.ld)(t,e,r,n,o),zr=a.dynCall_iij=(t,e,r,n)=>(zr=a.dynCall_iij=Er.md)(t,e,r,n),Ur=a.dynCall_jiii=(t,e,r,n)=>(Ur=a.dynCall_jiii=Er.nd)(t,e,r,n),Nr=(a.dynCall_jiji=(t,e,r,n,o)=>(a.dynCall_jiji=Er.od)(t,e,r,n,o),a.dynCall_viij=(t,e,r,n,o)=>(a.dynCall_viij=Er.pd)(t,e,r,n,o),a.dynCall_viji=(t,e,r,n,o)=>(Nr=a.dynCall_viji=Er.qd)(t,e,r,n,o)),Lr=(a.dynCall_jjj=(t,e,r,n,o)=>(a.dynCall_jjj=Er.rd)(t,e,r,n,o),a.dynCall_iiiijj=(t,e,r,n,o,i,s,c)=>(a.dynCall_iiiijj=Er.sd)(t,e,r,n,o,i,s,c),a.dynCall_viijj=(t,e,r,n,o,i,s)=>(a.dynCall_viijj=Er.td)(t,e,r,n,o,i,s),a.dynCall_viiijjj=(t,e,r,n,o,i,s,c,u,l)=>(a.dynCall_viiijjj=Er.ud)(t,e,r,n,o,i,s,c,u,l),a.dynCall_viiiijii=(t,e,r,n,o,i,s,c,u)=>(Lr=a.dynCall_viiiijii=Er.vd)(t,e,r,n,o,i,s,c,u)),Br=(a.dynCall_vij=(t,e,r,n)=>(a.dynCall_vij=Er.wd)(t,e,r,n),a.dynCall_j=t=>(Br=a.dynCall_j=Er.xd)(t)),Hr=a.dynCall_jii=(t,e,r)=>(Hr=a.dynCall_jii=Er.yd)(t,e,r),Vr=a.dynCall_iiiiij=(t,e,r,n,o,i,s)=>(Vr=a.dynCall_iiiiij=Er.zd)(t,e,r,n,o,i,s),Yr=a.dynCall_jiiii=(t,e,r,n,o)=>(Yr=a.dynCall_jiiii=Er.Ad)(t,e,r,n,o);function Qr(){function t(){wr||(wr=!0,a.calledRun=!0,S||(a.noFSInit||mt.init.initialized||mt.init(),mt.ignorePermissions=!1,lt.init(),Q(A),e(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)t=a.postRun.shift(),x.unshift(t);var t;Q(x)}()))}O>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)t=a.preRun.shift(),W.unshift(t);var t;Q(W)}(),O>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.dynCall_iiiiijj=(t,e,r,n,o,i,s,c,u)=>(a.dynCall_iiiiijj=Er.Bd)(t,e,r,n,o,i,s,c,u),a.dynCall_iiiiiijj=(t,e,r,n,o,i,s,c,u,l)=>(a.dynCall_iiiiiijj=Er.Cd)(t,e,r,n,o,i,s,c,u,l),a.___start_em_js=8332676,a.___stop_em_js=8332784,a.UTF8ToString=K,a.stringToUTF8=wt,a.lengthBytesUTF8=st,a.allocateUTF8=vr,R=function t(){wr||Qr(),wr||(R=t)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();function qr(t,e){var r=Gr();return qr=function(e,n){var o=r[e-=118];if(void 0===qr.lUTbvC){var a=function(t){for(var e,r,n="",o="",a=0,i=0;r=t.charAt(i++);~r&&(e=a%4?64*e+r:r,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,c=n.length;s<c;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(t,e){var r,n,o=[],i=0,s="";for(t=a(t),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,r=o[n],o[n]=o[i],o[i]=r;n=0,i=0;for(var c=0;c<t.length;c++)i=(i+o[n=(n+1)%256])%256,r=o[n],o[n]=o[i],o[i]=r,s+=String.fromCharCode(t.charCodeAt(c)^o[(o[n]+o[i])%256]);return s};qr.UoNOms=i,t=arguments,qr.lUTbvC=!0}var s=r[0],c=e+s,u=t[c];return u?o=u:(void 0===qr.Rgvtxj&&(qr.Rgvtxj=!0),o=qr.UoNOms(o,n),t[c]=o),o},qr(t,e)}function Gr(){var t=["W6RcT311c1CVAHv6DmoHga","tI4qqmoZWQRdQ0iyWObZ","WRb+m8oOWQFdPCoyFW","W4NcNmoGWRTZbmk8W6TtWQFcLIxcMa","fhNcIuddVMhcK8kzWR/cHq","WOuAW5zGW4anWOeVWRFcJg/cQLG","W4VdQCk7j8kGt8kDCH/cUhWqmW","W6DxW4eesmooW5RdHsWRW48W","W4/dR8k8j8kGtSkzEaNcVKG7kW","WO1HaWuDtSowWQGQWP9rsmkw","fNVcJbxdLLFcQ8kFWPW","jmk+vNtcTSodWQhdSLq","W7JdSmoDWPzEWOBcQ8kG","ECkhdNGYWQPyamkrWO8qW4S","l8oGlSk/W4NdGSkhW74","W6ddSmoTWOnyWOBcQSkP","aSk+ySknW5VdVmoiWPhcShi0WOu","q2OdhbuKow/cPKi","WQjgW605WRavCCk7gmoeChPc","W69wW4zBomkDW6ddIGe","WPy0iSopmCk4mW","WQZdTxbCW4KbW6lcSSo3W7FdTG","WPabW7ldUSkWDJ4gyNaBrq","rwGegMjTEglcQhThW6FcRa","WRqRWQHguSkGWQu","WOzLWQBdQufObrTI"];return(Gr=function(){return t})()}Qr(),function(t,e){for(var r=qr,n=t();;)try{if(871609==-parseInt(r(123,"CFi]"))/1+parseInt(r(125,"WEPJ"))/2+-parseInt(r(129,"iN7e"))/3*(parseInt(r(135,"CFi]"))/4)+-parseInt(r(118,"bplO"))/5*(parseInt(r(124,"D[i5"))/6)+parseInt(r(120,"mDjw"))/7*(-parseInt(r(137,"MpzE"))/8)+-parseInt(r(140,"#7l9"))/9*(-parseInt(r(122,"D[i5"))/10)+parseInt(r(127,"IDt2"))/11*(parseInt(r(121,"!3R@"))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Gr);var ighnua,Kr=(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}),Jr=Kr(this,(function(){return!/" + this + "/.constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Jr)}));return Jr(),t.ready});t.exports=o},772:()=>{}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{"use strict";function t(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)}function e(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))&&function(){if(WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])))return!0;if(!t())return!1;const e=navigator.userAgent.match(/OS (\d{1,2})_(\d{1,2})(_(\d{1,3}))?\s/);if(!e)return!1;const r=parseInt(e[1],10),n=parseInt(e[2],10);return 16===r&&n>=7||17===r}()}catch(t){return!1}}function n(r){const{allowSimd:n=!0,allowThreads:o=!0}=r||{};let a="";if(n&&e()){a+="-simd";o&&function(){if("undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.node)return!1;if(t())return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}()&&(a+="-threads")}return a}class o extends Error{constructor(){super(...arguments),this.errorType="UnknownError"}}class a extends Error{constructor(){super(...arguments),this.errorType="InvalidLicense"}}class i extends Error{constructor(){super(...arguments),this.errorType="NullPointer"}}class s extends Error{constructor(){super(...arguments),this.errorType="InvalidArgument"}}class c extends Error{constructor(){super(...arguments),this.errorType="InvalidImageRef"}}class u extends Error{constructor(){super(...arguments),this.errorType="ComponentUnavailable"}}class l extends Error{constructor(){super(...arguments),this.errorType="IllegalState"}}class d extends Error{constructor(){super(...arguments),this.errorType="IoError"}}class h extends Error{constructor(){super(...arguments),this.errorType="InvalidData"}}class f extends Error{constructor(){super(...arguments),this.errorType="OperationCanceled"}}class p extends Error{constructor(){super(...arguments),this.errorType="OutOfMemory"}}class v extends Error{constructor(){super(...arguments),this.errorType="Timeout"}}class m{constructor(t){this.id=t}}class y{constructor(){this._map=new Map,this._nextId=0,this._unique=Math.random().toString(36)}add(t){const e=this._nextId.toString()+"_"+this._unique;return this._map.set(e,t),this._nextId++,new m(e)}get(t){return this._map.get(t.id)}delete(t){this.get(t).delete(),this._map.delete(t.id)}}function g(t){if(t.errorMessage)throw function(t,e,r){const n=r?{cause:r}:void 0;switch(t){case"UnknownError":return new o(e,n);case"InvalidLicense":return new a("Your license is not valid to use this feature of the ScanbotSDK. This can be because of one of the following reasons: \n 1) You did not successfully initialize the SDK with your license. \n 2) Your license expired \n 3) Your license does not allow the use of this feature of the ScanbotSDK",n);case"NullPointer":return new i(e,n);case"InvalidArgument":return new s(e,n);case"InvalidImageRef":return new c(e,n);case"ComponentUnavailable":return new u(e,n);case"IllegalState":return new l(e,n);case"IoError":return new d(e,n);case"InvalidData":return new h(e,n);case"OperationCanceled":return new f(e,n);case"OutOfMemory":return new p(e,n);case"Timeout":return new v(e,n);default:throw new Error(e)}}(t.errorType,t.errorMessage);return t.result}var w;!function(t){t.from=function(t){const e=t._type;switch(e){case"LegacyFilter":return new b(t);case"ScanbotBinarizationFilter":return new E(t);case"CustomBinarizationFilter":return new _(t);case"ColorDocumentFilter":return new C(t);case"ColorDocumentShadowRemovalFilter":return new M(t);case"BrightnessFilter":return new k(t);case"ContrastFilter":return new $(t);case"GrayscaleFilter":return new S(t);case"WhiteBlackPointFilter":return new P(t);default:throw new Error(`Unknown child class name: ${e}`)}}}(w||(w={}));class b{constructor(t={}){this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class E{constructor(t={}){this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class _{constructor(t={}){this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==t.outputMode&&(this.outputMode=t.outputMode),void 0!==t.denoise&&(this.denoise=t.denoise),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.preset&&(this.preset=t.preset)}}class C{constructor(t={}){this._type="ColorDocumentFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperWhitening=1,this.paperWhiteningBias=0,void 0!==t.contrastEnhancement&&(this.contrastEnhancement=t.contrastEnhancement),void 0!==t.colorEnhancement&&(this.colorEnhancement=t.colorEnhancement),void 0!==t.paperWhitening&&(this.paperWhitening=t.paperWhitening),void 0!==t.paperWhiteningBias&&(this.paperWhiteningBias=t.paperWhiteningBias)}}class M{constructor(t={}){this._type="ColorDocumentShadowRemovalFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperSaturation=.5,this.paperLightness=.5,void 0!==t.contrastEnhancement&&(this.contrastEnhancement=t.contrastEnhancement),void 0!==t.colorEnhancement&&(this.colorEnhancement=t.colorEnhancement),void 0!==t.paperSaturation&&(this.paperSaturation=t.paperSaturation),void 0!==t.paperLightness&&(this.paperLightness=t.paperLightness)}}class k{constructor(t={}){this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class ${constructor(t={}){this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class S{constructor(t={}){this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==t.borderWidthFraction&&(this.borderWidthFraction=t.borderWidthFraction),void 0!==t.blackOutliersFraction&&(this.blackOutliersFraction=t.blackOutliersFraction),void 0!==t.whiteOutliersFraction&&(this.whiteOutliersFraction=t.whiteOutliersFraction)}}class P{constructor(t={}){this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==t.blackPoint&&(this.blackPoint=t.blackPoint),void 0!==t.whitePoint&&(this.whitePoint=t.whitePoint)}}class j{constructor(t={}){this.author="Created with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==t.author&&(this.author=t.author),void 0!==t.creator&&(this.creator=t.creator),void 0!==t.title&&(this.title=t.title),void 0!==t.subject&&(this.subject=t.subject),void 0!==t.keywords&&(this.keywords=t.keywords)}}class F{constructor(t={}){this.attributes=new j({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",this.binarizationFilter=null,void 0!==t.attributes&&(this.attributes=new j(t.attributes)),void 0!==t.pageSize&&(this.pageSize=t.pageSize),void 0!==t.pageDirection&&(this.pageDirection=t.pageDirection),void 0!==t.pageFit&&(this.pageFit=t.pageFit),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.resamplingMethod&&(this.resamplingMethod=t.resamplingMethod),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?w.from(t.binarizationFilter):null)}}var T;!function(t){t.from=function(t){const e=t._type;switch(e){case"UserFieldDoubleValue":return new D(t);case"UserFieldStringValue":return new W(t);case"UserFieldIntValue":return new A(t);default:throw new Error(`Unknown child class name: ${e}`)}}}(T||(T={}));class D{constructor(t={}){if(this._type="UserFieldDoubleValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class W{constructor(t={}){if(this._type="UserFieldStringValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class A{constructor(t={}){if(this._type="UserFieldIntValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class x{constructor(t={}){if(void 0===t.tag)throw new Error("tag must be present in constructor argument");if(this.tag=t.tag,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=T.from(t.value)}}class O{constructor(t={}){this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==t.compression&&(this.compression=t.compression),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.zipCompressionLevel&&(this.zipCompressionLevel=t.zipCompressionLevel),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.userFields&&(this.userFields=t.userFields.map((t=>new x(t)))),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?w.from(t.binarizationFilter):null)}}function I(t,e){const r=t[e];if(!r)throw new u(`You have initialized ScanbotSDK with "complete" flavor but are trying to access a feature, "${e}", not available in this flavor.\nPlease make sure you've copied over the correct binaries and pointed the "enginePath" parameter to the correct flavor.\nFor more information see Web SDK initialization section on https://docs.scanbot.io`);return r}!function(t){t.defaultCompression="LZW",t.binaryDocumentOptimizedCompression="CCITT_T6"}(O||(O={}));var R=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class z{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return R(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}parse(t,e){return R(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).parse(e);return r=g(r),r}))}destroy(t){return R(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"BarcodeDocumentParser")}}var U=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class N{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return U(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return U(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearFrameAccumulationCache(t){return U(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearFrameAccumulationCache()}))}destroy(t){return U(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"BarcodeScanner")}}var L=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class B{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return L(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return L(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return L(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"CheckScanner")}}var H=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class V{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return H(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return H(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return H(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return H(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"CreditCardScanner")}}var Y=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class Q{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return Y(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return Y(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return Y(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentClassifier")}}var q=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class G{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return q(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return q(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return q(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}verifyDocument(t,e){return q(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).verifyDocument(e);return r=g(r),r}))}destroy(t){return q(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentDataExtractor")}}var K=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class J{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return K(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return K(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return K(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentQualityAnalyzer")}}var X=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class Z{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return X(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return X(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}scan(t,e){return X(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).scan(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return X(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return X(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"DocumentScanner")}}var tt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class et{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return tt(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return this.objectMap.add(t)}))}cropRect(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).cropRect(e,r);return n=g(n),{result:n,originalImage:e}}))}rotate(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).rotate(e,r);return n=g(n),{result:n,originalImage:e}}))}flip(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).flip(e,r);return n=g(n),{result:n,originalImage:e}}))}resize(t,e,r){return tt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).resize(e,r);return n=g(n),{result:n,originalImage:e}}))}destroy(t){return tt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"ImageManipulator")}}var rt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class nt{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return rt(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return this.objectMap.add(t)}))}crop(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).crop(e,r);return n=g(n),{result:n,originalImage:e}}))}resize(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).resize(e,r);return n=g(n),{result:n,originalImage:e}}))}rotate(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).rotate(e,r);return n=g(n),{result:n,originalImage:e}}))}applyFilter(t,e,r){return rt(this,void 0,void 0,(function*(){let n=this.objectMap.get(t).applyFilter(e,r);return n=g(n),{result:n,originalImage:e}}))}destroy(t){return rt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"ImageProcessor")}}var ot=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class at{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ot(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return ot(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}clearResult(t){return ot(this,void 0,void 0,(function*(){return this.objectMap.get(t).clearResult()}))}destroy(t){return ot(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"MrzScanner")}}class it{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ot(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}parse(t,e){return ot(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).parse(e);return r=g(r),r}))}destroy(t){return ot(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"MrzParser")}}var st=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class ct{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(){return st(this,void 0,void 0,(function*(){let t=this.getWasmComponent().create();return t=g(t),this.objectMap.add(t)}))}run(t,e){return st(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}destroy(t){return st(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"OcrEngine")}}var ut=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class lt{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return ut(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return ut(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}cleanRecognitionQueue(t){return ut(this,void 0,void 0,(function*(){return this.objectMap.get(t).cleanRecognitionQueue()}))}destroy(t){return ut(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"TextPatternScanner")}}var dt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};class ht{constructor(t){this.getWasmModule=t,this.objectMap=new y}create(t){return dt(this,void 0,void 0,(function*(){let e=this.getWasmComponent().create(t);return e=g(e),this.objectMap.add(e)}))}run(t,e){return dt(this,void 0,void 0,(function*(){let r=this.objectMap.get(t).run(e);return r=g(r),{result:r,originalImage:e}}))}cleanRecognitionQueue(t){return dt(this,void 0,void 0,(function*(){return this.objectMap.get(t).cleanRecognitionQueue()}))}destroy(t){return dt(this,void 0,void 0,(function*(){this.objectMap.delete(t)}))}getWasmComponent(){return I(this.getWasmModule(),"VinScanner")}}var ft=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,s)}c((n=n.apply(t,e||[])).next())}))};let pt;class vt extends Error{}const mt={};function yt(t){const e=Math.random().toString(36);return mt[e]=t,new m(e)}function gt(t){if(!mt.hasOwnProperty(t.id))throw new Error(`Object ${t.id} does not exist`);return mt[t.id]}function wt(t){const e=gt(t);e.delete&&e.delete(),delete mt[t.id]}new y,new y;const bt=Object.assign(Object.assign({initialize:function(t,e,o,a){return ft(this,void 0,void 0,(function*(){try{const{captureConsole:i,requestSuffix:s=""}=a||{};i&&(console.log=function(...t){self.postMessage({log:t})},console.error=function(...t){self.postMessage({logError:t})});const c=r(60),u=r(772),l={locateFile:function(t,r){let n;return n=function(t){return t.startsWith("http:")||t.startsWith("https:")}(e)?e:"",t.endsWith(".worker.js")&&u?u.default:new URL(n+t+s,location.href).href}},d=n(a),h=d.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${d}.js`);let f;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((t=>"Chromium"===t.brand))&&h){let t=[2147483648,805306368,536870912],e=134217728;const r=67108864;["barcode-scanner"].includes("complete")&&(e=r,t.push(4*r));for(let r=0;r<t.length;r++){const n=t[r];try{f=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),f.grow(e/65536);break}catch(e){if(r===t.length-1)throw e}}}return f&&(l.wasmMemory=f),l.onAbort=function(t){const e="\nNo further calls to the SDK are possible.";throw new vt("OOM"===t?"ScanbotSDK ran out of memory. "+e:"ScanbotSDK ran into an unexpected error: "+t+e)},yield c(l),pt=l,g(pt.initialize(t||"",o))}catch(t){throw console.error(t),t}}))},getLicenseInfo:function(){return ft(this,void 0,void 0,(function*(){return g(pt.getLicenseInfo())}))},encodeJpeg:function(t,e=80){return ft(this,void 0,void 0,(function*(){return g(pt.encodeJpeg(t,e))}))},beginPdf:function(t){return ft(this,void 0,void 0,(function*(){return yt(g(I(pt,"PdfGenerationContext").create(new F(t))))}))},addPageToPdf:function(t,e,r="ENABLED_IF_BINARIZATION_FILTER_SET"){return ft(this,void 0,void 0,(function*(){g(gt(t).addPage(e,r))}))},addPageToPdfWithOcr:function(t,e,r="ENABLED_IF_BINARIZATION_FILTER_SET"){return ft(this,void 0,void 0,(function*(){g(gt(t).addPageWithOcr(e,r))}))},completePdf:function(t){return ft(this,void 0,void 0,(function*(){try{const e=gt(t);return g(e.complete())}finally{wt(t)}}))},beginTiff:function(t){return ft(this,void 0,void 0,(function*(){const e=g(I(pt,"TiffGenerationContext").create(new O(t)));return g(e.begin()),yt(e)}))},addPageToTiff:function(t,e,r){return ft(this,void 0,void 0,(function*(){g(gt(t).addPage(e,r))}))},completeTiff:function(t){return ft(this,void 0,void 0,(function*(){try{const e=gt(t);return g(e.complete())}finally{wt(t)}}))},releaseObject:function(t){return ft(this,void 0,void 0,(function*(){wt(t)}))},version:function(){return ft(this,void 0,void 0,(function*(){return"8.1.1"}))}},{BarcodeDocumentParser:new z(Et=()=>pt),BarcodeScanner:new N(Et),CheckScanner:new B(Et),CreditCardScanner:new V(Et),DocumentClassifier:new Q(Et),DocumentDataExtractor:new G(Et),DocumentQualityAnalyzer:new J(Et),DocumentScanner:new Z(Et),ImageManipulator:new et(Et),ImageProcessor:new nt(Et),MrzScanner:new at(Et),MrzParser:new it(Et),OcrEngine:new ct(Et),TextPatternScanner:new lt(Et),VinScanner:new ht(Et)}),{__hasModuleFunction:function(t){return ft(this,void 0,void 0,(function*(){return pt.hasOwnProperty(t)}))},__callModuleFunction:function(t,e=[]){return ft(this,void 0,void 0,(function*(){return pt[t](...e)}))}});var Et;onmessage=function(t){const{command:e,args:r,ticket:n}=t.data;if(!pt&&"initialize"!==e)return void self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")});let o;o=e.includes(".")?bt[e.split(".")[0]][e.split(".")[1]](...r):bt[e](...r),(()=>ft(this,void 0,void 0,(function*(){return yield o})))().then((t=>{const e=function(t,e=!1){const r=[];return e||function t(e){if(e)if(e.constructor===ImageData)r.push(e.data.buffer);else if(e.constructor===ArrayBuffer)r.push(e);else if(ArrayBuffer.isView(e))r.push(e.buffer);else if(Array.isArray(e))for(let r=0;r<e.length;++r)t(e[r]);else if("object"==typeof e)for(const r in e)e.hasOwnProperty(r)&&t(e[r])}(t),r}(t);self.postMessage({ticket:n,result:t},e)})).catch((t=>{if(t instanceof vt)self.postMessage({ticket:n,unrecoverableError:t});else{const e="number"==typeof t?Error(pt.stringFromException(t)):t;console.error(e),self.postMessage({ticket:n,recoverableError:e,errorType:null==e?void 0:e.errorType})}}))}})()})();