@datagrok/eda 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/111.js +1 -1
- package/dist/111.js.map +1 -1
- package/dist/128.js +1 -1
- package/dist/128.js.map +1 -1
- package/dist/153.js +1 -1
- package/dist/153.js.map +1 -1
- package/dist/23.js +1 -1
- package/dist/23.js.map +1 -1
- package/dist/234.js +1 -1
- package/dist/234.js.map +1 -1
- package/dist/242.js +1 -1
- package/dist/242.js.map +1 -1
- package/dist/260.js +1 -1
- package/dist/260.js.map +1 -1
- package/dist/33.js +1 -1
- package/dist/33.js.map +1 -1
- package/dist/348.js +1 -1
- package/dist/348.js.map +1 -1
- package/dist/377.js +1 -1
- package/dist/377.js.map +1 -1
- package/dist/412.js +1 -1
- package/dist/412.js.map +1 -1
- package/dist/415.js +1 -1
- package/dist/415.js.map +1 -1
- package/dist/531.js +1 -1
- package/dist/531.js.map +1 -1
- package/dist/583.js +1 -1
- package/dist/583.js.map +1 -1
- package/dist/589.js +1 -1
- package/dist/589.js.map +1 -1
- package/dist/603.js +1 -1
- package/dist/603.js.map +1 -1
- package/dist/656.js +1 -1
- package/dist/656.js.map +1 -1
- package/dist/682.js +1 -1
- package/dist/682.js.map +1 -1
- package/dist/705.js +1 -1
- package/dist/705.js.map +1 -1
- package/dist/727.js +1 -1
- package/dist/727.js.map +1 -1
- package/dist/731.js +1 -1
- package/dist/731.js.map +1 -1
- package/dist/738.js +1 -1
- package/dist/738.js.map +1 -1
- package/dist/763.js +1 -1
- package/dist/763.js.map +1 -1
- package/dist/778.js +1 -1
- package/dist/778.js.map +1 -1
- package/dist/783.js +1 -1
- package/dist/783.js.map +1 -1
- package/dist/793.js +1 -1
- package/dist/793.js.map +1 -1
- package/dist/810.js +2 -0
- package/dist/810.js.map +1 -0
- package/dist/860.js +1 -1
- package/dist/860.js.map +1 -1
- package/dist/907.js +1 -1
- package/dist/907.js.map +1 -1
- package/dist/950.js +1 -1
- package/dist/950.js.map +1 -1
- package/dist/980.js +1 -1
- package/dist/980.js.map +1 -1
- package/dist/990.js +1 -1
- package/dist/990.js.map +1 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +6 -6
- package/src/package.ts +1 -1
- package/src/pls/pls-constants.ts +7 -7
- package/src/pls/pls-tools.ts +5 -13
- package/test-console-output-1.log +0 -343
- package/test-record-1.mp4 +0 -0
package/dist/990.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var eda;(()=>{"use strict";var r={1101:(r,e,t)=>{t.d(e,{p:()=>o}),r=t.hmd(r);var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var e,o,a=void 0!==(r=r||{})?r:{};a.ready=new Promise((function(r,t){e=r,o=t}));var s,i,u,c=Object.assign({},a),d=[],f="./this.program",l=(r,e)=>{throw e},p="object"==typeof window,m="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,w="";(p||m)&&(m?w=self.location.href:"undefined"!=typeof document&&document.currentScript&&(w=document.currentScript.src),n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},m&&(u=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),i=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var v,y=a.print||console.log.bind(console),g=a.printErr||console.warn.bind(console);Object.assign(a,c),c=null,a.arguments&&(d=a.arguments),a.thisProgram&&(f=a.thisProgram),a.quit&&(l=a.quit),a.wasmBinary&&(v=a.wasmBinary);var E,_=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var k=!1;function b(r,e){r||G(e)}var S,D,M,A,F,P,x,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&O)return O.decode(r.subarray(e,o));for(var a="";e<o;){var s=r[e++];if(128&s){var i=63&r[e++];if(192!=(224&s)){var u=63&r[e++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|i)}else a+=String.fromCharCode(s)}return a}function R(r,e){return r?N(M,r,e):""}function C(r,e,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,s=0;s<r.length;++s){var i=r.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++s)),i<=127){if(t>=a)break;e[t++]=i}else if(i<=2047){if(t+1>=a)break;e[t++]=192|i>>6,e[t++]=128|63&i}else if(i<=65535){if(t+2>=a)break;e[t++]=224|i>>12,e[t++]=128|i>>6&63,e[t++]=128|63&i}else{if(t+3>=a)break;e[t++]=240|i>>18,e[t++]=128|i>>12&63,e[t++]=128|i>>6&63,e[t++]=128|63&i}}return e[t]=0,t-o}function T(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e}function j(r){S=r,a.HEAP8=D=new Int8Array(r),a.HEAP16=A=new Int16Array(r),a.HEAP32=P=new Int32Array(r),a.HEAPU8=M=new Uint8Array(r),a.HEAPU16=F=new Uint16Array(r),a.HEAPU32=x=new Uint32Array(r),a.HEAPF32=new Float32Array(r),a.HEAPF64=new Float64Array(r)}a.INITIAL_MEMORY;var B=[],L=[],z=[],I=0,U=null,H=null;function q(r){I++,a.monitorRunDependencies&&a.monitorRunDependencies(I)}function Y(r){if(I--,a.monitorRunDependencies&&a.monitorRunDependencies(I),0==I&&(null!==U&&(clearInterval(U),U=null),H)){var e=H;H=null,e()}}function G(r){a.onAbort&&a.onAbort(r),g(r="Aborted("+r+")"),k=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw o(e),e}var W,X,V,$;function K(r){return r.startsWith("data:application/octet-stream;base64,")}function Z(r){try{if(r==W&&v)return new Uint8Array(v);if(u)return u(r);throw"both async and sync fetching of the wasm failed"}catch(r){G(r)}}function J(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Q(r){for(;r.length>0;)r.shift()(a)}function rr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){P[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,D[this.ptr+12|0]=r},this.get_caught=function(){return 0!=D[this.ptr+12|0]},this.set_rethrown=function(r){r=r?1:0,D[this.ptr+13|0]=r},this.get_rethrown=function(){return 0!=D[this.ptr+13|0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=P[this.ptr>>2];P[this.ptr>>2]=r+1},this.release_ref=function(){var r=P[this.ptr>>2];return P[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Gr(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}K(W="XGBoostAPI.wasm")||(X=W,W=a.locateFile?a.locateFile(X,w):w+X);var er={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=er.isAbs(r),t="/"===r.substr(-1);return(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=er.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=er.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return er.normalize(r.join("/"))},join2:(r,e)=>er.normalize(r+"/"+e)},tr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:ur.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=er.isAbs(n)}return(e?"/":"")+(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=tr.resolve(r).substr(1),e=tr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),s=a,i=0;i<a;i++)if(n[i]!==o[i]){s=i;break}var u=[];for(i=s;i<n.length;i++)u.push("..");return(u=u.concat(o.slice(s))).join("/")}};function nr(r,e,t){var n=t>0?t:T(r)+1,o=new Array(n),a=C(r,o,0,o.length);return e&&(o.length=a),o}var or={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){or.ttys[r]={input:[],output:[],ops:e},ur.registerDevice(r,or.stream_ops)},stream_ops:{open:function(r){var e=or.ttys[r.node.rdev];if(!e)throw new ur.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ur.ErrnoError(60);for(var a=0,s=0;s<n;s++){var i;try{i=r.tty.ops.get_char(r.tty)}catch(r){throw new ur.ErrnoError(29)}if(void 0===i&&0===a)throw new ur.ErrnoError(6);if(null==i)break;a++,e[t+s]=i}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ur.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new ur.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;r.input=nr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(y(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(y(N(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(g(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(g(N(r.output,0)),r.output=[])}}};function ar(r,e){return M.fill(0,r,r+e),r}function sr(r){r=function(r){return 65536*Math.ceil(r/65536)}(r);var e=Ur(65536,r);return e?ar(e,r):0}var ir={ops_table:null,mount:function(r){return ir.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(ur.isBlkdev(t)||ur.isFIFO(t))throw new ur.ErrnoError(63);ir.ops_table||(ir.ops_table={dir:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,lookup:ir.node_ops.lookup,mknod:ir.node_ops.mknod,rename:ir.node_ops.rename,unlink:ir.node_ops.unlink,rmdir:ir.node_ops.rmdir,readdir:ir.node_ops.readdir,symlink:ir.node_ops.symlink},stream:{llseek:ir.stream_ops.llseek}},file:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:{llseek:ir.stream_ops.llseek,read:ir.stream_ops.read,write:ir.stream_ops.write,allocate:ir.stream_ops.allocate,mmap:ir.stream_ops.mmap,msync:ir.stream_ops.msync}},link:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,readlink:ir.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:ur.chrdev_stream_ops}});var o=ur.createNode(r,e,t,n);return ur.isDir(o.mode)?(o.node_ops=ir.ops_table.dir.node,o.stream_ops=ir.ops_table.dir.stream,o.contents={}):ur.isFile(o.mode)?(o.node_ops=ir.ops_table.file.node,o.stream_ops=ir.ops_table.file.stream,o.usedBytes=0,o.contents=null):ur.isLink(o.mode)?(o.node_ops=ir.ops_table.link.node,o.stream_ops=ir.ops_table.link.stream):ur.isChrdev(o.mode)&&(o.node_ops=ir.ops_table.chrdev.node,o.stream_ops=ir.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=ur.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,ur.isDir(r.mode)?e.size=4096:ur.isFile(r.mode)?e.size=r.usedBytes:ur.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&ir.resizeFileStorage(r,e.size)},lookup:function(r,e){throw ur.genericErrors[44]},mknod:function(r,e,t,n){return ir.createNode(r,e,t,n)},rename:function(r,e,t){if(ur.isDir(r.mode)){var n;try{n=ur.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new ur.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=ur.lookupNode(r,e);for(var n in t.contents)throw new ur.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=ir.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!ur.isLink(r.mode))throw new ur.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-o,n);if(s>8&&a.subarray)e.set(a.subarray(o,o+s),t);else for(var i=0;i<s;i++)e[t+i]=a[o+i];return s},write:function(r,e,t,n,o,a){if(e.buffer===D.buffer&&(a=!1),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===o)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(o+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),o),n}if(ir.expandFileStorage(s,o+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),o);else for(var i=0;i<n;i++)s.contents[o+i]=e[t+i];return s.usedBytes=Math.max(s.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ur.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ur.ErrnoError(28);return n},allocate:function(r,e,t){ir.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);var a,s,i=r.node.contents;if(2&o||i.buffer!==S){if((t>0||t+e<i.length)&&(i=i.subarray?i.subarray(t,t+e):Array.prototype.slice.call(i,t,t+e)),s=!0,!(a=sr(e)))throw new ur.ErrnoError(48);D.set(i,a)}else s=!1,a=i.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){return ir.stream_ops.write(r,e,0,n,t,!1),0}}},ur={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=tr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ur.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=ur.root,o="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&e.parent)break;if(n=ur.lookupNode(n,t[a]),o=er.join2(o,t[a]),ur.isMountpoint(n)&&(!s||s&&e.follow_mount)&&(n=n.mounted.root),!s||e.follow)for(var i=0;ur.isLink(n.mode);){var u=ur.readlink(o);if(o=tr.resolve(er.dirname(o),u),n=ur.lookupPath(o,{recurse_count:e.recurse_count+1}).node,i++>40)throw new ur.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(ur.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%ur.nameTable.length},hashAddNode:r=>{var e=ur.hashName(r.parent.id,r.name);r.name_next=ur.nameTable[e],ur.nameTable[e]=r},hashRemoveNode:r=>{var e=ur.hashName(r.parent.id,r.name);if(ur.nameTable[e]===r)ur.nameTable[e]=r.name_next;else for(var t=ur.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=ur.mayLookup(r);if(t)throw new ur.ErrnoError(t,r);for(var n=ur.hashName(r.id,e),o=ur.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ur.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new ur.FSNode(r,e,t,n);return ur.hashAddNode(o),o},destroyNode:r=>{ur.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=ur.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ur.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>ur.nodePermissions(r,"x")||(r.node_ops.lookup?0:2),mayCreate:(r,e)=>{try{return ur.lookupNode(r,e),20}catch(r){}return ur.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=ur.lookupNode(r,e)}catch(r){return r.errno}var o=ur.nodePermissions(r,"wx");if(o)return o;if(t){if(!ur.isDir(n.mode))return 54;if(ur.isRoot(n)||ur.getPath(n)===ur.cwd())return 10}else if(ur.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ur.isLink(r.mode)?32:ur.isDir(r.mode)&&("r"!==ur.flagsToPermissionString(e)||512&e)?31:ur.nodePermissions(r,ur.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=ur.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!ur.streams[t])return t;throw new ur.ErrnoError(33)},getStream:r=>ur.streams[r],createStream:(r,e,t)=>{ur.FSStream||(ur.FSStream=function(){this.shared={}},ur.FSStream.prototype={},Object.defineProperties(ur.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new ur.FSStream,r);var n=ur.nextfd(e,t);return r.fd=n,ur.streams[n]=r,r},closeStream:r=>{ur.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=ur.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new ur.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{ur.devices[r]={stream_ops:e}},getDevice:r=>ur.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),ur.syncFSRequests++,ur.syncFSRequests>1&&g("warning: "+ur.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=ur.getMounts(ur.root.mount),n=0;function o(r){return ur.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount:(r,e,t)=>{var n,o="/"===t,a=!t;if(o&&ur.root)throw new ur.ErrnoError(10);if(!o&&!a){var s=ur.lookupPath(t,{follow_mount:!1});if(t=s.path,n=s.node,ur.isMountpoint(n))throw new ur.ErrnoError(10);if(!ur.isDir(n.mode))throw new ur.ErrnoError(54)}var i={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(i);return u.mount=i,i.root=u,o?ur.root=u:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),u},unmount:r=>{var e=ur.lookupPath(r,{follow_mount:!1});if(!ur.isMountpoint(e.node))throw new ur.ErrnoError(28);var t=e.node,n=t.mounted,o=ur.getMounts(n);Object.keys(ur.nameTable).forEach((r=>{for(var e=ur.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ur.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=ur.lookupPath(r,{parent:!0}).node,o=er.basename(r);if(!o||"."===o||".."===o)throw new ur.ErrnoError(28);var a=ur.mayCreate(n,o);if(a)throw new ur.ErrnoError(a);if(!n.node_ops.mknod)throw new ur.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ur.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ur.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ur.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ur.mknod(r,e,t)),symlink:(r,e)=>{if(!tr.resolve(r))throw new ur.ErrnoError(44);var t=ur.lookupPath(e,{parent:!0}).node;if(!t)throw new ur.ErrnoError(44);var n=er.basename(e),o=ur.mayCreate(t,n);if(o)throw new ur.ErrnoError(o);if(!t.node_ops.symlink)throw new ur.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=er.dirname(r),a=er.dirname(e),s=er.basename(r),i=er.basename(e);if(t=ur.lookupPath(r,{parent:!0}).node,n=ur.lookupPath(e,{parent:!0}).node,!t||!n)throw new ur.ErrnoError(44);if(t.mount!==n.mount)throw new ur.ErrnoError(75);var u,c=ur.lookupNode(t,s),d=tr.relative(r,a);if("."!==d.charAt(0))throw new ur.ErrnoError(28);if("."!==(d=tr.relative(e,o)).charAt(0))throw new ur.ErrnoError(55);try{u=ur.lookupNode(n,i)}catch(r){}if(c!==u){var f=ur.isDir(c.mode),l=ur.mayDelete(t,s,f);if(l)throw new ur.ErrnoError(l);if(l=u?ur.mayDelete(n,i,f):ur.mayCreate(n,i))throw new ur.ErrnoError(l);if(!t.node_ops.rename)throw new ur.ErrnoError(63);if(ur.isMountpoint(c)||u&&ur.isMountpoint(u))throw new ur.ErrnoError(10);if(n!==t&&(l=ur.nodePermissions(t,"w")))throw new ur.ErrnoError(l);ur.hashRemoveNode(c);try{t.node_ops.rename(c,n,i)}catch(r){throw r}finally{ur.hashAddNode(c)}}},rmdir:r=>{var e=ur.lookupPath(r,{parent:!0}).node,t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!0);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.rmdir)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.rmdir(e,t),ur.destroyNode(n)},readdir:r=>{var e=ur.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ur.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=ur.lookupPath(r,{parent:!0}).node;if(!e)throw new ur.ErrnoError(44);var t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!1);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.unlink)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.unlink(e,t),ur.destroyNode(n)},readlink:r=>{var e=ur.lookupPath(r).node;if(!e)throw new ur.ErrnoError(44);if(!e.node_ops.readlink)throw new ur.ErrnoError(28);return tr.resolve(ur.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=ur.lookupPath(r,{follow:!e}).node;if(!t)throw new ur.ErrnoError(44);if(!t.node_ops.getattr)throw new ur.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ur.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n="string"==typeof r?ur.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{ur.chmod(r,e,!0)},fchmod:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);ur.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o="string"==typeof r?ur.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{ur.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=ur.getStream(r);if(!n)throw new ur.ErrnoError(8);ur.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new ur.ErrnoError(28);var t;if(!(t="string"==typeof r?ur.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);if(ur.isDir(t.mode))throw new ur.ErrnoError(31);if(!ur.isFile(t.mode))throw new ur.ErrnoError(28);var n=ur.nodePermissions(t,"w");if(n)throw new ur.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);if(!(2097155&t.flags))throw new ur.ErrnoError(28);ur.truncate(t.node,e)},utime:(r,e,t)=>{var n=ur.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new ur.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?ur.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=er.normalize(r);try{n=ur.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new ur.ErrnoError(20)}else n=ur.mknod(r,t,0),o=!0;if(!n)throw new ur.ErrnoError(44);if(ur.isChrdev(n.mode)&&(e&=-513),65536&e&&!ur.isDir(n.mode))throw new ur.ErrnoError(54);if(!o){var s=ur.mayOpen(n,e);if(s)throw new ur.ErrnoError(s)}512&e&&!o&&ur.truncate(n,0),e&=-131713;var i=ur.createStream({node:n,path:ur.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!a.logReadFiles||1&e||(ur.readFiles||(ur.readFiles={}),r in ur.readFiles||(ur.readFiles[r]=1)),i},close:r=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{ur.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ur.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ur.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(1==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.read)throw new ur.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var s=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=s),s},write:(r,e,t,n,o,a)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.write)throw new ur.ErrnoError(28);r.seekable&&1024&r.flags&&ur.llseek(r,0,2);var s=void 0!==o;if(s){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var i=r.stream_ops.write(r,e,t,n,o,a);return s||(r.position+=i),i},allocate:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(e<0||t<=0)throw new ur.ErrnoError(28);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(!ur.isFile(r.node.mode)&&!ur.isDir(r.node.mode))throw new ur.ErrnoError(43);if(!r.stream_ops.allocate)throw new ur.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new ur.ErrnoError(2);if(1==(2097155&r.flags))throw new ur.ErrnoError(2);if(!r.stream_ops.mmap)throw new ur.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new ur.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=ur.open(r,e.flags),o=ur.stat(r).size,a=new Uint8Array(o);return ur.read(n,a,0,o,0),"utf8"===e.encoding?t=N(a,0):"binary"===e.encoding&&(t=a),ur.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=ur.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(T(e)+1),a=C(e,o,0,o.length);ur.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ur.write(n,e,0,e.byteLength,void 0,t.canOwn)}ur.close(n)},cwd:()=>ur.currentPath,chdir:r=>{var e=ur.lookupPath(r,{follow:!0});if(null===e.node)throw new ur.ErrnoError(44);if(!ur.isDir(e.node.mode))throw new ur.ErrnoError(54);var t=ur.nodePermissions(e.node,"x");if(t)throw new ur.ErrnoError(t);ur.currentPath=e.path},createDefaultDirectories:()=>{ur.mkdir("/tmp"),ur.mkdir("/home"),ur.mkdir("/home/web_user")},createDefaultDevices:()=>{ur.mkdir("/dev"),ur.registerDevice(ur.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),ur.mkdev("/dev/null",ur.makedev(1,3)),or.register(ur.makedev(5,0),or.default_tty_ops),or.register(ur.makedev(6,0),or.default_tty1_ops),ur.mkdev("/dev/tty",ur.makedev(5,0)),ur.mkdev("/dev/tty1",ur.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>G("randomDevice")}();ur.createDevice("/dev","random",r),ur.createDevice("/dev","urandom",r),ur.mkdir("/dev/shm"),ur.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ur.mkdir("/proc");var r=ur.mkdir("/proc/self");ur.mkdir("/proc/self/fd"),ur.mount({mount:()=>{var e=ur.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=ur.getStream(t);if(!n)throw new ur.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?ur.createDevice("/dev","stdin",a.stdin):ur.symlink("/dev/tty","/dev/stdin"),a.stdout?ur.createDevice("/dev","stdout",null,a.stdout):ur.symlink("/dev/tty","/dev/stdout"),a.stderr?ur.createDevice("/dev","stderr",null,a.stderr):ur.symlink("/dev/tty1","/dev/stderr"),ur.open("/dev/stdin",0),ur.open("/dev/stdout",1),ur.open("/dev/stderr",1)},ensureErrnoError:()=>{ur.ErrnoError||(ur.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},ur.ErrnoError.prototype=new Error,ur.ErrnoError.prototype.constructor=ur.ErrnoError,[44].forEach((r=>{ur.genericErrors[r]=new ur.ErrnoError(r),ur.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{ur.ensureErrnoError(),ur.nameTable=new Array(4096),ur.mount(ir,{},"/"),ur.createDefaultDirectories(),ur.createDefaultDevices(),ur.createSpecialDirectories(),ur.filesystems={MEMFS:ir}},init:(r,e,t)=>{ur.init.initialized=!0,ur.ensureErrnoError(),a.stdin=r||a.stdin,a.stdout=e||a.stdout,a.stderr=t||a.stderr,ur.createStandardStreams()},quit:()=>{ur.init.initialized=!1;for(var r=0;r<ur.streams.length;r++){var e=ur.streams[r];e&&ur.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=ur.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=ur.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ur.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=er.basename(r),n=ur.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:ur.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var s=er.join2(r,a);try{ur.mkdir(s)}catch(r){}r=s}}return s},createFile:(r,e,t,n,o)=>{var a=er.join2("string"==typeof r?r:ur.getPath(r),e),s=ur.getMode(n,o);return ur.create(a,s)},createDataFile:(r,e,t,n,o,a)=>{var s=e;r&&(r="string"==typeof r?r:ur.getPath(r),s=e?er.join2(r,e):r);var i=ur.getMode(n,o),u=ur.create(s,i);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,f=t.length;d<f;++d)c[d]=t.charCodeAt(d);t=c}ur.chmod(u,146|i);var l=ur.open(u,577);ur.write(l,t,0,t.length,0,a),ur.close(l),ur.chmod(u,i)}return u},createDevice:(r,e,t,n)=>{var o=er.join2("string"==typeof r?r:ur.getPath(r),e),a=ur.getMode(!!t,!!n);ur.createDevice.major||(ur.createDevice.major=64);var s=ur.makedev(ur.createDevice.major++,0);return ur.registerDevice(s,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,a)=>{for(var s=0,i=0;i<o;i++){var u;try{u=t()}catch(r){throw new ur.ErrnoError(29)}if(void 0===u&&0===s)throw new ur.ErrnoError(6);if(null==u)break;s++,e[n+i]=u}return s&&(r.node.timestamp=Date.now()),s},write:(r,e,t,o,a)=>{for(var s=0;s<o;s++)try{n(e[t+s])}catch(r){throw new ur.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),s}}),ur.mkdev(o,a,s)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=nr(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new ur.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,s=1048576;o||(s=n);var i=this;i.setDataGetter((r=>{var e=r*s,o=(r+1)*s-1;if(o=Math.min(o,n-1),void 0===i.chunks[r]&&(i.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==s&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):nr(o.responseText||"",!0)})(e,o)),void 0===i.chunks[r])throw new Error("doXHR failed!");return i.chunks[r]})),!a&&n||(s=n=1,n=this.getter(0).length,s=n,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:s}}else i={isDevice:!1,url:t};var u=ur.createFile(r,e,i,n,o);i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var s=Math.min(a.length-o,n);if(a.slice)for(var i=0;i<s;i++)e[t+i]=a[o+i];else for(i=0;i<s;i++)e[t+i]=a.get(o+i);return s}return Object.keys(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return ur.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(ur.forceLoadFile(u),d(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{ur.forceLoadFile(u);var a=sr(e);if(!a)throw new ur.ErrnoError(48);return d(r,D,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,a,s,u,c,d)=>{var f=e?tr.resolve(er.join2(r,e)):r;function l(t){function i(t){d&&d(),u||ur.createDataFile(r,e,t,n,o,c),a&&a(),Y()}Browser.handledByPreloadPlugin(t,f,i,(()=>{s&&s(),Y()}))||i(t)}q(),"string"==typeof t?function(r,e,t){var n="al "+r;i(r,(e=>{b(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),l(new Uint8Array(e)),n&&Y()}),(e=>{if(!t)throw'Loading data file "'+r+'" failed.';t()})),n&&q()}(t,0,s):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:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{y("creating db"),o.result.createObjectStore(ur.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ur.DB_STORE_NAME],"readwrite"),a=n.objectStore(ur.DB_STORE_NAME),s=0,i=0,u=r.length;function c(){0==i?e():t()}r.forEach((r=>{var e=a.put(ur.analyzePath(r).object.contents,r);e.onsuccess=()=>{++s+i==u&&c()},e.onerror=()=>{i++,s+i==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([ur.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var s=a.objectStore(ur.DB_STORE_NAME),i=0,u=0,c=r.length;function d(){0==u?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{ur.analyzePath(r).exists&&ur.unlink(r),ur.createDataFile(er.dirname(r),er.basename(r),e.result,!0,!0,!0),++i+u==c&&d()},e.onerror=()=>{u++,i+u==c&&d()}})),a.onerror=t},o.onerror=t}},cr={mount:function(r){return a.websocket=a.websocket&&"object"==typeof a.websocket?a.websocket:{},a.websocket._callbacks={},a.websocket.on=function(r,e){return"function"==typeof e&&(this._callbacks[r]=e),this},a.websocket.emit=function(r,e){"function"==typeof this._callbacks[r]&&this._callbacks[r].call(this,e)},ur.createNode(null,"/",16895,0)},createSocket:function(r,e,t){if(1==(e&=-526337)&&t&&6!=t)throw new ur.ErrnoError(66);var n={family:r,type:e,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:cr.websocket_sock_ops},o=cr.nextname(),a=ur.createNode(cr.root,o,49152,0);a.sock=n;var s=ur.createStream({path:o,node:a,flags:2,seekable:!1,stream_ops:cr.stream_ops});return n.stream=s,n},getSocket:function(r){var e=ur.getStream(r);return e&&ur.isSocket(e.node.mode)?e.node.sock:null},stream_ops:{poll:function(r){var e=r.node.sock;return e.sock_ops.poll(e)},ioctl:function(r,e,t){var n=r.node.sock;return n.sock_ops.ioctl(n,e,t)},read:function(r,e,t,n,o){var a=r.node.sock,s=a.sock_ops.recvmsg(a,n);return s?(e.set(s.buffer,t),s.buffer.length):0},write:function(r,e,t,n,o){var a=r.node.sock;return a.sock_ops.sendmsg(a,e,t,n)},close:function(r){var e=r.node.sock;e.sock_ops.close(e)}},nextname:function(){return cr.nextname.current||(cr.nextname.current=0),"socket["+cr.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(r,e,t){var n;if("object"==typeof e&&(n=e,e=null,t=null),n)if(n._socket)e=n._socket.remoteAddress,t=n._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");e=o[1],t=parseInt(o[2],10)}else try{var s=a.websocket&&"object"==typeof a.websocket,i="ws:#".replace("#","//");if(s&&"string"==typeof a.websocket.url&&(i=a.websocket.url),"ws://"===i||"wss://"===i){var u=e.split("/");i=i+u[0]+":"+t+"/"+u.slice(1).join("/")}var c="binary";s&&"string"==typeof a.websocket.subprotocol&&(c=a.websocket.subprotocol);var d=void 0;"null"!==c&&(d=c=c.replace(/^ +| +$/g,"").split(/ *, */)),s&&null===a.websocket.subprotocol&&(c="null",d=void 0),(n=new WebSocket(i,d)).binaryType="arraybuffer"}catch(r){throw new ur.ErrnoError(23)}var f={addr:e,port:t,socket:n,dgram_send_queue:[]};return cr.websocket_sock_ops.addPeer(r,f),cr.websocket_sock_ops.handlePeerEvents(r,f),2===r.type&&void 0!==r.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&r.sport)>>8,255&r.sport])),f},getPeer:function(r,e,t){return r.peers[e+":"+t]},addPeer:function(r,e){r.peers[e.addr+":"+e.port]=e},removePeer:function(r,e){delete r.peers[e.addr+":"+e.port]},handlePeerEvents:function(r,e){var t=!0,n=function(){a.websocket.emit("open",r.stream.fd);try{for(var t=e.dgram_send_queue.shift();t;)e.socket.send(t),t=e.dgram_send_queue.shift()}catch(r){e.socket.close()}};function o(n){if("string"==typeof n)n=(new TextEncoder).encode(n);else{if(b(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var o=t;if(t=!1,o&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return cr.websocket_sock_ops.removePeer(r,e),e.port=s,void cr.websocket_sock_ops.addPeer(r,e)}r.recv_queue.push({addr:e.addr,port:e.port,data:n}),a.websocket.emit("message",r.stream.fd)}h?(e.socket.on("open",n),e.socket.on("message",(function(r,e){e&&o(new Uint8Array(r).buffer)})),e.socket.on("close",(function(){a.websocket.emit("close",r.stream.fd)})),e.socket.on("error",(function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])}))):(e.socket.onopen=n,e.socket.onclose=function(){a.websocket.emit("close",r.stream.fd)},e.socket.onmessage=function(r){o(r.data)},e.socket.onerror=function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})},poll:function(r){if(1===r.type&&r.server)return r.pending.length?65:0;var e=0,t=1===r.type?cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport):null;return(r.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(e|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=16),e},ioctl:function(r,e,t){if(21531===e){var n=0;return r.recv_queue.length&&(n=r.recv_queue[0].data.length),P[t>>2]=n,0}return 28},close:function(r){if(r.server){try{r.server.close()}catch(r){}r.server=null}for(var e=Object.keys(r.peers),t=0;t<e.length;t++){var n=r.peers[e[t]];try{n.socket.close()}catch(r){}cr.websocket_sock_ops.removePeer(r,n)}return 0},bind:function(r,e,t){if(void 0!==r.saddr||void 0!==r.sport)throw new ur.ErrnoError(28);if(r.saddr=e,r.sport=t,2===r.type){r.server&&(r.server.close(),r.server=null);try{r.sock_ops.listen(r,0)}catch(r){if(!(r instanceof ur.ErrnoError))throw r;if(138!==r.errno)throw r}}},connect:function(r,e,t){if(r.server)throw new ur.ErrnoError(138);if(void 0!==r.daddr&&void 0!==r.dport){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new ur.ErrnoError(7):new ur.ErrnoError(30)}var o=cr.websocket_sock_ops.createPeer(r,e,t);throw r.daddr=o.addr,r.dport=o.port,new ur.ErrnoError(26)},listen:function(r,e){if(!h)throw new ur.ErrnoError(138)},accept:function(r){if(!r.server||!r.pending.length)throw new ur.ErrnoError(28);var e=r.pending.shift();return e.stream.flags=r.stream.flags,e},getname:function(r,e){var t,n;if(e){if(void 0===r.daddr||void 0===r.dport)throw new ur.ErrnoError(53);t=r.daddr,n=r.dport}else t=r.saddr||0,n=r.sport||0;return{addr:t,port:n}},sendmsg:function(r,e,t,n,o,a){if(2===r.type){if(void 0!==o&&void 0!==a||(o=r.daddr,a=r.dport),void 0===o||void 0===a)throw new ur.ErrnoError(17)}else o=r.daddr,a=r.dport;var s,i=cr.websocket_sock_ops.getPeer(r,o,a);if(1===r.type){if(!i||i.socket.readyState===i.socket.CLOSING||i.socket.readyState===i.socket.CLOSED)throw new ur.ErrnoError(53);if(i.socket.readyState===i.socket.CONNECTING)throw new ur.ErrnoError(6)}if(ArrayBuffer.isView(e)&&(t+=e.byteOffset,e=e.buffer),s=e.slice(t,t+n),2===r.type&&(!i||i.socket.readyState!==i.socket.OPEN))return i&&i.socket.readyState!==i.socket.CLOSING&&i.socket.readyState!==i.socket.CLOSED||(i=cr.websocket_sock_ops.createPeer(r,o,a)),i.dgram_send_queue.push(s),n;try{return i.socket.send(s),n}catch(r){throw new ur.ErrnoError(28)}},recvmsg:function(r,e){if(1===r.type&&r.server)throw new ur.ErrnoError(53);var t=r.recv_queue.shift();if(!t){if(1===r.type){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(!n)throw new ur.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new ur.ErrnoError(6)}throw new ur.ErrnoError(6)}var o=t.data.byteLength||t.data.length,a=t.data.byteOffset||0,s=t.data.buffer||t.data,i=Math.min(e,o),u={buffer:new Uint8Array(s,a,i),addr:t.addr,port:t.port};if(1===r.type&&i<o){var c=o-i;t.data=new Uint8Array(s,a+i,c),r.recv_queue.unshift(t)}return u}}};function dr(r){var e=cr.getSocket(r);if(!e)throw new ur.ErrnoError(8);return e}function fr(r){for(var e=r.split("."),t=0;t<4;t++){var n=Number(e[t]);if(isNaN(n))return null;e[t]=n}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0}function lr(r){return parseInt(r)}function pr(r){var e,t,n,o,a=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(r))return null;if("::"===r)return[0,0,0,0,0,0,0,0];for((r=r.startsWith("::")?r.replace("::","Z:"):r.replace("::",":Z:")).indexOf(".")>0?((e=(r=r.replace(new RegExp("[.]","g"),":")).split(":"))[e.length-4]=lr(e[e.length-4])+256*lr(e[e.length-3]),e[e.length-3]=lr(e[e.length-2])+256*lr(e[e.length-1]),e=e.slice(0,e.length-2)):e=r.split(":"),n=0,o=0,t=0;t<e.length;t++)if("string"==typeof e[t])if("Z"===e[t]){for(o=0;o<8-e.length+1;o++)a[t+o]=0;n=o-1}else a[t+n]=Br(parseInt(e[t],16));else a[t+n]=e[t];return[a[1]<<16|a[0],a[3]<<16|a[2],a[5]<<16|a[4],a[7]<<16|a[6]]}function mr(r,e,t,n,o){switch(e){case 2:t=fr(t),ar(r,16),o&&(P[o>>2]=16),A[r>>1]=e,P[r+4>>2]=t,A[r+2>>1]=Br(n);break;case 10:t=pr(t),ar(r,28),o&&(P[o>>2]=28),P[r>>2]=e,P[r+8>>2]=t[0],P[r+12>>2]=t[1],P[r+16>>2]=t[2],P[r+20>>2]=t[3],A[r+2>>1]=Br(n);break;default:return 5}return 0}var hr={address_map:{id:1,addrs:{},names:{}},lookup_name:function(r){var e,t=fr(r);if(null!==t)return r;if(null!==(t=pr(r)))return r;if(hr.address_map.addrs[r])e=hr.address_map.addrs[r];else{var n=hr.address_map.id++;b(n<65535,"exceeded max address mappings of 65535"),e="172.29."+(255&n)+"."+(65280&n),hr.address_map.names[e]=r,hr.address_map.addrs[r]=e}return e},lookup_addr:function(r){return hr.address_map.names[r]?hr.address_map.names[r]:null}},wr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(er.isAbs(e))return e;var n;if(n=-100===r?ur.cwd():wr.getStreamFromFD(r).path,0==e.length){if(!t)throw new ur.ErrnoError(44);return n}return er.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&er.normalize(e)!==er.normalize(ur.getPath(r.node)))return-54;throw r}P[t>>2]=n.dev,P[t+8>>2]=n.ino,P[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,P[t+20>>2]=n.uid,P[t+24>>2]=n.gid,P[t+28>>2]=n.rdev,$=[n.size>>>0,(V=n.size,+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[t+40>>2]=$[0],P[t+44>>2]=$[1],P[t+48>>2]=4096,P[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),s=n.ctime.getTime();return $=[Math.floor(o/1e3)>>>0,(V=Math.floor(o/1e3),+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[t+56>>2]=$[0],P[t+60>>2]=$[1],x[t+64>>2]=o%1e3*1e3,$=[Math.floor(a/1e3)>>>0,(V=Math.floor(a/1e3),+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[t+72>>2]=$[0],P[t+76>>2]=$[1],x[t+80>>2]=a%1e3*1e3,$=[Math.floor(s/1e3)>>>0,(V=Math.floor(s/1e3),+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[t+88>>2]=$[0],P[t+92>>2]=$[1],x[t+96>>2]=s%1e3*1e3,$=[n.ino>>>0,(V=n.ino,+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[t+104>>2]=$[0],P[t+108>>2]=$[1],0},doMsync:function(r,e,t,n,o){if(!ur.isFile(e.node.mode))throw new ur.ErrnoError(43);if(2&n)return 0;var a=M.slice(r,r+t);ur.msync(e,a,o,t,n)},varargs:void 0,get:function(){return wr.varargs+=4,P[wr.varargs-4>>2]},getStr:function(r){return R(r)},getStreamFromFD:function(r){var e=ur.getStream(r);if(!e)throw new ur.ErrnoError(8);return e}};function vr(r){return(255&r)+"."+(r>>8&255)+"."+(r>>16&255)+"."+(r>>24&255)}function yr(r){var e="",t=0,n=0,o=0,a=0,s=0,i=0,u=[65535&r[0],r[0]>>16,65535&r[1],r[1]>>16,65535&r[2],r[2]>>16,65535&r[3],r[3]>>16],c=!0,d="";for(i=0;i<5;i++)if(0!==u[i]){c=!1;break}if(c){if(d=vr(u[6]|u[7]<<16),-1===u[5])return(e="::ffff:")+d;if(0===u[5])return"0.0.0.0"===d&&(d=""),"0.0.0.1"===d&&(d="1"),(e="::")+d}for(t=0;t<8;t++)0===u[t]&&(t-o>1&&(s=0),o=t,s++),s>n&&(a=t-(n=s)+1);for(t=0;t<8;t++)n>1&&0===u[t]&&t>=a&&t<a+n?t===a&&(e+=":",0===a&&(e+=":")):(e+=Number(zr(65535&u[t])).toString(16),e+=t<7?":":"");return e}function gr(r,e,t){if(t&&0===r)return null;var n=function(r,e){var t,n=A[r>>1],o=zr(F[r+2>>1]);switch(n){case 2:if(16!==e)return{errno:28};t=vr(t=P[r+4>>2]);break;case 10:if(28!==e)return{errno:28};t=yr(t=[P[r+8>>2],P[r+12>>2],P[r+16>>2],P[r+20>>2]]);break;default:return{errno:5}}return{family:n,addr:t,port:o}}(r,e);if(n.errno)throw new ur.ErrnoError(n.errno);return n.addr=hr.lookup_addr(n.addr)||n.addr,n}function Er(r){return r%4==0&&(r%100!=0||r%400==0)}var _r,kr=[0,31,60,91,121,152,182,213,244,274,305,335],br=[0,31,59,90,120,151,181,212,243,273,304,334];function Sr(r){var e=T(r)+1,t=jr(e);return t&&C(r,D,t,e),t}function Dr(r){try{return E.grow(r-S.byteLength+65535>>>16),j(E.buffer),1}catch(r){}}_r=()=>performance.now();var Mr={};function Ar(){if(!Ar.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Mr)void 0===Mr[e]?delete r[e]:r[e]=Mr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);Ar.strings=t}return Ar.strings}var Fr=[31,29,31,30,31,30,31,31,30,31,30,31],Pr=[31,28,31,30,31,30,31,31,30,31,30,31];function xr(r,e){D.set(r,e)}function Or(r){return a["_"+r]}function Nr(r,e,t,n,o){var a={string:r=>{var e=0;if(null!=r&&0!==r){var t=1+(r.length<<2);!function(r,e,t){C(r,M,e,t)}(r,e=Yr(t),t)}return e},array:r=>{var e=Yr(r.length);return xr(r,e),e}},s=Or(r),i=[],u=0;if(n)for(var c=0;c<n.length;c++){var d=a[t[c]];d?(0===u&&(u=Hr()),i[c]=d(n[c])):i[c]=n[c]}var f=s.apply(null,i);return function(r){return 0!==u&&qr(u),function(r){return"string"===e?R(r):"boolean"===e?Boolean(r):r}(r)}(f)}var Rr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=ur.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Rr.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ur.isDir(this.mode)}},isDevice:{get:function(){return ur.isChrdev(this.mode)}}}),ur.FSNode=Rr,ur.staticInit();var Cr,Tr={a:function(r,e,t){throw new rr(r).init(e,t),r},r:function(r,e,t,n){try{var o=dr(r),a=o.sock_ops.accept(o);return e&&mr(e,a.family,hr.lookup_name(a.daddr),a.dport,t),a.stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},q:function(r,e,t){try{var n=dr(r),o=gr(e,t);return n.sock_ops.connect(n,o.addr,o.port),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},b:function(r,e,t){wr.varargs=t;try{var n=wr.getStreamFromFD(r);switch(e){case 0:return(o=wr.get())<0?-28:ur.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=wr.get();return n.flags|=o,0;case 5:return o=wr.get(),A[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return P[Lr()>>2]=28,-1}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o){try{var a=dr(r);return 1===e&&4===t?(P[n>>2]=a.error,P[o>>2]=4,a.error=null,0):-50}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},x:function(r,e,t){try{for(var n=0,o=0;o<e;o++){var a=r+8*o,s=P[a>>2],i=A[a+4>>1],u=32,c=ur.getStream(s);c&&(u=wr.DEFAULT_POLLMASK,c.stream_ops.poll&&(u=c.stream_ops.poll(c))),(u&=24|i)&&n++,A[a+6>>1]=u}return n}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},o:function(r,e,t,n,o,a){try{var s=dr(r),i=s.sock_ops.recvmsg(s,t);return i?(o&&mr(o,s.family,hr.lookup_name(i.addr),i.port,a),M.set(i.buffer,e),i.buffer.byteLength):0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},n:function(r,e,t,n,o,a){try{var s=dr(r),i=gr(o,a,!0);return i?s.sock_ops.sendmsg(s,D,e,t,i.addr,i.port):ur.write(s.stream,D,e,t)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},m:function(r,e,t){try{return cr.createSocket(r,e,t).stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=wr.getStr(r),wr.doStat(ur.stat,r,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},g:function(){return!0},i:function(r,e){var t,n=new Date(1e3*(x[(t=r)>>2]+4294967296*P[t+4>>2]));P[e>>2]=n.getSeconds(),P[e+4>>2]=n.getMinutes(),P[e+8>>2]=n.getHours(),P[e+12>>2]=n.getDate(),P[e+16>>2]=n.getMonth(),P[e+20>>2]=n.getFullYear()-1900,P[e+24>>2]=n.getDay();var o=0|function(r){return(Er(r.getFullYear())?kr:br)[r.getMonth()]+r.getDate()-1}(n);P[e+28>>2]=o,P[e+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=a.getTimezoneOffset(),u=0|(s!=i&&n.getTimezoneOffset()==Math.min(i,s));P[e+32>>2]=u},j:function(r,e,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),s=o.getTimezoneOffset(),i=a.getTimezoneOffset(),u=Math.max(s,i);function c(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}x[r>>2]=60*u,P[e>>2]=Number(s!=i);var d=c(o),f=c(a),l=Sr(d),p=Sr(f);i<s?(x[t>>2]=l,x[t+4>>2]=p):(x[t>>2]=p,x[t+4>>2]=l)},c:function(){G("")},h:function(){return Date.now()},d:_r,k:function(r,e,t){M.copyWithin(r,e,e+t)},w:function(r){var e,t=M.length,n=2147483648;if((r>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var a=t*(1+.2/o);if(a=Math.min(a,r+100663296),Dr(Math.min(n,(e=Math.max(r,a))+(65536-e%65536)%65536)))return!0}return!1},u:function(r,e){var t=0;return Ar().forEach((function(n,o){var a=e+t;x[r+4*o>>2]=a,function(r,e){for(var t=0;t<r.length;++t)D[0|e++]=r.charCodeAt(t);D[0|e]=0}(n,a),t+=n.length+1})),0},v:function(r,e){var t=Ar();x[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),x[e>>2]=n,0},s:function(r,e){var t;t=r,_||(a.onExit&&a.onExit(t),k=!0),l(t,new J(t))},e:function(r){try{var e=wr.getStreamFromFD(r);return ur.close(e),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},z:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.read(r,D,a,s,undefined);if(i<0)return-1;if(n+=i,i<s)break}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(i=e)?(i>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var s=wr.getStreamFromFD(r);return ur.llseek(s,a,n),$=[s.position>>>0,(V=s.position,+Math.abs(V)>=1?V>0?(0|Math.min(+Math.floor(V/4294967296),4294967295))>>>0:~~+Math.ceil((V-+(~~V>>>0))/4294967296)>>>0:0)],P[o>>2]=$[0],P[o+4>>2]=$[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}var i,u},f:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.write(r,D,a,s,undefined);if(i<0)return-1;n+=i}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},A:function(r,e,t,n){var o,a=0,s=0,i=0,u=0,c=0,d=0;function f(r,e,t,n,o,a){var s,i,u;return i=10===r?28:16,o=10===r?yr(o):vr(o),b(!mr(s=jr(i),r,o,a)),u=jr(32),P[u+4>>2]=r,P[u+8>>2]=e,P[u+12>>2]=t,P[u+24>>2]=n,x[u+20>>2]=s,P[u+16>>2]=10===r?28:16,P[u+28>>2]=0,u}if(t&&(i=P[t>>2],u=P[t+4>>2],c=P[t+8>>2],d=P[t+12>>2]),c&&!d&&(d=2===c?17:6),!c&&d&&(c=17===d?2:1),0===d&&(d=6),0===c&&(c=1),!r&&!e)return-2;if(-1088&i)return-1;if(0!==t&&2&P[t>>2]&&!r)return-1;if(32&i)return-2;if(0!==c&&1!==c&&2!==c)return-7;if(0!==u&&2!==u&&10!==u)return-6;if(e&&(e=R(e),s=parseInt(e,10),isNaN(s)))return 1024&i?-2:-8;if(!r)return 0===u&&(u=2),1&i||(a=2===u?Ir(2130706433):[0,0,0,1]),o=f(u,c,d,null,a,s),x[n>>2]=o,0;if(null!==(a=fr(r=R(r))))if(0===u||2===u)u=2;else{if(!(10===u&&8&i))return-2;a=[0,0,Ir(65535),a],u=10}else if(null!==(a=pr(r))){if(0!==u&&10!==u)return-2;u=10}return null!=a?(o=f(u,c,d,r,a,s),x[n>>2]=o,0):4&i?-2:(a=fr(r=hr.lookup_name(r)),0===u?u=2:10===u&&(a=[0,0,Ir(65535),a]),o=f(u,c,d,null,a,s),x[n>>2]=o,0)},t:function(r,e,t,n,o){return function(r,e,t,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?R(o):""},s=R(t),i={"%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 i)s=s.replace(new RegExp(u,"g"),i[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function l(r,e){return f(r,e,"0")}function p(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function h(r){var e=function(r,e){for(var t=new Date(r.getTime());e>0;){var n=Er(t.getFullYear()),o=t.getMonth(),a=(n?Fr:Pr)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(t),a=m(n);return p(o,e)<=0?p(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return d[r.tm_mon].substring(0,3)},"%B":function(r){return d[r.tm_mon]},"%C":function(r){return l((r.tm_year+1900)/100|0,2)},"%d":function(r){return l(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return h(r).toString().substring(2)},"%G":function(r){return h(r)},"%H":function(r){return l(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),l(e,2)},"%j":function(r){return l(r.tm_mday+function(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}(Er(r.tm_year+1900)?Fr:Pr,r.tm_mon-1),3)},"%m":function(r){return l(r.tm_mon+1,2)},"%M":function(r){return l(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return l(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return l(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&Er(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Er(r.tm_year%400-1))&&e++}return l(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return l(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in s=s.replace(/%%/g,"\0\0"),w)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),w[u](a)));var v=nr(s=s.replace(/\0\0/g,"%"),!1);return v.length>e?0:(xr(v,r),v.length-1)}(r,e,t,n)}},jr=(function(){var r={a:Tr};function e(r,e){var t,n=r.exports;a.asm=n,j((E=a.asm.B).buffer),a.asm.H,t=a.asm.C,L.unshift(t),Y()}function n(r){e(r.instance)}function s(e){return(v||!p&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Z(W)})):fetch(new URL(t(686),t.b)).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+W+"'";return r.arrayBuffer()})).catch((function(){return Z(W)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){g("failed to asynchronously prepare wasm: "+r),G(r)}))}if(q(),a.instantiateWasm)try{return a.instantiateWasm(r,e)}catch(r){g("Module.instantiateWasm callback failed with error: "+r),o(r)}(v||"function"!=typeof WebAssembly.instantiateStreaming||K(W)||"function"!=typeof fetch?s(n):fetch(new URL(t(686),t.b)).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return g("wasm streaming compile failed: "+r),g("falling back to ArrayBuffer instantiation"),s(n)}))}))).catch(o)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.C).apply(null,arguments)},a._train=function(){return(a._train=a.asm.D).apply(null,arguments)},a._free=function(){return(a._free=a.asm.E).apply(null,arguments)},a._predict=function(){return(a._predict=a.asm.F).apply(null,arguments)},a._malloc=function(){return(jr=a._malloc=a.asm.G).apply(null,arguments)}),Br=a._htons=function(){return(Br=a._htons=a.asm.I).apply(null,arguments)},Lr=a.___errno_location=function(){return(Lr=a.___errno_location=a.asm.J).apply(null,arguments)},zr=a._ntohs=function(){return(zr=a._ntohs=a.asm.K).apply(null,arguments)},Ir=a._htonl=function(){return(Ir=a._htonl=a.asm.L).apply(null,arguments)},Ur=a._emscripten_builtin_memalign=function(){return(Ur=a._emscripten_builtin_memalign=a.asm.M).apply(null,arguments)},Hr=a.stackSave=function(){return(Hr=a.stackSave=a.asm.N).apply(null,arguments)},qr=a.stackRestore=function(){return(qr=a.stackRestore=a.asm.O).apply(null,arguments)},Yr=a.stackAlloc=function(){return(Yr=a.stackAlloc=a.asm.P).apply(null,arguments)},Gr=a.___cxa_is_pointer_type=function(){return(Gr=a.___cxa_is_pointer_type=a.asm.Q).apply(null,arguments)};function Wr(r){function t(){Cr||(Cr=!0,a.calledRun=!0,k||(cr.root=ur.mount(cr,{},null),a.noFSInit||ur.init.initialized||ur.init(),ur.ignorePermissions=!1,or.init(),Q(L),e(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)r=a.postRun.shift(),z.unshift(r);var r;Q(z)}()))}r=r||d,I>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)r=a.preRun.shift(),B.unshift(r);var r;Q(B)}(),I>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.ccall=Nr,a.cwrap=function(r,e,t,n){var o=(t=t||[]).every((r=>"number"===r||"boolean"===r));return"string"!==e&&o&&!n?Or(r):function(){return Nr(r,e,t,arguments)}},H=function r(){Cr||Wr(),Cr||(H=r)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return Wr(),r.ready});"object"==typeof exports?r.exports=o:"function"==typeof define&&t.amdO?define([],(function(){return o})):"object"==typeof exports&&(exports.XGBoost=o)},686:(r,e,t)=>{r.exports=t.p+"77573759e3857711e15b.wasm"}},e={};function t(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return r[n](a,a.exports,t),a.loaded=!0,a.exports}t.m=r,t.amdO={},t.d=(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),t.hmd=r=>((r=Object.create(r)).children||(r.children=[]),Object.defineProperty(r,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+r.id)}}),r),t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;t.g.importScripts&&(r=t.g.location+"");var e=t.g.document;if(!r&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(r=e.currentScript.src),!r)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=n[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=r})(),t.b=self.location+"";var n=t(1101);onmessage=async function(r){(0,n.p)().then((e=>{const t=r.data.features,n=r.data.target,o=r.data.samplesCount,a=r.data.featuresCount,s=r.data.modelReserve,i=r.data.utilsLength,u=r.data.iterations,c=r.data.eta,d=r.data.maxDepth,f=r.data.lambda,l=r.data.alpha,p=r.data.missingValue,m=e._malloc(o*a*4),h=e._malloc(4*o),w=e._malloc(4*s),v=e._malloc(4*i),y=e.HEAPF32,g=o*a;for(let r=0;r<g;++r)y[m/4+r]=t[r];for(let r=0;r<o;++r)y[h/4+r]=n[r];e._train(m,o,a,p,h,o,u,c,d,f,l,v,i,w,s);const E=e.HEAP32,_=E[v/4+0],k=new Int32Array(_);for(let r=0;r<_;++r)k[r]=E[w/4+r];e._free(m),e._free(h),e._free(v),e._free(w),postMessage({params:k})}))},eda={}})();
|
|
1
|
+
var eda;(()=>{"use strict";var r={686:(r,e,t)=>{r.exports=t.p+"77573759e3857711e15b.wasm"},1101:(r,e,t)=>{t.d(e,{p:()=>o}),r=t.hmd(r);var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var e,o,a=void 0!==(r=r||{})?r:{};a.ready=new Promise((function(r,t){e=r,o=t}));var s,i,u,c=Object.assign({},a),d=[],f="./this.program",l=(r,e)=>{throw e},p="object"==typeof window,m="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,w="";(p||m)&&(m?w=self.location.href:"undefined"!=typeof document&&document.currentScript&&(w=document.currentScript.src),n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},m&&(u=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),i=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var v,y=a.print||console.log.bind(console),g=a.printErr||console.warn.bind(console);Object.assign(a,c),c=null,a.arguments&&(d=a.arguments),a.thisProgram&&(f=a.thisProgram),a.quit&&(l=a.quit),a.wasmBinary&&(v=a.wasmBinary);var E,_=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&$("no native wasm support detected");var k=!1;function b(r,e){r||$(e)}var S,D,M,A,F,P,x,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&O)return O.decode(r.subarray(e,o));for(var a="";e<o;){var s=r[e++];if(128&s){var i=63&r[e++];if(192!=(224&s)){var u=63&r[e++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|i)}else a+=String.fromCharCode(s)}return a}function R(r,e){return r?N(M,r,e):""}function C(r,e,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,s=0;s<r.length;++s){var i=r.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++s)),i<=127){if(t>=a)break;e[t++]=i}else if(i<=2047){if(t+1>=a)break;e[t++]=192|i>>6,e[t++]=128|63&i}else if(i<=65535){if(t+2>=a)break;e[t++]=224|i>>12,e[t++]=128|i>>6&63,e[t++]=128|63&i}else{if(t+3>=a)break;e[t++]=240|i>>18,e[t++]=128|i>>12&63,e[t++]=128|i>>6&63,e[t++]=128|63&i}}return e[t]=0,t-o}function T(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e}function j(r){S=r,a.HEAP8=D=new Int8Array(r),a.HEAP16=A=new Int16Array(r),a.HEAP32=P=new Int32Array(r),a.HEAPU8=M=new Uint8Array(r),a.HEAPU16=F=new Uint16Array(r),a.HEAPU32=x=new Uint32Array(r),a.HEAPF32=new Float32Array(r),a.HEAPF64=new Float64Array(r)}a.INITIAL_MEMORY;var B,L,z,I,U=[],H=[],q=[],Y=0,G=null,W=null;function X(r){Y++,a.monitorRunDependencies&&a.monitorRunDependencies(Y)}function V(r){if(Y--,a.monitorRunDependencies&&a.monitorRunDependencies(Y),0==Y&&(null!==G&&(clearInterval(G),G=null),W)){var e=W;W=null,e()}}function $(r){a.onAbort&&a.onAbort(r),g(r="Aborted("+r+")"),k=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw o(e),e}function K(r){return r.startsWith("data:application/octet-stream;base64,")}function Z(r){try{if(r==B&&v)return new Uint8Array(v);if(u)return u(r);throw"both async and sync fetching of the wasm failed"}catch(r){$(r)}}function J(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Q(r){for(;r.length>0;)r.shift()(a)}function rr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){P[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,D[this.ptr+12|0]=r},this.get_caught=function(){return 0!=D[this.ptr+12|0]},this.set_rethrown=function(r){r=r?1:0,D[this.ptr+13|0]=r},this.get_rethrown=function(){return 0!=D[this.ptr+13|0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=P[this.ptr>>2];P[this.ptr>>2]=r+1},this.release_ref=function(){var r=P[this.ptr>>2];return P[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Gr(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}K(B="XGBoostAPI.wasm")||(L=B,B=a.locateFile?a.locateFile(L,w):w+L);var er={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=er.isAbs(r),t="/"===r.substr(-1);return(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=er.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=er.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return er.normalize(r.join("/"))},join2:(r,e)=>er.normalize(r+"/"+e)},tr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:ur.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=er.isAbs(n)}return(e?"/":"")+(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=tr.resolve(r).substr(1),e=tr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),s=a,i=0;i<a;i++)if(n[i]!==o[i]){s=i;break}var u=[];for(i=s;i<n.length;i++)u.push("..");return(u=u.concat(o.slice(s))).join("/")}};function nr(r,e,t){var n=t>0?t:T(r)+1,o=new Array(n),a=C(r,o,0,o.length);return e&&(o.length=a),o}var or={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){or.ttys[r]={input:[],output:[],ops:e},ur.registerDevice(r,or.stream_ops)},stream_ops:{open:function(r){var e=or.ttys[r.node.rdev];if(!e)throw new ur.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ur.ErrnoError(60);for(var a=0,s=0;s<n;s++){var i;try{i=r.tty.ops.get_char(r.tty)}catch(r){throw new ur.ErrnoError(29)}if(void 0===i&&0===a)throw new ur.ErrnoError(6);if(null==i)break;a++,e[t+s]=i}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ur.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new ur.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;r.input=nr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(y(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(y(N(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(g(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(g(N(r.output,0)),r.output=[])}}};function ar(r,e){return M.fill(0,r,r+e),r}function sr(r){r=function(r){return 65536*Math.ceil(r/65536)}(r);var e=Ur(65536,r);return e?ar(e,r):0}var ir={ops_table:null,mount:function(r){return ir.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(ur.isBlkdev(t)||ur.isFIFO(t))throw new ur.ErrnoError(63);ir.ops_table||(ir.ops_table={dir:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,lookup:ir.node_ops.lookup,mknod:ir.node_ops.mknod,rename:ir.node_ops.rename,unlink:ir.node_ops.unlink,rmdir:ir.node_ops.rmdir,readdir:ir.node_ops.readdir,symlink:ir.node_ops.symlink},stream:{llseek:ir.stream_ops.llseek}},file:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:{llseek:ir.stream_ops.llseek,read:ir.stream_ops.read,write:ir.stream_ops.write,allocate:ir.stream_ops.allocate,mmap:ir.stream_ops.mmap,msync:ir.stream_ops.msync}},link:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,readlink:ir.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:ur.chrdev_stream_ops}});var o=ur.createNode(r,e,t,n);return ur.isDir(o.mode)?(o.node_ops=ir.ops_table.dir.node,o.stream_ops=ir.ops_table.dir.stream,o.contents={}):ur.isFile(o.mode)?(o.node_ops=ir.ops_table.file.node,o.stream_ops=ir.ops_table.file.stream,o.usedBytes=0,o.contents=null):ur.isLink(o.mode)?(o.node_ops=ir.ops_table.link.node,o.stream_ops=ir.ops_table.link.stream):ur.isChrdev(o.mode)&&(o.node_ops=ir.ops_table.chrdev.node,o.stream_ops=ir.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=ur.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,ur.isDir(r.mode)?e.size=4096:ur.isFile(r.mode)?e.size=r.usedBytes:ur.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&ir.resizeFileStorage(r,e.size)},lookup:function(r,e){throw ur.genericErrors[44]},mknod:function(r,e,t,n){return ir.createNode(r,e,t,n)},rename:function(r,e,t){if(ur.isDir(r.mode)){var n;try{n=ur.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new ur.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=ur.lookupNode(r,e);for(var n in t.contents)throw new ur.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=ir.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!ur.isLink(r.mode))throw new ur.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-o,n);if(s>8&&a.subarray)e.set(a.subarray(o,o+s),t);else for(var i=0;i<s;i++)e[t+i]=a[o+i];return s},write:function(r,e,t,n,o,a){if(e.buffer===D.buffer&&(a=!1),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===o)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(o+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),o),n}if(ir.expandFileStorage(s,o+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),o);else for(var i=0;i<n;i++)s.contents[o+i]=e[t+i];return s.usedBytes=Math.max(s.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ur.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ur.ErrnoError(28);return n},allocate:function(r,e,t){ir.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);var a,s,i=r.node.contents;if(2&o||i.buffer!==S){if((t>0||t+e<i.length)&&(i=i.subarray?i.subarray(t,t+e):Array.prototype.slice.call(i,t,t+e)),s=!0,!(a=sr(e)))throw new ur.ErrnoError(48);D.set(i,a)}else s=!1,a=i.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){return ir.stream_ops.write(r,e,0,n,t,!1),0}}},ur={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=tr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ur.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=ur.root,o="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&e.parent)break;if(n=ur.lookupNode(n,t[a]),o=er.join2(o,t[a]),ur.isMountpoint(n)&&(!s||s&&e.follow_mount)&&(n=n.mounted.root),!s||e.follow)for(var i=0;ur.isLink(n.mode);){var u=ur.readlink(o);if(o=tr.resolve(er.dirname(o),u),n=ur.lookupPath(o,{recurse_count:e.recurse_count+1}).node,i++>40)throw new ur.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(ur.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%ur.nameTable.length},hashAddNode:r=>{var e=ur.hashName(r.parent.id,r.name);r.name_next=ur.nameTable[e],ur.nameTable[e]=r},hashRemoveNode:r=>{var e=ur.hashName(r.parent.id,r.name);if(ur.nameTable[e]===r)ur.nameTable[e]=r.name_next;else for(var t=ur.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=ur.mayLookup(r);if(t)throw new ur.ErrnoError(t,r);for(var n=ur.hashName(r.id,e),o=ur.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ur.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new ur.FSNode(r,e,t,n);return ur.hashAddNode(o),o},destroyNode:r=>{ur.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=ur.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ur.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>ur.nodePermissions(r,"x")||(r.node_ops.lookup?0:2),mayCreate:(r,e)=>{try{return ur.lookupNode(r,e),20}catch(r){}return ur.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=ur.lookupNode(r,e)}catch(r){return r.errno}var o=ur.nodePermissions(r,"wx");if(o)return o;if(t){if(!ur.isDir(n.mode))return 54;if(ur.isRoot(n)||ur.getPath(n)===ur.cwd())return 10}else if(ur.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ur.isLink(r.mode)?32:ur.isDir(r.mode)&&("r"!==ur.flagsToPermissionString(e)||512&e)?31:ur.nodePermissions(r,ur.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=ur.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!ur.streams[t])return t;throw new ur.ErrnoError(33)},getStream:r=>ur.streams[r],createStream:(r,e,t)=>{ur.FSStream||(ur.FSStream=function(){this.shared={}},ur.FSStream.prototype={},Object.defineProperties(ur.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new ur.FSStream,r);var n=ur.nextfd(e,t);return r.fd=n,ur.streams[n]=r,r},closeStream:r=>{ur.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=ur.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new ur.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{ur.devices[r]={stream_ops:e}},getDevice:r=>ur.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),ur.syncFSRequests++,ur.syncFSRequests>1&&g("warning: "+ur.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=ur.getMounts(ur.root.mount),n=0;function o(r){return ur.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount:(r,e,t)=>{var n,o="/"===t,a=!t;if(o&&ur.root)throw new ur.ErrnoError(10);if(!o&&!a){var s=ur.lookupPath(t,{follow_mount:!1});if(t=s.path,n=s.node,ur.isMountpoint(n))throw new ur.ErrnoError(10);if(!ur.isDir(n.mode))throw new ur.ErrnoError(54)}var i={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(i);return u.mount=i,i.root=u,o?ur.root=u:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),u},unmount:r=>{var e=ur.lookupPath(r,{follow_mount:!1});if(!ur.isMountpoint(e.node))throw new ur.ErrnoError(28);var t=e.node,n=t.mounted,o=ur.getMounts(n);Object.keys(ur.nameTable).forEach((r=>{for(var e=ur.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ur.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=ur.lookupPath(r,{parent:!0}).node,o=er.basename(r);if(!o||"."===o||".."===o)throw new ur.ErrnoError(28);var a=ur.mayCreate(n,o);if(a)throw new ur.ErrnoError(a);if(!n.node_ops.mknod)throw new ur.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ur.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ur.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ur.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ur.mknod(r,e,t)),symlink:(r,e)=>{if(!tr.resolve(r))throw new ur.ErrnoError(44);var t=ur.lookupPath(e,{parent:!0}).node;if(!t)throw new ur.ErrnoError(44);var n=er.basename(e),o=ur.mayCreate(t,n);if(o)throw new ur.ErrnoError(o);if(!t.node_ops.symlink)throw new ur.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=er.dirname(r),a=er.dirname(e),s=er.basename(r),i=er.basename(e);if(t=ur.lookupPath(r,{parent:!0}).node,n=ur.lookupPath(e,{parent:!0}).node,!t||!n)throw new ur.ErrnoError(44);if(t.mount!==n.mount)throw new ur.ErrnoError(75);var u,c=ur.lookupNode(t,s),d=tr.relative(r,a);if("."!==d.charAt(0))throw new ur.ErrnoError(28);if("."!==(d=tr.relative(e,o)).charAt(0))throw new ur.ErrnoError(55);try{u=ur.lookupNode(n,i)}catch(r){}if(c!==u){var f=ur.isDir(c.mode),l=ur.mayDelete(t,s,f);if(l)throw new ur.ErrnoError(l);if(l=u?ur.mayDelete(n,i,f):ur.mayCreate(n,i))throw new ur.ErrnoError(l);if(!t.node_ops.rename)throw new ur.ErrnoError(63);if(ur.isMountpoint(c)||u&&ur.isMountpoint(u))throw new ur.ErrnoError(10);if(n!==t&&(l=ur.nodePermissions(t,"w")))throw new ur.ErrnoError(l);ur.hashRemoveNode(c);try{t.node_ops.rename(c,n,i)}catch(r){throw r}finally{ur.hashAddNode(c)}}},rmdir:r=>{var e=ur.lookupPath(r,{parent:!0}).node,t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!0);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.rmdir)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.rmdir(e,t),ur.destroyNode(n)},readdir:r=>{var e=ur.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ur.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=ur.lookupPath(r,{parent:!0}).node;if(!e)throw new ur.ErrnoError(44);var t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!1);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.unlink)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.unlink(e,t),ur.destroyNode(n)},readlink:r=>{var e=ur.lookupPath(r).node;if(!e)throw new ur.ErrnoError(44);if(!e.node_ops.readlink)throw new ur.ErrnoError(28);return tr.resolve(ur.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=ur.lookupPath(r,{follow:!e}).node;if(!t)throw new ur.ErrnoError(44);if(!t.node_ops.getattr)throw new ur.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ur.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n="string"==typeof r?ur.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{ur.chmod(r,e,!0)},fchmod:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);ur.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o="string"==typeof r?ur.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{ur.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=ur.getStream(r);if(!n)throw new ur.ErrnoError(8);ur.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new ur.ErrnoError(28);var t;if(!(t="string"==typeof r?ur.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);if(ur.isDir(t.mode))throw new ur.ErrnoError(31);if(!ur.isFile(t.mode))throw new ur.ErrnoError(28);var n=ur.nodePermissions(t,"w");if(n)throw new ur.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);if(!(2097155&t.flags))throw new ur.ErrnoError(28);ur.truncate(t.node,e)},utime:(r,e,t)=>{var n=ur.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new ur.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?ur.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=er.normalize(r);try{n=ur.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new ur.ErrnoError(20)}else n=ur.mknod(r,t,0),o=!0;if(!n)throw new ur.ErrnoError(44);if(ur.isChrdev(n.mode)&&(e&=-513),65536&e&&!ur.isDir(n.mode))throw new ur.ErrnoError(54);if(!o){var s=ur.mayOpen(n,e);if(s)throw new ur.ErrnoError(s)}512&e&&!o&&ur.truncate(n,0),e&=-131713;var i=ur.createStream({node:n,path:ur.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!a.logReadFiles||1&e||(ur.readFiles||(ur.readFiles={}),r in ur.readFiles||(ur.readFiles[r]=1)),i},close:r=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{ur.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ur.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ur.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(1==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.read)throw new ur.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var s=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=s),s},write:(r,e,t,n,o,a)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.write)throw new ur.ErrnoError(28);r.seekable&&1024&r.flags&&ur.llseek(r,0,2);var s=void 0!==o;if(s){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var i=r.stream_ops.write(r,e,t,n,o,a);return s||(r.position+=i),i},allocate:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(e<0||t<=0)throw new ur.ErrnoError(28);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(!ur.isFile(r.node.mode)&&!ur.isDir(r.node.mode))throw new ur.ErrnoError(43);if(!r.stream_ops.allocate)throw new ur.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new ur.ErrnoError(2);if(1==(2097155&r.flags))throw new ur.ErrnoError(2);if(!r.stream_ops.mmap)throw new ur.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new ur.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=ur.open(r,e.flags),o=ur.stat(r).size,a=new Uint8Array(o);return ur.read(n,a,0,o,0),"utf8"===e.encoding?t=N(a,0):"binary"===e.encoding&&(t=a),ur.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=ur.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(T(e)+1),a=C(e,o,0,o.length);ur.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ur.write(n,e,0,e.byteLength,void 0,t.canOwn)}ur.close(n)},cwd:()=>ur.currentPath,chdir:r=>{var e=ur.lookupPath(r,{follow:!0});if(null===e.node)throw new ur.ErrnoError(44);if(!ur.isDir(e.node.mode))throw new ur.ErrnoError(54);var t=ur.nodePermissions(e.node,"x");if(t)throw new ur.ErrnoError(t);ur.currentPath=e.path},createDefaultDirectories:()=>{ur.mkdir("/tmp"),ur.mkdir("/home"),ur.mkdir("/home/web_user")},createDefaultDevices:()=>{ur.mkdir("/dev"),ur.registerDevice(ur.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),ur.mkdev("/dev/null",ur.makedev(1,3)),or.register(ur.makedev(5,0),or.default_tty_ops),or.register(ur.makedev(6,0),or.default_tty1_ops),ur.mkdev("/dev/tty",ur.makedev(5,0)),ur.mkdev("/dev/tty1",ur.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>$("randomDevice")}();ur.createDevice("/dev","random",r),ur.createDevice("/dev","urandom",r),ur.mkdir("/dev/shm"),ur.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ur.mkdir("/proc");var r=ur.mkdir("/proc/self");ur.mkdir("/proc/self/fd"),ur.mount({mount:()=>{var e=ur.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=ur.getStream(t);if(!n)throw new ur.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?ur.createDevice("/dev","stdin",a.stdin):ur.symlink("/dev/tty","/dev/stdin"),a.stdout?ur.createDevice("/dev","stdout",null,a.stdout):ur.symlink("/dev/tty","/dev/stdout"),a.stderr?ur.createDevice("/dev","stderr",null,a.stderr):ur.symlink("/dev/tty1","/dev/stderr"),ur.open("/dev/stdin",0),ur.open("/dev/stdout",1),ur.open("/dev/stderr",1)},ensureErrnoError:()=>{ur.ErrnoError||(ur.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},ur.ErrnoError.prototype=new Error,ur.ErrnoError.prototype.constructor=ur.ErrnoError,[44].forEach((r=>{ur.genericErrors[r]=new ur.ErrnoError(r),ur.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{ur.ensureErrnoError(),ur.nameTable=new Array(4096),ur.mount(ir,{},"/"),ur.createDefaultDirectories(),ur.createDefaultDevices(),ur.createSpecialDirectories(),ur.filesystems={MEMFS:ir}},init:(r,e,t)=>{ur.init.initialized=!0,ur.ensureErrnoError(),a.stdin=r||a.stdin,a.stdout=e||a.stdout,a.stderr=t||a.stderr,ur.createStandardStreams()},quit:()=>{ur.init.initialized=!1;for(var r=0;r<ur.streams.length;r++){var e=ur.streams[r];e&&ur.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=ur.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=ur.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ur.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=er.basename(r),n=ur.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:ur.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var s=er.join2(r,a);try{ur.mkdir(s)}catch(r){}r=s}}return s},createFile:(r,e,t,n,o)=>{var a=er.join2("string"==typeof r?r:ur.getPath(r),e),s=ur.getMode(n,o);return ur.create(a,s)},createDataFile:(r,e,t,n,o,a)=>{var s=e;r&&(r="string"==typeof r?r:ur.getPath(r),s=e?er.join2(r,e):r);var i=ur.getMode(n,o),u=ur.create(s,i);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,f=t.length;d<f;++d)c[d]=t.charCodeAt(d);t=c}ur.chmod(u,146|i);var l=ur.open(u,577);ur.write(l,t,0,t.length,0,a),ur.close(l),ur.chmod(u,i)}return u},createDevice:(r,e,t,n)=>{var o=er.join2("string"==typeof r?r:ur.getPath(r),e),a=ur.getMode(!!t,!!n);ur.createDevice.major||(ur.createDevice.major=64);var s=ur.makedev(ur.createDevice.major++,0);return ur.registerDevice(s,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,a)=>{for(var s=0,i=0;i<o;i++){var u;try{u=t()}catch(r){throw new ur.ErrnoError(29)}if(void 0===u&&0===s)throw new ur.ErrnoError(6);if(null==u)break;s++,e[n+i]=u}return s&&(r.node.timestamp=Date.now()),s},write:(r,e,t,o,a)=>{for(var s=0;s<o;s++)try{n(e[t+s])}catch(r){throw new ur.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),s}}),ur.mkdev(o,a,s)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=nr(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new ur.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,s=1048576;o||(s=n);var i=this;i.setDataGetter((r=>{var e=r*s,o=(r+1)*s-1;if(o=Math.min(o,n-1),void 0===i.chunks[r]&&(i.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==s&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):nr(o.responseText||"",!0)})(e,o)),void 0===i.chunks[r])throw new Error("doXHR failed!");return i.chunks[r]})),!a&&n||(s=n=1,n=this.getter(0).length,s=n,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:s}}else i={isDevice:!1,url:t};var u=ur.createFile(r,e,i,n,o);i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var s=Math.min(a.length-o,n);if(a.slice)for(var i=0;i<s;i++)e[t+i]=a[o+i];else for(i=0;i<s;i++)e[t+i]=a.get(o+i);return s}return Object.keys(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return ur.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(ur.forceLoadFile(u),d(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{ur.forceLoadFile(u);var a=sr(e);if(!a)throw new ur.ErrnoError(48);return d(r,D,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,a,s,u,c,d)=>{var f=e?tr.resolve(er.join2(r,e)):r;function l(t){function i(t){d&&d(),u||ur.createDataFile(r,e,t,n,o,c),a&&a(),V()}Browser.handledByPreloadPlugin(t,f,i,(()=>{s&&s(),V()}))||i(t)}X(),"string"==typeof t?function(r,e,t){var n="al "+r;i(r,(e=>{b(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),l(new Uint8Array(e)),n&&V()}),(e=>{if(!t)throw'Loading data file "'+r+'" failed.';t()})),n&&X()}(t,0,s):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:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{y("creating db"),o.result.createObjectStore(ur.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ur.DB_STORE_NAME],"readwrite"),a=n.objectStore(ur.DB_STORE_NAME),s=0,i=0,u=r.length;function c(){0==i?e():t()}r.forEach((r=>{var e=a.put(ur.analyzePath(r).object.contents,r);e.onsuccess=()=>{++s+i==u&&c()},e.onerror=()=>{i++,s+i==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([ur.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var s=a.objectStore(ur.DB_STORE_NAME),i=0,u=0,c=r.length;function d(){0==u?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{ur.analyzePath(r).exists&&ur.unlink(r),ur.createDataFile(er.dirname(r),er.basename(r),e.result,!0,!0,!0),++i+u==c&&d()},e.onerror=()=>{u++,i+u==c&&d()}})),a.onerror=t},o.onerror=t}},cr={mount:function(r){return a.websocket=a.websocket&&"object"==typeof a.websocket?a.websocket:{},a.websocket._callbacks={},a.websocket.on=function(r,e){return"function"==typeof e&&(this._callbacks[r]=e),this},a.websocket.emit=function(r,e){"function"==typeof this._callbacks[r]&&this._callbacks[r].call(this,e)},ur.createNode(null,"/",16895,0)},createSocket:function(r,e,t){if(1==(e&=-526337)&&t&&6!=t)throw new ur.ErrnoError(66);var n={family:r,type:e,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:cr.websocket_sock_ops},o=cr.nextname(),a=ur.createNode(cr.root,o,49152,0);a.sock=n;var s=ur.createStream({path:o,node:a,flags:2,seekable:!1,stream_ops:cr.stream_ops});return n.stream=s,n},getSocket:function(r){var e=ur.getStream(r);return e&&ur.isSocket(e.node.mode)?e.node.sock:null},stream_ops:{poll:function(r){var e=r.node.sock;return e.sock_ops.poll(e)},ioctl:function(r,e,t){var n=r.node.sock;return n.sock_ops.ioctl(n,e,t)},read:function(r,e,t,n,o){var a=r.node.sock,s=a.sock_ops.recvmsg(a,n);return s?(e.set(s.buffer,t),s.buffer.length):0},write:function(r,e,t,n,o){var a=r.node.sock;return a.sock_ops.sendmsg(a,e,t,n)},close:function(r){var e=r.node.sock;e.sock_ops.close(e)}},nextname:function(){return cr.nextname.current||(cr.nextname.current=0),"socket["+cr.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(r,e,t){var n;if("object"==typeof e&&(n=e,e=null,t=null),n)if(n._socket)e=n._socket.remoteAddress,t=n._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");e=o[1],t=parseInt(o[2],10)}else try{var s=a.websocket&&"object"==typeof a.websocket,i="ws:#".replace("#","//");if(s&&"string"==typeof a.websocket.url&&(i=a.websocket.url),"ws://"===i||"wss://"===i){var u=e.split("/");i=i+u[0]+":"+t+"/"+u.slice(1).join("/")}var c="binary";s&&"string"==typeof a.websocket.subprotocol&&(c=a.websocket.subprotocol);var d=void 0;"null"!==c&&(d=c=c.replace(/^ +| +$/g,"").split(/ *, */)),s&&null===a.websocket.subprotocol&&(c="null",d=void 0),(n=new WebSocket(i,d)).binaryType="arraybuffer"}catch(r){throw new ur.ErrnoError(23)}var f={addr:e,port:t,socket:n,dgram_send_queue:[]};return cr.websocket_sock_ops.addPeer(r,f),cr.websocket_sock_ops.handlePeerEvents(r,f),2===r.type&&void 0!==r.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&r.sport)>>8,255&r.sport])),f},getPeer:function(r,e,t){return r.peers[e+":"+t]},addPeer:function(r,e){r.peers[e.addr+":"+e.port]=e},removePeer:function(r,e){delete r.peers[e.addr+":"+e.port]},handlePeerEvents:function(r,e){var t=!0,n=function(){a.websocket.emit("open",r.stream.fd);try{for(var t=e.dgram_send_queue.shift();t;)e.socket.send(t),t=e.dgram_send_queue.shift()}catch(r){e.socket.close()}};function o(n){if("string"==typeof n)n=(new TextEncoder).encode(n);else{if(b(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var o=t;if(t=!1,o&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return cr.websocket_sock_ops.removePeer(r,e),e.port=s,void cr.websocket_sock_ops.addPeer(r,e)}r.recv_queue.push({addr:e.addr,port:e.port,data:n}),a.websocket.emit("message",r.stream.fd)}h?(e.socket.on("open",n),e.socket.on("message",(function(r,e){e&&o(new Uint8Array(r).buffer)})),e.socket.on("close",(function(){a.websocket.emit("close",r.stream.fd)})),e.socket.on("error",(function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])}))):(e.socket.onopen=n,e.socket.onclose=function(){a.websocket.emit("close",r.stream.fd)},e.socket.onmessage=function(r){o(r.data)},e.socket.onerror=function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})},poll:function(r){if(1===r.type&&r.server)return r.pending.length?65:0;var e=0,t=1===r.type?cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport):null;return(r.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(e|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=16),e},ioctl:function(r,e,t){if(21531===e){var n=0;return r.recv_queue.length&&(n=r.recv_queue[0].data.length),P[t>>2]=n,0}return 28},close:function(r){if(r.server){try{r.server.close()}catch(r){}r.server=null}for(var e=Object.keys(r.peers),t=0;t<e.length;t++){var n=r.peers[e[t]];try{n.socket.close()}catch(r){}cr.websocket_sock_ops.removePeer(r,n)}return 0},bind:function(r,e,t){if(void 0!==r.saddr||void 0!==r.sport)throw new ur.ErrnoError(28);if(r.saddr=e,r.sport=t,2===r.type){r.server&&(r.server.close(),r.server=null);try{r.sock_ops.listen(r,0)}catch(r){if(!(r instanceof ur.ErrnoError))throw r;if(138!==r.errno)throw r}}},connect:function(r,e,t){if(r.server)throw new ur.ErrnoError(138);if(void 0!==r.daddr&&void 0!==r.dport){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new ur.ErrnoError(7):new ur.ErrnoError(30)}var o=cr.websocket_sock_ops.createPeer(r,e,t);throw r.daddr=o.addr,r.dport=o.port,new ur.ErrnoError(26)},listen:function(r,e){if(!h)throw new ur.ErrnoError(138)},accept:function(r){if(!r.server||!r.pending.length)throw new ur.ErrnoError(28);var e=r.pending.shift();return e.stream.flags=r.stream.flags,e},getname:function(r,e){var t,n;if(e){if(void 0===r.daddr||void 0===r.dport)throw new ur.ErrnoError(53);t=r.daddr,n=r.dport}else t=r.saddr||0,n=r.sport||0;return{addr:t,port:n}},sendmsg:function(r,e,t,n,o,a){if(2===r.type){if(void 0!==o&&void 0!==a||(o=r.daddr,a=r.dport),void 0===o||void 0===a)throw new ur.ErrnoError(17)}else o=r.daddr,a=r.dport;var s,i=cr.websocket_sock_ops.getPeer(r,o,a);if(1===r.type){if(!i||i.socket.readyState===i.socket.CLOSING||i.socket.readyState===i.socket.CLOSED)throw new ur.ErrnoError(53);if(i.socket.readyState===i.socket.CONNECTING)throw new ur.ErrnoError(6)}if(ArrayBuffer.isView(e)&&(t+=e.byteOffset,e=e.buffer),s=e.slice(t,t+n),2===r.type&&(!i||i.socket.readyState!==i.socket.OPEN))return i&&i.socket.readyState!==i.socket.CLOSING&&i.socket.readyState!==i.socket.CLOSED||(i=cr.websocket_sock_ops.createPeer(r,o,a)),i.dgram_send_queue.push(s),n;try{return i.socket.send(s),n}catch(r){throw new ur.ErrnoError(28)}},recvmsg:function(r,e){if(1===r.type&&r.server)throw new ur.ErrnoError(53);var t=r.recv_queue.shift();if(!t){if(1===r.type){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(!n)throw new ur.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new ur.ErrnoError(6)}throw new ur.ErrnoError(6)}var o=t.data.byteLength||t.data.length,a=t.data.byteOffset||0,s=t.data.buffer||t.data,i=Math.min(e,o),u={buffer:new Uint8Array(s,a,i),addr:t.addr,port:t.port};if(1===r.type&&i<o){var c=o-i;t.data=new Uint8Array(s,a+i,c),r.recv_queue.unshift(t)}return u}}};function dr(r){var e=cr.getSocket(r);if(!e)throw new ur.ErrnoError(8);return e}function fr(r){for(var e=r.split("."),t=0;t<4;t++){var n=Number(e[t]);if(isNaN(n))return null;e[t]=n}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0}function lr(r){return parseInt(r)}function pr(r){var e,t,n,o,a=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(r))return null;if("::"===r)return[0,0,0,0,0,0,0,0];for((r=r.startsWith("::")?r.replace("::","Z:"):r.replace("::",":Z:")).indexOf(".")>0?((e=(r=r.replace(new RegExp("[.]","g"),":")).split(":"))[e.length-4]=lr(e[e.length-4])+256*lr(e[e.length-3]),e[e.length-3]=lr(e[e.length-2])+256*lr(e[e.length-1]),e=e.slice(0,e.length-2)):e=r.split(":"),n=0,o=0,t=0;t<e.length;t++)if("string"==typeof e[t])if("Z"===e[t]){for(o=0;o<8-e.length+1;o++)a[t+o]=0;n=o-1}else a[t+n]=Br(parseInt(e[t],16));else a[t+n]=e[t];return[a[1]<<16|a[0],a[3]<<16|a[2],a[5]<<16|a[4],a[7]<<16|a[6]]}function mr(r,e,t,n,o){switch(e){case 2:t=fr(t),ar(r,16),o&&(P[o>>2]=16),A[r>>1]=e,P[r+4>>2]=t,A[r+2>>1]=Br(n);break;case 10:t=pr(t),ar(r,28),o&&(P[o>>2]=28),P[r>>2]=e,P[r+8>>2]=t[0],P[r+12>>2]=t[1],P[r+16>>2]=t[2],P[r+20>>2]=t[3],A[r+2>>1]=Br(n);break;default:return 5}return 0}var hr={address_map:{id:1,addrs:{},names:{}},lookup_name:function(r){var e,t=fr(r);if(null!==t)return r;if(null!==(t=pr(r)))return r;if(hr.address_map.addrs[r])e=hr.address_map.addrs[r];else{var n=hr.address_map.id++;b(n<65535,"exceeded max address mappings of 65535"),e="172.29."+(255&n)+"."+(65280&n),hr.address_map.names[e]=r,hr.address_map.addrs[r]=e}return e},lookup_addr:function(r){return hr.address_map.names[r]?hr.address_map.names[r]:null}},wr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(er.isAbs(e))return e;var n;if(n=-100===r?ur.cwd():wr.getStreamFromFD(r).path,0==e.length){if(!t)throw new ur.ErrnoError(44);return n}return er.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&er.normalize(e)!==er.normalize(ur.getPath(r.node)))return-54;throw r}P[t>>2]=n.dev,P[t+8>>2]=n.ino,P[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,P[t+20>>2]=n.uid,P[t+24>>2]=n.gid,P[t+28>>2]=n.rdev,I=[n.size>>>0,(z=n.size,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+40>>2]=I[0],P[t+44>>2]=I[1],P[t+48>>2]=4096,P[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),s=n.ctime.getTime();return I=[Math.floor(o/1e3)>>>0,(z=Math.floor(o/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+56>>2]=I[0],P[t+60>>2]=I[1],x[t+64>>2]=o%1e3*1e3,I=[Math.floor(a/1e3)>>>0,(z=Math.floor(a/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+72>>2]=I[0],P[t+76>>2]=I[1],x[t+80>>2]=a%1e3*1e3,I=[Math.floor(s/1e3)>>>0,(z=Math.floor(s/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+88>>2]=I[0],P[t+92>>2]=I[1],x[t+96>>2]=s%1e3*1e3,I=[n.ino>>>0,(z=n.ino,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+104>>2]=I[0],P[t+108>>2]=I[1],0},doMsync:function(r,e,t,n,o){if(!ur.isFile(e.node.mode))throw new ur.ErrnoError(43);if(2&n)return 0;var a=M.slice(r,r+t);ur.msync(e,a,o,t,n)},varargs:void 0,get:function(){return wr.varargs+=4,P[wr.varargs-4>>2]},getStr:function(r){return R(r)},getStreamFromFD:function(r){var e=ur.getStream(r);if(!e)throw new ur.ErrnoError(8);return e}};function vr(r){return(255&r)+"."+(r>>8&255)+"."+(r>>16&255)+"."+(r>>24&255)}function yr(r){var e="",t=0,n=0,o=0,a=0,s=0,i=0,u=[65535&r[0],r[0]>>16,65535&r[1],r[1]>>16,65535&r[2],r[2]>>16,65535&r[3],r[3]>>16],c=!0,d="";for(i=0;i<5;i++)if(0!==u[i]){c=!1;break}if(c){if(d=vr(u[6]|u[7]<<16),-1===u[5])return(e="::ffff:")+d;if(0===u[5])return"0.0.0.0"===d&&(d=""),"0.0.0.1"===d&&(d="1"),(e="::")+d}for(t=0;t<8;t++)0===u[t]&&(t-o>1&&(s=0),o=t,s++),s>n&&(a=t-(n=s)+1);for(t=0;t<8;t++)n>1&&0===u[t]&&t>=a&&t<a+n?t===a&&(e+=":",0===a&&(e+=":")):(e+=Number(zr(65535&u[t])).toString(16),e+=t<7?":":"");return e}function gr(r,e,t){if(t&&0===r)return null;var n=function(r,e){var t,n=A[r>>1],o=zr(F[r+2>>1]);switch(n){case 2:if(16!==e)return{errno:28};t=vr(t=P[r+4>>2]);break;case 10:if(28!==e)return{errno:28};t=yr(t=[P[r+8>>2],P[r+12>>2],P[r+16>>2],P[r+20>>2]]);break;default:return{errno:5}}return{family:n,addr:t,port:o}}(r,e);if(n.errno)throw new ur.ErrnoError(n.errno);return n.addr=hr.lookup_addr(n.addr)||n.addr,n}function Er(r){return r%4==0&&(r%100!=0||r%400==0)}var _r,kr=[0,31,60,91,121,152,182,213,244,274,305,335],br=[0,31,59,90,120,151,181,212,243,273,304,334];function Sr(r){var e=T(r)+1,t=jr(e);return t&&C(r,D,t,e),t}function Dr(r){try{return E.grow(r-S.byteLength+65535>>>16),j(E.buffer),1}catch(r){}}_r=()=>performance.now();var Mr={};function Ar(){if(!Ar.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Mr)void 0===Mr[e]?delete r[e]:r[e]=Mr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);Ar.strings=t}return Ar.strings}var Fr=[31,29,31,30,31,30,31,31,30,31,30,31],Pr=[31,28,31,30,31,30,31,31,30,31,30,31];function xr(r,e){D.set(r,e)}function Or(r){return a["_"+r]}function Nr(r,e,t,n,o){var a={string:r=>{var e=0;if(null!=r&&0!==r){var t=1+(r.length<<2);!function(r,e,t){C(r,M,e,t)}(r,e=Yr(t),t)}return e},array:r=>{var e=Yr(r.length);return xr(r,e),e}},s=Or(r),i=[],u=0;if(n)for(var c=0;c<n.length;c++){var d=a[t[c]];d?(0===u&&(u=Hr()),i[c]=d(n[c])):i[c]=n[c]}var f=s.apply(null,i);return function(r){return 0!==u&&qr(u),function(r){return"string"===e?R(r):"boolean"===e?Boolean(r):r}(r)}(f)}var Rr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=ur.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Rr.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ur.isDir(this.mode)}},isDevice:{get:function(){return ur.isChrdev(this.mode)}}}),ur.FSNode=Rr,ur.staticInit();var Cr,Tr={a:function(r,e,t){throw new rr(r).init(e,t),r},r:function(r,e,t,n){try{var o=dr(r),a=o.sock_ops.accept(o);return e&&mr(e,a.family,hr.lookup_name(a.daddr),a.dport,t),a.stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},q:function(r,e,t){try{var n=dr(r),o=gr(e,t);return n.sock_ops.connect(n,o.addr,o.port),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},b:function(r,e,t){wr.varargs=t;try{var n=wr.getStreamFromFD(r);switch(e){case 0:return(o=wr.get())<0?-28:ur.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=wr.get();return n.flags|=o,0;case 5:return o=wr.get(),A[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return P[Lr()>>2]=28,-1}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o){try{var a=dr(r);return 1===e&&4===t?(P[n>>2]=a.error,P[o>>2]=4,a.error=null,0):-50}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},x:function(r,e,t){try{for(var n=0,o=0;o<e;o++){var a=r+8*o,s=P[a>>2],i=A[a+4>>1],u=32,c=ur.getStream(s);c&&(u=wr.DEFAULT_POLLMASK,c.stream_ops.poll&&(u=c.stream_ops.poll(c))),(u&=24|i)&&n++,A[a+6>>1]=u}return n}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},o:function(r,e,t,n,o,a){try{var s=dr(r),i=s.sock_ops.recvmsg(s,t);return i?(o&&mr(o,s.family,hr.lookup_name(i.addr),i.port,a),M.set(i.buffer,e),i.buffer.byteLength):0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},n:function(r,e,t,n,o,a){try{var s=dr(r),i=gr(o,a,!0);return i?s.sock_ops.sendmsg(s,D,e,t,i.addr,i.port):ur.write(s.stream,D,e,t)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},m:function(r,e,t){try{return cr.createSocket(r,e,t).stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=wr.getStr(r),wr.doStat(ur.stat,r,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},g:function(){return!0},i:function(r,e){var t,n=new Date(1e3*(x[(t=r)>>2]+4294967296*P[t+4>>2]));P[e>>2]=n.getSeconds(),P[e+4>>2]=n.getMinutes(),P[e+8>>2]=n.getHours(),P[e+12>>2]=n.getDate(),P[e+16>>2]=n.getMonth(),P[e+20>>2]=n.getFullYear()-1900,P[e+24>>2]=n.getDay();var o=0|function(r){return(Er(r.getFullYear())?kr:br)[r.getMonth()]+r.getDate()-1}(n);P[e+28>>2]=o,P[e+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=a.getTimezoneOffset(),u=0|(s!=i&&n.getTimezoneOffset()==Math.min(i,s));P[e+32>>2]=u},j:function(r,e,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),s=o.getTimezoneOffset(),i=a.getTimezoneOffset(),u=Math.max(s,i);function c(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}x[r>>2]=60*u,P[e>>2]=Number(s!=i);var d=c(o),f=c(a),l=Sr(d),p=Sr(f);i<s?(x[t>>2]=l,x[t+4>>2]=p):(x[t>>2]=p,x[t+4>>2]=l)},c:function(){$("")},h:function(){return Date.now()},d:_r,k:function(r,e,t){M.copyWithin(r,e,e+t)},w:function(r){var e,t=M.length,n=2147483648;if((r>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var a=t*(1+.2/o);if(a=Math.min(a,r+100663296),Dr(Math.min(n,(e=Math.max(r,a))+(65536-e%65536)%65536)))return!0}return!1},u:function(r,e){var t=0;return Ar().forEach((function(n,o){var a=e+t;x[r+4*o>>2]=a,function(r,e){for(var t=0;t<r.length;++t)D[0|e++]=r.charCodeAt(t);D[0|e]=0}(n,a),t+=n.length+1})),0},v:function(r,e){var t=Ar();x[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),x[e>>2]=n,0},s:function(r,e){var t;t=r,_||(a.onExit&&a.onExit(t),k=!0),l(t,new J(t))},e:function(r){try{var e=wr.getStreamFromFD(r);return ur.close(e),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},z:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.read(r,D,a,s,undefined);if(i<0)return-1;if(n+=i,i<s)break}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(i=e)?(i>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var s=wr.getStreamFromFD(r);return ur.llseek(s,a,n),I=[s.position>>>0,(z=s.position,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[o>>2]=I[0],P[o+4>>2]=I[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}var i,u},f:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.write(r,D,a,s,undefined);if(i<0)return-1;n+=i}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},A:function(r,e,t,n){var o,a=0,s=0,i=0,u=0,c=0,d=0;function f(r,e,t,n,o,a){var s,i,u;return i=10===r?28:16,o=10===r?yr(o):vr(o),b(!mr(s=jr(i),r,o,a)),u=jr(32),P[u+4>>2]=r,P[u+8>>2]=e,P[u+12>>2]=t,P[u+24>>2]=n,x[u+20>>2]=s,P[u+16>>2]=10===r?28:16,P[u+28>>2]=0,u}if(t&&(i=P[t>>2],u=P[t+4>>2],c=P[t+8>>2],d=P[t+12>>2]),c&&!d&&(d=2===c?17:6),!c&&d&&(c=17===d?2:1),0===d&&(d=6),0===c&&(c=1),!r&&!e)return-2;if(-1088&i)return-1;if(0!==t&&2&P[t>>2]&&!r)return-1;if(32&i)return-2;if(0!==c&&1!==c&&2!==c)return-7;if(0!==u&&2!==u&&10!==u)return-6;if(e&&(e=R(e),s=parseInt(e,10),isNaN(s)))return 1024&i?-2:-8;if(!r)return 0===u&&(u=2),1&i||(a=2===u?Ir(2130706433):[0,0,0,1]),o=f(u,c,d,null,a,s),x[n>>2]=o,0;if(null!==(a=fr(r=R(r))))if(0===u||2===u)u=2;else{if(!(10===u&&8&i))return-2;a=[0,0,Ir(65535),a],u=10}else if(null!==(a=pr(r))){if(0!==u&&10!==u)return-2;u=10}return null!=a?(o=f(u,c,d,r,a,s),x[n>>2]=o,0):4&i?-2:(a=fr(r=hr.lookup_name(r)),0===u?u=2:10===u&&(a=[0,0,Ir(65535),a]),o=f(u,c,d,null,a,s),x[n>>2]=o,0)},t:function(r,e,t,n,o){return function(r,e,t,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?R(o):""},s=R(t),i={"%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 i)s=s.replace(new RegExp(u,"g"),i[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function l(r,e){return f(r,e,"0")}function p(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function h(r){var e=function(r,e){for(var t=new Date(r.getTime());e>0;){var n=Er(t.getFullYear()),o=t.getMonth(),a=(n?Fr:Pr)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(t),a=m(n);return p(o,e)<=0?p(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return d[r.tm_mon].substring(0,3)},"%B":function(r){return d[r.tm_mon]},"%C":function(r){return l((r.tm_year+1900)/100|0,2)},"%d":function(r){return l(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return h(r).toString().substring(2)},"%G":function(r){return h(r)},"%H":function(r){return l(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),l(e,2)},"%j":function(r){return l(r.tm_mday+function(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}(Er(r.tm_year+1900)?Fr:Pr,r.tm_mon-1),3)},"%m":function(r){return l(r.tm_mon+1,2)},"%M":function(r){return l(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return l(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return l(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&Er(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Er(r.tm_year%400-1))&&e++}return l(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return l(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in s=s.replace(/%%/g,"\0\0"),w)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),w[u](a)));var v=nr(s=s.replace(/\0\0/g,"%"),!1);return v.length>e?0:(xr(v,r),v.length-1)}(r,e,t,n)}},jr=(function(){var r={a:Tr};function e(r,e){var t,n=r.exports;a.asm=n,j((E=a.asm.B).buffer),a.asm.H,t=a.asm.C,H.unshift(t),V()}function n(r){e(r.instance)}function s(e){return(v||!p&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Z(B)})):fetch(new URL(t(686),t.b)).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+B+"'";return r.arrayBuffer()})).catch((function(){return Z(B)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){g("failed to asynchronously prepare wasm: "+r),$(r)}))}if(X(),a.instantiateWasm)try{return a.instantiateWasm(r,e)}catch(r){g("Module.instantiateWasm callback failed with error: "+r),o(r)}(v||"function"!=typeof WebAssembly.instantiateStreaming||K(B)||"function"!=typeof fetch?s(n):fetch(new URL(t(686),t.b)).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return g("wasm streaming compile failed: "+r),g("falling back to ArrayBuffer instantiation"),s(n)}))}))).catch(o)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.C).apply(null,arguments)},a._train=function(){return(a._train=a.asm.D).apply(null,arguments)},a._free=function(){return(a._free=a.asm.E).apply(null,arguments)},a._predict=function(){return(a._predict=a.asm.F).apply(null,arguments)},a._malloc=function(){return(jr=a._malloc=a.asm.G).apply(null,arguments)}),Br=a._htons=function(){return(Br=a._htons=a.asm.I).apply(null,arguments)},Lr=a.___errno_location=function(){return(Lr=a.___errno_location=a.asm.J).apply(null,arguments)},zr=a._ntohs=function(){return(zr=a._ntohs=a.asm.K).apply(null,arguments)},Ir=a._htonl=function(){return(Ir=a._htonl=a.asm.L).apply(null,arguments)},Ur=a._emscripten_builtin_memalign=function(){return(Ur=a._emscripten_builtin_memalign=a.asm.M).apply(null,arguments)},Hr=a.stackSave=function(){return(Hr=a.stackSave=a.asm.N).apply(null,arguments)},qr=a.stackRestore=function(){return(qr=a.stackRestore=a.asm.O).apply(null,arguments)},Yr=a.stackAlloc=function(){return(Yr=a.stackAlloc=a.asm.P).apply(null,arguments)},Gr=a.___cxa_is_pointer_type=function(){return(Gr=a.___cxa_is_pointer_type=a.asm.Q).apply(null,arguments)};function Wr(r){function t(){Cr||(Cr=!0,a.calledRun=!0,k||(cr.root=ur.mount(cr,{},null),a.noFSInit||ur.init.initialized||ur.init(),ur.ignorePermissions=!1,or.init(),Q(H),e(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)r=a.postRun.shift(),q.unshift(r);var r;Q(q)}()))}r=r||d,Y>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)r=a.preRun.shift(),U.unshift(r);var r;Q(U)}(),Y>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.ccall=Nr,a.cwrap=function(r,e,t,n){var o=(t=t||[]).every((r=>"number"===r||"boolean"===r));return"string"!==e&&o&&!n?Or(r):function(){return Nr(r,e,t,arguments)}},W=function r(){Cr||Wr(),Cr||(W=r)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return Wr(),r.ready});"object"==typeof exports?r.exports=o:"function"==typeof define&&t.amdO?define([],(function(){return o})):"object"==typeof exports&&(exports.XGBoost=o)}},e={};function t(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return r[n](a,a.exports,t),a.loaded=!0,a.exports}t.m=r,t.amdO={},t.d=(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),t.hmd=r=>((r=Object.create(r)).children||(r.children=[]),Object.defineProperty(r,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+r.id)}}),r),t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;t.g.importScripts&&(r=t.g.location+"");var e=t.g.document;if(!r&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(r=e.currentScript.src),!r)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=n[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=r})(),t.b=self.location+"";var n=t(1101);onmessage=async function(r){(0,n.p)().then((e=>{const t=r.data.features,n=r.data.target,o=r.data.samplesCount,a=r.data.featuresCount,s=r.data.modelReserve,i=r.data.utilsLength,u=r.data.iterations,c=r.data.eta,d=r.data.maxDepth,f=r.data.lambda,l=r.data.alpha,p=r.data.missingValue,m=e._malloc(o*a*4),h=e._malloc(4*o),w=e._malloc(4*s),v=e._malloc(4*i),y=e.HEAPF32,g=o*a;for(let r=0;r<g;++r)y[m/4+r]=t[r];for(let r=0;r<o;++r)y[h/4+r]=n[r];e._train(m,o,a,p,h,o,u,c,d,f,l,v,i,w,s);const E=e.HEAP32,_=E[v/4+0],k=new Int32Array(_);for(let r=0;r<_;++r)k[r]=E[w/4+r];e._free(m),e._free(h),e._free(v),e._free(w),postMessage({params:k})}))},eda={}})();
|
|
2
2
|
//# sourceMappingURL=990.js.map
|