/*!
 * PSPDFKit for Web 2024.5.1 (https://pspdfkit.com/web)
 * 
 * Copyright (c) 2016-2024 PSPDFKit GmbH. All rights reserved.
 * 
 * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
 * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
 * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
 * This notice may not be removed from this file.
 * 
 * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/
 */
var PSPDFModuleInit=(()=>{var e="undefined"!=typeof document?document.currentScript?.src:void 0;return"undefined"!=typeof __filename&&(e||=__filename),function(r={}){var t,n,o,a,i=r,s=new Promise(((e,r)=>{t=e,n=r})),l="object"==typeof window,u="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c=Object.assign({},i),f="./this.program",h=(e,r)=>{throw r},p="";if(d){var m=require("fs"),v=require("path");p=__dirname+"/",a=e=>(e=q(e)?new URL(e):v.normalize(e),m.readFileSync(e)),o=(e,r=!0)=>(e=q(e)?new URL(e):v.normalize(e),new Promise(((t,n)=>{m.readFile(e,r?void 0:"utf8",((e,o)=>{e?n(e):t(r?o.buffer:o)}))}))),!i.thisProgram&&process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),h=(e,r)=>{throw process.exitCode=e,r}}else(l||u)&&(u?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),e&&(p=e),p=p.startsWith("blob:")?"":p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1),u&&(a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),o=e=>q(e)?new Promise(((r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{(200==n.status||0==n.status&&n.response)&&t(n.response),r(n.status)},n.onerror=r,n.send(null)})):fetch(e,{credentials:"same-origin"}).then((e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))));var g,y,w=i.print||console.log.bind(console),E=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(f=i.thisProgram),i.quit&&(h=i.quit),i.wasmBinary&&(g=i.wasmBinary);var b,_,$,k,C,P,D,T,F=!1;function S(e,r){e||I(r)}function M(){var e=y.buffer;i.HEAP8=b=new Int8Array(e),i.HEAP16=$=new Int16Array(e),i.HEAPU8=_=new Uint8Array(e),i.HEAPU16=k=new Uint16Array(e),i.HEAP32=C=new Int32Array(e),i.HEAPU32=P=new Uint32Array(e),i.HEAPF32=D=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var A=[],j=[],O=[],R=!1;var z=0,N=null,x=null;function U(e){z++,i.monitorRunDependencies?.(z)}function L(e){if(z--,i.monitorRunDependencies?.(z),0==z&&(null!==N&&(clearInterval(N),N=null),x)){var r=x;x=null,r()}}function I(e){i.onAbort?.(e),E(e="Aborted("+e+")"),F=!0,1,e+=". Build with -sASSERTIONS for more info.",R&&Dt();var r=new WebAssembly.RuntimeError(e);throw n(r),r}var W,B,H,V=e=>e.startsWith("data:application/octet-stream;base64,"),q=e=>e.startsWith("file://");function Y(){var e,r="pspdfkit.wasm.wasm";return V(r)?r:(e=r,i.locateFile?i.locateFile(e,p):p+e)}function G(e){if(e==W&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function X(e,r,t){return function(e){return g?Promise.resolve().then((()=>G(e))):o(e).then((e=>new Uint8Array(e)),(()=>G(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then(t,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),I(e)}))}var J={3088472:()=>"undefined"!=typeof wasmOffsetConverter};function K(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var Z=e=>{for(;e.length>0;)e.shift()(i)},Q=i.noExitRuntime||!0,ee={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=ee.isAbs(e),t="/"===e.substr(-1);return(e=ee.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=ee.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=ee.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:(...e)=>ee.normalize(e.join("/")),join2:(e,r)=>ee.normalize(e+"/"+r)},re=e=>(re=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(d)try{var e=require("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}I("initRandomDevice")})())(e),te={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:ge.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=ee.isAbs(o)}return(t?"/":"")+(r=ee.normalizeArray(r.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=te.resolve(e).substr(1),r=te.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},ne="undefined"!=typeof TextDecoder?new TextDecoder:void 0,oe=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&ne)return ne.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&e[r++])<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},ae=[],ie=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},se=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function le(e,r,t){var n=t>0?t:ie(e)+1,o=new Array(n),a=se(e,o,0,o.length);return r&&(o.length=a),o}var ue={ttys:[],init(){},shutdown(){},register(e,r){ue.ttys[e]={input:[],output:[],ops:r},ge.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var r=ue.ttys[e.node.rdev];if(!r)throw new ge.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ge.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ge.ErrnoError(29)}if(void 0===s&&0===a)throw new ge.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ge.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ge.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!ae.length){var e=null;if(d){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=m.readSync(n,r,0,256)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}t>0&&(e=r.slice(0,t).toString("utf-8"))}else"undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n");if(!e)return null;ae=le(e,!0)}return ae.shift()})(),put_char(e,r){null===r||10===r?(w(oe(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(w(oe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(E(oe(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(E(oe(e.output,0)),e.output=[])}}},de=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=Pt(65536,e);return r?((e,r)=>(_.fill(0,e,e+r),e))(r,e):0},ce={ops_table:null,mount:e=>ce.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ge.isBlkdev(t)||ge.isFIFO(t))throw new ge.ErrnoError(63);ce.ops_table||={dir:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,lookup:ce.node_ops.lookup,mknod:ce.node_ops.mknod,rename:ce.node_ops.rename,unlink:ce.node_ops.unlink,rmdir:ce.node_ops.rmdir,readdir:ce.node_ops.readdir,symlink:ce.node_ops.symlink},stream:{llseek:ce.stream_ops.llseek}},file:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:{llseek:ce.stream_ops.llseek,read:ce.stream_ops.read,write:ce.stream_ops.write,allocate:ce.stream_ops.allocate,mmap:ce.stream_ops.mmap,msync:ce.stream_ops.msync}},link:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,readlink:ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:ge.chrdev_stream_ops}};var o=ge.createNode(e,r,t,n);return ge.isDir(o.mode)?(o.node_ops=ce.ops_table.dir.node,o.stream_ops=ce.ops_table.dir.stream,o.contents={}):ge.isFile(o.mode)?(o.node_ops=ce.ops_table.file.node,o.stream_ops=ce.ops_table.file.stream,o.usedBytes=0,o.contents=null):ge.isLink(o.mode)?(o.node_ops=ce.ops_table.link.node,o.stream_ops=ce.ops_table.link.stream):ge.isChrdev(o.mode)&&(o.node_ops=ce.ops_table.chrdev.node,o.stream_ops=ce.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=ge.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,ge.isDir(e.mode)?r.size=4096:ge.isFile(e.mode)?r.size=e.usedBytes:ge.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ce.resizeFileStorage(e,r.size)},lookup(e,r){throw ge.genericErrors[44]},mknod:(e,r,t,n)=>ce.createNode(e,r,t,n),rename(e,r,t){if(ge.isDir(e.mode)){var n;try{n=ge.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ge.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ge.lookupNode(e,r);for(var n in t.contents)throw new ge.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){var n=ce.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ge.isLink(e.mode))throw new ge.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===b.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(ce.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ge.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ge.ErrnoError(28);return n},allocate(e,r,t){ce.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ge.isFile(e.node.mode))throw new ge.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==b.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=de(r)))throw new ge.ErrnoError(48);b.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(ce.stream_ops.write(e,r,0,n,t,!1),0)}},fe=(e,r,t,n,o,a)=>{ge.createDataFile(e,r,t,n,o,a)},he=i.preloadPlugins||[],pe=(e,r,t,n,a,i,s,l,u,d)=>{var c=r?te.resolve(ee.join2(e,r)):e;function f(t){function o(t){d?.(),l||fe(e,r,t,n,a,u),i?.(),L()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return he.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,c,o,(()=>{s?.(),L()}))||o(t)}U(),"string"==typeof t?((e,r,t,n)=>{var a=n?"":`al ${e}`;o(e).then((e=>{r(new Uint8Array(e)),a&&L()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),a&&U()})(t,f,s):f(t)},me=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ve={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount(e){S(u),ve.reader||(ve.reader=new FileReaderSync);var r=ve.createNode(null,"/",ve.DIR_MODE,0),t={};function n(e){for(var n=e.split("/"),o=r,a=0;a<n.length-1;a++){var i=n.slice(0,a+1).join("/");t[i]||=ve.createNode(o,n[a],ve.DIR_MODE,0),o=t[i]}return o}function o(e){var r=e.split("/");return r[r.length-1]}return Array.prototype.forEach.call(e.opts.files||[],(function(e){ve.createNode(n(e.name),o(e.name),ve.FILE_MODE,0,e,e.lastModifiedDate)})),(e.opts.blobs||[]).forEach((function(e){ve.createNode(n(e.name),o(e.name),ve.FILE_MODE,0,e.data)})),(e.opts.packages||[]).forEach((function(e){e.metadata.files.forEach((function(r){var t=r.filename.substr(1);ve.createNode(n(t),o(t),ve.FILE_MODE,0,e.blob.slice(r.start,r.end))}))})),r},createNode(e,r,t,n,o,a){var i=ge.createNode(e,r,t);return i.mode=t,i.node_ops=ve.node_ops,i.stream_ops=ve.stream_ops,i.timestamp=(a||new Date).getTime(),S(ve.FILE_MODE!==ve.DIR_MODE),t===ve.FILE_MODE?(i.size=o.size,i.contents=o):(i.size=4096,i.contents={}),e&&(e.contents[r]=i),i},node_ops:{getattr:e=>({dev:1,ino:e.id,mode:e.mode,nlink:1,uid:0,gid:0,rdev:0,size:e.size,atime:new Date(e.timestamp),mtime:new Date(e.timestamp),ctime:new Date(e.timestamp),blksize:4096,blocks:Math.ceil(e.size/4096)}),setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp)},lookup(e,r){throw new ge.ErrnoError(44)},mknod(e,r,t,n){throw new ge.ErrnoError(63)},rename(e,r,t){throw new ge.ErrnoError(63)},unlink(e,r){throw new ge.ErrnoError(63)},rmdir(e,r){throw new ge.ErrnoError(63)},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){throw new ge.ErrnoError(63)}},stream_ops:{read(e,r,t,n,o){if(o>=e.node.size)return 0;var a=e.node.contents.slice(o,o+n),i=ve.reader.readAsArrayBuffer(a);return r.set(new Uint8Array(i),t),a.size},write(e,r,t,n,o){throw new ge.ErrnoError(29)},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ge.isFile(e.node.mode)&&(n+=e.node.size),n<0)throw new ge.ErrnoError(28);return n}}},ge={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return 0!=(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ge.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return ge.isDir(this.mode)}get isDevice(){return ge.isChrdev(this.mode)}},lookupPath(e,r={}){if(!(e=te.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ge.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ge.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ge.lookupNode(n,t[a]),o=ee.join2(o,t[a]),ge.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ge.isLink(n.mode);){var l=ge.readlink(o);if(o=te.resolve(ee.dirname(o),l),n=ge.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ge.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ge.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%ge.nameTable.length},hashAddNode(e){var r=ge.hashName(e.parent.id,e.name);e.name_next=ge.nameTable[r],ge.nameTable[r]=e},hashRemoveNode(e){var r=ge.hashName(e.parent.id,e.name);if(ge.nameTable[r]===e)ge.nameTable[r]=e.name_next;else for(var t=ge.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ge.mayLookup(e);if(t)throw new ge.ErrnoError(t);for(var n=ge.hashName(e.id,r),o=ge.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ge.lookup(e,r)},createNode(e,r,t,n){var o=new ge.FSNode(e,r,t,n);return ge.hashAddNode(o),o},destroyNode(e){ge.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ge.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!ge.isDir(e.mode))return 54;var r=ge.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{ge.lookupNode(e,r);return 20}catch(e){}return ge.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ge.lookupNode(e,r)}catch(e){return e.errno}var o=ge.nodePermissions(e,"wx");if(o)return o;if(t){if(!ge.isDir(n.mode))return 54;if(ge.isRoot(n)||ge.getPath(n)===ge.cwd())return 10}else if(ge.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ge.isLink(e.mode)?32:ge.isDir(e.mode)&&("r"!==ge.flagsToPermissionString(r)||512&r)?31:ge.nodePermissions(e,ge.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ge.MAX_OPEN_FDS;e++)if(!ge.streams[e])return e;throw new ge.ErrnoError(33)},getStreamChecked(e){var r=ge.getStream(e);if(!r)throw new ge.ErrnoError(8);return r},getStream:e=>ge.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new ge.FSStream,e),-1==r&&(r=ge.nextfd()),e.fd=r,ge.streams[r]=e,e),closeStream(e){ge.streams[e]=null},dupStream(e,r=-1){var t=ge.createStream(e,r);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(e){var r=ge.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new ge.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ge.devices[e]={stream_ops:r}},getDevice:e=>ge.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),ge.syncFSRequests++,ge.syncFSRequests>1&&E(`warning: ${ge.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ge.getMounts(ge.root.mount),n=0;function o(e){return ge.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&ge.root)throw new ge.ErrnoError(10);if(!o&&!a){var i=ge.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ge.isMountpoint(n))throw new ge.ErrnoError(10);if(!ge.isDir(n.mode))throw new ge.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?ge.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=ge.lookupPath(e,{follow_mount:!1});if(!ge.isMountpoint(r.node))throw new ge.ErrnoError(28);var t=r.node,n=t.mounted,o=ge.getMounts(n);Object.keys(ge.nameTable).forEach((e=>{for(var r=ge.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ge.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=ge.lookupPath(e,{parent:!0}).node,o=ee.basename(e);if(!o||"."===o||".."===o)throw new ge.ErrnoError(28);var a=ge.mayCreate(n,o);if(a)throw new ge.ErrnoError(a);if(!n.node_ops.mknod)throw new ge.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ge.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ge.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ge.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ge.mknod(e,r,t)),symlink(e,r){if(!te.resolve(e))throw new ge.ErrnoError(44);var t=ge.lookupPath(r,{parent:!0}).node;if(!t)throw new ge.ErrnoError(44);var n=ee.basename(r),o=ge.mayCreate(t,n);if(o)throw new ge.ErrnoError(o);if(!t.node_ops.symlink)throw new ge.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=ee.dirname(e),a=ee.dirname(r),i=ee.basename(e),s=ee.basename(r);if(t=ge.lookupPath(e,{parent:!0}).node,n=ge.lookupPath(r,{parent:!0}).node,!t||!n)throw new ge.ErrnoError(44);if(t.mount!==n.mount)throw new ge.ErrnoError(75);var l,u=ge.lookupNode(t,i),d=te.relative(e,a);if("."!==d.charAt(0))throw new ge.ErrnoError(28);if("."!==(d=te.relative(r,o)).charAt(0))throw new ge.ErrnoError(55);try{l=ge.lookupNode(n,s)}catch(e){}if(u!==l){var c=ge.isDir(u.mode),f=ge.mayDelete(t,i,c);if(f)throw new ge.ErrnoError(f);if(f=l?ge.mayDelete(n,s,c):ge.mayCreate(n,s))throw new ge.ErrnoError(f);if(!t.node_ops.rename)throw new ge.ErrnoError(63);if(ge.isMountpoint(u)||l&&ge.isMountpoint(l))throw new ge.ErrnoError(10);if(n!==t&&(f=ge.nodePermissions(t,"w")))throw new ge.ErrnoError(f);ge.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(e){throw e}finally{ge.hashAddNode(u)}}},rmdir(e){var r=ge.lookupPath(e,{parent:!0}).node,t=ee.basename(e),n=ge.lookupNode(r,t),o=ge.mayDelete(r,t,!0);if(o)throw new ge.ErrnoError(o);if(!r.node_ops.rmdir)throw new ge.ErrnoError(63);if(ge.isMountpoint(n))throw new ge.ErrnoError(10);r.node_ops.rmdir(r,t),ge.destroyNode(n)},readdir(e){var r=ge.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ge.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ge.lookupPath(e,{parent:!0}).node;if(!r)throw new ge.ErrnoError(44);var t=ee.basename(e),n=ge.lookupNode(r,t),o=ge.mayDelete(r,t,!1);if(o)throw new ge.ErrnoError(o);if(!r.node_ops.unlink)throw new ge.ErrnoError(63);if(ge.isMountpoint(n))throw new ge.ErrnoError(10);r.node_ops.unlink(r,t),ge.destroyNode(n)},readlink(e){var r=ge.lookupPath(e).node;if(!r)throw new ge.ErrnoError(44);if(!r.node_ops.readlink)throw new ge.ErrnoError(28);return te.resolve(ge.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ge.lookupPath(e,{follow:!r}).node;if(!t)throw new ge.ErrnoError(44);if(!t.node_ops.getattr)throw new ge.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ge.stat(e,!0),chmod(e,r,t){var n;"string"==typeof e?n=ge.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new ge.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ge.chmod(e,r,!0)},fchmod(e,r){var t=ge.getStreamChecked(e);ge.chmod(t.node,r)},chown(e,r,t,n){var o;"string"==typeof e?o=ge.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new ge.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ge.chown(e,r,t,!0)},fchown(e,r,t){var n=ge.getStreamChecked(e);ge.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ge.ErrnoError(28);var t;"string"==typeof e?t=ge.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new ge.ErrnoError(63);if(ge.isDir(t.mode))throw new ge.ErrnoError(31);if(!ge.isFile(t.mode))throw new ge.ErrnoError(28);var n=ge.nodePermissions(t,"w");if(n)throw new ge.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ge.getStreamChecked(e);if(0==(2097155&t.flags))throw new ge.ErrnoError(28);ge.truncate(t.node,r)},utime(e,r,t){var n=ge.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ge.ErrnoError(44);var n;if(t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&(t=void 0===t?438:t)|32768:0,"object"==typeof e)n=e;else{e=ee.normalize(e);try{n=ge.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new ge.ErrnoError(20)}else n=ge.mknod(e,t,0),o=!0;if(!n)throw new ge.ErrnoError(44);if(ge.isChrdev(n.mode)&&(r&=-513),65536&r&&!ge.isDir(n.mode))throw new ge.ErrnoError(54);if(!o){var a=ge.mayOpen(n,r);if(a)throw new ge.ErrnoError(a)}512&r&&!o&&ge.truncate(n,0),r&=-131713;var s=ge.createStream({node:n,path:ge.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&r||(ge.readFiles||(ge.readFiles={}),e in ge.readFiles||(ge.readFiles[e]=1)),s},close(e){if(ge.isClosed(e))throw new ge.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ge.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ge.isClosed(e))throw new ge.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ge.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ge.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new ge.ErrnoError(28);if(ge.isClosed(e))throw new ge.ErrnoError(8);if(1==(2097155&e.flags))throw new ge.ErrnoError(8);if(ge.isDir(e.node.mode))throw new ge.ErrnoError(31);if(!e.stream_ops.read)throw new ge.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ge.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ge.ErrnoError(28);if(ge.isClosed(e))throw new ge.ErrnoError(8);if(0==(2097155&e.flags))throw new ge.ErrnoError(8);if(ge.isDir(e.node.mode))throw new ge.ErrnoError(31);if(!e.stream_ops.write)throw new ge.ErrnoError(28);e.seekable&&1024&e.flags&&ge.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ge.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ge.isClosed(e))throw new ge.ErrnoError(8);if(r<0||t<=0)throw new ge.ErrnoError(28);if(0==(2097155&e.flags))throw new ge.ErrnoError(8);if(!ge.isFile(e.node.mode)&&!ge.isDir(e.node.mode))throw new ge.ErrnoError(43);if(!e.stream_ops.allocate)throw new ge.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new ge.ErrnoError(2);if(1==(2097155&e.flags))throw new ge.ErrnoError(2);if(!e.stream_ops.mmap)throw new ge.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new ge.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=ge.open(e,r.flags),o=ge.stat(e).size,a=new Uint8Array(o);return ge.read(n,a,0,o,0),"utf8"===r.encoding?t=oe(a,0):"binary"===r.encoding&&(t=a),ge.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ge.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ie(r)+1),a=se(r,o,0,o.length);ge.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ge.write(n,r,0,r.byteLength,void 0,t.canOwn)}ge.close(n)},cwd:()=>ge.currentPath,chdir(e){var r=ge.lookupPath(e,{follow:!0});if(null===r.node)throw new ge.ErrnoError(44);if(!ge.isDir(r.node.mode))throw new ge.ErrnoError(54);var t=ge.nodePermissions(r.node,"x");if(t)throw new ge.ErrnoError(t);ge.currentPath=r.path},createDefaultDirectories(){ge.mkdir("/tmp"),ge.mkdir("/home"),ge.mkdir("/home/web_user")},createDefaultDevices(){ge.mkdir("/dev"),ge.registerDevice(ge.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ge.mkdev("/dev/null",ge.makedev(1,3)),ue.register(ge.makedev(5,0),ue.default_tty_ops),ue.register(ge.makedev(6,0),ue.default_tty1_ops),ge.mkdev("/dev/tty",ge.makedev(5,0)),ge.mkdev("/dev/tty1",ge.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=re(e).byteLength),e[--r]);ge.createDevice("/dev","random",t),ge.createDevice("/dev","urandom",t),ge.mkdir("/dev/shm"),ge.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ge.mkdir("/proc");var e=ge.mkdir("/proc/self");ge.mkdir("/proc/self/fd"),ge.mount({mount(){var r=ge.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ge.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?ge.createDevice("/dev","stdin",i.stdin):ge.symlink("/dev/tty","/dev/stdin"),i.stdout?ge.createDevice("/dev","stdout",null,i.stdout):ge.symlink("/dev/tty","/dev/stdout"),i.stderr?ge.createDevice("/dev","stderr",null,i.stderr):ge.symlink("/dev/tty1","/dev/stderr");ge.open("/dev/stdin",0),ge.open("/dev/stdout",1),ge.open("/dev/stderr",1)},staticInit(){[44].forEach((e=>{ge.genericErrors[e]=new ge.ErrnoError(e),ge.genericErrors[e].stack="<generic error, no stack>"})),ge.nameTable=new Array(4096),ge.mount(ce,{},"/"),ge.createDefaultDirectories(),ge.createDefaultDevices(),ge.createSpecialDirectories(),ge.filesystems={MEMFS:ce,WORKERFS:ve}},init(e,r,t){ge.init.initialized=!0,i.stdin=e||i.stdin,i.stdout=r||i.stdout,i.stderr=t||i.stderr,ge.createStandardStreams()},quit(){ge.init.initialized=!1;for(var e=0;e<ge.streams.length;e++){var r=ge.streams[e];r&&ge.close(r)}},findObject(e,r){var t=ge.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ge.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ge.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=ee.basename(e),n=ge.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:ge.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=ee.join2(e,a);try{ge.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=ee.join2("string"==typeof e?e:ge.getPath(e),r),i=me(n,o);return ge.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ge.getPath(e),i=r?ee.join2(e,r):e);var s=me(n,o),l=ge.create(i,s);if(t){if("string"==typeof t){for(var u=new Array(t.length),d=0,c=t.length;d<c;++d)u[d]=t.charCodeAt(d);t=u}ge.chmod(l,146|s);var f=ge.open(l,577);ge.write(f,t,0,t.length,0,a),ge.close(f),ge.chmod(l,s)}},createDevice(e,r,t,n){var o=ee.join2("string"==typeof e?e:ge.getPath(e),r),a=me(!!t,!!n);ge.createDevice.major||(ge.createDevice.major=64);var i=ge.makedev(ge.createDevice.major++,0);return ge.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new ge.ErrnoError(29)}if(void 0===l&&0===i)throw new ge.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ge.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ge.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=a(e.url),e.usedBytes=e.contents.length}catch(e){throw new ge.ErrnoError(29)}},createLazyFile(e,r,t,n,o){class a{constructor(){this.lengthKnown=!1,this.chunks=[]}get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):le(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var s=ge.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];l[e]=(...e)=>(ge.forceLoadFile(s),r(...e))})),l.read=(e,r,t,n,o)=>(ge.forceLoadFile(s),d(e,r,t,n,o)),l.mmap=(e,r,t,n,o)=>{ge.forceLoadFile(s);var a=de(r);if(!a)throw new ge.ErrnoError(48);return d(e,b,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=l,s}},ye=(e,r)=>e?oe(_,e,r):"",we={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(ee.isAbs(r))return r;var n;-100===e?n=ge.cwd():n=we.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new ge.ErrnoError(44);return n}return ee.join2(n,r)},doStat(e,r,t){var n=e(r);C[t>>2]=n.dev,C[t+4>>2]=n.mode,P[t+8>>2]=n.nlink,C[t+12>>2]=n.uid,C[t+16>>2]=n.gid,C[t+20>>2]=n.rdev,H=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[t+24>>2]=H[0],C[t+28>>2]=H[1],C[t+32>>2]=4096,C[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return H=[Math.floor(o/1e3)>>>0,(B=Math.floor(o/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[t+40>>2]=H[0],C[t+44>>2]=H[1],P[t+48>>2]=o%1e3*1e3,H=[Math.floor(a/1e3)>>>0,(B=Math.floor(a/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[t+56>>2]=H[0],C[t+60>>2]=H[1],P[t+64>>2]=a%1e3*1e3,H=[Math.floor(i/1e3)>>>0,(B=Math.floor(i/1e3),+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[t+72>>2]=H[0],C[t+76>>2]=H[1],P[t+80>>2]=i%1e3*1e3,H=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[t+88>>2]=H[0],C[t+92>>2]=H[1],0},doMsync(e,r,t,n,o){if(!ge.isFile(r.node.mode))throw new ge.ErrnoError(43);if(2&n)return 0;var a=_.slice(e,e+t);ge.msync(r,a,o,t,n)},getStreamFromFD:e=>ge.getStreamChecked(e),varargs:void 0,getStr:e=>ye(e)};function Ee(){var e=C[+we.varargs>>2];return we.varargs+=4,e}var be=Ee;var _e=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN;var $e=(e,r,t)=>se(e,_,r,t);var ke,Ce,Pe,De,Te,Fe=(e,r)=>Object.defineProperty(r,"name",{value:e}),Se=[],Me=[],Ae=e=>{throw new ke(e)},je=()=>Me.length/2-5-Se.length,Oe=e=>(e||Ae("Cannot use deleted val. handle = "+e),Me[e]),Re=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=Se.pop()||Me.length;return Me[r]=e,Me[r+1]=1,r}}},ze=(e,r)=>{var t=Fe(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Ne=e=>{for(var r="",t=e;_[t];)r+=Pe[_[t++]];return r},xe=()=>Object.keys(Be).length,Ue=()=>{var e=[];for(var r in Be)Be.hasOwnProperty(r)&&e.push(Be[r]);return e},Le=[],Ie=()=>{for(;Le.length;){var e=Le.pop();e.$$.deleteScheduled=!1,e.delete()}},We=e=>{De=e,Le.length&&De&&De(Ie)},Be={},He=(e,r)=>{for(void 0===r&&Ae("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},Ve={},qe=e=>{var r=$t(e),t=Ne(r);return Ct(r),t},Ye=(e,r)=>{var t=Ve[e];return void 0===t&&Ae(`${r} has unknown type ${qe(e)}`),t},Ge=e=>{},Xe=!1,Je=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Ke=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=Ke(e,r,t.baseClass);return null===n?null:t.downcast(n)},Ze={},Qe=e=>{throw new Te(e)},er=(e,r)=>(r.ptrType&&r.ptr||Qe("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Qe("Both smartPtrType and smartPtr must be specified"),r.count={value:1},tr(Object.create(e,{$$:{value:r,writable:!0}})));function rr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=((e,r)=>(r=He(e,r),Be[r]))(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?er(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):er(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Ze[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=Ke(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?er(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):er(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var tr=e=>"undefined"==typeof FinalizationRegistry?(tr=e=>e,e):(Xe=new FinalizationRegistry((e=>{Je(e.$$)})),tr=e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r};Xe.register(e,t,e)}return e},Ge=e=>Xe.unregister(e),tr(e)),nr={},or=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function ar(e){return this.fromWireType(P[e>>2])}var ir={},sr={},lr=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Qe("Mismatched type converter count");for(var o=0;o<e.length;++o)ur(e[o],n[o])}e.forEach((function(e){sr[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Ve.hasOwnProperty(e)?o[r]=Ve[e]:(a.push(e),ir.hasOwnProperty(e)||(ir[e]=[]),ir[e].push((()=>{o[r]=Ve[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function ur(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Ae(`type "${n}" must have a positive integer typeid pointer`),Ve.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${n}' twice`)}if(Ve[e]=r,delete sr[e],ir.hasOwnProperty(e)){var o=ir[e];delete ir[e],o.forEach((e=>e()))}}(e,r,t)}var dr=8,cr=e=>{Ae(e.$$.ptrType.registeredClass.name+" instance already deleted")};function fr(){}var hr=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||Ae(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},pr=(e,r,t)=>{i.hasOwnProperty(e)?((void 0===t||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[t])&&Ae(`Cannot register public name '${e}' twice`),hr(i,e,e),i.hasOwnProperty(t)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),i[e].overloadTable[t]=r):(i[e]=r,void 0!==t&&(i[e].numArguments=t))};function mr(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var vr=(e,r,t)=>{for(;r!==t;)r.upcast||Ae(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function gr(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${Rr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return vr(r.$$.ptr,t,this.registeredClass)}function yr(e,r){var t;if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r&&r.$$||Ae(`Cannot pass "${Rr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=vr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ae(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Re((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ae("Unsupporting sharing policy")}return t}function wr(e,r){if(null===r)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;r.$$||Ae(`Cannot pass "${Rr(r)}" as a ${this.name}`),r.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return vr(r.$$.ptr,t,this.registeredClass)}function Er(e,r,t,n,o,a,i,s,l,u,d){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=d,o||void 0!==r.baseClass?this.toWireType=yr:n?(this.toWireType=gr,this.destructorFunction=null):(this.toWireType=wr,this.destructorFunction=null)}var br,_r,$r=(e,r,t)=>{i.hasOwnProperty(e)||Qe("Replacing nonexistent public symbol"),void 0!==i[e].overloadTable&&void 0!==t?i[e].overloadTable[t]=r:(i[e]=r,i[e].argCount=t)},kr=e=>br.get(e),Cr=(e,r,t=[])=>e.includes("j")?((e,r,t)=>(e=e.replace(/p/g,"i"),(0,i["dynCall_"+e])(r,...t)))(e,r,t):kr(r)(...t),Pr=(e,r)=>{var t,n,o=(e=Ne(e)).includes("j")?(t=e,n=r,(...e)=>Cr(t,n,e)):kr(r);return"function"!=typeof o&&Ae(`unknown function pointer with signature ${e}: ${r}`),o},Dr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Ve[r]||(sr[r]?sr[r].forEach(e):(t.push(r),n[r]=!0))})),new _r(`${e}: `+t.map(qe).join([", "]))};function Tr(e,r,t,n,o,a){var i=r.length;i<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==r[1]&&null!==t,l=function(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}(r),u="void"!==r[0].name,d=i-2,c=new Array(d),f=[],h=[];return Fe(e,(function(...t){var a;t.length!==d&&Ae(`function ${e} called with ${t.length} arguments, expected ${d}`),h.length=0,f.length=s?2:1,f[0]=o,s&&(a=r[1].toWireType(h,this),f[1]=a);for(var i=0;i<d;++i)c[i]=r[i+2].toWireType(h,t[i]),f.push(c[i]);return function(e){if(l)or(h);else for(var t=s?1:2;t<r.length;t++){var n=1===t?a:c[t-2];null!==r[t].destructorFunction&&r[t].destructorFunction(n)}if(u)return r[0].fromWireType(e)}(n(...f))}))}var Fr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(P[r+4*n>>2]);return t},Sr=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e},Mr=(e,r,t)=>(e instanceof Object||Ae(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Ae(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Ae(`cannot call emscripten binding method ${t} on deleted object`),vr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)),Ar=e=>{e>9&&0==--Me[e+1]&&(Me[e]=void 0,Se.push(e))},jr={name:"emscripten::val",fromWireType:e=>{var r=Oe(e);return Ar(e),r},toWireType:(e,r)=>Re(r),argPackAdvance:dr,readValueFromPointer:ar,destructorFunction:null},Or=e=>ur(e,jr),Rr=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},zr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(D[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},Nr=(e,r,t)=>{switch(r){case 1:return t?e=>b[e]:e=>_[e];case 2:return t?e=>$[e>>1]:e=>k[e>>1];case 4:return t?e=>C[e>>2]:e=>P[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},xr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ur=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&k[n];)++n;if((t=n<<1)-e>32&&xr)return xr.decode(_.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=$[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Lr=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);$[r>>1]=i,r+=2}return $[r>>1]=0,r-n},Ir=e=>2*e.length,Wr=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=C[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Br=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a);if(C[r>>2]=i,(r+=4)+4>o)break}return C[r>>2]=0,r-n},Hr=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Vr=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(P[r>>2]=Re(n)),o},qr=[],Yr={},Gr=e=>{var r=Yr[e];return void 0===r?Ne(e):r},Xr=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof global&&e(global)?$$$embind_global$$$=global:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},Jr=Reflect.construct;var Kr=e=>e%4==0&&(e%100!=0||e%400==0),Zr=[0,31,60,91,121,152,182,213,244,274,305,335],Qr=[0,31,59,90,120,151,181,212,243,273,304,334],et=e=>(Kr(e.getFullYear())?Zr:Qr)[e.getMonth()]+e.getDate()-1;var rt=e=>Tt(e);var tt,nt=[],ot=(e,r,t)=>{var n=((e,r)=>{var t;for(nt.length=0;t=_[e++];){var n=105!=t;r+=(n&=112!=t)&&r%8?4:0,nt.push(112==t?P[r>>2]:105==t?C[r>>2]:T[r>>3]),r+=n?8:4}return nt})(r,t);return J[e](...n)};tt=()=>performance.now();var at=e=>{var r=(e-y.buffer.byteLength+65535)/65536;try{return y.grow(r),M(),1}catch(e){}},it=e=>(I("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0),st={},lt=e=>{e.forEach((e=>{var r=it();r&&(st[r]=e)}))};function ut(){return(new Error).stack.toString()}var dt={},ct=()=>{if(!ct.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var r in dt)void 0===dt[r]?delete e[r]:e[r]=dt[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);ct.strings=t}return ct.strings};var ft=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},ht=[31,29,31,30,31,30,31,31,30,31,30,31],pt=[31,28,31,30,31,30,31,31,30,31,30,31],mt=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Kr(t.getFullYear()),o=t.getMonth(),a=(n?ht:pt)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t},vt=e=>parseInt(e),gt=ge.createPath,yt=ge.createLazyFile,wt=ge.createDevice;ge.createPreloadedFile=pe,ge.staticInit(),i.FS_createPath=ge.createPath,i.FS_createDataFile=ge.createDataFile,i.FS_createPreloadedFile=ge.createPreloadedFile,i.FS_unlink=ge.unlink,i.FS_createLazyFile=ge.createLazyFile,i.FS_createDevice=ge.createDevice,ke=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Me.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=je,Ce=i.PureVirtualError=ze(Error,"PureVirtualError"),(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Pe=e})(),i.getInheritedInstanceCount=xe,i.getLiveInheritedInstances=Ue,i.flushPendingDeletes=Ie,i.setDelayFunction=We,Te=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(fr.prototype,{isAliasOf(e){if(!(this instanceof fr))return!1;if(!(e instanceof fr))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||cr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=tr(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||cr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Ge(this),Je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||cr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Le.push(this),1===Le.length&&De&&De(Ie),this.$$.deleteScheduled=!0,this}}),Object.assign(Er.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:dr,readValueFromPointer:ar,fromWireType:rr}),_r=i.UnboundTypeError=ze(Error,"UnboundTypeError");var Et,bt={qa:function(){return"undefined"!=typeof wasmOffsetConverter},W:function(e,r,t,n,o){try{for(var a=0,i=r?C[r>>2]:0,s=r?C[r+4>>2]:0,l=t?C[t>>2]:0,u=t?C[t+4>>2]:0,d=n?C[n>>2]:0,c=n?C[n+4>>2]:0,f=0,h=0,p=0,m=0,v=0,g=0,y=(r?C[r>>2]:0)|(t?C[t>>2]:0)|(n?C[n>>2]:0),w=(r?C[r+4>>2]:0)|(t?C[t+4>>2]:0)|(n?C[n+4>>2]:0),E=function(e,r,t,n){return e<32?r&n:t&n},b=0;b<e;b++){var _=1<<b%32;if(E(b,y,w,_)){var $=we.getStreamFromFD(b),k=we.DEFAULT_POLLMASK;if($.stream_ops.poll){var P=-1;if(o)P=1e3*((r?C[o>>2]:0)+(r?C[o+4>>2]:0)/1e6);k=$.stream_ops.poll($,P)}1&k&&E(b,i,s,_)&&(b<32?f|=_:h|=_,a++),4&k&&E(b,l,u,_)&&(b<32?p|=_:m|=_,a++),2&k&&E(b,d,c,_)&&(b<32?v|=_:g|=_,a++)}}return r&&(C[r>>2]=f,C[r+4>>2]=h),t&&(C[t>>2]=p,C[t+4>>2]=m),n&&(C[n>>2]=v,C[n+4>>2]=g),a}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ia:function(e,r){try{return e=we.getStr(e),ge.chmod(e,r),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},la:function(e,r,t,n){try{if(r=we.getStr(r),r=we.calculateAt(e,r),-8&t)return-28;var o=ge.lookupPath(r,{follow:!0}).node;if(!o)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&ge.nodePermissions(o,a)?-2:0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ja:function(e,r){try{return ge.fchmod(e,r),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},A:function(e,r,t){we.varargs=t;try{var n=we.getStreamFromFD(e);switch(r){case 0:if((o=Ee())<0)return-28;for(;ge.streams[o];)o++;return ge.dupStream(n,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=Ee();return n.flags|=o,0;case 12:o=be();return $[o+0>>1]=2,0}return-28}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},fa:function(e,r){try{var t=we.getStreamFromFD(e);return we.doStat(ge.stat,t.path,r)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},Q:function(e,r,t){var n=_e(r,t);try{return isNaN(n)?61:(ge.ftruncate(e,n),0)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},Y:function(e,r,t){try{var n=we.getStreamFromFD(e);n.getdents||=ge.readdir(n.path);for(var o=280,a=0,i=ge.llseek(n,0,1),s=Math.floor(i/o);s<n.getdents.length&&a+o<=t;){var l,u,d=n.getdents[s];if("."===d)l=n.node.id,u=4;else if(".."===d){l=ge.lookupPath(n.path,{parent:!0}).node.id,u=4}else{var c=ge.lookupNode(n.node,d);l=c.id,u=ge.isChrdev(c.mode)?2:ge.isDir(c.mode)?4:ge.isLink(c.mode)?10:8}H=[l>>>0,(B=l,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[r+a>>2]=H[0],C[r+a+4>>2]=H[1],H=[(s+1)*o>>>0,(B=(s+1)*o,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[r+a+8>>2]=H[0],C[r+a+12>>2]=H[1],$[r+a+16>>1]=280,b[r+a+18]=u,$e(d,r+a+19,256),a+=o,s+=1}return ge.llseek(n,s*o,0),a}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ha:function(e,r,t){we.varargs=t;try{var n=we.getStreamFromFD(e);switch(r){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=be();C[a>>2]=o.c_iflag||0,C[a+4>>2]=o.c_oflag||0,C[a+8>>2]=o.c_cflag||0,C[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)b[a+i+17]=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=be();var s=C[a>>2],l=C[a+4>>2],u=C[a+8>>2],d=C[a+12>>2],c=[];for(i=0;i<32;i++)c.push(b[a+i+17]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:l,c_cflag:u,c_lflag:d,c_cc:c})}return 0;case 21519:if(!n.tty)return-59;a=be();return C[a>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:a=be();return ge.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=be();$[a>>1]=f[0],$[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},da:function(e,r){try{return e=we.getStr(e),we.doStat(ge.lstat,e,r)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},Z:function(e,r,t){try{return r=we.getStr(r),r=we.calculateAt(e,r),"/"===(r=ee.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),ge.mkdir(r,t,0),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ca:function(e,r,t,n){try{r=we.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=we.calculateAt(e,r,a),we.doStat(o?ge.lstat:ge.stat,r,t)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},t:function(e,r,t,n){we.varargs=n;try{r=we.getStr(r),r=we.calculateAt(e,r);var o=n?Ee():0;return ge.open(r,t,o).fd}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},X:function(e,r,t,n){try{return r=we.getStr(r),n=we.getStr(n),r=we.calculateAt(e,r),n=we.calculateAt(t,n),ge.rename(r,n),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},w:function(e){try{return e=we.getStr(e),ge.rmdir(e),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ea:function(e,r){try{return e=we.getStr(e),we.doStat(ge.stat,e,r)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},x:function(e,r,t){try{return r=we.getStr(r),r=we.calculateAt(e,r),0===t?ge.unlink(r):512===t?ge.rmdir(r):I("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},ma:()=>{I("")},wa:(e,r,t)=>{e=Ne(e),r=Ye(r,"wrapper"),t=Oe(t);var n=r.registeredClass,o=n.instancePrototype,a=n.baseClass.instancePrototype,i=n.baseClass.constructor,s=Fe(e,(function(...e){n.baseClass.pureVirtualFunctions.forEach(function(e){if(this[e]===a[e])throw new Ce(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:o}),this.__construct(...e)}));return o.__construct=function(...e){this===o&&Ae("Pass correct 'this' to __construct");var r=i.implement(this,...e);Ge(r);var t,a,s,l=r.$$;r.notifyOnDestruction(),l.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:l}}),tr(this),t=n,a=l.ptr,s=this,a=He(t,a),Be.hasOwnProperty(a)?Ae(`Tried to register registered instance: ${a}`):Be[a]=s},o.__destruct=function(){var e,r;this===o&&Ae("Pass correct 'this' to __destruct"),Ge(this),e=n,r=this.$$.ptr,r=He(e,r),Be.hasOwnProperty(r)?delete Be[r]:Ae(`Tried to unregister unregistered instance: ${r}`)},s.prototype=Object.create(o),Object.assign(s.prototype,t),Re(s)},C:e=>{var r=nr[e];delete nr[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));lr([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,l=r.getterContext,u=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(l,e)),write:(e,r)=>{var t=[];d(c,e,u.toWireType(t,r)),or(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:dr,readValueFromPointer:ar,destructorFunction:n}]}))},R:(e,r,t,n,o)=>{},za:(e,r,t,n)=>{ur(e,{name:r=Ne(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:dr,readValueFromPointer:function(e){return this.fromWireType(_[e])},destructorFunction:null})},i:(e,r,t,n,o,a,i,s,l,u,d,c,f)=>{d=Ne(d),a=Pr(o,a),s&&=Pr(i,s),u&&=Pr(l,u),f=Pr(c,f);var h=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(d);pr(h,(function(){Dr(`Cannot construct ${d} due to unbound types`,[n])})),lr([e,r,t],n?[n]:[],(r=>{var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:fr.prototype;var i=Fe(d,(function(...e){if(Object.getPrototypeOf(this)!==l)throw new ke("Use 'new' to construct "+d);if(void 0===c.constructor_body)throw new ke(d+" has no accessible constructor");var r=c.constructor_body[e.length];if(void 0===r)throw new ke(`Tried to invoke ctor of ${d} with invalid number of parameters (${e.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return r.apply(this,e)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new mr(d,i,l,f,t,a,s,u);c.baseClass&&(c.baseClass.__derivedClasses??=[],c.baseClass.__derivedClasses.push(c));var p=new Er(d,c,!0,!1,!1),m=new Er(d+"*",c,!1,!1,!1),v=new Er(d+" const*",c,!1,!0,!1);return Ze[e]={pointerType:m,constPointerType:v},$r(h,i),[p,m,v]}))},B:(e,r,t,n,o,a,i,s)=>{var l=Fr(t,n);r=Ne(r),r=Sr(r),a=Pr(o,a),lr([],[e],(e=>{var n=`${(e=e[0]).name}.${r}`;function o(){Dr(`Cannot call ${n} due to unbound types`,l)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var s=e.registeredClass.constructor;return void 0===s[r]?(o.argCount=t-1,s[r]=o):(hr(s,r,n),s[r].overloadTable[t-1]=o),lr([],l,(o=>{var l=[o[0],null].concat(o.slice(1)),u=Tr(n,l,null,a,i);if(void 0===s[r].overloadTable?(u.argCount=t-1,s[r]=u):s[r].overloadTable[t-1]=u,e.registeredClass.__derivedClasses)for(const t of e.registeredClass.__derivedClasses)t.constructor.hasOwnProperty(r)||(t.constructor[r]=u);return[]})),[]}))},E:(e,r,t,n,o,a)=>{var i=Fr(r,t);o=Pr(n,o),lr([],[e],(e=>{var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new ke(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Dr(`Cannot construct ${e.name} due to unbound types`,i)},lr([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Tr(t,n,null,o,a),[]))),[]}))},c:(e,r,t,n,o,a,i,s,l)=>{var u=Fr(t,n);r=Ne(r),r=Sr(r),a=Pr(o,a),lr([],[e],(e=>{var n=`${(e=e[0]).name}.${r}`;function o(){Dr(`Cannot call ${n} due to unbound types`,u)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var l=e.registeredClass.instancePrototype,d=l[r];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===t-2?(o.argCount=t-2,o.className=e.name,l[r]=o):(hr(l,r,n),l[r].overloadTable[t-2]=o),lr([],u,(o=>{var s=Tr(n,o,e,a,i);return void 0===l[r].overloadTable?(s.argCount=t-2,l[r]=s):l[r].overloadTable[t-2]=s,[]})),[]}))},r:(e,r,t,n,o,a,i,s,l,u)=>{r=Ne(r),o=Pr(n,o),lr([],[e],(e=>{var n=`${(e=e[0]).name}.${r}`,d={get(){Dr(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return d.set=l?()=>Dr(`Cannot access ${n} due to unbound types`,[t,i]):e=>Ae(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,d),lr([],l?[t,i]:[t],(t=>{var i=t[0],d={get(){var r=Mr(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(l){l=Pr(s,l);var c=t[1];d.set=function(r){var t=Mr(this,e,n+" setter"),o=[];l(u,t,c.toWireType(o,r)),or(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,d),[]})),[]}))},ya:Or,F:(e,r,t)=>{ur(e,{name:r=Ne(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:dr,readValueFromPointer:zr(r,t),destructorFunction:null})},a:(e,r,t,n,o,a,i)=>{var s=Fr(r,t);e=Ne(e),e=Sr(e),o=Pr(n,o),pr(e,(function(){Dr(`Cannot call ${e} due to unbound types`,s)}),r-1),lr([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return $r(e,Tr(e,n,null,o,a),r-1),[]}))},h:(e,r,t,n,o)=>{r=Ne(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");ur(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:dr,readValueFromPointer:Nr(r,t,0!==n),destructorFunction:null})},d:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=P[e>>2],t=P[e+4>>2];return new n(b.buffer,t,r)}ur(e,{name:t=Ne(t),fromWireType:o,argPackAdvance:dr,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},H:(e,r)=>{Or(e)},aa:(e,r,t,n,o,a,i,s,l,u,d,c)=>{t=Ne(t),a=Pr(o,a),s=Pr(i,s),u=Pr(l,u),c=Pr(d,c),lr([e],[r],(e=>(e=e[0],[new Er(t,e.registeredClass,!1,!1,!0,e,n,a,s,u,c)])))},G:(e,r)=>{var t="std::string"===(r=Ne(r));ur(e,{name:r,fromWireType(e){var r,n=P[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==_[s]){var l=ye(a,s-a);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),a=s+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(_[o+i]);r=u.join("")}return Ct(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Ae("Cannot pass non-string to std::string"),n=t&&o?ie(r):r.length;var a=kt(4+n+1),i=a+4;if(P[a>>2]=n,t&&o)$e(r,i,n+1);else if(o)for(var s=0;s<n;++s){var l=r.charCodeAt(s);l>255&&(Ct(i),Ae("String has UTF-16 code units that do not fit in 8 bits")),_[i+s]=l}else for(s=0;s<n;++s)_[i+s]=r[s];return null!==e&&e.push(Ct,a),a},argPackAdvance:dr,readValueFromPointer:ar,destructorFunction(e){Ct(e)}})},v:(e,r,t)=>{var n,o,a,i;t=Ne(t),2===r?(n=Ur,o=Lr,i=Ir,a=e=>k[e>>1]):4===r&&(n=Wr,o=Br,i=Hr,a=e=>P[e>>2]),ur(e,{name:t,fromWireType:e=>{for(var t,o=P[e>>2],i=e+4,s=0;s<=o;++s){var l=e+4+s*r;if(s==o||0==a(l)){var u=n(i,l-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=l+r}}return Ct(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ae(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=kt(4+a+r);return P[s>>2]=a/r,o(n,s+4,a+r),null!==e&&e.push(Ct,s),s},argPackAdvance:dr,readValueFromPointer:ar,destructorFunction(e){Ct(e)}})},xa:(e,r,t,n,o,a)=>{nr[e]={name:Ne(r),rawConstructor:Pr(t,n),rawDestructor:Pr(o,a),fields:[]}},D:(e,r,t,n,o,a,i,s,l,u)=>{nr[e].fields.push({fieldName:Ne(r),getterReturnType:t,getter:Pr(n,o),getterContext:a,setterArgumentType:i,setter:Pr(s,l),setterContext:u})},Aa:(e,r)=>{ur(e,{isVoid:!0,name:r=Ne(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},oa:e=>{do{var r=P[e>>2],t=P[(e+=4)>>2],n=P[(e+=4)>>2];e+=4;var o=ye(r);ge.createPath("/",ee.dirname(o),!0,!0),ge.createDataFile(o,null,b.subarray(n,n+t),!0,!0,!0)}while(P[e>>2])},ka:()=>1,ga:(e,r,t)=>_.copyWithin(e,r,r+t),n:(e,r,t)=>(e=Oe(e),r=Ye(r,"emval::as"),Vr(r,t,e)),J:(e,r,t,n)=>(e=qr[e])(null,r=Oe(r),t,n),g:(e,r,t,n,o)=>(e=qr[e])(r=Oe(r),r[t=Gr(t)],n,o),b:Ar,q:e=>0===e?Re(Xr()):(e=Gr(e),Re(Xr()[e])),f:(e,r,t)=>{var n=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Ye(P[r+4*n>>2],"parameter "+n);return t})(e,r),o=n.shift();e--;var a,i,s=new Array(e),l=`methodCaller<(${n.map((e=>e.name)).join(", ")}) => ${o.name}>`;return a=Fe(l,((r,a,i,l)=>{for(var u=0,d=0;d<e;++d)s[d]=n[d].readValueFromPointer(l+u),u+=n[d].argPackAdvance;var c=1===t?Jr(a,s):a.apply(r,s);return Vr(o,i,c)})),i=qr.length,qr.push(a),i},ua:e=>(e=Gr(e),Re(i[e])),p:(e,r)=>(e=Oe(e),r=Oe(r),Re(e[r])),s:e=>{e>9&&(Me[e+1]+=1)},o:e=>Re(Gr(e)),e:e=>{var r=Oe(e);or(r),Ar(e)},k:(e,r)=>{var t=(e=Ye(e,"_emval_take_value")).readValueFromPointer(r);return Re(t)},u:e=>(e=Oe(e),Re(typeof e)),L:function(e,r,t){var n=_e(e,r),o=new Date(1e3*n);C[t>>2]=o.getUTCSeconds(),C[t+4>>2]=o.getUTCMinutes(),C[t+8>>2]=o.getUTCHours(),C[t+12>>2]=o.getUTCDate(),C[t+16>>2]=o.getUTCMonth(),C[t+20>>2]=o.getUTCFullYear()-1900,C[t+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-a)/864e5|0;C[t+28>>2]=i},M:function(e,r,t){var n=_e(e,r),o=new Date(1e3*n);C[t>>2]=o.getSeconds(),C[t+4>>2]=o.getMinutes(),C[t+8>>2]=o.getHours(),C[t+12>>2]=o.getDate(),C[t+16>>2]=o.getMonth(),C[t+20>>2]=o.getFullYear()-1900,C[t+24>>2]=o.getDay();var a=0|et(o);C[t+28>>2]=a,C[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),u=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));C[t+32>>2]=u},N:function(e){var r=(()=>{var r=new Date(C[e+20>>2]+1900,C[e+16>>2],C[e+12>>2],C[e+8>>2],C[e+4>>2],C[e>>2],0),t=C[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(t<0)C[e+32>>2]=Number(a!=i&&s==n);else if(t>0!=(s==n)){var l=Math.max(i,a),u=t>0?s:l;r.setTime(r.getTime()+6e4*(u-n))}C[e+24>>2]=r.getDay();var d=0|et(r);C[e+28>>2]=d,C[e>>2]=r.getSeconds(),C[e+4>>2]=r.getMinutes(),C[e+8>>2]=r.getHours(),C[e+12>>2]=r.getDate(),C[e+16>>2]=r.getMonth(),C[e+20>>2]=r.getYear();var c=r.getTime();return isNaN(c)?-1:c/1e3})();return rt((B=r,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)),r>>>0},I:function(e,r,t,n,o,a,i,s){var l=_e(o,a);try{if(isNaN(l))return 61;var u=we.getStreamFromFD(n),d=ge.mmap(u,e,l,r,t),c=d.ptr;return C[i>>2]=d.allocated,P[s>>2]=c,0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},K:function(e,r,t,n,o,a,i){var s=_e(a,i);try{var l=we.getStreamFromFD(o);2&t&&we.doMsync(e,l,r,n,s)}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e){var r=(()=>{var r=Date.UTC(C[e+20>>2]+1900,C[e+16>>2],C[e+12>>2],C[e+8>>2],C[e+4>>2],C[e>>2],0),t=new Date(r);C[e+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;return C[e+28>>2]=o,t.getTime()/1e3})();return rt((B=r,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)),r>>>0},ta:(e,r,t)=>ot(e,r,t),l:()=>Date.now(),V:()=>2147483648,j:tt,pa:e=>(I("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0),T:e=>{var r=_.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(at(s))return!0}return!1},sa:function(){var e=ut().split("\n");return"Error"==e[0]&&e.shift(),lt(e),st.last_addr=it(e[3]),st.last_stack=e,st.last_addr},ra:(e,r,t)=>{var n;st.last_addr==e?n=st.last_stack:("Error"==(n=ut().split("\n"))[0]&&n.shift(),lt(n));for(var o=3;n[o]&&it(n[o])!=e;)++o;for(var a=0;a<t&&n[a+o];++a)C[r+4*a>>2]=it(n[a+o]);return a},_:(e,r)=>{var t=0;return ct().forEach(((n,o)=>{var a=r+t;P[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)b[r++]=e.charCodeAt(t);b[r]=0})(n,a),t+=n.length+1})),0},$:(e,r)=>{var t=ct();P[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),P[r>>2]=n,0},m:function(e){try{var r=we.getStreamFromFD(e);return ge.close(r),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},U:function(e,r){try{var t=we.getStreamFromFD(e),n=t.tty?2:ge.isDir(t.mode)?3:ge.isLink(t.mode)?7:4;return b[r]=n,$[r+2>>1]=0,H=[0,(B=0,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[r+8>>2]=H[0],C[r+12>>2]=H[1],H=[0,(B=0,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[r+16>>2]=H[0],C[r+20>>2]=H[1],0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},z:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=P[r>>2],s=P[r+4>>2];r+=8;var l=ge.read(e,b,i,s,n);if(l<0)return-1;if(o+=l,l<s)break;void 0!==n&&(n+=l)}return o})(we.getStreamFromFD(e),r,t);return P[n>>2]=o,0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},P:function(e,r,t,n,o){var a=_e(r,t);try{if(isNaN(a))return 61;var i=we.getStreamFromFD(e);return ge.llseek(i,a,n),H=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?+Math.floor(B/4294967296)>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[o>>2]=H[0],C[o+4>>2]=H[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},ba:function(e){try{var r=we.getStreamFromFD(e);return r.stream_ops?.fsync?r.stream_ops.fsync(r):0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},y:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=P[r>>2],s=P[r+4>>2];r+=8;var l=ge.write(e,b,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o})(we.getStreamFromFD(e),r,t);return P[n>>2]=o,0}catch(e){if(void 0===ge||"ErrnoError"!==e.name)throw e;return e.errno}},S:(e,r)=>(re(_.subarray(e,e+r)),0),na:e=>{e,Q||(i.onExit?.(e),F=!0),h(e,new K(e))},va:(e,r,t)=>{for(var n=ye(r),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"},l={a:"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)",b:"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)",C:"\\d\\d",d:"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31",H:"\\d(?!\\d)|[0,1]\\d|20|21|22|23",I:"\\d(?!\\d)|0\\d|10|11|12",j:"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d",m:"0[1-9]|[1-9](?!\\d)|10|11|12",M:"0\\d|\\d(?!\\d)|[1-5]\\d",n:" ",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:" ",z:"Z|(?:[\\+\\-]\\d\\d:?(?:\\d\\d)?)"},u=[],d=n.replace(/%(.)/g,((e,r)=>s[r]||e)).replace(/%(.)/g,((e,r)=>{let t=l[r];return t?(u.push(r),`(${t})`):r})).replace(/\s+/g,"\\s*"),c=new RegExp("^"+d,"i").exec(ye(e));if(c){var f,h=function(){function e(e,r,t){return"number"!=typeof e||isNaN(e)?r:e>=r?e<=t?e:t:r}return{year:e(C[t+20>>2]+1900,1970,9999),month:e(C[t+16>>2],0,11),day:e(C[t+12>>2],1,31),hour:e(C[t+8>>2],0,23),min:e(C[t+4>>2],0,59),sec:e(C[t>>2],0,59),gmtoff:0}}(),p=e=>{var r=u.indexOf(e);if(r>=0)return c[r+1]};if((f=p("S"))&&(h.sec=vt(f)),(f=p("M"))&&(h.min=vt(f)),f=p("H"))h.hour=vt(f);else if(f=p("I")){var m=vt(f);(f=p("p"))&&(m+="P"===f.toUpperCase()[0]?12:0),h.hour=m}if(f=p("Y"))h.year=vt(f);else if(f=p("y")){var v=vt(f);(f=p("C"))?v+=100*vt(f):v+=v<69?2e3:1900,h.year=v}if((f=p("m"))?h.month=vt(f)-1:(f=p("b"))&&(h.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=p("d"))h.day=vt(f);else if(f=p("j"))for(var g=vt(f),y=Kr(h.year),w=0;w<12;++w){var E=ft(y?ht:pt,w-1);g<=E+(y?ht:pt)[w]&&(h.day=g-E)}else if(f=p("a")){var b=f.substring(0,3).toUpperCase();if(f=p("U")){var _={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[b],$=vt(f);P=0===(k=new Date(h.year,0,1)).getDay()?mt(k,_+7*($-1)):mt(k,7-k.getDay()+_+7*($-1)),h.day=P.getDate(),h.month=P.getMonth()}else if(f=p("W")){var k,P;_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[b],$=vt(f);P=1===(k=new Date(h.year,0,1)).getDay()?mt(k,_+7*($-1)):mt(k,7-k.getDay()+1+_+7*($-1)),h.day=P.getDate(),h.month=P.getMonth()}}if(f=p("z"))if("z"===f.toLowerCase())h.gmtoff=0;else{var D=f.match(/^((?:\-|\+)\d\d):?(\d\d)?/);h.gmtoff=3600*D[1],D[2]&&(h.gmtoff+=h.gmtoff>0?60*D[2]:60*-D[2])}var T=new Date(h.year,h.month,h.day,h.hour,h.min,h.sec,0);return C[t>>2]=T.getSeconds(),C[t+4>>2]=T.getMinutes(),C[t+8>>2]=T.getHours(),C[t+12>>2]=T.getDate(),C[t+16>>2]=T.getMonth(),C[t+20>>2]=T.getFullYear()-1900,C[t+24>>2]=T.getDay(),C[t+28>>2]=ft(Kr(T.getFullYear())?ht:pt,T.getMonth()-1)+T.getDate()-1,C[t+32>>2]=0,C[t+36>>2]=h.gmtoff,e+le(c[0]).length-1}return 0}},_t=function(){var e,r,t,o,a={a:bt};function s(e,r){var t;return _t=e.exports,y=_t.Ba,M(),br=_t.Ga,t=_t.Ca,j.unshift(t),L(),_t}if(U(),i.instantiateWasm)try{return i.instantiateWasm(a,s)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return W||(W=Y()),(e=g,r=W,t=a,o=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||V(r)||q(r)||d||"function"!=typeof fetch?X(r,t,o):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(o,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),X(r,t,o)}))))).catch(n),{}}(),$t=e=>($t=_t.Da)(e),kt=e=>(kt=_t.Ea)(e),Ct=e=>(Ct=_t.Fa)(e),Pt=(e,r)=>(Pt=_t.Ha)(e,r),Dt=()=>(Dt=_t.Ia)(),Tt=e=>(Tt=_t.Ja)(e);i.dynCall_jiji=(e,r,t,n,o)=>(i.dynCall_jiji=_t.Ka)(e,r,t,n,o),i.dynCall_ji=(e,r)=>(i.dynCall_ji=_t.La)(e,r),i.dynCall_viij=(e,r,t,n,o)=>(i.dynCall_viij=_t.Ma)(e,r,t,n,o),i.dynCall_iij=(e,r,t,n)=>(i.dynCall_iij=_t.Na)(e,r,t,n),i.dynCall_iiji=(e,r,t,n,o)=>(i.dynCall_iiji=_t.Oa)(e,r,t,n,o),i.dynCall_jji=(e,r,t,n)=>(i.dynCall_jji=_t.Pa)(e,r,t,n),i.dynCall_iji=(e,r,t,n)=>(i.dynCall_iji=_t.Qa)(e,r,t,n),i.dynCall_viijj=(e,r,t,n,o,a,s)=>(i.dynCall_viijj=_t.Ra)(e,r,t,n,o,a,s),i.dynCall_iiij=(e,r,t,n,o)=>(i.dynCall_iiij=_t.Sa)(e,r,t,n,o),i.dynCall_vij=(e,r,t,n)=>(i.dynCall_vij=_t.Ta)(e,r,t,n),i.dynCall_viiiji=(e,r,t,n,o,a,s)=>(i.dynCall_viiiji=_t.Ua)(e,r,t,n,o,a,s),i.dynCall_viijii=(e,r,t,n,o,a,s)=>(i.dynCall_viijii=_t.Va)(e,r,t,n,o,a,s),i.dynCall_viji=(e,r,t,n,o)=>(i.dynCall_viji=_t.Wa)(e,r,t,n,o),i.dynCall_iiiijij=(e,r,t,n,o,a,s,l,u)=>(i.dynCall_iiiijij=_t.Xa)(e,r,t,n,o,a,s,l,u),i.dynCall_jij=(e,r,t,n)=>(i.dynCall_jij=_t.Ya)(e,r,t,n),i.dynCall_iiiij=(e,r,t,n,o,a)=>(i.dynCall_iiiij=_t.Za)(e,r,t,n,o,a),i.dynCall_iiiiij=(e,r,t,n,o,a,s)=>(i.dynCall_iiiiij=_t._a)(e,r,t,n,o,a,s),i.dynCall_iiiiijj=(e,r,t,n,o,a,s,l,u)=>(i.dynCall_iiiiijj=_t.$a)(e,r,t,n,o,a,s,l,u),i.dynCall_iiiiiijj=(e,r,t,n,o,a,s,l,u,d)=>(i.dynCall_iiiiiijj=_t.ab)(e,r,t,n,o,a,s,l,u,d),i.___emscripten_embedded_file_data=160796;function Ft(){function e(){Et||(Et=!0,i.calledRun=!0,F||(R=!0,i.noFSInit||ge.init.initialized||ge.init(),ge.ignorePermissions=!1,ue.init(),Z(j),t(i),i.onRuntimeInitialized?.(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),O.unshift(e);var e;Z(O)}()))}z>0||(!function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),A.unshift(e);var e;Z(A)}(),z>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.addRunDependency=U,i.removeRunDependency=L,i.FS_createPreloadedFile=pe,i.FS_unlink=e=>ge.unlink(e),i.FS_createPath=gt,i.FS_createDevice=wt,i.FS=ge,i.FS_createDataFile=fe,i.FS_createLazyFile=yt,x=function e(){Et||Ft(),Et||(x=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ft(),s}})();"object"==typeof exports&&"object"==typeof module?module.exports=PSPDFModuleInit:"function"==typeof define&&define.amd&&define([],(()=>PSPDFModuleInit));