@arcgis/core 4.26.0-next.20221220 → 4.26.0-next.20221221

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.
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- function e(e,r){for(var t=0;t<r.length;t++){const n=r[t];if("string"!=typeof n&&!Array.isArray(n))for(const r in n)if("default"!==r&&!(r in e)){const t=Object.getOwnPropertyDescriptor(n,r);t&&Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>n[r]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var r,t,n,o={};r={get exports(){return o},set exports(e){o=e}},t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(e){var r,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(e,t){r=e,n=t}));var a,i,s,u=Object.assign({},o),c="./this.program",f=!0,l="";function d(e){return o.locateFile?o.locateFile(e,l):l+e}"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),t&&(l=t),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var m,p,h=o.print||console.log.bind(console),v=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(m=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&Q("no native wasm support detected");var _=!1;function g(e,r){e||Q(r)}var y,w,E,b,k,x,D,F,S,A,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&P)return P.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 u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function T(e,r){return e?C(E,e,r):""}function j(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function B(e,r,t){return j(e,E,r,t)}function M(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}function L(e){y=e,o.HEAP8=w=new Int8Array(e),o.HEAP16=b=new Int16Array(e),o.HEAP32=x=new Int32Array(e),o.HEAPU8=E=new Uint8Array(e),o.HEAPU16=k=new Uint16Array(e),o.HEAPU32=D=new Uint32Array(e),o.HEAPF32=F=new Float32Array(e),o.HEAPF64=S=new Float64Array(e)}o.INITIAL_MEMORY;var R=[],I=[],N=[];function O(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Z(o.preRun.shift());ae(R)}function z(){o.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,ae(I)}function W(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)U(o.postRun.shift());ae(N)}function Z(e){R.unshift(e)}function H(e){I.unshift(e)}function U(e){N.unshift(e)}var q=0,V=null;function G(e){return e}function Y(e){q++,o.monitorRunDependencies&&o.monitorRunDependencies(q)}function X(e){if(q--,o.monitorRunDependencies&&o.monitorRunDependencies(q),0==q&&V){var r=V;V=null,r()}}function Q(e){o.onAbort&&o.onAbort(e),v(e="Aborted("+e+")"),_=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var K,J,$,ee="data:application/octet-stream;base64,";function re(e){return e.startsWith(ee)}function te(e){try{if(e==K&&m)return new Uint8Array(m);if(!s)throw"both async and sync fetching of the wasm failed"}catch(v){Q(v)}}function ne(){return!m&&f&&"function"==typeof fetch?fetch(K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+K+"'";return e.arrayBuffer()})).catch((function(){return te(K)})):Promise.resolve().then((function(){return te(K)}))}function oe(){var e={a:mo};function r(e,r){var t=e.exports;o.asm=t,L((p=o.asm.Ya).buffer),A=o.asm._a,H(o.asm.Za),X()}function t(e){r(e.instance)}function a(r){return ne().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){v("failed to asynchronously prepare wasm: "+e),Q(e)}))}function i(){return m||"function"!=typeof WebAssembly.instantiateStreaming||re(K)||"function"!=typeof fetch?a(t):fetch(K,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,e).then(t,(function(e){return v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation"),a(t)}))}))}if(Y(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(s){return v("Module.instantiateWasm callback failed with error: "+s),!1}return i().catch(n),{}}function ae(e){for(;e.length>0;)e.shift()(o)}function ie(e,r){w.set(e,r)}function se(e,r,t,n){Q("Assertion failed: "+T(e)+", at: "+[r?T(r):"unknown filename",t,n?T(n):"unknown function"])}function ue(e){return ho(e+24)+24}function ce(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_refcount=function(e){x[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,w[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=w[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=x[this.ptr>>2];x[this.ptr>>2]=e+1},this.release_ref=function(){var e=x[this.ptr>>2];return x[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){D[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return D[this.ptr+16>>2]},this.get_exception_ptr=function(){if(yo(this.get_type()))return D[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function fe(e,r,t){throw new ce(e).init(r,t),e}function le(e){return x[go()>>2]=e,e}re(K="vxlLayer.wasm")||(K=d(K));var de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=de.isAbs(e),t="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=de.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return de.normalize(e.join("/"))},join2:(e,r)=>de.normalize(e+"/"+r)};function me(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Q("randomDevice")}}var pe={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:we.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=de.isAbs(n)}return(r?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=pe.resolve(e).substr(1),r=pe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function he(e,r,t){var n=t>0?t:M(e)+1,o=new Array(n),a=j(e,o,0,o.length);return r&&(o.length=a),o}var ve={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){ve.ttys[e]={input:[],output:[],ops:r},we.registerDevice(e,ve.stream_ops)},stream_ops:{open:function(e){var r=ve.ttys[e.node.rdev];if(!r)throw new we.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new we.ErrnoError(29)}if(void 0===s&&0===a)throw new we.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new we.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new we.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=he(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(h(C(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(h(C(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(v(C(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(v(C(e.output,0)),e.output=[])}}};function _e(e){Q()}var ge={ops_table:null,mount:function(e){return ge.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(we.isBlkdev(t)||we.isFIFO(t))throw new we.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:we.chrdev_stream_ops}});var o=we.createNode(e,r,t,n);return we.isDir(o.mode)?(o.node_ops=ge.ops_table.dir.node,o.stream_ops=ge.ops_table.dir.stream,o.contents={}):we.isFile(o.mode)?(o.node_ops=ge.ops_table.file.node,o.stream_ops=ge.ops_table.file.stream,o.usedBytes=0,o.contents=null):we.isLink(o.mode)?(o.node_ops=ge.ops_table.link.node,o.stream_ops=ge.ops_table.link.stream):we.isChrdev(o.mode)&&(o.node_ops=ge.ops_table.chrdev.node,o.stream_ops=ge.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(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:function(e){var r={};return r.dev=we.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,we.isDir(e.mode)?r.size=4096:we.isFile(e.mode)?r.size=e.usedBytes:we.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ge.resizeFileStorage(e,r.size)},lookup:function(e,r){throw we.genericErrors[44]},mknod:function(e,r,t,n){return ge.createNode(e,r,t,n)},rename:function(e,r,t){if(we.isDir(e.mode)){var n;try{n=we.lookupNode(r,t)}catch(a){}if(n)for(var o in n.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=we.lookupNode(e,r);for(var n in t.contents)throw new we.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=ge.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read:function(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:function(e,r,t,n,o,a){if(r.buffer===w.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(ge.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:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&we.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new we.ErrnoError(28);return n},allocate:function(e,r,t){ge.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==y){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=_e()))throw new we.ErrnoError(48);w.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(e,r,t,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);return 2&o||ge.stream_ops.write(e,r,0,n,t,!1),0}}};function ye(e,r,t,n){var o=n?"":G("al "+e);i(e,(function(t){g(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&X()}),(function(r){if(!t)throw'Loading data file "'+e+'" failed.';t()})),o&&Y()}var we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=pe.resolve(we.cwd(),e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((r=Object.assign(t,r)).recurse_count>8)throw new we.ErrnoError(32);for(var n=de.normalizeArray(e.split("/").filter((e=>!!e)),!1),o=we.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(o=we.lookupNode(o,n[i]),a=de.join2(a,n[i]),we.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow)for(var u=0;we.isLink(o.mode);){var c=we.readlink(a);if(a=pe.resolve(de.dirname(a),c),o=we.lookupPath(a,{recurse_count:r.recurse_count+1}).node,u++>40)throw new we.ErrnoError(32)}}return{path:a,node:o}},getPath:e=>{for(var r;;){if(we.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%we.nameTable.length},hashAddNode:e=>{var r=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[r],we.nameTable[r]=e},hashRemoveNode:e=>{var r=we.hashName(e.parent.id,e.name);if(we.nameTable[r]===e)we.nameTable[r]=e.name_next;else for(var t=we.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=we.mayLookup(e);if(t)throw new we.ErrnoError(t,e);for(var n=we.hashName(e.id,r),o=we.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return we.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new we.FSNode(e,r,t,n);return we.hashAddNode(o),o},destroyNode:e=>{we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=we.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>we.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=we.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{return we.lookupNode(e,r),20}catch(t){}return we.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=we.lookupNode(e,r)}catch(a){return a.errno}var o=we.nodePermissions(e,"wx");if(o)return o;if(t){if(!we.isDir(n.mode))return 54;if(we.isRoot(n)||we.getPath(n)===we.cwd())return 10}else if(we.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(r)||512&r)?31:we.nodePermissions(e,we.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=we.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!we.streams[t])return t;throw new we.ErrnoError(33)},getStream:e=>we.streams[e],createStream:(e,r,t)=>{we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e);var n=we.nextfd(r,t);return e.fd=n,we.streams[n]=e,e},closeStream:e=>{we.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=we.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{we.devices[e]={stream_ops:r}},getDevice:e=>we.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&v("warning: "+we.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=we.getMounts(we.root.mount),n=0;function o(e){return we.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&we.root)throw new we.ErrnoError(10);if(!o&&!a){var i=we.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,we.isMountpoint(n))throw new we.ErrnoError(10);if(!we.isDir(n.mode))throw new we.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?we.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(r.node))throw new we.ErrnoError(28);var t=r.node,n=t.mounted,o=we.getMounts(n);Object.keys(we.nameTable).forEach((e=>{for(var r=we.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&we.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=we.lookupPath(e,{parent:!0}).node,o=de.basename(e);if(!o||"."===o||".."===o)throw new we.ErrnoError(28);var a=we.mayCreate(n,o);if(a)throw new we.ErrnoError(a);if(!n.node_ops.mknod)throw new we.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,we.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,we.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{we.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,we.mknod(e,r,t)),symlink:(e,r)=>{if(!pe.resolve(e))throw new we.ErrnoError(44);var t=we.lookupPath(r,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var n=de.basename(r),o=we.mayCreate(t,n);if(o)throw new we.ErrnoError(o);if(!t.node_ops.symlink)throw new we.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o=de.dirname(e),a=de.dirname(r),i=de.basename(e),s=de.basename(r);if(t=we.lookupPath(e,{parent:!0}).node,n=we.lookupPath(r,{parent:!0}).node,!t||!n)throw new we.ErrnoError(44);if(t.mount!==n.mount)throw new we.ErrnoError(75);var u,c=we.lookupNode(t,i),f=pe.relative(e,a);if("."!==f.charAt(0))throw new we.ErrnoError(28);if("."!==(f=pe.relative(r,o)).charAt(0))throw new we.ErrnoError(55);try{u=we.lookupNode(n,s)}catch(m){}if(c!==u){var l=we.isDir(c.mode),d=we.mayDelete(t,i,l);if(d)throw new we.ErrnoError(d);if(d=u?we.mayDelete(n,s,l):we.mayCreate(n,s))throw new we.ErrnoError(d);if(!t.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(c)||u&&we.isMountpoint(u))throw new we.ErrnoError(10);if(n!==t&&(d=we.nodePermissions(t,"w")))throw new we.ErrnoError(d);we.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(m){throw m}finally{we.hashAddNode(c)}}},rmdir:e=>{var r=we.lookupPath(e,{parent:!0}).node,t=de.basename(e),n=we.lookupNode(r,t),o=we.mayDelete(r,t,!0);if(o)throw new we.ErrnoError(o);if(!r.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);r.node_ops.rmdir(r,t),we.destroyNode(n)},readdir:e=>{var r=we.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new we.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=we.lookupPath(e,{parent:!0}).node;if(!r)throw new we.ErrnoError(44);var t=de.basename(e),n=we.lookupNode(r,t),o=we.mayDelete(r,t,!1);if(o)throw new we.ErrnoError(o);if(!r.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);r.node_ops.unlink(r,t),we.destroyNode(n)},readlink:e=>{var r=we.lookupPath(e).node;if(!r)throw new we.ErrnoError(44);if(!r.node_ops.readlink)throw new we.ErrnoError(28);return pe.resolve(we.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=we.lookupPath(e,{follow:!r}).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.getattr)throw new we.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>we.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new we.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{we.chmod(e,r,!0)},fchmod:(e,r)=>{var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);we.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{we.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=we.getStream(e);if(!n)throw new we.ErrnoError(8);we.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new we.ErrnoError(28);var t;if(!(t="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(t.mode))throw new we.ErrnoError(31);if(!we.isFile(t.mode))throw new we.ErrnoError(28);var n=we.nodePermissions(t,"w");if(n)throw new we.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);if(0==(2097155&t.flags))throw new we.ErrnoError(28);we.truncate(t.node,r)},utime:(e,r,t)=>{var n=we.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new we.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?we.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=we.lookupPath(e,{follow:!(131072&r)}).node}catch(u){}}var a=!1;if(64&r)if(n){if(128&r)throw new we.ErrnoError(20)}else n=we.mknod(e,t,0),a=!0;if(!n)throw new we.ErrnoError(44);if(we.isChrdev(n.mode)&&(r&=-513),65536&r&&!we.isDir(n.mode))throw new we.ErrnoError(54);if(!a){var i=we.mayOpen(n,r);if(i)throw new we.ErrnoError(i)}512&r&&!a&&we.truncate(n,0),r&=-131713;var s=we.createStream({node:n,path:we.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),!o.logReadFiles||1&r||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),s},close:e=>{if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(0==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(we.isClosed(e))throw new we.ErrnoError(8);if(r<0||t<=0)throw new we.ErrnoError(28);if(0==(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=we.open(e,r.flags),o=we.stat(e).size,a=new Uint8Array(o);return we.read(n,a,0,o,0),"utf8"===r.encoding?t=C(a,0):"binary"===r.encoding&&(t=a),we.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=we.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(M(r)+1),a=j(r,o,0,o.length);we.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");we.write(n,r,0,r.byteLength,void 0,t.canOwn)}we.close(n)},cwd:()=>we.currentPath,chdir:e=>{var r=we.lookupPath(e,{follow:!0});if(null===r.node)throw new we.ErrnoError(44);if(!we.isDir(r.node.mode))throw new we.ErrnoError(54);var t=we.nodePermissions(r.node,"x");if(t)throw new we.ErrnoError(t);we.currentPath=r.path},createDefaultDirectories:()=>{we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices:()=>{we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),we.mkdev("/dev/null",we.makedev(1,3)),ve.register(we.makedev(5,0),ve.default_tty_ops),ve.register(we.makedev(6,0),ve.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=me();we.createDevice("/dev","random",e),we.createDevice("/dev","urandom",e),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount:()=>{var r=we.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=we.getStream(t);if(!n)throw new we.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?we.createDevice("/dev","stdin",o.stdin):we.symlink("/dev/tty","/dev/stdin"),o.stdout?we.createDevice("/dev","stdout",null,o.stdout):we.symlink("/dev/tty","/dev/stdout"),o.stderr?we.createDevice("/dev","stderr",null,o.stderr):we.symlink("/dev/tty1","/dev/stderr"),we.open("/dev/stdin",0),we.open("/dev/stdout",1),we.open("/dev/stderr",1)},ensureErrnoError:()=>{we.ErrnoError||(we.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(ge,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:ge}},init:(e,r,t)=>{we.init.initialized=!0,we.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,we.createStandardStreams()},quit:()=>{we.init.initialized=!1;for(var e=0;e<we.streams.length;e++){var r=we.streams[e];r&&we.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=we.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{e=(n=we.lookupPath(e,{follow:!r})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=we.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=de.basename(e),n=we.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath:(e,r,t,n)=>{e="string"==typeof e?e:we.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=de.join2(e,a);try{we.mkdir(i)}catch(s){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=de.join2("string"==typeof e?e:we.getPath(e),r),i=we.getMode(n,o);return we.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:we.getPath(e),i=r?de.join2(e,r):e);var s=we.getMode(n,o),u=we.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}we.chmod(u,146|s);var d=we.open(u,577);we.write(d,t,0,t.length,0,a),we.close(d),we.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=de.join2("string"==typeof e?e:we.getPath(e),r),a=we.getMode(!!t,!!n);we.createDevice.major||(we.createDevice.major=64);var i=we.makedev(we.createDevice.major++,0);return we.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new we.ErrnoError(29)}if(void 0===u&&0===i)throw new we.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new we.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),we.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=he(a(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new we.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){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=(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||[]):he(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("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)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=we.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 u={};function c(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];u[e]=function(){return we.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(we.forceLoadFile(s),c(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{we.forceLoadFile(s);var a=_e();if(!a)throw new we.ErrnoError(48);return c(e,w,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,a,i,s,u,c)=>{var f=r?pe.resolve(de.join2(e,r)):e;function l(t){function l(t){c&&c(),s||we.createDataFile(e,r,t,n,o,u),a&&a(),X()}Browser.handledByPreloadPlugin(t,f,l,(()=>{i&&i(),X()}))||l(t)}Y(),"string"==typeof t?ye(t,(e=>l(e)),i):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=we.indexedDB();try{var o=n.open(we.DB_NAME(),we.DB_VERSION)}catch(a){return t(a)}o.onupgradeneeded=()=>{h("creating db"),o.result.createObjectStore(we.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([we.DB_STORE_NAME],"readwrite"),a=n.objectStore(we.DB_STORE_NAME),i=0,s=0,u=e.length;function c(){0==s?r():t()}e.forEach((e=>{var r=a.put(we.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&c()},r.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=we.indexedDB();try{var o=n.open(we.DB_NAME(),we.DB_VERSION)}catch(a){return t(a)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([we.DB_STORE_NAME],"readonly")}catch(a){return void t(a)}var s=i.objectStore(we.DB_STORE_NAME),u=0,c=0,f=e.length;function l(){0==c?r():t()}e.forEach((e=>{var r=s.get(e);r.onsuccess=()=>{we.analyzePath(e).exists&&we.unlink(e),we.createDataFile(de.dirname(e),de.basename(e),r.result,!0,!0,!0),++u+c==f&&l()},r.onerror=()=>{c++,u+c==f&&l()}})),i.onerror=t},o.onerror=t}},Ee={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(de.isAbs(r))return r;var n;if(-100===e)n=we.cwd();else{var o=we.getStream(e);if(!o)throw new we.ErrnoError(8);n=o.path}if(0==r.length){if(!t)throw new we.ErrnoError(44);return n}return de.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(o){if(o&&o.node&&de.normalize(r)!==de.normalize(we.getPath(o.node)))return-54;throw o}return x[t>>2]=n.dev,x[t+4>>2]=0,x[t+8>>2]=n.ino,x[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,x[t+20>>2]=n.uid,x[t+24>>2]=n.gid,x[t+28>>2]=n.rdev,x[t+32>>2]=0,$=[n.size>>>0,(J=n.size,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[t+40>>2]=$[0],x[t+44>>2]=$[1],x[t+48>>2]=4096,x[t+52>>2]=n.blocks,x[t+56>>2]=n.atime.getTime()/1e3|0,x[t+64>>2]=0,x[t+72>>2]=n.mtime.getTime()/1e3|0,x[t+80>>2]=0,x[t+88>>2]=n.ctime.getTime()/1e3|0,x[t+96>>2]=0,$=[n.ino>>>0,(J=n.ino,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[t+104>>2]=$[0],x[t+108>>2]=$[1],0},doMsync:function(e,r,t,n,o){var a=E.slice(e,e+t);we.msync(r,a,o,t,n)},varargs:void 0,get:function(){return Ee.varargs+=4,x[Ee.varargs-4>>2]},getStr:function(e){return T(e)},getStreamFromFD:function(e){var r=we.getStream(e);if(!r)throw new we.ErrnoError(8);return r}};function be(e,r,t){Ee.varargs=t;try{var n=Ee.getStreamFromFD(e);switch(r){case 0:return(o=Ee.get())<0?-28:we.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Ee.get();return n.flags|=o,0;case 5:return o=Ee.get(),b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return le(28),-1}}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}function ke(e,r,t){Ee.varargs=t;try{var n=Ee.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Ee.get();return x[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Ee.get(),we.ioctl(n,r,o);default:Q("bad ioctl syscall "+r)}}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}function xe(e,r,t,n){Ee.varargs=n;try{r=Ee.getStr(r),r=Ee.calculateAt(e,r);var o=n?Ee.get():0;return we.open(r,t,o).fd}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}var De={};function Fe(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function Se(e){return this.fromWireType(x[e>>2])}var Ae={},Pe={},Ce={},Te=48,je=57;function Be(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Te&&r<=je?"_"+e:e}function Me(e,r){return e=Be(e),function(){return r.apply(this,arguments)}}function Le(e,r){var t=Me(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}var Re=void 0;function Ie(e){throw new Re(e)}function Ne(e,r,t){function n(r){var n=t(r);n.length!==e.length&&Ie("Mismatched type converter count");for(var o=0;o<e.length;++o)Ge(e[o],n[o])}e.forEach((function(e){Ce[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Pe.hasOwnProperty(e)?o[r]=Pe[e]:(a.push(e),Ae.hasOwnProperty(e)||(Ae[e]=[]),Ae[e].push((()=>{o[r]=Pe[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)}function Oe(e){var r=De[e];delete De[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields;Ne([e],o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType))),(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],f=r.setter,l=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];f(l,e,c.toWireType(t,r)),Fe(t)}}})),[{name:r.name,fromWireType:function(e){var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:function(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:8,readValueFromPointer:Se,destructorFunction:n}]}))}function ze(e,r,t,n,o){}function We(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function Ze(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);He=e}var He=void 0;function Ue(e){for(var r="",t=e;E[t];)r+=He[E[t++]];return r}var qe=void 0;function Ve(e){throw new qe(e)}function Ge(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=r.name;if(e||Ve('type "'+n+'" must have a positive integer typeid pointer'),Pe.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ve("Cannot register type '"+n+"' twice")}if(Pe[e]=r,delete Ce[e],Ae.hasOwnProperty(e)){var o=Ae[e];delete Ae[e],o.forEach((e=>e()))}}function Ye(e,r,t,n,o){var a=We(t);Ge(e,{name:r=Ue(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===t)n=w;else if(2===t)n=b;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+r);n=x}return this.fromWireType(n[e>>a])},destructorFunction:null})}var Xe=[],Qe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ke(e){e>4&&0==--Qe[e].refcount&&(Qe[e]=void 0,Xe.push(e))}function Je(){for(var e=0,r=5;r<Qe.length;++r)void 0!==Qe[r]&&++e;return e}function $e(){for(var e=5;e<Qe.length;++e)if(void 0!==Qe[e])return Qe[e];return null}function er(){o.count_emval_handles=Je,o.get_first_emval=$e}var rr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),Qe[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Xe.length?Xe.pop():Qe.length;return Qe[r]={refcount:1,value:e},r}}};function tr(e,r){Ge(e,{name:r=Ue(r),fromWireType:function(e){var r=rr.toValue(e);return Ke(e),r},toWireType:function(e,r){return rr.toHandle(r)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})}function nr(e,r,t){if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ve("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].overloadTable+")!"),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}}function or(e,r,t){o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ve("Cannot register public name '"+e+"' twice"),nr(o,e,e),o.hasOwnProperty(t)&&Ve("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))}function ar(e,r,t){switch(r){case 0:return function(e){var r=t?w:E;return this.fromWireType(r[e])};case 1:return function(e){var r=t?b:k;return this.fromWireType(r[e>>1])};case 2:return function(e){var r=t?x:D;return this.fromWireType(r[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ir(e,r,t,n){var o=We(t);function a(){}r=Ue(r),a.values={},Ge(e,{name:r,constructor:a,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,r){return r.value},argPackAdvance:8,readValueFromPointer:ar(r,o,n),destructorFunction:null}),or(r,a)}function sr(e){var r=vo(e),t=Ue(r);return po(r),t}function ur(e,r){var t=Pe[e];return void 0===t&&Ve(r+" has unknown type "+sr(e)),t}function cr(e,r,t){var n=ur(e,"enum");r=Ue(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Me(n.name+"_"+r,(function(){}))}});o.values[t]=a,o[r]=a}function fr(e,r){switch(r){case 2:return function(e){return this.fromWireType(F[e>>2])};case 3:return function(e){return this.fromWireType(S[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function lr(e,r,t){var n=We(t);Ge(e,{name:r=Ue(r),fromWireType:function(e){return e},toWireType:function(e,r){return r},argPackAdvance:8,readValueFromPointer:fr(r,n),destructorFunction:null})}function dr(e,r,t,n,o){var a=r.length;a<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==r[1]&&null!==t,s=!1,u=1;u<r.length;++u)if(null!==r[u]&&void 0===r[u].destructorFunction){s=!0;break}var c="void"!==r[0].name,f=a-2,l=new Array(f),d=[],m=[];return function(){var t;arguments.length!==f&&Ve("function "+e+" called with "+arguments.length+" arguments, expected "+f+" args!"),m.length=0,d.length=i?2:1,d[0]=o,i&&(t=r[1].toWireType(m,this),d[1]=t);for(var a=0;a<f;++a)l[a]=r[a+2].toWireType(m,arguments[a]),d.push(l[a]);function u(e){if(s)Fe(m);else for(var n=i?1:2;n<r.length;n++){var o=1===n?t:l[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(c)return r[0].fromWireType(e)}return u(n.apply(null,d))}}function mr(e,r){for(var t=[],n=0;n<e;n++)t.push(D[r+4*n>>2]);return t}function pr(e,r,t){o.hasOwnProperty(e)||Ie("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)}function hr(e,r,t){var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)}var vr=[];function _r(e){var r=vr[e];return r||(e>=vr.length&&(vr.length=e+1),vr[e]=r=A.get(e)),r}function gr(e,r,t){return e.includes("j")?hr(e,r,t):_r(r).apply(null,t)}function yr(e,r){var t=[];return function(){return t.length=0,Object.assign(t,arguments),gr(e,r,t)}}function wr(e,r){function t(){return e.includes("j")?yr(e,r):_r(r)}e=Ue(e);var n=t();return"function"!=typeof n&&Ve("unknown function pointer with signature "+e+": "+r),n}var Er=void 0;function br(e,r){var t=[],n={};function o(e){n[e]||Pe[e]||(Ce[e]?Ce[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new Er(e+": "+t.map(sr).join([", "]))}function kr(e,r,t,n,o,a){var i=mr(r,t);e=Ue(e),o=wr(n,o),or(e,(function(){br("Cannot call "+e+" due to unbound types",i)}),r-1),Ne([],i,(function(t){var n=[t[0],null].concat(t.slice(1));return pr(e,dr(e,n,null,o,a),r-1),[]}))}function xr(e,r,t){switch(r){case 0:return t?function(e){return w[e]}:function(e){return E[e]};case 1:return t?function(e){return b[e>>1]}:function(e){return k[e>>1]};case 2:return t?function(e){return x[e>>2]}:function(e){return D[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Dr(e,r,t,n,o){r=Ue(r);var a=We(t),i=e=>e;if(0===n){var s=32-8*t;i=e=>e<<s>>>s}var u=r.includes("unsigned"),c=(e,r)=>{};Ge(e,{name:r,fromWireType:i,toWireType:u?function(e,r){return c(r,this.name),r>>>0}:function(e,r){return c(r,this.name),r},argPackAdvance:8,readValueFromPointer:xr(r,a,0!==n),destructorFunction:null})}function Fr(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=D,t=r[e>>=2],o=r[e+1];return new n(y,o,t)}Ge(e,{name:t=Ue(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function Sr(e,r){var t="std::string"===(r=Ue(r));Ge(e,{name:r,fromWireType:function(e){var r,n=D[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=T(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);r=c.join("")}return po(e),r},toWireType:function(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||Ve("Cannot pass non-string to std::string"),n=t&&o?M(r):r.length;var a=ho(4+n+1),i=a+4;if(D[a>>2]=n,t&&o)B(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(po(i),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=r[s];return null!==e&&e.push(po,a),a},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){po(e)}})}var Ar="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Pr(e,r){for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&k[n];)++n;if((t=n<<1)-e>32&&Ar)return Ar.decode(E.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=b[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Cr(e,r,t){if(void 0===t&&(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);b[r>>1]=i,r+=2}return b[r>>1]=0,r-n}function Tr(e){return 2*e.length}function jr(e,r){for(var t=0,n="";!(t>=r/4);){var o=x[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}function Br(e,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),x[r>>2]=i,(r+=4)+4>o)break}return x[r>>2]=0,r-n}function Mr(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}function Lr(e,r,t){var n,o,a,i,s;t=Ue(t),2===r?(n=Pr,o=Cr,i=Tr,a=()=>k,s=1):4===r&&(n=jr,o=Br,i=Mr,a=()=>D,s=2),Ge(e,{name:t,fromWireType:function(e){for(var t,o=D[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var f=e+4+c*r;if(c==o||0==i[f>>s]){var l=n(u,f-u);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),u=f+r}}return po(e),t},toWireType:function(e,n){"string"!=typeof n&&Ve("Cannot pass non-string to C++ string type "+t);var a=i(n),u=ho(4+a+r);return D[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(po,u),u},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){po(e)}})}function Rr(e,r,t,n,o,a){De[e]={name:Ue(r),rawConstructor:wr(t,n),rawDestructor:wr(o,a),fields:[]}}function Ir(e,r,t,n,o,a,i,s,u,c){De[e].fields.push({fieldName:Ue(r),getterReturnType:t,getter:wr(n,o),getterContext:a,setterArgumentType:i,setter:wr(s,u),setterContext:c})}function Nr(e,r){Ge(e,{isVoid:!0,name:r=Ue(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})}function Or(e){do{var r=D[e>>2],t=D[(e+=4)>>2],n=D[(e+=4)>>2];e+=4;var o=T(r);we.createPath("/",de.dirname(o),!0,!0),we.createDataFile(o,null,w.subarray(n,n+t),!0,!0,!0)}while(D[e>>2])}function zr(e){e>4&&(Qe[e].refcount+=1)}var Wr={};function Zr(e){var r=Wr[e];return void 0===r?Ue(e):r}function Hr(e){return rr.toHandle(Zr(e))}function Ur(){return rr.toHandle({})}function qr(e,r,t){e=rr.toValue(e),r=rr.toValue(r),t=rr.toValue(t),e[r]=t}function Vr(e,r){var t=(e=ur(e,"_emval_take_value")).readValueFromPointer(r);return rr.toHandle(t)}function Gr(){Q("")}function Yr(e,r,t){E.copyWithin(e,r,r+t)}function Xr(){return 2147483648}function Qr(e){try{return p.grow(e-y.byteLength+65535>>>16),L(p.buffer),1}catch(r){}}function Kr(e){var r=E.length;e>>>=0;var t=Xr();if(e>t)return!1;let n=(e,r)=>e+(r-e%r)%r;for(var o=1;o<=4;o*=2){var a=r*(1+.2/o);if(a=Math.min(a,e+100663296),Qr(Math.min(t,n(Math.max(e,a),65536))))return!0}return!1}function Jr(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function $r(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function et(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var rt={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){rt.lastError||(rt.lastError=e)},getNewId:function(e){for(var r=rt.counter++,t=e.length;t<r;t++)e[t]=null;return r},getSource:function(e,r,t,n){for(var o="",a=0;a<r;++a){var i=n?x[n+4*a>>2]:-1;o+=T(x[t+4*a>>2],i<0?void 0:i)}return o},createContext:function(e,r){if(o.preinitializedWebGLContext){var t=o.preinitializedWebGLContext;r.majorVersion="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}else{if(!e.getContextSafariWebGL2Fixed){function n(r,t){var n=e.getContextSafariWebGL2Fixed(r,t);return"webgl"==r==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=n}t=e.getContext("webgl2",r)}return t?rt.registerContext(t,r):0},registerContext:function(e,r){var t=rt.getNewId(rt.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),rt.contexts[t]=n,(void 0===r.enableExtensionsByDefault||r.enableExtensionsByDefault)&&rt.initExtensions(n),t},makeContextCurrent:function(e){return rt.currentContext=rt.contexts[e],o.ctx=so=rt.currentContext&&rt.currentContext.GLctx,!(e&&!so)},getContext:function(e){return rt.contexts[e]},deleteContext:function(e){rt.currentContext===rt.contexts[e]&&(rt.currentContext=null),"object"==typeof tt&&tt.removeAllHandlersOnTarget(rt.contexts[e].GLctx.canvas),rt.contexts[e]&&rt.contexts[e].GLctx.canvas&&(rt.contexts[e].GLctx.canvas.GLctxObject=void 0),rt.contexts[e]=null},initExtensions:function(e){if(e||(e=rt.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;Jr(r),$r(r),e.version>=2&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!r.disjointTimerQueryExt)&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query")),et(r),(r.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||r.getExtension(e)}))}}},tt={inEventHandler:0,removeAllEventListeners:function(){for(var e=tt.eventHandlers.length-1;e>=0;--e)tt._removeHandler(e);tt.eventHandlers=[],tt.deferredCalls=[]},registerRemoveEventListeners:function(){tt.removeEventListenersRegistered||(tt.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,r,t){function n(e,r){if(e.length!=r.length)return!1;for(var t in e)if(e[t]!=r[t])return!1;return!0}for(var o in tt.deferredCalls){var a=tt.deferredCalls[o];if(a.targetFunction==e&&n(a.argsList,t))return}tt.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),tt.deferredCalls.sort((function(e,r){return e.precedence<r.precedence}))},removeDeferredCalls:function(e){for(var r=0;r<tt.deferredCalls.length;++r)tt.deferredCalls[r].targetFunction==e&&(tt.deferredCalls.splice(r,1),--r)},canPerformEventHandlerRequests:function(){return tt.inEventHandler&&tt.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(tt.canPerformEventHandlerRequests())for(var e=0;e<tt.deferredCalls.length;++e){var r=tt.deferredCalls[e];tt.deferredCalls.splice(e,1),--e,r.targetFunction.apply(null,r.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,r){for(var t=0;t<tt.eventHandlers.length;++t)tt.eventHandlers[t].target!=e||r&&r!=tt.eventHandlers[t].eventTypeString||tt._removeHandler(t--)},_removeHandler:function(e){var r=tt.eventHandlers[e];r.target.removeEventListener(r.eventTypeString,r.eventListenerFunc,r.useCapture),tt.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var r=function(r){++tt.inEventHandler,tt.currentEventHandler=e,tt.runDeferredCalls(),e.handlerFunc(r),tt.runDeferredCalls(),--tt.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=r,e.target.addEventListener(e.eventTypeString,r,e.useCapture),tt.eventHandlers.push(e),tt.registerRemoveEventListeners();else for(var t=0;t<tt.eventHandlers.length;++t)tt.eventHandlers[t].target==e.target&&tt.eventHandlers[t].eventTypeString==e.eventTypeString&&tt._removeHandler(t--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},nt=["default","low-power","high-performance"];function ot(e){return e>2?T(e):e}var at=[0,document,window];function it(e){return e=ot(e),at[e]||document.querySelector(e)}function st(e){return it(e)}function ut(e,r){var t=r>>2,n=x[t+6],o={alpha:!!x[t+0],depth:!!x[t+1],stencil:!!x[t+2],antialias:!!x[t+3],premultipliedAlpha:!!x[t+4],preserveDrawingBuffer:!!x[t+5],powerPreference:nt[n],failIfMajorPerformanceCaveat:!!x[t+7],majorVersion:x[t+8],minorVersion:x[t+9],enableExtensionsByDefault:x[t+10],explicitSwapControl:x[t+11],proxyContextToMainThread:x[t+12],renderViaOffscreenBackBuffer:x[t+13]},a=st(e);return a?o.explicitSwapControl?0:rt.createContext(a,o):0}var ct=ut;function ft(e){for(var r=e>>2,t=0;t<14;++t)x[r+t]=0;x[r+0]=x[r+1]=x[r+3]=x[r+4]=x[r+8]=x[r+10]=1}function lt(e){return rt.makeContextCurrent(e)?0:-5}var dt={};function mt(){return c||"./this.program"}function pt(){if(!pt.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",_:mt()};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]);pt.strings=t}return pt.strings}function ht(e,r,t){for(var n=0;n<e.length;++n)w[r++>>0]=e.charCodeAt(n);t||(w[r>>0]=0)}function vt(e,r){var t=0;return pt().forEach((function(n,o){var a=r+t;D[e+4*o>>2]=a,ht(n,a),t+=n.length+1})),0}function _t(e,r){var t=pt();D[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),D[r>>2]=n,0}function gt(e){try{var r=Ee.getStreamFromFD(e);return we.close(r),0}catch(t){if(void 0===we||!(t instanceof we.ErrnoError))throw t;return t.errno}}function yt(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=D[r>>2],s=D[r+4>>2];r+=8;var u=we.read(e,w,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function wt(e,r,t,n){try{var o=yt(Ee.getStreamFromFD(e),r,t);return x[n>>2]=o,0}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return a.errno}}function Et(e,r){return r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN}function bt(e,r,t,n,o){try{var a=Et(r,t);if(isNaN(a))return 61;var i=Ee.getStreamFromFD(e);return we.llseek(i,a,n),$=[i.position>>>0,(J=i.position,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[o>>2]=$[0],x[o+4>>2]=$[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===we||!(s instanceof we.ErrnoError))throw s;return s.errno}}function kt(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=D[r>>2],s=D[r+4>>2];r+=8;var u=we.write(e,w,i,s,n);if(u<0)return-1;o+=u}return o}function xt(e,r,t,n){try{var o=kt(Ee.getStreamFromFD(e),r,t);return D[n>>2]=o,0}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return a.errno}}function Dt(e){so.activeTexture(e)}function Ft(e,r){so.attachShader(rt.programs[e],rt.shaders[r])}function St(e,r,t){so.bindAttribLocation(rt.programs[e],r,T(t))}function At(e,r){35051==e?so.currentPixelPackBufferBinding=r:35052==e&&(so.currentPixelUnpackBufferBinding=r),so.bindBuffer(e,rt.buffers[r])}function Pt(e,r,t){so.bindBufferBase(e,r,rt.buffers[t])}function Ct(e,r,t,n,o){so.bindBufferRange(e,r,rt.buffers[t],n,o)}function Tt(e,r){so.bindFramebuffer(e,rt.framebuffers[r])}function jt(e,r){so.bindTexture(e,rt.textures[r])}function Bt(e){so.bindVertexArray(rt.vaos[e])}function Mt(e,r,t,n){t&&r?so.bufferData(e,E,n,t,r):so.bufferData(e,r,n)}function Lt(e,r,t,n){t&&so.bufferSubData(e,r,E,n,t)}function Rt(e){so.clear(e)}function It(e,r,t,n){so.clearBufferfi(e,r,t,n)}function Nt(e,r,t){so.clearBufferfv(e,r,F,t>>2)}function Ot(e,r,t){so.clearBufferiv(e,r,x,t>>2)}function zt(e,r,t){so.clearBufferuiv(e,r,D,t>>2)}function Wt(e,r,t,n){so.clearColor(e,r,t,n)}function Zt(e){so.clearDepth(e)}function Ht(e){so.clearStencil(e)}function Ut(e){so.compileShader(rt.shaders[e])}function qt(){var e=rt.getNewId(rt.programs),r=so.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,rt.programs[e]=r,e}function Vt(e){var r=rt.getNewId(rt.shaders);return rt.shaders[r]=so.createShader(e),r}function Gt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.buffers[n];o&&(so.deleteBuffer(o),o.name=0,rt.buffers[n]=null,n==so.currentPixelPackBufferBinding&&(so.currentPixelPackBufferBinding=0),n==so.currentPixelUnpackBufferBinding&&(so.currentPixelUnpackBufferBinding=0))}}function Yt(e,r){for(var t=0;t<e;++t){var n=x[r+4*t>>2],o=rt.framebuffers[n];o&&(so.deleteFramebuffer(o),o.name=0,rt.framebuffers[n]=null)}}function Xt(e){if(e){var r=rt.programs[e];r?(so.deleteProgram(r),r.name=0,rt.programs[e]=null):rt.recordError(1281)}}function Qt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.queries[n];o&&(so.deleteQuery(o),rt.queries[n]=null)}}function Kt(e){if(e){var r=rt.shaders[e];r?(so.deleteShader(r),rt.shaders[e]=null):rt.recordError(1281)}}function Jt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.textures[n];o&&(so.deleteTexture(o),o.name=0,rt.textures[n]=null)}}function $t(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2];so.deleteVertexArray(rt.vaos[n]),rt.vaos[n]=null}}function en(e,r,t){so.drawArrays(e,r,t)}var rn=[];function tn(e,r){for(var t=rn[e],n=0;n<e;n++)t[n]=x[r+4*n>>2];so.drawBuffers(t)}function nn(e,r,t,n){so.drawElements(e,r,t,n)}function on(e,r,t,n,o){so.drawElementsInstanced(e,r,t,n,o)}function an(e){so.enableVertexAttribArray(e)}function sn(e,r,t,n,o){so.framebufferTexture2D(e,r,t,rt.textures[n],o)}function un(e,r,t,n){for(var o=0;o<e;o++){var a=so[t](),i=a&&rt.getNewId(n);a?(a.name=i,n[i]=a):rt.recordError(1282),x[r+4*o>>2]=i}}function cn(e,r){un(e,r,"createBuffer",rt.buffers)}function fn(e,r){un(e,r,"createFramebuffer",rt.framebuffers)}function ln(e,r){un(e,r,"createQuery",rt.queries)}function dn(e,r){un(e,r,"createTexture",rt.textures)}function mn(e,r){un(e,r,"createVertexArray",rt.vaos)}function pn(e){so.generateMipmap(e)}function hn(e,r){D[e>>2]=r,D[e+4>>2]=(r-D[e>>2])/4294967296}function vn(e,r,t){if(r){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=t&&1!=t&&rt.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=so.getParameter(34467);n=o?o.length:0;break;case 33309:if(rt.currentContext.version<2)return void rt.recordError(1282);n=2*(so.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(rt.currentContext.version<2)return void rt.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=so.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void rt.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void rt.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var i=0;i<a.length;++i)switch(t){case 0:x[r+4*i>>2]=a[i];break;case 2:F[r+4*i>>2]=a[i];break;case 4:w[r+i>>0]=a[i]?1:0}return}try{n=0|a.name}catch(s){return rt.recordError(1280),void v("GL_INVALID_ENUM in glGet"+t+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+s+")")}}break;default:return rt.recordError(1280),void v("GL_INVALID_ENUM in glGet"+t+"v: Native code calling glGet"+t+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(t){case 1:hn(r,n);break;case 0:x[r>>2]=n;break;case 2:F[r>>2]=n;break;case 4:w[r>>0]=n?1:0}}else rt.recordError(1281)}function _n(e,r){vn(e,r,0)}function gn(e,r,t){if(t){var n,o=rt.queries[e];hn(t,"boolean"==typeof(n=rt.currentContext.version<2?so.disjointTimerQueryExt.getQueryObjectEXT(o,r):so.getQueryParameter(o,r))?n?1:0:n)}else rt.recordError(1281)}function yn(e,r,t){if(t){var n,o=rt.queries[e],a=so.disjointTimerQueryExt.getQueryObjectEXT(o,r);n="boolean"==typeof a?a?1:0:a,x[t>>2]=n}else rt.recordError(1281)}function wn(e,r){return so.getUniformBlockIndex(rt.programs[e],T(r))}function En(e){return parseInt(e)}function bn(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function kn(e){var r,t,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},r=0;r<so.getProgramParameter(e,35718);++r){var a=so.getActiveUniform(e,r),i=a.name,s=a.size,u=bn(i),c=u>0?i.slice(0,u):i,f=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[c]=[s,f],t=0;t<s;++t)n[f]=t,e.uniformArrayNamesById[f++]=c}}function xn(e,r){if(r=T(r),e=rt.programs[e]){kn(e);var t=e.uniformLocsById,n=0,o=r,a=bn(r);a>0&&(n=En(r.slice(a+1))>>>0,o=r.slice(0,a));var i=e.uniformSizeAndIdsByName[o];if(i&&n<i[0]&&(t[n+=i[1]]=t[n]||so.getUniformLocation(e,r)))return n}else rt.recordError(1281);return-1}function Dn(e){e=rt.programs[e],so.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Fn(e,r){3317==e&&(rt.unpackAlignment=r),so.pixelStorei(e,r)}function Sn(e,r){so.disjointTimerQueryExt.queryCounterEXT(rt.queries[e],r)}function An(e){so.readBuffer(e)}function Pn(e){return 0==(e-=5120)?w:1==e?E:2==e?b:4==e?x:6==e?F:5==e||28922==e||28520==e||30779==e||30782==e?D:k}function Cn(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Tn(e,r,t,n,o,a,i){if(so.currentPixelPackBufferBinding)so.readPixels(e,r,t,n,o,a,i);else{var s=Pn(a);so.readPixels(e,r,t,n,o,a,s,i>>Cn(s))}}function jn(e,r,t,n){var o=rt.getSource(e,r,t,n);so.shaderSource(rt.shaders[e],o)}function Bn(e,r,t,n,o,a,i,s,u,c){if(so.currentPixelUnpackBufferBinding)so.texImage3D(e,r,t,n,o,a,i,s,u,c);else if(c){var f=Pn(u);so.texImage3D(e,r,t,n,o,a,i,s,u,f,c>>Cn(f))}else so.texImage3D(e,r,t,n,o,a,i,s,u,null)}function Mn(e,r,t){so.texParameteri(e,r,t)}function Ln(e,r,t,n,o){so.texStorage2D(e,r,t,n,o)}function Rn(e,r,t,n,o,a,i,s,u){if(so.currentPixelUnpackBufferBinding)so.texSubImage2D(e,r,t,n,o,a,i,s,u);else if(u){var c=Pn(s);so.texSubImage2D(e,r,t,n,o,a,i,s,c,u>>Cn(c))}else so.texSubImage2D(e,r,t,n,o,a,i,s,null)}function In(e,r,t,n,o,a,i,s,u,c,f){if(so.currentPixelUnpackBufferBinding)so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,f);else if(f){var l=Pn(c);so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,l,f>>Cn(l))}else so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,null)}function Nn(e){var r=so.currentProgram;if(r){var t=r.uniformLocsById[e];return"number"==typeof t&&(r.uniformLocsById[e]=t=so.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"["+t+"]":""))),t}rt.recordError(1282)}function On(e,r){so.uniform1i(Nn(e),r)}function zn(e,r,t){e=rt.programs[e],so.uniformBlockBinding(e,r,t)}function Wn(e){e=rt.programs[e],so.useProgram(e),so.currentProgram=e}function Zn(e,r,t,n,o){so.vertexAttribIPointer(e,r,t,n,o)}function Hn(e,r,t,n,o,a){so.vertexAttribPointer(e,r,t,!!n,o,a)}function Un(e){}function qn(e){return e%4==0&&(e%100!=0||e%400==0)}function Vn(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}var Gn=[31,29,31,30,31,30,31,31,30,31,30,31],Yn=[31,28,31,30,31,30,31,31,30,31,30,31];function Xn(e,r){for(var t=new Date(e.getTime());r>0;){var n=qn(t.getFullYear()),o=t.getMonth(),a=(n?Gn:Yn)[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}function Qn(e,r,t,n){var o=x[n+40>>2],a={tm_sec:x[n>>2],tm_min:x[n+4>>2],tm_hour:x[n+8>>2],tm_mday:x[n+12>>2],tm_mon:x[n+16>>2],tm_year:x[n+20>>2],tm_wday:x[n+24>>2],tm_yday:x[n+28>>2],tm_isdst:x[n+32>>2],tm_gmtoff:x[n+36>>2],tm_zone:o?T(o):""},i=T(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return l(e,r,"0")}function m(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var r=Xn(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return m(o,r)<=0?m(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":function(e){return d(e.tm_mday+Vn(qn(e.tm_year+1900)?Gn:Yn,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&qn(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&qn(e.tm_year%400-1))&&r++}return d(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var _=he(i=i.replace(/\0\0/g,"%"),!1);return _.length>r?0:(ie(_,e),_.length-1)}function Kn(e,r,t,n){return Qn(e,r,t,n)}function Jn(e,r){e<128?r.push(e):r.push(e%128|128,e>>7)}function $n(e){for(var r={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t}function eo(e,r){if("function"==typeof WebAssembly.Function)return new WebAssembly.Function($n(r),e);var t=[1,96],n=r.slice(0,1),o=r.slice(1),a={i:127,p:127,j:126,f:125,d:124};Jn(o.length,t);for(var i=0;i<o.length;++i)t.push(a[o[i]]);"v"==n?t.push(0):t.push(1,a[n]);var s=[0,97,115,109,1,0,0,0,1];Jn(t.length,s),s.push.apply(s,t),s.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var u=new WebAssembly.Module(new Uint8Array(s));return new WebAssembly.Instance(u,{e:{f:e}}).exports.f}function ro(e,r){if(to)for(var t=e;t<e+r;t++){var n=_r(t);n&&to.set(n,t)}}var to=void 0,no=[];function oo(){if(no.length)return no.pop();try{A.grow(1)}catch(v){if(!(v instanceof RangeError))throw v;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return A.length-1}function ao(e,r){A.set(e,r),vr[e]=A.get(e)}function io(e,r){if(to||(to=new WeakMap,ro(0,A.length)),to.has(e))return to.get(e);var t=oo();try{ao(t,e)}catch(v){if(!(v instanceof TypeError))throw v;ao(t,eo(e,r))}return to.set(e,t),t}var so,uo=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},co=365,fo=146;Object.defineProperties(uo.prototype,{read:{get:function(){return(this.mode&co)===co},set:function(e){e?this.mode|=co:this.mode&=~co}},write:{get:function(){return(this.mode&fo)===fo},set:function(e){e?this.mode|=fo:this.mode&=~fo}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=uo,we.staticInit(),o.FS_createPath=we.createPath,o.FS_createDataFile=we.createDataFile,o.FS_createPreloadedFile=we.createPreloadedFile,o.FS_unlink=we.unlink,o.FS_createLazyFile=we.createLazyFile,o.FS_createDevice=we.createDevice,Re=o.InternalError=Le(Error,"InternalError"),Ze(),qe=o.BindingError=Le(Error,"BindingError"),er(),Er=o.UnboundTypeError=Le(Error,"UnboundTypeError");for(var lo=0;lo<32;++lo)rn.push(new Array(lo));var mo={X:se,n:ue,m:fe,y:be,$:ke,aa:xe,ja:Oe,Ta:ze,fa:Ye,ea:tr,E:ir,j:cr,D:lr,b:kr,g:Dr,f:Fr,C:Sr,w:Lr,ka:Rr,o:Ir,ga:Nr,ha:Or,a:Ke,q:zr,e:Hr,h:Ur,d:qr,c:Vr,z:Gr,da:Yr,ba:Kr,ia:ct,ma:ft,ca:lt,Y:vt,Z:_t,A:gt,_:wt,Sa:bt,B:xt,La:Dt,r:Ft,Ca:St,Oa:At,Ma:Pt,Na:Ct,t:Tt,i:jt,u:Bt,Wa:Mt,O:Lt,Q:Rt,Ga:It,x:Nt,Fa:Ot,P:zt,Ja:Wt,Ia:Zt,Ha:Ht,K:Ut,Da:qt,M:Vt,W:Gt,S:Yt,Ea:Xt,H:Qt,p:Kt,R:Jt,J:$t,Pa:en,Ka:tn,Qa:nn,Ra:on,qa:an,s:sn,Xa:cn,U:fn,I:ln,xa:dn,ra:mn,sa:pn,v:_n,F:gn,na:yn,Ba:wn,za:xn,N:Dn,l:Fn,G:Sn,la:An,T:Tn,L:jn,va:Bn,k:Mn,wa:Ln,ta:Rn,ua:In,ya:On,Aa:zn,V:Wn,oa:Zn,pa:Hn,Ua:Un,Va:Kn};oe(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Za).apply(null,arguments)};var po=o._free=function(){return(po=o._free=o.asm.$a).apply(null,arguments)},ho=o._malloc=function(){return(ho=o._malloc=o.asm.ab).apply(null,arguments)};o.__Z16get_new_requestsi=function(){return(o.__Z16get_new_requestsi=o.asm.bb).apply(null,arguments)},o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=function(){return(o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=o.asm.cb).apply(null,arguments)},o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=function(){return(o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=o.asm.db).apply(null,arguments)},o.__Z12remove_layeri=function(){return(o.__Z12remove_layeri=o.asm.eb).apply(null,arguments)},o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=function(){return(o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=o.asm.fb).apply(null,arguments)},o.__Z23uninitialize_voxel_wasmv=function(){return(o.__Z23uninitialize_voxel_wasmv=o.asm.gb).apply(null,arguments)},o.__Z15set_view_matrixffffffffffffffff=function(){return(o.__Z15set_view_matrixffffffffffffffff=o.asm.hb).apply(null,arguments)},o.__Z21set_projection_matrixffffffffffffffff=function(){return(o.__Z21set_projection_matrixffffffffffffffff=o.asm.ib).apply(null,arguments)},o.__Z12set_near_fardd=function(){return(o.__Z12set_near_fardd=o.asm.jb).apply(null,arguments)},o.__Z4cullv=function(){return(o.__Z4cullv=o.asm.kb).apply(null,arguments)},o.__Z31update_camera_pos_and_directiondddddd=function(){return(o.__Z31update_camera_pos_and_directiondddddd=o.asm.lb).apply(null,arguments)},o.__Z8get_nearv=function(){return(o.__Z8get_nearv=o.asm.mb).apply(null,arguments)},o.__Z7get_farv=function(){return(o.__Z7get_farv=o.asm.nb).apply(null,arguments)},o.__Z17begin_color_framebddd=function(){return(o.__Z17begin_color_framebddd=o.asm.ob).apply(null,arguments)},o.__Z11begin_framev=function(){return(o.__Z11begin_framev=o.asm.pb).apply(null,arguments)},o.__Z32get_texture_units_bound_in_framev=function(){return(o.__Z32get_texture_units_bound_in_framev=o.asm.qb).apply(null,arguments)},o.__Z23get_active_texture_unitv=function(){return(o.__Z23get_active_texture_unitv=o.asm.rb).apply(null,arguments)},o.__Z12set_viewportii=function(){return(o.__Z12set_viewportii=o.asm.sb).apply(null,arguments)},o.__Z4drawv=function(){return(o.__Z4drawv=o.asm.tb).apply(null,arguments)},o.__Z11set_qualityi=function(){return(o.__Z11set_qualityi=o.asm.ub).apply(null,arguments)},o.__Z10pick_depthii=function(){return(o.__Z10pick_depthii=o.asm.vb).apply(null,arguments)},o.__Z11pick_objectii=function(){return(o.__Z11pick_objectii=o.asm.wb).apply(null,arguments)},o.__Z11set_enabledib=function(){return(o.__Z11set_enabledib=o.asm.xb).apply(null,arguments)},o.__Z23handle_masked_ui_updateijj=function(){return(o.__Z23handle_masked_ui_updateijj=o.asm.yb).apply(null,arguments)},o.__Z21set_scene_time_extentddb=function(){return(o.__Z21set_scene_time_extentddb=o.asm.zb).apply(null,arguments)},o.__Z20set_upscaling_limitsidd=function(){return(o.__Z20set_upscaling_limitsidd=o.asm.Ab).apply(null,arguments)},o.__Z21estimate_memory_usagei=function(){return(o.__Z21estimate_memory_usagei=o.asm.Bb).apply(null,arguments)},o.__Z16add_generic_meshjjjjjjjj=function(){return(o.__Z16add_generic_meshjjjjjjjj=o.asm.Cb).apply(null,arguments)},o.__Z19remove_generic_meshi=function(){return(o.__Z19remove_generic_meshi=o.asm.Db).apply(null,arguments)},o.__Z30toggle_full_volume_extent_drawi=function(){return(o.__Z30toggle_full_volume_extent_drawi=o.asm.Eb).apply(null,arguments)},o.__Z21get_layer_epoch_timesii=function(){return(o.__Z21get_layer_epoch_timesii=o.asm.Fb).apply(null,arguments)},o.__Z25get_layer_current_time_idi=function(){return(o.__Z25get_layer_current_time_idi=o.asm.Gb).apply(null,arguments)},o.__Z27get_locked_isosurface_coloriid=function(){return(o.__Z27get_locked_isosurface_coloriid=o.asm.Hb).apply(null,arguments)};var vo=o.___getTypeName=function(){return(vo=o.___getTypeName=o.asm.Ib).apply(null,arguments)};o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.Jb).apply(null,arguments)};var _o,go=o.___errno_location=function(){return(go=o.___errno_location=o.asm.Kb).apply(null,arguments)},yo=o.___cxa_is_pointer_type=function(){return(yo=o.___cxa_is_pointer_type=o.asm.Lb).apply(null,arguments)};function wo(e){function t(){_o||(_o=!0,o.calledRun=!0,_||(z(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),W()))}q>0||(O(),q>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.dynCall_iij=function(){return(o.dynCall_iij=o.asm.Mb).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.Nb).apply(null,arguments)},o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm.Ob).apply(null,arguments)},o.dynCall_iiiiij=function(){return(o.dynCall_iiiiij=o.asm.Pb).apply(null,arguments)},o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.Qb).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.Rb).apply(null,arguments)},o.___emscripten_embedded_file_data=138304,o.stringToUTF8=B,o.lengthBytesUTF8=M,o.addRunDependency=Y,o.removeRunDependency=X,o.FS_createPath=we.createPath,o.FS_createDataFile=we.createDataFile,o.FS_createPreloadedFile=we.createPreloadedFile,o.FS_createLazyFile=we.createLazyFile,o.FS_createDevice=we.createDevice,o.FS_unlink=we.unlink,o.addFunction=io,V=function e(){_o||wo(),_o||(V=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return wo(),e.ready},r.exports=n;const a=e({__proto__:null,default:o},[o]);export{a as v};
5
+ function e(e,r){for(var t=0;t<r.length;t++){const n=r[t];if("string"!=typeof n&&!Array.isArray(n))for(const r in n)if("default"!==r&&!(r in e)){const t=Object.getOwnPropertyDescriptor(n,r);t&&Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>n[r]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var r,t,n,o={};r={get exports(){return o},set exports(e){o=e}},t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(e){var r,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(e,t){r=e,n=t}));var a,i,s,u=Object.assign({},o),c="./this.program",f=!0,l="";function d(e){return o.locateFile?o.locateFile(e,l):l+e}"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),t&&(l=t),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var m,p,h=o.print||console.log.bind(console),v=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(m=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&Q("no native wasm support detected");var _=!1;function g(e,r){e||Q(r)}var y,w,E,b,k,x,D,F,S,A,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&P)return P.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 u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function T(e,r){return e?C(E,e,r):""}function j(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function B(e,r,t){return j(e,E,r,t)}function M(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}function L(e){y=e,o.HEAP8=w=new Int8Array(e),o.HEAP16=b=new Int16Array(e),o.HEAP32=x=new Int32Array(e),o.HEAPU8=E=new Uint8Array(e),o.HEAPU16=k=new Uint16Array(e),o.HEAPU32=D=new Uint32Array(e),o.HEAPF32=F=new Float32Array(e),o.HEAPF64=S=new Float64Array(e)}o.INITIAL_MEMORY;var R=[],I=[],N=[];function O(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Z(o.preRun.shift());ae(R)}function z(){o.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,ae(I)}function W(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)U(o.postRun.shift());ae(N)}function Z(e){R.unshift(e)}function H(e){I.unshift(e)}function U(e){N.unshift(e)}var q=0,V=null;function G(e){return e}function Y(e){q++,o.monitorRunDependencies&&o.monitorRunDependencies(q)}function X(e){if(q--,o.monitorRunDependencies&&o.monitorRunDependencies(q),0==q&&V){var r=V;V=null,r()}}function Q(e){o.onAbort&&o.onAbort(e),v(e="Aborted("+e+")"),_=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var K,J,$,ee="data:application/octet-stream;base64,";function re(e){return e.startsWith(ee)}function te(e){try{if(e==K&&m)return new Uint8Array(m);if(!s)throw"both async and sync fetching of the wasm failed"}catch(v){Q(v)}}function ne(){return!m&&f&&"function"==typeof fetch?fetch(K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+K+"'";return e.arrayBuffer()})).catch((function(){return te(K)})):Promise.resolve().then((function(){return te(K)}))}function oe(){var e={a:mo};function r(e,r){var t=e.exports;o.asm=t,L((p=o.asm.Ya).buffer),A=o.asm._a,H(o.asm.Za),X()}function t(e){r(e.instance)}function a(r){return ne().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){v("failed to asynchronously prepare wasm: "+e),Q(e)}))}function i(){return m||"function"!=typeof WebAssembly.instantiateStreaming||re(K)||"function"!=typeof fetch?a(t):fetch(K,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,e).then(t,(function(e){return v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation"),a(t)}))}))}if(Y(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(s){return v("Module.instantiateWasm callback failed with error: "+s),!1}return i().catch(n),{}}function ae(e){for(;e.length>0;)e.shift()(o)}function ie(e,r){w.set(e,r)}function se(e,r,t,n){Q("Assertion failed: "+T(e)+", at: "+[r?T(r):"unknown filename",t,n?T(n):"unknown function"])}function ue(e){return ho(e+24)+24}function ce(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_refcount=function(e){x[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,w[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=w[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=x[this.ptr>>2];x[this.ptr>>2]=e+1},this.release_ref=function(){var e=x[this.ptr>>2];return x[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){D[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return D[this.ptr+16>>2]},this.get_exception_ptr=function(){if(yo(this.get_type()))return D[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function fe(e,r,t){throw new ce(e).init(r,t),e}function le(e){return x[go()>>2]=e,e}re(K="vxlLayer.wasm")||(K=d(K));var de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=de.isAbs(e),t="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=de.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return de.normalize(e.join("/"))},join2:(e,r)=>de.normalize(e+"/"+r)};function me(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Q("randomDevice")}}var pe={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:we.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=de.isAbs(n)}return(r?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=pe.resolve(e).substr(1),r=pe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function he(e,r,t){var n=t>0?t:M(e)+1,o=new Array(n),a=j(e,o,0,o.length);return r&&(o.length=a),o}var ve={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){ve.ttys[e]={input:[],output:[],ops:r},we.registerDevice(e,ve.stream_ops)},stream_ops:{open:function(e){var r=ve.ttys[e.node.rdev];if(!r)throw new we.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new we.ErrnoError(29)}if(void 0===s&&0===a)throw new we.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new we.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new we.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=he(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(h(C(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(h(C(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(v(C(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(v(C(e.output,0)),e.output=[])}}};function _e(e){Q()}var ge={ops_table:null,mount:function(e){return ge.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(we.isBlkdev(t)||we.isFIFO(t))throw new we.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:we.chrdev_stream_ops}});var o=we.createNode(e,r,t,n);return we.isDir(o.mode)?(o.node_ops=ge.ops_table.dir.node,o.stream_ops=ge.ops_table.dir.stream,o.contents={}):we.isFile(o.mode)?(o.node_ops=ge.ops_table.file.node,o.stream_ops=ge.ops_table.file.stream,o.usedBytes=0,o.contents=null):we.isLink(o.mode)?(o.node_ops=ge.ops_table.link.node,o.stream_ops=ge.ops_table.link.stream):we.isChrdev(o.mode)&&(o.node_ops=ge.ops_table.chrdev.node,o.stream_ops=ge.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(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:function(e){var r={};return r.dev=we.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,we.isDir(e.mode)?r.size=4096:we.isFile(e.mode)?r.size=e.usedBytes:we.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ge.resizeFileStorage(e,r.size)},lookup:function(e,r){throw we.genericErrors[44]},mknod:function(e,r,t,n){return ge.createNode(e,r,t,n)},rename:function(e,r,t){if(we.isDir(e.mode)){var n;try{n=we.lookupNode(r,t)}catch(a){}if(n)for(var o in n.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=we.lookupNode(e,r);for(var n in t.contents)throw new we.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=ge.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read:function(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:function(e,r,t,n,o,a){if(r.buffer===w.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(ge.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:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&we.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new we.ErrnoError(28);return n},allocate:function(e,r,t){ge.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==y){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=_e()))throw new we.ErrnoError(48);w.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(e,r,t,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);return 2&o||ge.stream_ops.write(e,r,0,n,t,!1),0}}};function ye(e,r,t,n){var o=n?"":G("al "+e);i(e,(function(t){g(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&X()}),(function(r){if(!t)throw'Loading data file "'+e+'" failed.';t()})),o&&Y()}var we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=pe.resolve(we.cwd(),e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((r=Object.assign(t,r)).recurse_count>8)throw new we.ErrnoError(32);for(var n=de.normalizeArray(e.split("/").filter((e=>!!e)),!1),o=we.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(o=we.lookupNode(o,n[i]),a=de.join2(a,n[i]),we.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow)for(var u=0;we.isLink(o.mode);){var c=we.readlink(a);if(a=pe.resolve(de.dirname(a),c),o=we.lookupPath(a,{recurse_count:r.recurse_count+1}).node,u++>40)throw new we.ErrnoError(32)}}return{path:a,node:o}},getPath:e=>{for(var r;;){if(we.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%we.nameTable.length},hashAddNode:e=>{var r=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[r],we.nameTable[r]=e},hashRemoveNode:e=>{var r=we.hashName(e.parent.id,e.name);if(we.nameTable[r]===e)we.nameTable[r]=e.name_next;else for(var t=we.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=we.mayLookup(e);if(t)throw new we.ErrnoError(t,e);for(var n=we.hashName(e.id,r),o=we.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return we.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new we.FSNode(e,r,t,n);return we.hashAddNode(o),o},destroyNode:e=>{we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=we.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>we.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=we.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{return we.lookupNode(e,r),20}catch(t){}return we.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=we.lookupNode(e,r)}catch(a){return a.errno}var o=we.nodePermissions(e,"wx");if(o)return o;if(t){if(!we.isDir(n.mode))return 54;if(we.isRoot(n)||we.getPath(n)===we.cwd())return 10}else if(we.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(r)||512&r)?31:we.nodePermissions(e,we.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=we.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!we.streams[t])return t;throw new we.ErrnoError(33)},getStream:e=>we.streams[e],createStream:(e,r,t)=>{we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e);var n=we.nextfd(r,t);return e.fd=n,we.streams[n]=e,e},closeStream:e=>{we.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=we.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{we.devices[e]={stream_ops:r}},getDevice:e=>we.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&v("warning: "+we.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=we.getMounts(we.root.mount),n=0;function o(e){return we.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&we.root)throw new we.ErrnoError(10);if(!o&&!a){var i=we.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,we.isMountpoint(n))throw new we.ErrnoError(10);if(!we.isDir(n.mode))throw new we.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?we.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(r.node))throw new we.ErrnoError(28);var t=r.node,n=t.mounted,o=we.getMounts(n);Object.keys(we.nameTable).forEach((e=>{for(var r=we.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&we.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=we.lookupPath(e,{parent:!0}).node,o=de.basename(e);if(!o||"."===o||".."===o)throw new we.ErrnoError(28);var a=we.mayCreate(n,o);if(a)throw new we.ErrnoError(a);if(!n.node_ops.mknod)throw new we.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,we.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,we.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{we.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,we.mknod(e,r,t)),symlink:(e,r)=>{if(!pe.resolve(e))throw new we.ErrnoError(44);var t=we.lookupPath(r,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var n=de.basename(r),o=we.mayCreate(t,n);if(o)throw new we.ErrnoError(o);if(!t.node_ops.symlink)throw new we.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o=de.dirname(e),a=de.dirname(r),i=de.basename(e),s=de.basename(r);if(t=we.lookupPath(e,{parent:!0}).node,n=we.lookupPath(r,{parent:!0}).node,!t||!n)throw new we.ErrnoError(44);if(t.mount!==n.mount)throw new we.ErrnoError(75);var u,c=we.lookupNode(t,i),f=pe.relative(e,a);if("."!==f.charAt(0))throw new we.ErrnoError(28);if("."!==(f=pe.relative(r,o)).charAt(0))throw new we.ErrnoError(55);try{u=we.lookupNode(n,s)}catch(m){}if(c!==u){var l=we.isDir(c.mode),d=we.mayDelete(t,i,l);if(d)throw new we.ErrnoError(d);if(d=u?we.mayDelete(n,s,l):we.mayCreate(n,s))throw new we.ErrnoError(d);if(!t.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(c)||u&&we.isMountpoint(u))throw new we.ErrnoError(10);if(n!==t&&(d=we.nodePermissions(t,"w")))throw new we.ErrnoError(d);we.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(m){throw m}finally{we.hashAddNode(c)}}},rmdir:e=>{var r=we.lookupPath(e,{parent:!0}).node,t=de.basename(e),n=we.lookupNode(r,t),o=we.mayDelete(r,t,!0);if(o)throw new we.ErrnoError(o);if(!r.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);r.node_ops.rmdir(r,t),we.destroyNode(n)},readdir:e=>{var r=we.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new we.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=we.lookupPath(e,{parent:!0}).node;if(!r)throw new we.ErrnoError(44);var t=de.basename(e),n=we.lookupNode(r,t),o=we.mayDelete(r,t,!1);if(o)throw new we.ErrnoError(o);if(!r.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);r.node_ops.unlink(r,t),we.destroyNode(n)},readlink:e=>{var r=we.lookupPath(e).node;if(!r)throw new we.ErrnoError(44);if(!r.node_ops.readlink)throw new we.ErrnoError(28);return pe.resolve(we.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=we.lookupPath(e,{follow:!r}).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.getattr)throw new we.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>we.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new we.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{we.chmod(e,r,!0)},fchmod:(e,r)=>{var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);we.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{we.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=we.getStream(e);if(!n)throw new we.ErrnoError(8);we.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new we.ErrnoError(28);var t;if(!(t="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(t.mode))throw new we.ErrnoError(31);if(!we.isFile(t.mode))throw new we.ErrnoError(28);var n=we.nodePermissions(t,"w");if(n)throw new we.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);if(0==(2097155&t.flags))throw new we.ErrnoError(28);we.truncate(t.node,r)},utime:(e,r,t)=>{var n=we.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new we.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?we.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=we.lookupPath(e,{follow:!(131072&r)}).node}catch(u){}}var a=!1;if(64&r)if(n){if(128&r)throw new we.ErrnoError(20)}else n=we.mknod(e,t,0),a=!0;if(!n)throw new we.ErrnoError(44);if(we.isChrdev(n.mode)&&(r&=-513),65536&r&&!we.isDir(n.mode))throw new we.ErrnoError(54);if(!a){var i=we.mayOpen(n,r);if(i)throw new we.ErrnoError(i)}512&r&&!a&&we.truncate(n,0),r&=-131713;var s=we.createStream({node:n,path:we.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),!o.logReadFiles||1&r||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),s},close:e=>{if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(0==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(we.isClosed(e))throw new we.ErrnoError(8);if(r<0||t<=0)throw new we.ErrnoError(28);if(0==(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=we.open(e,r.flags),o=we.stat(e).size,a=new Uint8Array(o);return we.read(n,a,0,o,0),"utf8"===r.encoding?t=C(a,0):"binary"===r.encoding&&(t=a),we.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=we.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(M(r)+1),a=j(r,o,0,o.length);we.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");we.write(n,r,0,r.byteLength,void 0,t.canOwn)}we.close(n)},cwd:()=>we.currentPath,chdir:e=>{var r=we.lookupPath(e,{follow:!0});if(null===r.node)throw new we.ErrnoError(44);if(!we.isDir(r.node.mode))throw new we.ErrnoError(54);var t=we.nodePermissions(r.node,"x");if(t)throw new we.ErrnoError(t);we.currentPath=r.path},createDefaultDirectories:()=>{we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices:()=>{we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),we.mkdev("/dev/null",we.makedev(1,3)),ve.register(we.makedev(5,0),ve.default_tty_ops),ve.register(we.makedev(6,0),ve.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=me();we.createDevice("/dev","random",e),we.createDevice("/dev","urandom",e),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount:()=>{var r=we.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=we.getStream(t);if(!n)throw new we.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?we.createDevice("/dev","stdin",o.stdin):we.symlink("/dev/tty","/dev/stdin"),o.stdout?we.createDevice("/dev","stdout",null,o.stdout):we.symlink("/dev/tty","/dev/stdout"),o.stderr?we.createDevice("/dev","stderr",null,o.stderr):we.symlink("/dev/tty1","/dev/stderr"),we.open("/dev/stdin",0),we.open("/dev/stdout",1),we.open("/dev/stderr",1)},ensureErrnoError:()=>{we.ErrnoError||(we.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(ge,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:ge}},init:(e,r,t)=>{we.init.initialized=!0,we.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,we.createStandardStreams()},quit:()=>{we.init.initialized=!1;for(var e=0;e<we.streams.length;e++){var r=we.streams[e];r&&we.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=we.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{e=(n=we.lookupPath(e,{follow:!r})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=we.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=de.basename(e),n=we.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath:(e,r,t,n)=>{e="string"==typeof e?e:we.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=de.join2(e,a);try{we.mkdir(i)}catch(s){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=de.join2("string"==typeof e?e:we.getPath(e),r),i=we.getMode(n,o);return we.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:we.getPath(e),i=r?de.join2(e,r):e);var s=we.getMode(n,o),u=we.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}we.chmod(u,146|s);var d=we.open(u,577);we.write(d,t,0,t.length,0,a),we.close(d),we.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=de.join2("string"==typeof e?e:we.getPath(e),r),a=we.getMode(!!t,!!n);we.createDevice.major||(we.createDevice.major=64);var i=we.makedev(we.createDevice.major++,0);return we.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new we.ErrnoError(29)}if(void 0===u&&0===i)throw new we.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new we.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),we.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=he(a(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new we.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){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=(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||[]):he(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("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)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=we.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 u={};function c(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];u[e]=function(){return we.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(we.forceLoadFile(s),c(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{we.forceLoadFile(s);var a=_e();if(!a)throw new we.ErrnoError(48);return c(e,w,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,a,i,s,u,c)=>{var f=r?pe.resolve(de.join2(e,r)):e;function l(t){function l(t){c&&c(),s||we.createDataFile(e,r,t,n,o,u),a&&a(),X()}Browser.handledByPreloadPlugin(t,f,l,(()=>{i&&i(),X()}))||l(t)}Y(),"string"==typeof t?ye(t,(e=>l(e)),i):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=we.indexedDB();try{var o=n.open(we.DB_NAME(),we.DB_VERSION)}catch(a){return t(a)}o.onupgradeneeded=()=>{h("creating db"),o.result.createObjectStore(we.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([we.DB_STORE_NAME],"readwrite"),a=n.objectStore(we.DB_STORE_NAME),i=0,s=0,u=e.length;function c(){0==s?r():t()}e.forEach((e=>{var r=a.put(we.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&c()},r.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=we.indexedDB();try{var o=n.open(we.DB_NAME(),we.DB_VERSION)}catch(a){return t(a)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([we.DB_STORE_NAME],"readonly")}catch(a){return void t(a)}var s=i.objectStore(we.DB_STORE_NAME),u=0,c=0,f=e.length;function l(){0==c?r():t()}e.forEach((e=>{var r=s.get(e);r.onsuccess=()=>{we.analyzePath(e).exists&&we.unlink(e),we.createDataFile(de.dirname(e),de.basename(e),r.result,!0,!0,!0),++u+c==f&&l()},r.onerror=()=>{c++,u+c==f&&l()}})),i.onerror=t},o.onerror=t}},Ee={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(de.isAbs(r))return r;var n;if(-100===e)n=we.cwd();else{var o=we.getStream(e);if(!o)throw new we.ErrnoError(8);n=o.path}if(0==r.length){if(!t)throw new we.ErrnoError(44);return n}return de.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(o){if(o&&o.node&&de.normalize(r)!==de.normalize(we.getPath(o.node)))return-54;throw o}return x[t>>2]=n.dev,x[t+4>>2]=0,x[t+8>>2]=n.ino,x[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,x[t+20>>2]=n.uid,x[t+24>>2]=n.gid,x[t+28>>2]=n.rdev,x[t+32>>2]=0,$=[n.size>>>0,(J=n.size,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[t+40>>2]=$[0],x[t+44>>2]=$[1],x[t+48>>2]=4096,x[t+52>>2]=n.blocks,x[t+56>>2]=n.atime.getTime()/1e3|0,x[t+64>>2]=0,x[t+72>>2]=n.mtime.getTime()/1e3|0,x[t+80>>2]=0,x[t+88>>2]=n.ctime.getTime()/1e3|0,x[t+96>>2]=0,$=[n.ino>>>0,(J=n.ino,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[t+104>>2]=$[0],x[t+108>>2]=$[1],0},doMsync:function(e,r,t,n,o){var a=E.slice(e,e+t);we.msync(r,a,o,t,n)},varargs:void 0,get:function(){return Ee.varargs+=4,x[Ee.varargs-4>>2]},getStr:function(e){return T(e)},getStreamFromFD:function(e){var r=we.getStream(e);if(!r)throw new we.ErrnoError(8);return r}};function be(e,r,t){Ee.varargs=t;try{var n=Ee.getStreamFromFD(e);switch(r){case 0:return(o=Ee.get())<0?-28:we.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Ee.get();return n.flags|=o,0;case 5:return o=Ee.get(),b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return le(28),-1}}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}function ke(e,r,t){Ee.varargs=t;try{var n=Ee.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Ee.get();return x[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Ee.get(),we.ioctl(n,r,o);default:Q("bad ioctl syscall "+r)}}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}function xe(e,r,t,n){Ee.varargs=n;try{r=Ee.getStr(r),r=Ee.calculateAt(e,r);var o=n?Ee.get():0;return we.open(r,t,o).fd}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return-a.errno}}var De={};function Fe(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function Se(e){return this.fromWireType(x[e>>2])}var Ae={},Pe={},Ce={},Te=48,je=57;function Be(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Te&&r<=je?"_"+e:e}function Me(e,r){return e=Be(e),function(){return r.apply(this,arguments)}}function Le(e,r){var t=Me(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}var Re=void 0;function Ie(e){throw new Re(e)}function Ne(e,r,t){function n(r){var n=t(r);n.length!==e.length&&Ie("Mismatched type converter count");for(var o=0;o<e.length;++o)Ge(e[o],n[o])}e.forEach((function(e){Ce[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Pe.hasOwnProperty(e)?o[r]=Pe[e]:(a.push(e),Ae.hasOwnProperty(e)||(Ae[e]=[]),Ae[e].push((()=>{o[r]=Pe[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)}function Oe(e){var r=De[e];delete De[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields;Ne([e],o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType))),(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,c=e[t+o.length],f=r.setter,l=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];f(l,e,c.toWireType(t,r)),Fe(t)}}})),[{name:r.name,fromWireType:function(e){var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:function(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:8,readValueFromPointer:Se,destructorFunction:n}]}))}function ze(e,r,t,n,o){}function We(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function Ze(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);He=e}var He=void 0;function Ue(e){for(var r="",t=e;E[t];)r+=He[E[t++]];return r}var qe=void 0;function Ve(e){throw new qe(e)}function Ge(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=r.name;if(e||Ve('type "'+n+'" must have a positive integer typeid pointer'),Pe.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ve("Cannot register type '"+n+"' twice")}if(Pe[e]=r,delete Ce[e],Ae.hasOwnProperty(e)){var o=Ae[e];delete Ae[e],o.forEach((e=>e()))}}function Ye(e,r,t,n,o){var a=We(t);Ge(e,{name:r=Ue(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===t)n=w;else if(2===t)n=b;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+r);n=x}return this.fromWireType(n[e>>a])},destructorFunction:null})}var Xe=[],Qe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ke(e){e>4&&0==--Qe[e].refcount&&(Qe[e]=void 0,Xe.push(e))}function Je(){for(var e=0,r=5;r<Qe.length;++r)void 0!==Qe[r]&&++e;return e}function $e(){for(var e=5;e<Qe.length;++e)if(void 0!==Qe[e])return Qe[e];return null}function er(){o.count_emval_handles=Je,o.get_first_emval=$e}var rr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),Qe[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Xe.length?Xe.pop():Qe.length;return Qe[r]={refcount:1,value:e},r}}};function tr(e,r){Ge(e,{name:r=Ue(r),fromWireType:function(e){var r=rr.toValue(e);return Ke(e),r},toWireType:function(e,r){return rr.toHandle(r)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})}function nr(e,r,t){if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ve("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].overloadTable+")!"),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}}function or(e,r,t){o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ve("Cannot register public name '"+e+"' twice"),nr(o,e,e),o.hasOwnProperty(t)&&Ve("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))}function ar(e,r,t){switch(r){case 0:return function(e){var r=t?w:E;return this.fromWireType(r[e])};case 1:return function(e){var r=t?b:k;return this.fromWireType(r[e>>1])};case 2:return function(e){var r=t?x:D;return this.fromWireType(r[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ir(e,r,t,n){var o=We(t);function a(){}r=Ue(r),a.values={},Ge(e,{name:r,constructor:a,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,r){return r.value},argPackAdvance:8,readValueFromPointer:ar(r,o,n),destructorFunction:null}),or(r,a)}function sr(e){var r=vo(e),t=Ue(r);return po(r),t}function ur(e,r){var t=Pe[e];return void 0===t&&Ve(r+" has unknown type "+sr(e)),t}function cr(e,r,t){var n=ur(e,"enum");r=Ue(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Me(n.name+"_"+r,(function(){}))}});o.values[t]=a,o[r]=a}function fr(e,r){switch(r){case 2:return function(e){return this.fromWireType(F[e>>2])};case 3:return function(e){return this.fromWireType(S[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function lr(e,r,t){var n=We(t);Ge(e,{name:r=Ue(r),fromWireType:function(e){return e},toWireType:function(e,r){return r},argPackAdvance:8,readValueFromPointer:fr(r,n),destructorFunction:null})}function dr(e,r,t,n,o){var a=r.length;a<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==r[1]&&null!==t,s=!1,u=1;u<r.length;++u)if(null!==r[u]&&void 0===r[u].destructorFunction){s=!0;break}var c="void"!==r[0].name,f=a-2,l=new Array(f),d=[],m=[];return function(){var t;arguments.length!==f&&Ve("function "+e+" called with "+arguments.length+" arguments, expected "+f+" args!"),m.length=0,d.length=i?2:1,d[0]=o,i&&(t=r[1].toWireType(m,this),d[1]=t);for(var a=0;a<f;++a)l[a]=r[a+2].toWireType(m,arguments[a]),d.push(l[a]);function u(e){if(s)Fe(m);else for(var n=i?1:2;n<r.length;n++){var o=1===n?t:l[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(c)return r[0].fromWireType(e)}return u(n.apply(null,d))}}function mr(e,r){for(var t=[],n=0;n<e;n++)t.push(D[r+4*n>>2]);return t}function pr(e,r,t){o.hasOwnProperty(e)||Ie("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)}function hr(e,r,t){var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)}var vr=[];function _r(e){var r=vr[e];return r||(e>=vr.length&&(vr.length=e+1),vr[e]=r=A.get(e)),r}function gr(e,r,t){return e.includes("j")?hr(e,r,t):_r(r).apply(null,t)}function yr(e,r){var t=[];return function(){return t.length=0,Object.assign(t,arguments),gr(e,r,t)}}function wr(e,r){function t(){return e.includes("j")?yr(e,r):_r(r)}e=Ue(e);var n=t();return"function"!=typeof n&&Ve("unknown function pointer with signature "+e+": "+r),n}var Er=void 0;function br(e,r){var t=[],n={};function o(e){n[e]||Pe[e]||(Ce[e]?Ce[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new Er(e+": "+t.map(sr).join([", "]))}function kr(e,r,t,n,o,a){var i=mr(r,t);e=Ue(e),o=wr(n,o),or(e,(function(){br("Cannot call "+e+" due to unbound types",i)}),r-1),Ne([],i,(function(t){var n=[t[0],null].concat(t.slice(1));return pr(e,dr(e,n,null,o,a),r-1),[]}))}function xr(e,r,t){switch(r){case 0:return t?function(e){return w[e]}:function(e){return E[e]};case 1:return t?function(e){return b[e>>1]}:function(e){return k[e>>1]};case 2:return t?function(e){return x[e>>2]}:function(e){return D[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Dr(e,r,t,n,o){r=Ue(r);var a=We(t),i=e=>e;if(0===n){var s=32-8*t;i=e=>e<<s>>>s}var u=r.includes("unsigned"),c=(e,r)=>{};Ge(e,{name:r,fromWireType:i,toWireType:u?function(e,r){return c(r,this.name),r>>>0}:function(e,r){return c(r,this.name),r},argPackAdvance:8,readValueFromPointer:xr(r,a,0!==n),destructorFunction:null})}function Fr(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=D,t=r[e>>=2],o=r[e+1];return new n(y,o,t)}Ge(e,{name:t=Ue(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function Sr(e,r){var t="std::string"===(r=Ue(r));Ge(e,{name:r,fromWireType:function(e){var r,n=D[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=T(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);r=c.join("")}return po(e),r},toWireType:function(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||Ve("Cannot pass non-string to std::string"),n=t&&o?M(r):r.length;var a=ho(4+n+1),i=a+4;if(D[a>>2]=n,t&&o)B(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(po(i),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=r[s];return null!==e&&e.push(po,a),a},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){po(e)}})}var Ar="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Pr(e,r){for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&k[n];)++n;if((t=n<<1)-e>32&&Ar)return Ar.decode(E.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=b[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Cr(e,r,t){if(void 0===t&&(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);b[r>>1]=i,r+=2}return b[r>>1]=0,r-n}function Tr(e){return 2*e.length}function jr(e,r){for(var t=0,n="";!(t>=r/4);){var o=x[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}function Br(e,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),x[r>>2]=i,(r+=4)+4>o)break}return x[r>>2]=0,r-n}function Mr(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}function Lr(e,r,t){var n,o,a,i,s;t=Ue(t),2===r?(n=Pr,o=Cr,i=Tr,a=()=>k,s=1):4===r&&(n=jr,o=Br,i=Mr,a=()=>D,s=2),Ge(e,{name:t,fromWireType:function(e){for(var t,o=D[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var f=e+4+c*r;if(c==o||0==i[f>>s]){var l=n(u,f-u);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),u=f+r}}return po(e),t},toWireType:function(e,n){"string"!=typeof n&&Ve("Cannot pass non-string to C++ string type "+t);var a=i(n),u=ho(4+a+r);return D[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(po,u),u},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){po(e)}})}function Rr(e,r,t,n,o,a){De[e]={name:Ue(r),rawConstructor:wr(t,n),rawDestructor:wr(o,a),fields:[]}}function Ir(e,r,t,n,o,a,i,s,u,c){De[e].fields.push({fieldName:Ue(r),getterReturnType:t,getter:wr(n,o),getterContext:a,setterArgumentType:i,setter:wr(s,u),setterContext:c})}function Nr(e,r){Ge(e,{isVoid:!0,name:r=Ue(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})}function Or(e){do{var r=D[e>>2],t=D[(e+=4)>>2],n=D[(e+=4)>>2];e+=4;var o=T(r);we.createPath("/",de.dirname(o),!0,!0),we.createDataFile(o,null,w.subarray(n,n+t),!0,!0,!0)}while(D[e>>2])}function zr(e){e>4&&(Qe[e].refcount+=1)}var Wr={};function Zr(e){var r=Wr[e];return void 0===r?Ue(e):r}function Hr(e){return rr.toHandle(Zr(e))}function Ur(){return rr.toHandle({})}function qr(e,r,t){e=rr.toValue(e),r=rr.toValue(r),t=rr.toValue(t),e[r]=t}function Vr(e,r){var t=(e=ur(e,"_emval_take_value")).readValueFromPointer(r);return rr.toHandle(t)}function Gr(){Q("")}function Yr(e,r,t){E.copyWithin(e,r,r+t)}function Xr(){return 2147483648}function Qr(e){try{return p.grow(e-y.byteLength+65535>>>16),L(p.buffer),1}catch(r){}}function Kr(e){var r=E.length;e>>>=0;var t=Xr();if(e>t)return!1;let n=(e,r)=>e+(r-e%r)%r;for(var o=1;o<=4;o*=2){var a=r*(1+.2/o);if(a=Math.min(a,e+100663296),Qr(Math.min(t,n(Math.max(e,a),65536))))return!0}return!1}function Jr(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function $r(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function et(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var rt={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){rt.lastError||(rt.lastError=e)},getNewId:function(e){for(var r=rt.counter++,t=e.length;t<r;t++)e[t]=null;return r},getSource:function(e,r,t,n){for(var o="",a=0;a<r;++a){var i=n?x[n+4*a>>2]:-1;o+=T(x[t+4*a>>2],i<0?void 0:i)}return o},createContext:function(e,r){if(o.preinitializedWebGLContext){var t=o.preinitializedWebGLContext;r.majorVersion="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}else{if(!e.getContextSafariWebGL2Fixed){function n(r,t){var n=e.getContextSafariWebGL2Fixed(r,t);return"webgl"==r==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=n}t=e.getContext("webgl2",r)}return t?rt.registerContext(t,r):0},registerContext:function(e,r){var t=rt.getNewId(rt.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),rt.contexts[t]=n,(void 0===r.enableExtensionsByDefault||r.enableExtensionsByDefault)&&rt.initExtensions(n),t},makeContextCurrent:function(e){return rt.currentContext=rt.contexts[e],o.ctx=so=rt.currentContext&&rt.currentContext.GLctx,!(e&&!so)},getContext:function(e){return rt.contexts[e]},deleteContext:function(e){rt.currentContext===rt.contexts[e]&&(rt.currentContext=null),"object"==typeof tt&&tt.removeAllHandlersOnTarget(rt.contexts[e].GLctx.canvas),rt.contexts[e]&&rt.contexts[e].GLctx.canvas&&(rt.contexts[e].GLctx.canvas.GLctxObject=void 0),rt.contexts[e]=null},initExtensions:function(e){if(e||(e=rt.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;Jr(r),$r(r),e.version>=2&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!r.disjointTimerQueryExt)&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query")),et(r),(r.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||r.getExtension(e)}))}}},tt={inEventHandler:0,removeAllEventListeners:function(){for(var e=tt.eventHandlers.length-1;e>=0;--e)tt._removeHandler(e);tt.eventHandlers=[],tt.deferredCalls=[]},registerRemoveEventListeners:function(){tt.removeEventListenersRegistered||(tt.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,r,t){function n(e,r){if(e.length!=r.length)return!1;for(var t in e)if(e[t]!=r[t])return!1;return!0}for(var o in tt.deferredCalls){var a=tt.deferredCalls[o];if(a.targetFunction==e&&n(a.argsList,t))return}tt.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),tt.deferredCalls.sort((function(e,r){return e.precedence<r.precedence}))},removeDeferredCalls:function(e){for(var r=0;r<tt.deferredCalls.length;++r)tt.deferredCalls[r].targetFunction==e&&(tt.deferredCalls.splice(r,1),--r)},canPerformEventHandlerRequests:function(){return tt.inEventHandler&&tt.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(tt.canPerformEventHandlerRequests())for(var e=0;e<tt.deferredCalls.length;++e){var r=tt.deferredCalls[e];tt.deferredCalls.splice(e,1),--e,r.targetFunction.apply(null,r.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,r){for(var t=0;t<tt.eventHandlers.length;++t)tt.eventHandlers[t].target!=e||r&&r!=tt.eventHandlers[t].eventTypeString||tt._removeHandler(t--)},_removeHandler:function(e){var r=tt.eventHandlers[e];r.target.removeEventListener(r.eventTypeString,r.eventListenerFunc,r.useCapture),tt.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var r=function(r){++tt.inEventHandler,tt.currentEventHandler=e,tt.runDeferredCalls(),e.handlerFunc(r),tt.runDeferredCalls(),--tt.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=r,e.target.addEventListener(e.eventTypeString,r,e.useCapture),tt.eventHandlers.push(e),tt.registerRemoveEventListeners();else for(var t=0;t<tt.eventHandlers.length;++t)tt.eventHandlers[t].target==e.target&&tt.eventHandlers[t].eventTypeString==e.eventTypeString&&tt._removeHandler(t--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},nt=["default","low-power","high-performance"];function ot(e){return e>2?T(e):e}var at=[0,document,window];function it(e){return e=ot(e),at[e]||document.querySelector(e)}function st(e){return it(e)}function ut(e,r){var t=r>>2,n=x[t+6],o={alpha:!!x[t+0],depth:!!x[t+1],stencil:!!x[t+2],antialias:!!x[t+3],premultipliedAlpha:!!x[t+4],preserveDrawingBuffer:!!x[t+5],powerPreference:nt[n],failIfMajorPerformanceCaveat:!!x[t+7],majorVersion:x[t+8],minorVersion:x[t+9],enableExtensionsByDefault:x[t+10],explicitSwapControl:x[t+11],proxyContextToMainThread:x[t+12],renderViaOffscreenBackBuffer:x[t+13]},a=st(e);return a?o.explicitSwapControl?0:rt.createContext(a,o):0}var ct=ut;function ft(e){for(var r=e>>2,t=0;t<14;++t)x[r+t]=0;x[r+0]=x[r+1]=x[r+3]=x[r+4]=x[r+8]=x[r+10]=1}function lt(e){return rt.makeContextCurrent(e)?0:-5}var dt={};function mt(){return c||"./this.program"}function pt(){if(!pt.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",_:mt()};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]);pt.strings=t}return pt.strings}function ht(e,r,t){for(var n=0;n<e.length;++n)w[r++>>0]=e.charCodeAt(n);t||(w[r>>0]=0)}function vt(e,r){var t=0;return pt().forEach((function(n,o){var a=r+t;D[e+4*o>>2]=a,ht(n,a),t+=n.length+1})),0}function _t(e,r){var t=pt();D[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),D[r>>2]=n,0}function gt(e){try{var r=Ee.getStreamFromFD(e);return we.close(r),0}catch(t){if(void 0===we||!(t instanceof we.ErrnoError))throw t;return t.errno}}function yt(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=D[r>>2],s=D[r+4>>2];r+=8;var u=we.read(e,w,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function wt(e,r,t,n){try{var o=yt(Ee.getStreamFromFD(e),r,t);return x[n>>2]=o,0}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return a.errno}}function Et(e,r){return r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN}function bt(e,r,t,n,o){try{var a=Et(r,t);if(isNaN(a))return 61;var i=Ee.getStreamFromFD(e);return we.llseek(i,a,n),$=[i.position>>>0,(J=i.position,+Math.abs(J)>=1?J>0?(0|Math.min(+Math.floor(J/4294967296),4294967295))>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)],x[o>>2]=$[0],x[o+4>>2]=$[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===we||!(s instanceof we.ErrnoError))throw s;return s.errno}}function kt(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=D[r>>2],s=D[r+4>>2];r+=8;var u=we.write(e,w,i,s,n);if(u<0)return-1;o+=u}return o}function xt(e,r,t,n){try{var o=kt(Ee.getStreamFromFD(e),r,t);return D[n>>2]=o,0}catch(a){if(void 0===we||!(a instanceof we.ErrnoError))throw a;return a.errno}}function Dt(e){so.activeTexture(e)}function Ft(e,r){so.attachShader(rt.programs[e],rt.shaders[r])}function St(e,r,t){so.bindAttribLocation(rt.programs[e],r,T(t))}function At(e,r){35051==e?so.currentPixelPackBufferBinding=r:35052==e&&(so.currentPixelUnpackBufferBinding=r),so.bindBuffer(e,rt.buffers[r])}function Pt(e,r,t){so.bindBufferBase(e,r,rt.buffers[t])}function Ct(e,r,t,n,o){so.bindBufferRange(e,r,rt.buffers[t],n,o)}function Tt(e,r){so.bindFramebuffer(e,rt.framebuffers[r])}function jt(e,r){so.bindTexture(e,rt.textures[r])}function Bt(e){so.bindVertexArray(rt.vaos[e])}function Mt(e,r,t,n){t&&r?so.bufferData(e,E,n,t,r):so.bufferData(e,r,n)}function Lt(e,r,t,n){t&&so.bufferSubData(e,r,E,n,t)}function Rt(e){so.clear(e)}function It(e,r,t,n){so.clearBufferfi(e,r,t,n)}function Nt(e,r,t){so.clearBufferfv(e,r,F,t>>2)}function Ot(e,r,t){so.clearBufferiv(e,r,x,t>>2)}function zt(e,r,t){so.clearBufferuiv(e,r,D,t>>2)}function Wt(e,r,t,n){so.clearColor(e,r,t,n)}function Zt(e){so.clearDepth(e)}function Ht(e){so.clearStencil(e)}function Ut(e){so.compileShader(rt.shaders[e])}function qt(){var e=rt.getNewId(rt.programs),r=so.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,rt.programs[e]=r,e}function Vt(e){var r=rt.getNewId(rt.shaders);return rt.shaders[r]=so.createShader(e),r}function Gt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.buffers[n];o&&(so.deleteBuffer(o),o.name=0,rt.buffers[n]=null,n==so.currentPixelPackBufferBinding&&(so.currentPixelPackBufferBinding=0),n==so.currentPixelUnpackBufferBinding&&(so.currentPixelUnpackBufferBinding=0))}}function Yt(e,r){for(var t=0;t<e;++t){var n=x[r+4*t>>2],o=rt.framebuffers[n];o&&(so.deleteFramebuffer(o),o.name=0,rt.framebuffers[n]=null)}}function Xt(e){if(e){var r=rt.programs[e];r?(so.deleteProgram(r),r.name=0,rt.programs[e]=null):rt.recordError(1281)}}function Qt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.queries[n];o&&(so.deleteQuery(o),rt.queries[n]=null)}}function Kt(e){if(e){var r=rt.shaders[e];r?(so.deleteShader(r),rt.shaders[e]=null):rt.recordError(1281)}}function Jt(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2],o=rt.textures[n];o&&(so.deleteTexture(o),o.name=0,rt.textures[n]=null)}}function $t(e,r){for(var t=0;t<e;t++){var n=x[r+4*t>>2];so.deleteVertexArray(rt.vaos[n]),rt.vaos[n]=null}}function en(e,r,t){so.drawArrays(e,r,t)}var rn=[];function tn(e,r){for(var t=rn[e],n=0;n<e;n++)t[n]=x[r+4*n>>2];so.drawBuffers(t)}function nn(e,r,t,n){so.drawElements(e,r,t,n)}function on(e,r,t,n,o){so.drawElementsInstanced(e,r,t,n,o)}function an(e){so.enableVertexAttribArray(e)}function sn(e,r,t,n,o){so.framebufferTexture2D(e,r,t,rt.textures[n],o)}function un(e,r,t,n){for(var o=0;o<e;o++){var a=so[t](),i=a&&rt.getNewId(n);a?(a.name=i,n[i]=a):rt.recordError(1282),x[r+4*o>>2]=i}}function cn(e,r){un(e,r,"createBuffer",rt.buffers)}function fn(e,r){un(e,r,"createFramebuffer",rt.framebuffers)}function ln(e,r){un(e,r,"createQuery",rt.queries)}function dn(e,r){un(e,r,"createTexture",rt.textures)}function mn(e,r){un(e,r,"createVertexArray",rt.vaos)}function pn(e){so.generateMipmap(e)}function hn(e,r){D[e>>2]=r,D[e+4>>2]=(r-D[e>>2])/4294967296}function vn(e,r,t){if(r){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=t&&1!=t&&rt.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=so.getParameter(34467);n=o?o.length:0;break;case 33309:if(rt.currentContext.version<2)return void rt.recordError(1282);n=2*(so.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(rt.currentContext.version<2)return void rt.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=so.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void rt.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void rt.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var i=0;i<a.length;++i)switch(t){case 0:x[r+4*i>>2]=a[i];break;case 2:F[r+4*i>>2]=a[i];break;case 4:w[r+i>>0]=a[i]?1:0}return}try{n=0|a.name}catch(s){return rt.recordError(1280),void v("GL_INVALID_ENUM in glGet"+t+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+s+")")}}break;default:return rt.recordError(1280),void v("GL_INVALID_ENUM in glGet"+t+"v: Native code calling glGet"+t+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(t){case 1:hn(r,n);break;case 0:x[r>>2]=n;break;case 2:F[r>>2]=n;break;case 4:w[r>>0]=n?1:0}}else rt.recordError(1281)}function _n(e,r){vn(e,r,0)}function gn(e,r,t){if(t){var n,o=rt.queries[e];hn(t,"boolean"==typeof(n=rt.currentContext.version<2?so.disjointTimerQueryExt.getQueryObjectEXT(o,r):so.getQueryParameter(o,r))?n?1:0:n)}else rt.recordError(1281)}function yn(e,r,t){if(t){var n,o=rt.queries[e],a=so.disjointTimerQueryExt.getQueryObjectEXT(o,r);n="boolean"==typeof a?a?1:0:a,x[t>>2]=n}else rt.recordError(1281)}function wn(e,r){return so.getUniformBlockIndex(rt.programs[e],T(r))}function En(e){return parseInt(e)}function bn(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function kn(e){var r,t,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},r=0;r<so.getProgramParameter(e,35718);++r){var a=so.getActiveUniform(e,r),i=a.name,s=a.size,u=bn(i),c=u>0?i.slice(0,u):i,f=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[c]=[s,f],t=0;t<s;++t)n[f]=t,e.uniformArrayNamesById[f++]=c}}function xn(e,r){if(r=T(r),e=rt.programs[e]){kn(e);var t=e.uniformLocsById,n=0,o=r,a=bn(r);a>0&&(n=En(r.slice(a+1))>>>0,o=r.slice(0,a));var i=e.uniformSizeAndIdsByName[o];if(i&&n<i[0]&&(t[n+=i[1]]=t[n]||so.getUniformLocation(e,r)))return n}else rt.recordError(1281);return-1}function Dn(e){e=rt.programs[e],so.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Fn(e,r){3317==e&&(rt.unpackAlignment=r),so.pixelStorei(e,r)}function Sn(e,r){so.disjointTimerQueryExt.queryCounterEXT(rt.queries[e],r)}function An(e){so.readBuffer(e)}function Pn(e){return 0==(e-=5120)?w:1==e?E:2==e?b:4==e?x:6==e?F:5==e||28922==e||28520==e||30779==e||30782==e?D:k}function Cn(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Tn(e,r,t,n,o,a,i){if(so.currentPixelPackBufferBinding)so.readPixels(e,r,t,n,o,a,i);else{var s=Pn(a);so.readPixels(e,r,t,n,o,a,s,i>>Cn(s))}}function jn(e,r,t,n){var o=rt.getSource(e,r,t,n);so.shaderSource(rt.shaders[e],o)}function Bn(e,r,t,n,o,a,i,s,u,c){if(so.currentPixelUnpackBufferBinding)so.texImage3D(e,r,t,n,o,a,i,s,u,c);else if(c){var f=Pn(u);so.texImage3D(e,r,t,n,o,a,i,s,u,f,c>>Cn(f))}else so.texImage3D(e,r,t,n,o,a,i,s,u,null)}function Mn(e,r,t){so.texParameteri(e,r,t)}function Ln(e,r,t,n,o){so.texStorage2D(e,r,t,n,o)}function Rn(e,r,t,n,o,a,i,s,u){if(so.currentPixelUnpackBufferBinding)so.texSubImage2D(e,r,t,n,o,a,i,s,u);else if(u){var c=Pn(s);so.texSubImage2D(e,r,t,n,o,a,i,s,c,u>>Cn(c))}else so.texSubImage2D(e,r,t,n,o,a,i,s,null)}function In(e,r,t,n,o,a,i,s,u,c,f){if(so.currentPixelUnpackBufferBinding)so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,f);else if(f){var l=Pn(c);so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,l,f>>Cn(l))}else so.texSubImage3D(e,r,t,n,o,a,i,s,u,c,null)}function Nn(e){var r=so.currentProgram;if(r){var t=r.uniformLocsById[e];return"number"==typeof t&&(r.uniformLocsById[e]=t=so.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"["+t+"]":""))),t}rt.recordError(1282)}function On(e,r){so.uniform1i(Nn(e),r)}function zn(e,r,t){e=rt.programs[e],so.uniformBlockBinding(e,r,t)}function Wn(e){e=rt.programs[e],so.useProgram(e),so.currentProgram=e}function Zn(e,r,t,n,o){so.vertexAttribIPointer(e,r,t,n,o)}function Hn(e,r,t,n,o,a){so.vertexAttribPointer(e,r,t,!!n,o,a)}function Un(e){}function qn(e){return e%4==0&&(e%100!=0||e%400==0)}function Vn(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}var Gn=[31,29,31,30,31,30,31,31,30,31,30,31],Yn=[31,28,31,30,31,30,31,31,30,31,30,31];function Xn(e,r){for(var t=new Date(e.getTime());r>0;){var n=qn(t.getFullYear()),o=t.getMonth(),a=(n?Gn:Yn)[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}function Qn(e,r,t,n){var o=x[n+40>>2],a={tm_sec:x[n>>2],tm_min:x[n+4>>2],tm_hour:x[n+8>>2],tm_mday:x[n+12>>2],tm_mon:x[n+16>>2],tm_year:x[n+20>>2],tm_wday:x[n+24>>2],tm_yday:x[n+28>>2],tm_isdst:x[n+32>>2],tm_gmtoff:x[n+36>>2],tm_zone:o?T(o):""},i=T(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return l(e,r,"0")}function m(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var r=Xn(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return m(o,r)<=0?m(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":function(e){return d(e.tm_mday+Vn(qn(e.tm_year+1900)?Gn:Yn,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&qn(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&qn(e.tm_year%400-1))&&r++}return d(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var _=he(i=i.replace(/\0\0/g,"%"),!1);return _.length>r?0:(ie(_,e),_.length-1)}function Kn(e,r,t,n){return Qn(e,r,t,n)}function Jn(e,r){e<128?r.push(e):r.push(e%128|128,e>>7)}function $n(e){for(var r={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t}function eo(e,r){if("function"==typeof WebAssembly.Function)return new WebAssembly.Function($n(r),e);var t=[1,96],n=r.slice(0,1),o=r.slice(1),a={i:127,p:127,j:126,f:125,d:124};Jn(o.length,t);for(var i=0;i<o.length;++i)t.push(a[o[i]]);"v"==n?t.push(0):t.push(1,a[n]);var s=[0,97,115,109,1,0,0,0,1];Jn(t.length,s),s.push.apply(s,t),s.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var u=new WebAssembly.Module(new Uint8Array(s));return new WebAssembly.Instance(u,{e:{f:e}}).exports.f}function ro(e,r){if(to)for(var t=e;t<e+r;t++){var n=_r(t);n&&to.set(n,t)}}var to=void 0,no=[];function oo(){if(no.length)return no.pop();try{A.grow(1)}catch(v){if(!(v instanceof RangeError))throw v;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return A.length-1}function ao(e,r){A.set(e,r),vr[e]=A.get(e)}function io(e,r){if(to||(to=new WeakMap,ro(0,A.length)),to.has(e))return to.get(e);var t=oo();try{ao(t,e)}catch(v){if(!(v instanceof TypeError))throw v;ao(t,eo(e,r))}return to.set(e,t),t}var so,uo=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},co=365,fo=146;Object.defineProperties(uo.prototype,{read:{get:function(){return(this.mode&co)===co},set:function(e){e?this.mode|=co:this.mode&=~co}},write:{get:function(){return(this.mode&fo)===fo},set:function(e){e?this.mode|=fo:this.mode&=~fo}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=uo,we.staticInit(),o.FS_createPath=we.createPath,o.FS_createDataFile=we.createDataFile,o.FS_createPreloadedFile=we.createPreloadedFile,o.FS_unlink=we.unlink,o.FS_createLazyFile=we.createLazyFile,o.FS_createDevice=we.createDevice,Re=o.InternalError=Le(Error,"InternalError"),Ze(),qe=o.BindingError=Le(Error,"BindingError"),er(),Er=o.UnboundTypeError=Le(Error,"UnboundTypeError");for(var lo=0;lo<32;++lo)rn.push(new Array(lo));var mo={Y:se,n:ue,m:fe,A:be,aa:ke,ba:xe,ka:Oe,Ta:ze,ga:Ye,fa:tr,G:ir,j:cr,F:lr,b:kr,g:Dr,f:Fr,E:Sr,x:Lr,la:Rr,p:Ir,ha:Nr,ia:Or,a:Ke,o:zr,d:Hr,h:Ur,e:qr,c:Vr,B:Gr,ea:Yr,ca:Kr,ja:ct,ma:ft,da:lt,Z:vt,_:_t,C:gt,$:wt,Sa:bt,D:xt,La:Dt,r:Ft,Ca:St,Oa:At,Ma:Pt,Na:Ct,u:Tt,i:jt,v:Bt,Wa:Mt,Q:Lt,S:Rt,Ga:It,z:Nt,Fa:Ot,R:zt,Ja:Wt,Ia:Zt,Ha:Ht,M:Ut,Da:qt,O:Vt,X:Gt,U:Yt,Ea:Xt,J:Qt,q:Kt,T:Jt,L:$t,Pa:en,Ka:tn,Qa:nn,Ra:on,qa:an,t:sn,Xa:cn,V:fn,K:ln,xa:dn,ra:mn,sa:pn,w:_n,H:gn,na:yn,Ba:wn,za:xn,P:Dn,l:Fn,I:Sn,y:An,s:Tn,N:jn,va:Bn,k:Mn,wa:Ln,ta:Rn,ua:In,ya:On,Aa:zn,W:Wn,oa:Zn,pa:Hn,Ua:Un,Va:Kn};oe(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Za).apply(null,arguments)};var po=o._free=function(){return(po=o._free=o.asm.$a).apply(null,arguments)},ho=o._malloc=function(){return(ho=o._malloc=o.asm.ab).apply(null,arguments)};o.__Z16get_new_requestsi=function(){return(o.__Z16get_new_requestsi=o.asm.bb).apply(null,arguments)},o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=function(){return(o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=o.asm.cb).apply(null,arguments)},o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=function(){return(o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=o.asm.db).apply(null,arguments)},o.__Z12remove_layeri=function(){return(o.__Z12remove_layeri=o.asm.eb).apply(null,arguments)},o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=function(){return(o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=o.asm.fb).apply(null,arguments)},o.__Z23uninitialize_voxel_wasmv=function(){return(o.__Z23uninitialize_voxel_wasmv=o.asm.gb).apply(null,arguments)},o.__Z15set_view_matrixffffffffffffffff=function(){return(o.__Z15set_view_matrixffffffffffffffff=o.asm.hb).apply(null,arguments)},o.__Z21set_projection_matrixffffffffffffffff=function(){return(o.__Z21set_projection_matrixffffffffffffffff=o.asm.ib).apply(null,arguments)},o.__Z12set_near_fardd=function(){return(o.__Z12set_near_fardd=o.asm.jb).apply(null,arguments)},o.__Z4cullv=function(){return(o.__Z4cullv=o.asm.kb).apply(null,arguments)},o.__Z31update_camera_pos_and_directiondddddd=function(){return(o.__Z31update_camera_pos_and_directiondddddd=o.asm.lb).apply(null,arguments)},o.__Z8get_nearv=function(){return(o.__Z8get_nearv=o.asm.mb).apply(null,arguments)},o.__Z7get_farv=function(){return(o.__Z7get_farv=o.asm.nb).apply(null,arguments)},o.__Z17begin_color_framebddd=function(){return(o.__Z17begin_color_framebddd=o.asm.ob).apply(null,arguments)},o.__Z11begin_framev=function(){return(o.__Z11begin_framev=o.asm.pb).apply(null,arguments)},o.__Z32get_texture_units_bound_in_framev=function(){return(o.__Z32get_texture_units_bound_in_framev=o.asm.qb).apply(null,arguments)},o.__Z23get_active_texture_unitv=function(){return(o.__Z23get_active_texture_unitv=o.asm.rb).apply(null,arguments)},o.__Z12set_viewportii=function(){return(o.__Z12set_viewportii=o.asm.sb).apply(null,arguments)},o.__Z4drawv=function(){return(o.__Z4drawv=o.asm.tb).apply(null,arguments)},o.__Z11set_qualityi=function(){return(o.__Z11set_qualityi=o.asm.ub).apply(null,arguments)},o.__Z10pick_depthii=function(){return(o.__Z10pick_depthii=o.asm.vb).apply(null,arguments)},o.__Z11pick_objectiijj=function(){return(o.__Z11pick_objectiijj=o.asm.wb).apply(null,arguments)},o.__Z11set_enabledib=function(){return(o.__Z11set_enabledib=o.asm.xb).apply(null,arguments)},o.__Z23handle_masked_ui_updateijj=function(){return(o.__Z23handle_masked_ui_updateijj=o.asm.yb).apply(null,arguments)},o.__Z21set_scene_time_extentddb=function(){return(o.__Z21set_scene_time_extentddb=o.asm.zb).apply(null,arguments)},o.__Z20set_upscaling_limitsidd=function(){return(o.__Z20set_upscaling_limitsidd=o.asm.Ab).apply(null,arguments)},o.__Z21estimate_memory_usagei=function(){return(o.__Z21estimate_memory_usagei=o.asm.Bb).apply(null,arguments)},o.__Z16add_generic_meshjjjjjjjj=function(){return(o.__Z16add_generic_meshjjjjjjjj=o.asm.Cb).apply(null,arguments)},o.__Z19remove_generic_meshi=function(){return(o.__Z19remove_generic_meshi=o.asm.Db).apply(null,arguments)},o.__Z30toggle_full_volume_extent_drawi=function(){return(o.__Z30toggle_full_volume_extent_drawi=o.asm.Eb).apply(null,arguments)},o.__Z21get_layer_epoch_timesii=function(){return(o.__Z21get_layer_epoch_timesii=o.asm.Fb).apply(null,arguments)},o.__Z25get_layer_current_time_idi=function(){return(o.__Z25get_layer_current_time_idi=o.asm.Gb).apply(null,arguments)},o.__Z27get_locked_isosurface_coloriid=function(){return(o.__Z27get_locked_isosurface_coloriid=o.asm.Hb).apply(null,arguments)};var vo=o.___getTypeName=function(){return(vo=o.___getTypeName=o.asm.Ib).apply(null,arguments)};o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.Jb).apply(null,arguments)};var _o,go=o.___errno_location=function(){return(go=o.___errno_location=o.asm.Kb).apply(null,arguments)},yo=o.___cxa_is_pointer_type=function(){return(yo=o.___cxa_is_pointer_type=o.asm.Lb).apply(null,arguments)};function wo(e){function t(){_o||(_o=!0,o.calledRun=!0,_||(z(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),W()))}q>0||(O(),q>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.dynCall_iij=function(){return(o.dynCall_iij=o.asm.Mb).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.Nb).apply(null,arguments)},o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm.Ob).apply(null,arguments)},o.dynCall_iiiiij=function(){return(o.dynCall_iiiiij=o.asm.Pb).apply(null,arguments)},o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.Qb).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.Rb).apply(null,arguments)},o.___emscripten_embedded_file_data=138992,o.stringToUTF8=B,o.lengthBytesUTF8=M,o.addRunDependency=Y,o.removeRunDependency=X,o.FS_createPath=we.createPath,o.FS_createDataFile=we.createDataFile,o.FS_createPreloadedFile=we.createPreloadedFile,o.FS_createLazyFile=we.createLazyFile,o.FS_createDevice=we.createDevice,o.FS_unlink=we.unlink,o.addFunction=io,V=function e(){_o||wo(),_o||(V=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return wo(),e.ready},r.exports=n;const a=e({__proto__:null,default:o},[o]);export{a as v};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{isSome as t,isNone as s}from"../core/maybe.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import{Integer as c}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{n as p}from"../chunks/vec3.js";import{f as y}from"../chunks/vec3f64.js";import d from"../geometry/Extent.js";import f from"./Layer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as g}from"./mixins/ScaleRangeLayer.js";import{SceneService as V}from"./mixins/SceneService.js";import{sanitizeUrl as x}from"./support/arcgisLayerUrl.js";import{popupEnabled as j,legendEnabled as w,url as I}from"./support/commonProperties.js";import D from"./voxel/VoxelSection.js";import F from"./voxel/VoxelSimpleShading.js";import N from"./voxel/VoxelVariable.js";import T from"./voxel/VoxelVariableStyle.js";import L from"./voxel/VoxelVolume.js";import A from"./voxel/VoxelVolumeIndex.js";import E from"./voxel/VoxelVolumeStyle.js";const R="esri.layers.VoxelLayer",M=o.getLogger(R);let O=class extends(V(h(b(S(g(n(v(f)))))))){constructor(e){super(e),this.serviceRoot="",this.popupEnabled=!0,this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new F,this.opacity=1,this.variables=new r,this.volumes=new r,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.volumeStyles=new(r.ofType(E)),this.variableStyles=new(r.ofType(T)),this.sections=new(r.ofType(D))}set url(e){this._set("url",x(e,M))}load(e){const r=t(e)?e.signal:null,i=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(r))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(i),Promise.resolve(this)}read(e,r){super.read(e,r);for(const i of this.volumes)i.spatialReference=this.spatialReference}readVersion(e,r){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new i("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,r,i){if(null!=e&&"object"==typeof e){const o=d.fromJSON(e,i);if(0===o.zmin&&0===o.zmax&&Array.isArray(r.volumes)){const e=L.fromJSON(r.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const r=e.dimensions[2];if(r.isRegular){let e=r.regularSpacing.offset,i=r.regularSpacing.offset+r.regularSpacing.scale*(r.size-1);if(e>i){const r=e;e=i,i=r}o.zmin=e,o.zmax=i}}}return o}return null}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let r=-1;r=t(e)?e:this.currentVariableId;if(!this.variableStyles||-1===r)return null;const i=this.variableStyles.findIndex((e=>e.variableId===r));return i<0?null:this.variableStyles.getItemAt(i)}getVariable(e){let r=-1;if(r=t(e)?e:this.currentVariableId,!this.variables||-1===r)return null;const i=this.variables.findIndex((e=>e.id===r));return i<0?null:this.variables.getItemAt(i)}getVolume(e){const r=this.getVariable(e);return t(r)?this.volumes.find((({id:e})=>e===r.volumeId)):null}getVolumeStyle(e){const r=this.getVariable(e);return t(r)?this.volumeStyles.find((({volumeId:e})=>e===r.volumeId)):null}getColorForContinuousDataValue(e,r,i){const o=this.getVariable(e);if(s(o)||"continuous"!==o.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const t=this.variableStyles.findIndex((r=>r.variableId===e));if(t<0)return null;const n=this.variableStyles.getItemAt(t);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(r,i):null}getSections(){const e=[];for(const r of this.sections)e.push(new D({enabled:r.enabled,href:r.href,id:r.id,label:r.label,normal:r.normal,point:r.point,sizeInPixel:r.sizeInPixel,slices:r.slices,timeId:r.timeId,variableId:r.variableId}));return e}getVariableStyles(){const e=[];for(const r of this.variableStyles){const i=this._getVariable(r);if(t(i)){const o=r.clone();o.isosurfaces.length>4&&(o.isosurfaces=o.isosurfaces.slice(0,3),M.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of o.isosurfaces)if(e.colorLocked){const r=this.getColorForContinuousDataValue(o.variableId,e.value,!1);null===r||r.equals(e.color)||(e.color=r)}if("continuous"===i.renderingFormat.continuity)(null===o.transferFunction||o.transferFunction.colorStops.length<2)&&M.error(`VoxelVariableStyle for variable ${i.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==o.transferFunction&&(Array.isArray(o.transferFunction.stretchRange)&&2===o.transferFunction.stretchRange.length||(M.error(`VoxelVariableStyle for variable ${i.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),o.transferFunction.stretchRange=[0,1],o.transferFunction.colorStops.removeAll()));else if("discrete"===i.renderingFormat.continuity)if(0===r.uniqueValues.length)M.error(`VoxelVariableStyle for variable ${i.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of r.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(o)}else M.error(`VoxelVariable ID=${r.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const r of this.volumeStyles){const i=this._getVolumeFromVolumeId(r.volumeId);if(t(i)){const o=r.clone();for(const e of o.slices)this._isPlaneValid(e,[0,1,i.zDimension],i.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of o.dynamicSections)this._isPlaneValid(e,[0,1,i.zDimension],i.dimensions)||(e.enabled=!1,e.label="invalid");e.push(o)}else M.error(`VoxelVolume ID=${r.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const r=e.variableId;for(const i of this.variables)if(i.id===r)return i;return null}_getVolumeFromVolumeId(e){for(const r of this.volumes)if(r.id===e)return r;return null}_isPlaneValid(e,r,i){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let s=0;s<3;++s){const o=e.point[s];if(o<0||o>=i[r[s]].size)return!1}const o=y(e.normal[0],e.normal[1],e.normal[2]);p(o,o);const t=1e-6;return!(Math.abs(o[0])+Math.abs(o[1])+Math.abs(o[2])<t)&&(e.normal[0]=o[0],e.normal[1]=o[1],e.normal[2]=o[2],!0)}};e([a(j)],O.prototype,"popupEnabled",void 0),e([a({type:["Voxel"]})],O.prototype,"operationalLayerType",void 0),e([a(w)],O.prototype,"legendEnabled",void 0),e([a({json:{write:!0}})],O.prototype,"title",void 0),e([a(I)],O.prototype,"url",null),e([a({type:r.ofType(D),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],O.prototype,"sections",void 0),e([a({type:c,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],O.prototype,"currentVariableId",void 0),e([a({type:r.ofType(E),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],O.prototype,"volumeStyles",void 0),e([a({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],O.prototype,"renderMode",void 0),e([a({type:r.ofType(T),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],O.prototype,"variableStyles",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],O.prototype,"enableSlices",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],O.prototype,"enableSections",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],O.prototype,"enableDynamicSections",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],O.prototype,"enableIsosurfaces",void 0),e([a({type:F,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],O.prototype,"shading",void 0),e([a({type:["show","hide"]})],O.prototype,"listMode",void 0),e([a({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],O.prototype,"opacity",void 0),e([a({type:r.ofType(N)})],O.prototype,"variables",void 0),e([a({type:r.ofType(L)})],O.prototype,"volumes",void 0),e([a({type:A})],O.prototype,"index",void 0),e([a({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],O.prototype,"minScale",void 0),e([a({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],O.prototype,"maxScale",void 0),e([a({json:{read:!1},readOnly:!0})],O.prototype,"type",void 0),e([a({readOnly:!0,json:{name:"serviceVersion"}})],O.prototype,"version",void 0),e([u("service","version")],O.prototype,"readVersion",null),e([a({type:d})],O.prototype,"fullExtent",void 0),e([u("service","fullExtent",["fullExtent"])],O.prototype,"readFullExtent",null),O=e([m(R)],O);const P=O;export{P as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{isSome as t,isNone as s}from"../core/maybe.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import{Integer as c}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{n as p}from"../chunks/vec3.js";import{f as y}from"../chunks/vec3f64.js";import d from"../geometry/Extent.js";import f from"./Layer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as g}from"./mixins/ScaleRangeLayer.js";import{SceneService as V}from"./mixins/SceneService.js";import{sanitizeUrl as x}from"./support/arcgisLayerUrl.js";import{popupEnabled as j,legendEnabled as w,url as I}from"./support/commonProperties.js";import D from"./voxel/VoxelSection.js";import F from"./voxel/VoxelSimpleShading.js";import N from"./voxel/VoxelVariable.js";import T from"./voxel/VoxelVariableStyle.js";import L from"./voxel/VoxelVolume.js";import A from"./voxel/VoxelVolumeIndex.js";import E from"./voxel/VoxelVolumeStyle.js";const R="esri.layers.VoxelLayer",M=o.getLogger(R);let O=class extends(V(h(b(S(g(n(v(f)))))))){constructor(e){super(e),this.serviceRoot="",this.popupEnabled=!0,this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new F,this.opacity=1,this.variables=new r,this.volumes=new r,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.volumeStyles=new(r.ofType(E)),this.variableStyles=new(r.ofType(T)),this.sections=new(r.ofType(D))}set url(e){this._set("url",x(e,M))}load(e){const r=t(e)?e.signal:null,i=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(r))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(i),Promise.resolve(this)}read(e,r){super.read(e,r);for(const i of this.volumes)i.spatialReference=this.spatialReference}readVersion(e,r){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new i("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,r,i){if(null!=e&&"object"==typeof e){const o=d.fromJSON(e,i);if(0===o.zmin&&0===o.zmax&&Array.isArray(r.volumes)){const e=L.fromJSON(r.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const r=e.dimensions[2];if(r.isRegular){let e=r.regularSpacing.offset,i=r.regularSpacing.offset+r.regularSpacing.scale*(r.size-1);if(e>i){const r=e;e=i,i=r}o.zmin=e,o.zmax=i}}}return o}return null}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let r=-1;r=t(e)?e:this.currentVariableId;if(!this.variableStyles||-1===r)return null;const i=this.variableStyles.findIndex((e=>e.variableId===r));return i<0?null:this.variableStyles.getItemAt(i)}getVariable(e){let r=-1;if(r=t(e)?e:this.currentVariableId,!this.variables||-1===r)return null;const i=this.variables.findIndex((e=>e.id===r));return i<0?null:this.variables.getItemAt(i)}getVolume(e){const r=this.getVariable(e);return t(r)?this.volumes.find((({id:e})=>e===r.volumeId)):null}getVolumeStyle(e){const r=this.getVariable(e);return t(r)?this.volumeStyles.find((({volumeId:e})=>e===r.volumeId)):null}getColorForContinuousDataValue(e,r,i){const o=this.getVariable(e);if(s(o)||"continuous"!==o.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const t=this.variableStyles.findIndex((r=>r.variableId===e));if(t<0)return null;const n=this.variableStyles.getItemAt(t);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(r,i):null}getSections(){const e=[];for(const r of this.sections)e.push(new D({enabled:r.enabled,href:r.href,id:r.id,label:r.label,normal:r.normal,point:r.point,sizeInPixel:r.sizeInPixel,slices:r.slices,timeId:r.timeId,variableId:r.variableId}));return e}getVariableStyles(){const e=[];for(const r of this.variableStyles){const i=this._getVariable(r);if(t(i)){const o=r.clone();o.isosurfaces.length>4&&(o.isosurfaces=o.isosurfaces.slice(0,3),M.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of o.isosurfaces)if(!e.colorLocked){const r=this.getColorForContinuousDataValue(o.variableId,e.value,!1);null===r||r.equals(e.color)||(e.color=r)}if("continuous"===i.renderingFormat.continuity)(null===o.transferFunction||o.transferFunction.colorStops.length<2)&&M.error(`VoxelVariableStyle for variable ${i.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==o.transferFunction&&(Array.isArray(o.transferFunction.stretchRange)&&2===o.transferFunction.stretchRange.length||(M.error(`VoxelVariableStyle for variable ${i.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),o.transferFunction.stretchRange=[0,1],o.transferFunction.colorStops.removeAll()));else if("discrete"===i.renderingFormat.continuity)if(0===r.uniqueValues.length)M.error(`VoxelVariableStyle for variable ${i.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of r.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(o)}else M.error(`VoxelVariable ID=${r.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const r of this.volumeStyles){const i=this._getVolumeFromVolumeId(r.volumeId);if(t(i)){const o=r.clone();for(const e of o.slices)this._isPlaneValid(e,[0,1,i.zDimension],i.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of o.dynamicSections)this._isPlaneValid(e,[0,1,i.zDimension],i.dimensions)||(e.enabled=!1,e.label="invalid");e.push(o)}else M.error(`VoxelVolume ID=${r.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const r=e.variableId;for(const i of this.variables)if(i.id===r)return i;return null}_getVolumeFromVolumeId(e){for(const r of this.volumes)if(r.id===e)return r;return null}_isPlaneValid(e,r,i){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let s=0;s<3;++s){const o=e.point[s];if(o<0||o>=i[r[s]].size)return!1}const o=y(e.normal[0],e.normal[1],e.normal[2]);p(o,o);const t=1e-6;return!(Math.abs(o[0])+Math.abs(o[1])+Math.abs(o[2])<t)&&(e.normal[0]=o[0],e.normal[1]=o[1],e.normal[2]=o[2],!0)}};e([a(j)],O.prototype,"popupEnabled",void 0),e([a({type:["Voxel"]})],O.prototype,"operationalLayerType",void 0),e([a(w)],O.prototype,"legendEnabled",void 0),e([a({json:{write:!0}})],O.prototype,"title",void 0),e([a(I)],O.prototype,"url",null),e([a({type:r.ofType(D),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],O.prototype,"sections",void 0),e([a({type:c,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],O.prototype,"currentVariableId",void 0),e([a({type:r.ofType(E),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],O.prototype,"volumeStyles",void 0),e([a({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],O.prototype,"renderMode",void 0),e([a({type:r.ofType(T),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],O.prototype,"variableStyles",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],O.prototype,"enableSlices",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],O.prototype,"enableSections",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],O.prototype,"enableDynamicSections",void 0),e([a({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],O.prototype,"enableIsosurfaces",void 0),e([a({type:F,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],O.prototype,"shading",void 0),e([a({type:["show","hide"]})],O.prototype,"listMode",void 0),e([a({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],O.prototype,"opacity",void 0),e([a({type:r.ofType(N)})],O.prototype,"variables",void 0),e([a({type:r.ofType(L)})],O.prototype,"volumes",void 0),e([a({type:A})],O.prototype,"index",void 0),e([a({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],O.prototype,"minScale",void 0),e([a({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],O.prototype,"maxScale",void 0),e([a({json:{read:!1},readOnly:!0})],O.prototype,"type",void 0),e([a({readOnly:!0,json:{name:"serviceVersion"}})],O.prototype,"version",void 0),e([u("service","version")],O.prototype,"readVersion",null),e([a({type:d})],O.prototype,"fullExtent",void 0),e([u("service","fullExtent",["fullExtent"])],O.prototype,"readFullExtent",null),O=e([m(R)],O);const P=O;export{P as default};