@hpcc-js/graph 2.75.0 → 2.77.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/dist/index.es6.js +8329 -718
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +8335 -724
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +24 -23
- package/src/__package__.ts +2 -2
- package/src/graph2/graph.ts +1 -3
- package/src/graph2/layouts/dagreWorker.ts +1 -1
- package/src/graph2/layouts/forceDirectedWorker.ts +1 -8
- package/src/graph2/layouts/graphvizWorker.ts +1 -22
- package/types/__package__.d.ts +2 -2
- package/types/graph2/graph.d.ts.map +1 -1
- package/types/graph2/layouts/forceDirectedWorker.d.ts.map +1 -1
- package/types/graph2/layouts/graphvizWorker.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
|
@@ -50,28 +50,7 @@ export interface Options {
|
|
|
50
50
|
|
|
51
51
|
export function graphviz(data: Data, options: Options) {
|
|
52
52
|
// eslint-disable-next-line quotes
|
|
53
|
-
const workerCode = `!function(){"use strict";
|
|
54
|
-
/*! *****************************************************************************
|
|
55
|
-
Copyright (c) Microsoft Corporation.
|
|
56
|
-
|
|
57
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
58
|
-
purpose with or without fee is hereby granted.
|
|
59
|
-
|
|
60
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
61
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
62
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
63
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
64
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
65
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
66
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
67
|
-
***************************************************************************** */function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}var e,t,n,o={exports:{}};e=o,t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(r){var e,n,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,t){e=r,n=t}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c="./this.program",f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),t&&(f=t),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",s=function(r){var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},u=function(r,e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var l,d,p=o.print||console.log.bind(console),h=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit,o.wasmBinary&&(l=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&I("no native wasm support detected");var m=!1;function v(r,e){r||I("Assertion failed: "+e)}var w,_,y,g,E,b,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&k)return k.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function S(r,e){return r?D(y,r,e):""}function P(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function F(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function x(r){w=r,o.HEAP8=_=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=g=new Int32Array(r),o.HEAPU8=y=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=E=new Float64Array(r)}o.INITIAL_MEMORY;var A,M,R,C,z=[],T=[],j=[],B=0,N=null;function O(r){B++,o.monitorRunDependencies&&o.monitorRunDependencies(B)}function L(r){if(B--,o.monitorRunDependencies&&o.monitorRunDependencies(B),0==B&&N){var e=N;N=null,e()}}function I(r){o.onAbort&&o.onAbort(r),h(r+=""),m=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}function U(r){return r.startsWith("data:application/octet-stream;base64,")}function H(r){try{if(r==A&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(r){I(r)}}o.preloadedImages={},o.preloadedAudios={},U(A="expatlib.wasm")||(M=A,A=o.locateFile?o.locateFile(M,f):f+M);var W={11922:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},12140:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},12352:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function G(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?b.get(t)():b.get(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}var q={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(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:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=q.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=q.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=q.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return q.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return q.normalize(r.join("/"))},join2:function(r,e){return q.normalize(r+"/"+e)}},V={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Y.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=q.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(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=V.resolve(r).substr(1),e=V.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},Y.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new Y.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Y.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Y.ErrnoError(29)}if(void 0===s&&0===i)throw new Y.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Y.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Y.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},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=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(p(D(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(D(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(h(D(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(h(D(r.output,0)),r.output=[])}}},X={ops_table:null,mount:function(r){return X.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Y.isBlkdev(t)||Y.isFIFO(t))throw new Y.ErrnoError(63);X.ops_table||(X.ops_table={dir:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,lookup:X.node_ops.lookup,mknod:X.node_ops.mknod,rename:X.node_ops.rename,unlink:X.node_ops.unlink,rmdir:X.node_ops.rmdir,readdir:X.node_ops.readdir,symlink:X.node_ops.symlink},stream:{llseek:X.stream_ops.llseek}},file:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:{llseek:X.stream_ops.llseek,read:X.stream_ops.read,write:X.stream_ops.write,allocate:X.stream_ops.allocate,mmap:X.stream_ops.mmap,msync:X.stream_ops.msync}},link:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,readlink:X.node_ops.readlink},stream:{}},chrdev:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,e,t,n);return Y.isDir(o.mode)?(o.node_ops=X.ops_table.dir.node,o.stream_ops=X.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=X.ops_table.file.node,o.stream_ops=X.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=X.ops_table.link.node,o.stream_ops=X.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=X.ops_table.chrdev.node,o.stream_ops=X.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=Y.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,Y.isDir(r.mode)?e.size=4096:Y.isFile(r.mode)?e.size=r.usedBytes:Y.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&&X.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Y.genericErrors[44]},mknod:function(r,e,t,n){return X.createNode(r,e,t,n)},rename:function(r,e,t){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Y.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=Y.lookupNode(r,e);for(var n in t.contents)throw new Y.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=X.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===_.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(X.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Y.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Y.ErrnoError(28);return n},allocate:function(r,e,t){X.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Y.ErrnoError(28);if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==w){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void I()))throw new Y.ErrnoError(48);_.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);return 2&o||X.stream_ops.write(r,e,0,n,t,!1),0}}},Y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(r,e){if(e=e||{},!(r=V.resolve(Y.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Y.ErrnoError(32);for(var o=q.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=Y.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Y.lookupNode(i,o[s]),a=q.join2(a,o[s]),Y.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Y.isLink(i.mode);){var f=Y.readlink(a);if(a=V.resolve(q.dirname(a),f),i=Y.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var e;;){if(Y.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:function(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Y.nameTable.length},hashAddNode:function(r){var e=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[e],Y.nameTable[e]=r},hashRemoveNode:function(r){var e=Y.hashName(r.parent.id,r.name);if(Y.nameTable[e]===r)Y.nameTable[e]=r.name_next;else for(var t=Y.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:function(r,e){var t=Y.mayLookup(r);if(t)throw new Y.ErrnoError(t,r);for(var n=Y.hashName(r.id,e),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Y.lookup(r,e)},createNode:function(r,e,t,n){var o=new Y.FSNode(r,e,t,n);return Y.hashAddNode(o),o},destroyNode:function(r){Y.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var e=Y.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:function(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:function(r,e){return Y.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var e=Y.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:function(r,e){try{return Y.lookupNode(r,e),20}catch(r){}return Y.nodePermissions(r,"wx")},mayDelete:function(r,e,t){var n;try{n=Y.lookupNode(r,e)}catch(r){return r.errno}var o=Y.nodePermissions(r,"wx");if(o)return o;if(t){if(!Y.isDir(n.mode))return 54;if(Y.isRoot(n)||Y.getPath(n)===Y.cwd())return 10}else if(Y.isDir(n.mode))return 31;return 0},mayOpen:function(r,e){return r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&("r"!==Y.flagsToPermissionString(e)||512&e)?31:Y.nodePermissions(r,Y.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(r,e){r=r||0,e=e||Y.MAX_OPEN_FDS;for(var t=r;t<=e;t++)if(!Y.streams[t])return t;throw new Y.ErrnoError(33)},getStream:function(r){return Y.streams[r]},createStream:function(r,e,t){Y.FSStream||(Y.FSStream=function(){},Y.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Y.FSStream;for(var o in r)n[o]=r[o];r=n;var i=Y.nextfd(e,t);return r.fd=i,Y.streams[i]=r,r},closeStream:function(r){Y.streams[r]=null},chrdev_stream_ops:{open:function(r){var e=Y.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new Y.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,e){return r<<8|e},registerDevice:function(r,e){Y.devices[r]={stream_ops:e}},getDevice:function(r){return Y.devices[r]},getMounts:function(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:function(r,e){"function"==typeof r&&(e=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&h("warning: "+Y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:function(r,e,t){var n,o="/"===t,i=!t;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Y.isMountpoint(n))throw new Y.ErrnoError(10);if(!Y.isDir(n.mode))throw new Y.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Y.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var e=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(e.node))throw new Y.ErrnoError(28);var t=e.node,n=t.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((function(r){for(var e=Y.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Y.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:function(r,e){return r.node_ops.lookup(r,e)},mknod:function(r,e,t){var n=Y.lookupPath(r,{parent:!0}).node,o=q.basename(r);if(!o||"."===o||".."===o)throw new Y.ErrnoError(28);var i=Y.mayCreate(n,o);if(i)throw new Y.ErrnoError(i);if(!n.node_ops.mknod)throw new Y.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:function(r,e){return e=void 0!==e?e:438,e&=4095,e|=32768,Y.mknod(r,e,0)},mkdir:function(r,e){return e=void 0!==e?e:511,e&=1023,e|=16384,Y.mknod(r,e,0)},mkdirTree:function(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Y.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,e,t){return void 0===t&&(t=e,e=438),e|=8192,Y.mknod(r,e,t)},symlink:function(r,e){if(!V.resolve(r))throw new Y.ErrnoError(44);var t=Y.lookupPath(e,{parent:!0}).node;if(!t)throw new Y.ErrnoError(44);var n=q.basename(e),o=Y.mayCreate(t,n);if(o)throw new Y.ErrnoError(o);if(!t.node_ops.symlink)throw new Y.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:function(r,e){var t,n,o=q.dirname(r),i=q.dirname(e),a=q.basename(r),s=q.basename(e);if(t=Y.lookupPath(r,{parent:!0}).node,n=Y.lookupPath(e,{parent:!0}).node,!t||!n)throw new Y.ErrnoError(44);if(t.mount!==n.mount)throw new Y.ErrnoError(75);var u,c=Y.lookupNode(t,a),f=V.relative(r,i);if("."!==f.charAt(0))throw new Y.ErrnoError(28);if("."!==(f=V.relative(e,o)).charAt(0))throw new Y.ErrnoError(55);try{u=Y.lookupNode(n,s)}catch(r){}if(c!==u){var l=Y.isDir(c.mode),d=Y.mayDelete(t,a,l);if(d)throw new Y.ErrnoError(d);if(d=u?Y.mayDelete(n,s,l):Y.mayCreate(n,s))throw new Y.ErrnoError(d);if(!t.node_ops.rename)throw new Y.ErrnoError(63);if(Y.isMountpoint(c)||u&&Y.isMountpoint(u))throw new Y.ErrnoError(10);if(n!==t&&(d=Y.nodePermissions(t,"w")))throw new Y.ErrnoError(d);try{Y.trackingDelegate.willMovePath}catch(t){h("FS.trackingDelegate['willMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}Y.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Y.hashAddNode(c)}try{Y.trackingDelegate.onMovePath}catch(t){h("FS.trackingDelegate['onMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}}},rmdir:function(r){var e=Y.lookupPath(r,{parent:!0}).node,t=q.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!0);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.rmdir)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);try{Y.trackingDelegate.willDeletePath}catch(e){h("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,t),Y.destroyNode(n);try{Y.trackingDelegate.onDeletePath}catch(e){h("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readdir:function(r){var e=Y.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Y.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(r){var e=Y.lookupPath(r,{parent:!0}).node,t=q.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!1);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.unlink)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);try{Y.trackingDelegate.willDeletePath}catch(e){h("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.unlink(e,t),Y.destroyNode(n);try{Y.trackingDelegate.onDeletePath}catch(e){h("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readlink:function(r){var e=Y.lookupPath(r).node;if(!e)throw new Y.ErrnoError(44);if(!e.node_ops.readlink)throw new Y.ErrnoError(28);return V.resolve(Y.getPath(e.parent),e.node_ops.readlink(e))},stat:function(r,e){var t=Y.lookupPath(r,{follow:!e}).node;if(!t)throw new Y.ErrnoError(44);if(!t.node_ops.getattr)throw new Y.ErrnoError(63);return t.node_ops.getattr(t)},lstat:function(r){return Y.stat(r,!0)},chmod:function(r,e,t){var n;if(!(n="string"==typeof r?Y.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,e){Y.chmod(r,e,!0)},fchmod:function(r,e){var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);Y.chmod(t.node,e)},chown:function(r,e,t,n){var o;if(!(o="string"==typeof r?Y.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,e,t){Y.chown(r,e,t,!0)},fchown:function(r,e,t){var n=Y.getStream(r);if(!n)throw new Y.ErrnoError(8);Y.chown(n.node,e,t)},truncate:function(r,e){if(e<0)throw new Y.ErrnoError(28);var t;if(!(t="string"==typeof r?Y.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);if(Y.isDir(t.mode))throw new Y.ErrnoError(31);if(!Y.isFile(t.mode))throw new Y.ErrnoError(28);var n=Y.nodePermissions(t,"w");if(n)throw new Y.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:function(r,e){var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);if(0==(2097155&t.flags))throw new Y.ErrnoError(28);Y.truncate(t.node,e)},utime:function(r,e,t){var n=Y.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:function(r,e,t,n,i){if(""===r)throw new Y.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?Y.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=q.normalize(r);try{a=Y.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Y.ErrnoError(20)}else a=Y.mknod(r,t,0),s=!0;if(!a)throw new Y.ErrnoError(44);if(Y.isChrdev(a.mode)&&(e&=-513),65536&e&&!Y.isDir(a.mode))throw new Y.ErrnoError(54);if(!s){var u=Y.mayOpen(a,e);if(u)throw new Y.ErrnoError(u)}512&e&&Y.truncate(a,0),e&=-131713;var c=Y.createStream({node:a,path:Y.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Y.readFiles||(Y.readFiles={}),r in Y.readFiles||(Y.readFiles[r]=1,h("FS.trackingDelegate error on read file: "+r)));try{Y.trackingDelegate.onOpenFile}catch(e){h("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+e.message)}return c},close:function(r){if(Y.isClosed(r))throw new Y.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Y.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,e,t){if(Y.isClosed(r))throw new Y.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Y.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Y.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:function(r,e,t,n,o){if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(1==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.read)throw new Y.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:function(r,e,t,n,o,i){if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.write)throw new Y.ErrnoError(28);r.seekable&&1024&r.flags&&Y.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);a||(r.position+=s);try{r.path&&Y.trackingDelegate.onWriteToFile&&Y.trackingDelegate.onWriteToFile(r.path)}catch(e){h("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+e.message)}return s},allocate:function(r,e,t){if(Y.isClosed(r))throw new Y.ErrnoError(8);if(e<0||t<=0)throw new Y.ErrnoError(28);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(!Y.isFile(r.node.mode)&&!Y.isDir(r.node.mode))throw new Y.ErrnoError(43);if(!r.stream_ops.allocate)throw new Y.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:function(r,e,t,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Y.ErrnoError(2);if(1==(2097155&r.flags))throw new Y.ErrnoError(2);if(!r.stream_ops.mmap)throw new Y.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:function(r,e,t,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0},munmap:function(r){return 0},ioctl:function(r,e,t){if(!r.stream_ops.ioctl)throw new Y.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:function(r,e){if((e=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=Y.open(r,e.flags),o=Y.stat(r).size,i=new Uint8Array(o);return Y.read(n,i,0,o,0),"utf8"===e.encoding?t=D(i,0):"binary"===e.encoding&&(t=i),Y.close(n),t},writeFile:function(r,e,t){(t=t||{}).flags=t.flags||577;var n=Y.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(F(e)+1),i=P(e,o,0,o.length);Y.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Y.write(n,e,0,e.byteLength,void 0,t.canOwn)}Y.close(n)},cwd:function(){return Y.currentPath},chdir:function(r){var e=Y.lookupPath(r,{follow:!0});if(null===e.node)throw new Y.ErrnoError(44);if(!Y.isDir(e.node.mode))throw new Y.ErrnoError(54);var t=Y.nodePermissions(e.node,"x");if(t)throw new Y.ErrnoError(t);Y.currentPath=e.path},createDefaultDirectories:function(){Y.mkdir("/tmp"),Y.mkdir("/home"),Y.mkdir("/home/web_user")},createDefaultDevices:function(){Y.mkdir("/dev"),Y.registerDevice(Y.makedev(1,3),{read:function(){return 0},write:function(r,e,t,n,o){return n}}),Y.mkdev("/dev/null",Y.makedev(1,3)),J.register(Y.makedev(5,0),J.default_tty_ops),J.register(Y.makedev(6,0),J.default_tty1_ops),Y.mkdev("/dev/tty",Y.makedev(5,0)),Y.mkdev("/dev/tty1",Y.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){I("randomDevice")}}();Y.createDevice("/dev","random",r),Y.createDevice("/dev","urandom",r),Y.mkdir("/dev/shm"),Y.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Y.mkdir("/proc");var r=Y.mkdir("/proc/self");Y.mkdir("/proc/self/fd"),Y.mount({mount:function(){var e=Y.createNode(r,"fd",16895,73);return e.node_ops={lookup:function(r,e){var t=+e,n=Y.getStream(t);if(!n)throw new Y.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?Y.createDevice("/dev","stdin",o.stdin):Y.symlink("/dev/tty","/dev/stdin"),o.stdout?Y.createDevice("/dev","stdout",null,o.stdout):Y.symlink("/dev/tty","/dev/stdout"),o.stderr?Y.createDevice("/dev","stderr",null,o.stderr):Y.symlink("/dev/tty1","/dev/stderr"),Y.open("/dev/stdin",0),Y.open("/dev/stdout",1),Y.open("/dev/stderr",1)},ensureErrnoError:function(){Y.ErrnoError||(Y.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Y.ErrnoError.prototype=new Error,Y.ErrnoError.prototype.constructor=Y.ErrnoError,[44].forEach((function(r){Y.genericErrors[r]=new Y.ErrnoError(r),Y.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:function(){Y.ensureErrnoError(),Y.nameTable=new Array(4096),Y.mount(X,{},"/"),Y.createDefaultDirectories(),Y.createDefaultDevices(),Y.createSpecialDirectories(),Y.filesystems={MEMFS:X}},init:function(r,e,t){Y.init.initialized=!0,Y.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Y.createStandardStreams()},quit:function(){Y.init.initialized=!1;var r=o._fflush;r&&r(0);for(var e=0;e<Y.streams.length;e++){var t=Y.streams[e];t&&Y.close(t)}},getMode:function(r,e){var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:function(r,e){var t=Y.analyzePath(r,e);return t.exists?t.object:null},analyzePath:function(r,e){try{r=(n=Y.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=Y.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=q.basename(r),n=Y.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:function(r,e,t,n){r="string"==typeof r?r:Y.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=q.join2(r,i);try{Y.mkdir(a)}catch(r){}r=a}}return a},createFile:function(r,e,t,n,o){var i=q.join2("string"==typeof r?r:Y.getPath(r),e),a=Y.getMode(n,o);return Y.create(i,a)},createDataFile:function(r,e,t,n,o,i){var a=e?q.join2("string"==typeof r?r:Y.getPath(r),e):r,s=Y.getMode(n,o),u=Y.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}Y.chmod(u,146|s);var d=Y.open(u,577);Y.write(d,t,0,t.length,0,i),Y.close(d),Y.chmod(u,s)}return u},createDevice:function(r,e,t,n){var o=q.join2("string"==typeof r?r:Y.getPath(r),e),i=Y.getMode(!!t,!!n);Y.createDevice.major||(Y.createDevice.major=64);var a=Y.makedev(Y.createDevice.major++,0);return Y.registerDevice(a,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Y.ErrnoError(29)}if(void 0===u&&0===a)throw new Y.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,o,i){for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Y.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Y.mkdev(o,i,a)},forceLoadFile:function(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=or(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Y.ErrnoError(29)}},createLazyFile:function(r,e,t,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.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]}},i.prototype.setDataGetter=function(r){this.getter=r},i.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,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(r){var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(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!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),"undefined"!=typeof Uint8Array&&(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||[]):or(o.responseText||"",!0)}(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=Y.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(r){var e=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(r,e,t,n,o){Y.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(r,e,t,n,i,a,s,c,f,l){Browser.init();var d=e?V.resolve(q.join2(r,e)):r;function p(t){function u(t){l&&l(),c||Y.createDataFile(r,e,t,n,i,f),a&&a(),L()}var p=!1;o.preloadPlugins.forEach((function(r){p||r.canHandle(d)&&(r.handle(t,d,u,(function(){s&&s(),L()})),p=!0)})),p||u(t)}O(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;u(r,(function(t){v(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&L()}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&O()}(t,(function(r){p(r)}),s):p(t)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=function(){p("creating db"),o.result.createObjectStore(Y.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([Y.DB_STORE_NAME],"readwrite"),i=n.objectStore(Y.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((function(r){var e=i.put(Y.analyzePath(r).object.contents,r);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([Y.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(Y.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?e():t()}r.forEach((function(r){var e=a.get(r);e.onsuccess=function(){Y.analyzePath(r).exists&&Y.unlink(r),Y.createDataFile(q.dirname(r),q.basename(r),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=t},o.onerror=t}},K={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=Y.cwd();else{var o=Y.getStream(r);if(!o)throw new Y.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Y.ErrnoError(44);return n}return q.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&q.normalize(e)!==q.normalize(Y.getPath(r.node)))return-54;throw r}return g[t>>2]=n.dev,g[t+4>>2]=0,g[t+8>>2]=n.ino,g[t+12>>2]=n.mode,g[t+16>>2]=n.nlink,g[t+20>>2]=n.uid,g[t+24>>2]=n.gid,g[t+28>>2]=n.rdev,g[t+32>>2]=0,C=[n.size>>>0,(R=n.size,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],g[t+40>>2]=C[0],g[t+44>>2]=C[1],g[t+48>>2]=4096,g[t+52>>2]=n.blocks,g[t+56>>2]=n.atime.getTime()/1e3|0,g[t+60>>2]=0,g[t+64>>2]=n.mtime.getTime()/1e3|0,g[t+68>>2]=0,g[t+72>>2]=n.ctime.getTime()/1e3|0,g[t+76>>2]=0,C=[n.ino>>>0,(R=n.ino,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],g[t+80>>2]=C[0],g[t+84>>2]=C[1],0},doMsync:function(r,e,t,n,o){var i=y.slice(r,r+t);Y.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=q.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Y.readlink(r),o=Math.min(t,F(n)),i=_[e+o];return P(n,y,e,t+1),_[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t;if(!(t=Y.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&Y.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Y.getStream(t);return n&&Y.close(n),Y.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=g[e+8*i>>2],s=g[e+(8*i+4)>>2],u=Y.read(r,_,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=g[e+8*i>>2],s=g[e+(8*i+4)>>2],u=Y.write(r,_,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return K.varargs+=4,g[K.varargs-4>>2]},getStr:function(r){return S(r)},getStreamFromFD:function(r){var e=Y.getStream(r);if(!e)throw new Y.ErrnoError(8);return e},get64:function(r,e){return r}},$=[];function Q(r){try{return d.grow(r-w.byteLength+65535>>>16),x(d.buffer),1}catch(r){}}var Z={};function rr(){if(!rr.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",_:c||"./this.program"};for(var e in Z)void 0===Z[e]?delete r[e]:r[e]=Z[e];var t=[];for(var e in r)t.push(e+"="+r[e]);rr.strings=t}return rr.strings}var er=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},tr=365,nr=146;function or(r,e,t){var n=t>0?t:F(r)+1,o=new Array(n),i=P(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&tr)===tr},set:function(r){r?this.mode|=tr:this.mode&=-366}},write:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-147}},isFolder:{get:function(){return Y.isDir(this.mode)}},isDevice:{get:function(){return Y.isChrdev(this.mode)}}}),Y.FSNode=er,Y.staticInit();var ir={g:function(){return 42},i:function(r,e,t){K.varargs=t;try{var n=K.getStr(r),o=t?K.get():0;return Y.open(n,e,o).fd}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),-r.errno}},b:function(){I()},a:function(r,e,t){var n=function(r,e){var t;for($.length=0,e>>=2;t=y[r++];){var n=t<105;n&&1&e&&e++,$.push(n?E[e++>>1]:g[e]),++e}return $}(e,t);return W[r].apply(null,n)},k:function(r,e,t){y.copyWithin(r,e,e+t)},l:function(r){var e,t,n=y.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),Q(Math.min(o,((e=Math.max(r,a))%(t=65536)>0&&(e+=t-e%t),e))))return!0}return!1},e:function(r,e){try{var t=0;return rr().forEach((function(n,o){var i=e+t;g[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)_[e++>>0]=r.charCodeAt(n);t||(_[e>>0]=0)}(n,i),t+=n.length+1})),0}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},f:function(r,e){try{var t=rr();g[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),g[e>>2]=n,0}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},c:function(r){try{var e=K.getStreamFromFD(r);return Y.close(e),0}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},h:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doReadv(o,e,t);return g[n>>2]=i,0}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},j:function(r,e,t,n,o){try{var i=K.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),C=[i.position>>>0,(R=i.position,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],g[o>>2]=C[0],g[o+4>>2]=C[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},d:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doWritev(o,e,t);return g[n>>2]=i,0}catch(r){return void 0!==Y&&r instanceof Y.ErrnoError||I(r),r.errno}},m:function(r){var e=Date.now();return g[r>>2]=e/1e3|0,g[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ir};function e(r,e){var t,n=r.exports;o.asm=n,x((d=o.asm.n).buffer),b=o.asm.H,t=o.asm.o,T.unshift(t),L()}function t(r){e(r.instance)}function i(e){return(l||"function"!=typeof fetch?Promise.resolve().then((function(){return H(A)})):fetch(A,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+A+"'";return r.arrayBuffer()})).catch((function(){return H(A)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(r){h("failed to asynchronously prepare wasm: "+r),I(r)}))}if(O(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return h("Module.instantiateWasm callback failed with error: "+r),!1}(l||"function"!=typeof WebAssembly.instantiateStreaming||U(A)||"function"!=typeof fetch?i(t):fetch(A,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return h("wasm streaming compile failed: "+r),h("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.o).apply(null,arguments)};var ar,sr=o._emscripten_bind_CExpat_CExpat_0=function(){return(sr=o._emscripten_bind_CExpat_CExpat_0=o.asm.p).apply(null,arguments)},ur=o._emscripten_bind_CExpat_version_0=function(){return(ur=o._emscripten_bind_CExpat_version_0=o.asm.q).apply(null,arguments)},cr=o._emscripten_bind_CExpat_create_0=function(){return(cr=o._emscripten_bind_CExpat_create_0=o.asm.r).apply(null,arguments)},fr=o._emscripten_bind_CExpat_destroy_0=function(){return(fr=o._emscripten_bind_CExpat_destroy_0=o.asm.s).apply(null,arguments)},lr=o._emscripten_bind_CExpat_parse_1=function(){return(lr=o._emscripten_bind_CExpat_parse_1=o.asm.t).apply(null,arguments)},dr=o._emscripten_bind_CExpat_tag_0=function(){return(dr=o._emscripten_bind_CExpat_tag_0=o.asm.u).apply(null,arguments)},pr=o._emscripten_bind_CExpat_attrs_0=function(){return(pr=o._emscripten_bind_CExpat_attrs_0=o.asm.v).apply(null,arguments)},hr=o._emscripten_bind_CExpat_content_0=function(){return(hr=o._emscripten_bind_CExpat_content_0=o.asm.w).apply(null,arguments)},mr=o._emscripten_bind_CExpat_startElement_0=function(){return(mr=o._emscripten_bind_CExpat_startElement_0=o.asm.x).apply(null,arguments)},vr=o._emscripten_bind_CExpat_endElement_0=function(){return(vr=o._emscripten_bind_CExpat_endElement_0=o.asm.y).apply(null,arguments)},wr=o._emscripten_bind_CExpat_characterData_0=function(){return(wr=o._emscripten_bind_CExpat_characterData_0=o.asm.z).apply(null,arguments)},_r=o._emscripten_bind_CExpat___destroy___0=function(){return(_r=o._emscripten_bind_CExpat___destroy___0=o.asm.A).apply(null,arguments)},yr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(yr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.B).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(gr=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.C).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_startElement_0=function(){return(Er=o._emscripten_bind_CExpatJS_startElement_0=o.asm.D).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_endElement_0=function(){return(br=o._emscripten_bind_CExpatJS_endElement_0=o.asm.E).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(kr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.F).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Dr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.G).apply(null,arguments)};function Sr(r){function t(){ar||(ar=!0,o.calledRun=!0,m||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,G(T),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;G(j)}()))}B>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),z.unshift(r);var r;G(z)}(),B>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)},N=function r(){ar||Sr(),ar||(N=r)},o.run=Sr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Pr(){}function Fr(r){return(r||Pr).__cache__}function xr(r,e){var t=Fr(e),n=t[r];return n||((n=Object.create((e||Pr).prototype)).ptr=r,t[r]=n)}Sr(),Pr.prototype=Object.create(Pr.prototype),Pr.prototype.constructor=Pr,Pr.prototype.__class__=Pr,Pr.__cache__={},o.WrapperObject=Pr,o.getCache=Fr,o.wrapPointer=xr,o.castObject=function(r,e){return xr(r.ptr,e)},o.NULL=xr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Fr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Ar={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Ar.needed){for(var r=0;r<Ar.temps.length;r++)o._free(Ar.temps[r]);Ar.temps.length=0,o._free(Ar.buffer),Ar.buffer=0,Ar.size+=Ar.needed,Ar.needed=0}Ar.buffer||(Ar.size+=128,Ar.buffer=o._malloc(Ar.size),v(Ar.buffer)),Ar.pos=0},alloc:function(r,e){v(Ar.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Ar.pos+i>=Ar.size?(v(i>0),Ar.needed+=i,t=o._malloc(i),Ar.temps.push(t)):(t=Ar.buffer+Ar.pos,Ar.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Mr(){this.ptr=sr(),Fr(Mr)[this.ptr]=this}function Rr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Cr(){this.ptr=gr(),Fr(Cr)[this.ptr]=this}return Mr.prototype=Object.create(Pr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.CExpat=Mr,Mr.prototype.version=Mr.prototype.version=function(){var r=this.ptr;return S(ur(r))},Mr.prototype.create=Mr.prototype.create=function(){var r=this.ptr;return!!cr(r)},Mr.prototype.destroy=Mr.prototype.destroy=function(){var r=this.ptr;fr(r)},Mr.prototype.parse=Mr.prototype.parse=function(r){var e=this.ptr;return Ar.prepare(),r=r&&"object"==typeof r?r.ptr:function(r){if("string"==typeof r){var e=or(r),t=Ar.alloc(e,_);return Ar.copy(e,_,t),t}return r}(r),!!lr(e,r)},Mr.prototype.tag=Mr.prototype.tag=function(){var r=this.ptr;return S(dr(r))},Mr.prototype.attrs=Mr.prototype.attrs=function(){var r=this.ptr;return S(pr(r))},Mr.prototype.content=Mr.prototype.content=function(){var r=this.ptr;return S(hr(r))},Mr.prototype.startElement=Mr.prototype.startElement=function(){var r=this.ptr;mr(r)},Mr.prototype.endElement=Mr.prototype.endElement=function(){var r=this.ptr;vr(r)},Mr.prototype.characterData=Mr.prototype.characterData=function(){var r=this.ptr;wr(r)},Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},Rr.prototype=Object.create(Pr.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.VoidPtr=Rr,Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.CExpatJS=Cr,Cr.prototype.startElement=Cr.prototype.startElement=function(){var r=this.ptr;Er(r)},Cr.prototype.endElement=Cr.prototype.endElement=function(){var r=this.ptr;br(r)},Cr.prototype.characterData=Cr.prototype.characterData=function(){var r=this.ptr;kr(r)},Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},r.ready},e.exports=n;var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function a(r,e,t){var n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:function(r,t){return function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return i;var e=i;return i=r,e}()||t||".","/")+"/"+function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,"/")}})),n.__hpcc_promise}!function(){function r(r,e){this.tag=r,this.attrs=e,this._content=""}Object.defineProperty(r.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),r.prototype.appendContent=function(r){this._content+=r}}();var s={exports:{}};!function(r,e){var t=function(){var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c="./this.program",f=function(r,e){throw e},l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf("blob:")?l.substr(0,l.lastIndexOf("/")+1):"",s=function(r){var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},u=function(r,e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var d=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit&&(f=o.quit);var h,m=0;o.wasmBinary&&(h=o.wasmBinary);var v,w=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&I("no native wasm support detected");var _=!1;function y(r,e){r||I("Assertion failed: "+e)}var g,E,b,k,D,S,P,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&F)return F.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function A(r,e){return r?x(b,r,e):""}function M(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function R(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function C(r){g=r,o.HEAP8=E=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=b=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=S=new Float64Array(r)}o.INITIAL_MEMORY;var z=[],T=[],j=[];var B=0,N=null;function O(r){B++,o.monitorRunDependencies&&o.monitorRunDependencies(B)}function L(r){if(B--,o.monitorRunDependencies&&o.monitorRunDependencies(B),0==B&&N){var e=N;N=null,e()}}function I(r){o.onAbort&&o.onAbort(r),p(r+=""),_=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var U,H,W,G;function q(r){return r.startsWith("data:application/octet-stream;base64,")}function V(r){try{if(r==U&&h)return new Uint8Array(h);throw"both async and sync fetching of the wasm failed"}catch(r){I(r)}}q(U="graphvizlib.wasm")||(H=U,U=o.locateFile?o.locateFile(H,l):l+H);var J,X={141888:function(r,e){var t=A(r),n=A(e);nr.createPath("/",$.dirname(t)),nr.writeFile($.join("/",t),n)}};function Y(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?P.get(t)():P.get(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}J=function(){return performance.now()};function K(r){return D[kr()>>2]=r,r}var $={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(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:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=$.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=$.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return $.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return $.normalize(r.join("/"))},join2:function(r,e){return $.normalize(r+"/"+e)}};var Q={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:nr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(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=Q.resolve(r).substr(1),e=Q.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},Z={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Z.ttys[r]={input:[],output:[],ops:e},nr.registerDevice(r,Z.stream_ops)},stream_ops:{open:function(r){var e=Z.ttys[r.node.rdev];if(!e)throw new nr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new nr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new nr.ErrnoError(29)}if(void 0===s&&0===i)throw new nr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new nr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new nr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},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=dr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(x(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(d(x(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(x(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(x(r.output,0)),r.output=[])}}};function rr(r,e){b.fill(0,r,r+e)}function er(r){r=function(r,e){return e||(e=16),Math.ceil(r/e)*e}(r,65536);var e=Fr(65536,r);return e?(rr(e,r),e):0}var tr={ops_table:null,mount:function(r){return tr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(nr.isBlkdev(t)||nr.isFIFO(t))throw new nr.ErrnoError(63);tr.ops_table||(tr.ops_table={dir:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr,lookup:tr.node_ops.lookup,mknod:tr.node_ops.mknod,rename:tr.node_ops.rename,unlink:tr.node_ops.unlink,rmdir:tr.node_ops.rmdir,readdir:tr.node_ops.readdir,symlink:tr.node_ops.symlink},stream:{llseek:tr.stream_ops.llseek}},file:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr},stream:{llseek:tr.stream_ops.llseek,read:tr.stream_ops.read,write:tr.stream_ops.write,allocate:tr.stream_ops.allocate,mmap:tr.stream_ops.mmap,msync:tr.stream_ops.msync}},link:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr,readlink:tr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr},stream:nr.chrdev_stream_ops}});var o=nr.createNode(r,e,t,n);return nr.isDir(o.mode)?(o.node_ops=tr.ops_table.dir.node,o.stream_ops=tr.ops_table.dir.stream,o.contents={}):nr.isFile(o.mode)?(o.node_ops=tr.ops_table.file.node,o.stream_ops=tr.ops_table.file.stream,o.usedBytes=0,o.contents=null):nr.isLink(o.mode)?(o.node_ops=tr.ops_table.link.node,o.stream_ops=tr.ops_table.link.stream):nr.isChrdev(o.mode)&&(o.node_ops=tr.ops_table.chrdev.node,o.stream_ops=tr.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=nr.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,nr.isDir(r.mode)?e.size=4096:nr.isFile(r.mode)?e.size=r.usedBytes:nr.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&&tr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw nr.genericErrors[44]},mknod:function(r,e,t,n){return tr.createNode(r,e,t,n)},rename:function(r,e,t){if(nr.isDir(r.mode)){var n;try{n=nr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new nr.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=nr.lookupNode(r,e);for(var n in t.contents)throw new nr.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=tr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!nr.isLink(r.mode))throw new nr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===E.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(tr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&nr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new nr.ErrnoError(28);return n},allocate:function(r,e,t){tr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new nr.ErrnoError(28);if(!nr.isFile(r.node.mode))throw new nr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==g){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=er(t)))throw new nr.ErrnoError(48);E.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!nr.isFile(r.node.mode))throw new nr.ErrnoError(43);return 2&o||tr.stream_ops.write(r,e,0,n,t,!1),0}}};var nr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(r,e){if(e=e||{},!(r=Q.resolve(nr.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new nr.ErrnoError(32);for(var o=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=nr.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=nr.lookupNode(i,o[s]),a=$.join2(a,o[s]),nr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;nr.isLink(i.mode);){var f=nr.readlink(a);if(a=Q.resolve($.dirname(a),f),i=nr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new nr.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var e;;){if(nr.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:function(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%nr.nameTable.length},hashAddNode:function(r){var e=nr.hashName(r.parent.id,r.name);r.name_next=nr.nameTable[e],nr.nameTable[e]=r},hashRemoveNode:function(r){var e=nr.hashName(r.parent.id,r.name);if(nr.nameTable[e]===r)nr.nameTable[e]=r.name_next;else for(var t=nr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:function(r,e){var t=nr.mayLookup(r);if(t)throw new nr.ErrnoError(t,r);for(var n=nr.hashName(r.id,e),o=nr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return nr.lookup(r,e)},createNode:function(r,e,t,n){var o=new nr.FSNode(r,e,t,n);return nr.hashAddNode(o),o},destroyNode:function(r){nr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var e=nr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:function(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:function(r,e){return nr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var e=nr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:function(r,e){try{nr.lookupNode(r,e);return 20}catch(r){}return nr.nodePermissions(r,"wx")},mayDelete:function(r,e,t){var n;try{n=nr.lookupNode(r,e)}catch(r){return r.errno}var o=nr.nodePermissions(r,"wx");if(o)return o;if(t){if(!nr.isDir(n.mode))return 54;if(nr.isRoot(n)||nr.getPath(n)===nr.cwd())return 10}else if(nr.isDir(n.mode))return 31;return 0},mayOpen:function(r,e){return r?nr.isLink(r.mode)?32:nr.isDir(r.mode)&&("r"!==nr.flagsToPermissionString(e)||512&e)?31:nr.nodePermissions(r,nr.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(r,e){r=r||0,e=e||nr.MAX_OPEN_FDS;for(var t=r;t<=e;t++)if(!nr.streams[t])return t;throw new nr.ErrnoError(33)},getStream:function(r){return nr.streams[r]},createStream:function(r,e,t){nr.FSStream||(nr.FSStream=function(){},nr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new nr.FSStream;for(var o in r)n[o]=r[o];r=n;var i=nr.nextfd(e,t);return r.fd=i,nr.streams[i]=r,r},closeStream:function(r){nr.streams[r]=null},chrdev_stream_ops:{open:function(r){var e=nr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new nr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,e){return r<<8|e},registerDevice:function(r,e){nr.devices[r]={stream_ops:e}},getDevice:function(r){return nr.devices[r]},getMounts:function(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:function(r,e){"function"==typeof r&&(e=r,r=!1),nr.syncFSRequests++,nr.syncFSRequests>1&&p("warning: "+nr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=nr.getMounts(nr.root.mount),n=0;function o(r){return nr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:function(r,e,t){var n,o="/"===t,i=!t;if(o&&nr.root)throw new nr.ErrnoError(10);if(!o&&!i){var a=nr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,nr.isMountpoint(n))throw new nr.ErrnoError(10);if(!nr.isDir(n.mode))throw new nr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?nr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var e=nr.lookupPath(r,{follow_mount:!1});if(!nr.isMountpoint(e.node))throw new nr.ErrnoError(28);var t=e.node,n=t.mounted,o=nr.getMounts(n);Object.keys(nr.nameTable).forEach((function(r){for(var e=nr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&nr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:function(r,e){return r.node_ops.lookup(r,e)},mknod:function(r,e,t){var n=nr.lookupPath(r,{parent:!0}).node,o=$.basename(r);if(!o||"."===o||".."===o)throw new nr.ErrnoError(28);var i=nr.mayCreate(n,o);if(i)throw new nr.ErrnoError(i);if(!n.node_ops.mknod)throw new nr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:function(r,e){return e=void 0!==e?e:438,e&=4095,e|=32768,nr.mknod(r,e,0)},mkdir:function(r,e){return e=void 0!==e?e:511,e&=1023,e|=16384,nr.mknod(r,e,0)},mkdirTree:function(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{nr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,e,t){return void 0===t&&(t=e,e=438),e|=8192,nr.mknod(r,e,t)},symlink:function(r,e){if(!Q.resolve(r))throw new nr.ErrnoError(44);var t=nr.lookupPath(e,{parent:!0}).node;if(!t)throw new nr.ErrnoError(44);var n=$.basename(e),o=nr.mayCreate(t,n);if(o)throw new nr.ErrnoError(o);if(!t.node_ops.symlink)throw new nr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:function(r,e){var t,n,o=$.dirname(r),i=$.dirname(e),a=$.basename(r),s=$.basename(e);if(t=nr.lookupPath(r,{parent:!0}).node,n=nr.lookupPath(e,{parent:!0}).node,!t||!n)throw new nr.ErrnoError(44);if(t.mount!==n.mount)throw new nr.ErrnoError(75);var u,c=nr.lookupNode(t,a),f=Q.relative(r,i);if("."!==f.charAt(0))throw new nr.ErrnoError(28);if("."!==(f=Q.relative(e,o)).charAt(0))throw new nr.ErrnoError(55);try{u=nr.lookupNode(n,s)}catch(r){}if(c!==u){var l=nr.isDir(c.mode),d=nr.mayDelete(t,a,l);if(d)throw new nr.ErrnoError(d);if(d=u?nr.mayDelete(n,s,l):nr.mayCreate(n,s))throw new nr.ErrnoError(d);if(!t.node_ops.rename)throw new nr.ErrnoError(63);if(nr.isMountpoint(c)||u&&nr.isMountpoint(u))throw new nr.ErrnoError(10);if(n!==t&&(d=nr.nodePermissions(t,"w")))throw new nr.ErrnoError(d);try{nr.trackingDelegate.willMovePath}catch(t){p("FS.trackingDelegate['willMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}nr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{nr.hashAddNode(c)}try{nr.trackingDelegate.onMovePath}catch(t){p("FS.trackingDelegate['onMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}}},rmdir:function(r){var e=nr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=nr.lookupNode(e,t),o=nr.mayDelete(e,t,!0);if(o)throw new nr.ErrnoError(o);if(!e.node_ops.rmdir)throw new nr.ErrnoError(63);if(nr.isMountpoint(n))throw new nr.ErrnoError(10);try{nr.trackingDelegate.willDeletePath}catch(e){p("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,t),nr.destroyNode(n);try{nr.trackingDelegate.onDeletePath}catch(e){p("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readdir:function(r){var e=nr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new nr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(r){var e=nr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=nr.lookupNode(e,t),o=nr.mayDelete(e,t,!1);if(o)throw new nr.ErrnoError(o);if(!e.node_ops.unlink)throw new nr.ErrnoError(63);if(nr.isMountpoint(n))throw new nr.ErrnoError(10);try{nr.trackingDelegate.willDeletePath}catch(e){p("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.unlink(e,t),nr.destroyNode(n);try{nr.trackingDelegate.onDeletePath}catch(e){p("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readlink:function(r){var e=nr.lookupPath(r).node;if(!e)throw new nr.ErrnoError(44);if(!e.node_ops.readlink)throw new nr.ErrnoError(28);return Q.resolve(nr.getPath(e.parent),e.node_ops.readlink(e))},stat:function(r,e){var t=nr.lookupPath(r,{follow:!e}).node;if(!t)throw new nr.ErrnoError(44);if(!t.node_ops.getattr)throw new nr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:function(r){return nr.stat(r,!0)},chmod:function(r,e,t){var n;"string"==typeof r?n=nr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new nr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,e){nr.chmod(r,e,!0)},fchmod:function(r,e){var t=nr.getStream(r);if(!t)throw new nr.ErrnoError(8);nr.chmod(t.node,e)},chown:function(r,e,t,n){var o;"string"==typeof r?o=nr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new nr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,e,t){nr.chown(r,e,t,!0)},fchown:function(r,e,t){var n=nr.getStream(r);if(!n)throw new nr.ErrnoError(8);nr.chown(n.node,e,t)},truncate:function(r,e){if(e<0)throw new nr.ErrnoError(28);var t;"string"==typeof r?t=nr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new nr.ErrnoError(63);if(nr.isDir(t.mode))throw new nr.ErrnoError(31);if(!nr.isFile(t.mode))throw new nr.ErrnoError(28);var n=nr.nodePermissions(t,"w");if(n)throw new nr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:function(r,e){var t=nr.getStream(r);if(!t)throw new nr.ErrnoError(8);if(0==(2097155&t.flags))throw new nr.ErrnoError(28);nr.truncate(t.node,e)},utime:function(r,e,t){var n=nr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:function(r,e,t,n,i){if(""===r)throw new nr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?nr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=$.normalize(r);try{a=nr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new nr.ErrnoError(20)}else a=nr.mknod(r,t,0),s=!0;if(!a)throw new nr.ErrnoError(44);if(nr.isChrdev(a.mode)&&(e&=-513),65536&e&&!nr.isDir(a.mode))throw new nr.ErrnoError(54);if(!s){var u=nr.mayOpen(a,e);if(u)throw new nr.ErrnoError(u)}512&e&&nr.truncate(a,0),e&=-131713;var c=nr.createStream({node:a,path:nr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(nr.readFiles||(nr.readFiles={}),r in nr.readFiles||(nr.readFiles[r]=1,p("FS.trackingDelegate error on read file: "+r)));try{nr.trackingDelegate.onOpenFile}catch(e){p("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+e.message)}return c},close:function(r){if(nr.isClosed(r))throw new nr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{nr.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,e,t){if(nr.isClosed(r))throw new nr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new nr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new nr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:function(r,e,t,n,o){if(n<0||o<0)throw new nr.ErrnoError(28);if(nr.isClosed(r))throw new nr.ErrnoError(8);if(1==(2097155&r.flags))throw new nr.ErrnoError(8);if(nr.isDir(r.node.mode))throw new nr.ErrnoError(31);if(!r.stream_ops.read)throw new nr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new nr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:function(r,e,t,n,o,i){if(n<0||o<0)throw new nr.ErrnoError(28);if(nr.isClosed(r))throw new nr.ErrnoError(8);if(0==(2097155&r.flags))throw new nr.ErrnoError(8);if(nr.isDir(r.node.mode))throw new nr.ErrnoError(31);if(!r.stream_ops.write)throw new nr.ErrnoError(28);r.seekable&&1024&r.flags&&nr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new nr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);a||(r.position+=s);try{r.path&&nr.trackingDelegate.onWriteToFile&&nr.trackingDelegate.onWriteToFile(r.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+e.message)}return s},allocate:function(r,e,t){if(nr.isClosed(r))throw new nr.ErrnoError(8);if(e<0||t<=0)throw new nr.ErrnoError(28);if(0==(2097155&r.flags))throw new nr.ErrnoError(8);if(!nr.isFile(r.node.mode)&&!nr.isDir(r.node.mode))throw new nr.ErrnoError(43);if(!r.stream_ops.allocate)throw new nr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:function(r,e,t,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new nr.ErrnoError(2);if(1==(2097155&r.flags))throw new nr.ErrnoError(2);if(!r.stream_ops.mmap)throw new nr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:function(r,e,t,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0},munmap:function(r){return 0},ioctl:function(r,e,t){if(!r.stream_ops.ioctl)throw new nr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:function(r,e){if((e=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=nr.open(r,e.flags),o=nr.stat(r).size,i=new Uint8Array(o);return nr.read(n,i,0,o,0),"utf8"===e.encoding?t=x(i,0):"binary"===e.encoding&&(t=i),nr.close(n),t},writeFile:function(r,e,t){(t=t||{}).flags=t.flags||577;var n=nr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(R(e)+1),i=M(e,o,0,o.length);nr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");nr.write(n,e,0,e.byteLength,void 0,t.canOwn)}nr.close(n)},cwd:function(){return nr.currentPath},chdir:function(r){var e=nr.lookupPath(r,{follow:!0});if(null===e.node)throw new nr.ErrnoError(44);if(!nr.isDir(e.node.mode))throw new nr.ErrnoError(54);var t=nr.nodePermissions(e.node,"x");if(t)throw new nr.ErrnoError(t);nr.currentPath=e.path},createDefaultDirectories:function(){nr.mkdir("/tmp"),nr.mkdir("/home"),nr.mkdir("/home/web_user")},createDefaultDevices:function(){nr.mkdir("/dev"),nr.registerDevice(nr.makedev(1,3),{read:function(){return 0},write:function(r,e,t,n,o){return n}}),nr.mkdev("/dev/null",nr.makedev(1,3)),Z.register(nr.makedev(5,0),Z.default_tty_ops),Z.register(nr.makedev(6,0),Z.default_tty1_ops),nr.mkdev("/dev/tty",nr.makedev(5,0)),nr.mkdev("/dev/tty1",nr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){I("randomDevice")}}();nr.createDevice("/dev","random",r),nr.createDevice("/dev","urandom",r),nr.mkdir("/dev/shm"),nr.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){nr.mkdir("/proc");var r=nr.mkdir("/proc/self");nr.mkdir("/proc/self/fd"),nr.mount({mount:function(){var e=nr.createNode(r,"fd",16895,73);return e.node_ops={lookup:function(r,e){var t=+e,n=nr.getStream(t);if(!n)throw new nr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?nr.createDevice("/dev","stdin",o.stdin):nr.symlink("/dev/tty","/dev/stdin"),o.stdout?nr.createDevice("/dev","stdout",null,o.stdout):nr.symlink("/dev/tty","/dev/stdout"),o.stderr?nr.createDevice("/dev","stderr",null,o.stderr):nr.symlink("/dev/tty1","/dev/stderr"),nr.open("/dev/stdin",0),nr.open("/dev/stdout",1),nr.open("/dev/stderr",1)},ensureErrnoError:function(){nr.ErrnoError||(nr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},nr.ErrnoError.prototype=new Error,nr.ErrnoError.prototype.constructor=nr.ErrnoError,[44].forEach((function(r){nr.genericErrors[r]=new nr.ErrnoError(r),nr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:function(){nr.ensureErrnoError(),nr.nameTable=new Array(4096),nr.mount(tr,{},"/"),nr.createDefaultDirectories(),nr.createDefaultDevices(),nr.createSpecialDirectories(),nr.filesystems={MEMFS:tr}},init:function(r,e,t){nr.init.initialized=!0,nr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,nr.createStandardStreams()},quit:function(){nr.init.initialized=!1;var r=o._fflush;r&&r(0);for(var e=0;e<nr.streams.length;e++){var t=nr.streams[e];t&&nr.close(t)}},getMode:function(r,e){var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:function(r,e){var t=nr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:function(r,e){try{r=(n=nr.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=nr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=$.basename(r),n=nr.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:function(r,e,t,n){r="string"==typeof r?r:nr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=$.join2(r,i);try{nr.mkdir(a)}catch(r){}r=a}}return a},createFile:function(r,e,t,n,o){var i=$.join2("string"==typeof r?r:nr.getPath(r),e),a=nr.getMode(n,o);return nr.create(i,a)},createDataFile:function(r,e,t,n,o,i){var a=e?$.join2("string"==typeof r?r:nr.getPath(r),e):r,s=nr.getMode(n,o),u=nr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}nr.chmod(u,146|s);var d=nr.open(u,577);nr.write(d,t,0,t.length,0,i),nr.close(d),nr.chmod(u,s)}return u},createDevice:function(r,e,t,n){var o=$.join2("string"==typeof r?r:nr.getPath(r),e),i=nr.getMode(!!t,!!n);nr.createDevice.major||(nr.createDevice.major=64);var a=nr.makedev(nr.createDevice.major++,0);return nr.registerDevice(a,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new nr.ErrnoError(29)}if(void 0===u&&0===a)throw new nr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,o,i){for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new nr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),nr.mkdev(o,i,a)},forceLoadFile:function(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=dr(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new nr.ErrnoError(29)}},createLazyFile:function(r,e,t,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.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]}},i.prototype.setDataGetter=function(r){this.getter=r},i.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,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(r){var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(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!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),"undefined"!=typeof Uint8Array&&(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||[]):dr(o.responseText||"",!0)}(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=nr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(r){var e=s.stream_ops[r];u[r]=function(){return nr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(r,e,t,n,o){nr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(r,e,t,n,i,a,s,c,f,l){Browser.init();var d=e?Q.resolve($.join2(r,e)):r;function p(t){function u(t){l&&l(),c||nr.createDataFile(r,e,t,n,i,f),a&&a(),L()}var p=!1;o.preloadPlugins.forEach((function(r){p||r.canHandle(d)&&(r.handle(t,d,u,(function(){s&&s(),L()})),p=!0)})),p||u(t)}O(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;u(r,(function(t){y(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&L()}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&O()}(t,(function(r){p(r)}),s):p(t)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=nr.indexedDB();try{var o=n.open(nr.DB_NAME(),nr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=function(){d("creating db"),o.result.createObjectStore(nr.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([nr.DB_STORE_NAME],"readwrite"),i=n.objectStore(nr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((function(r){var e=i.put(nr.analyzePath(r).object.contents,r);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=nr.indexedDB();try{var o=n.open(nr.DB_NAME(),nr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([nr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(nr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?e():t()}r.forEach((function(r){var e=a.get(r);e.onsuccess=function(){nr.analyzePath(r).exists&&nr.unlink(r),nr.createDataFile($.dirname(r),$.basename(r),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=t},o.onerror=t}},or={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=nr.cwd();else{var o=nr.getStream(r);if(!o)throw new nr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new nr.ErrnoError(44);return n}return $.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&$.normalize(e)!==$.normalize(nr.getPath(r.node)))return-54;throw r}return D[t>>2]=n.dev,D[t+4>>2]=0,D[t+8>>2]=n.ino,D[t+12>>2]=n.mode,D[t+16>>2]=n.nlink,D[t+20>>2]=n.uid,D[t+24>>2]=n.gid,D[t+28>>2]=n.rdev,D[t+32>>2]=0,G=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],D[t+40>>2]=G[0],D[t+44>>2]=G[1],D[t+48>>2]=4096,D[t+52>>2]=n.blocks,D[t+56>>2]=n.atime.getTime()/1e3|0,D[t+60>>2]=0,D[t+64>>2]=n.mtime.getTime()/1e3|0,D[t+68>>2]=0,D[t+72>>2]=n.ctime.getTime()/1e3|0,D[t+76>>2]=0,G=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],D[t+80>>2]=G[0],D[t+84>>2]=G[1],0},doMsync:function(r,e,t,n,o){var i=b.slice(r,r+t);nr.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=$.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),nr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return nr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=nr.readlink(r),o=Math.min(t,R(n)),i=E[e+o];return M(n,b,e,t+1),E[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t;if(!(t=nr.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&nr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=nr.getStream(t);return n&&nr.close(n),nr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=D[e+8*i>>2],s=D[e+(8*i+4)>>2],u=nr.read(r,E,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=D[e+8*i>>2],s=D[e+(8*i+4)>>2],u=nr.write(r,E,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return or.varargs+=4,D[or.varargs-4>>2]},getStr:function(r){return A(r)},getStreamFromFD:function(r){var e=nr.getStream(r);if(!e)throw new nr.ErrnoError(8);return e},get64:function(r,e){return r}};var ir=[];function ar(r){try{return v.grow(r-g.byteLength+65535>>>16),C(v.buffer),1}catch(r){}}var sr={};function ur(){if(!ur.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",_:c||"./this.program"};for(var e in sr)void 0===sr[e]?delete r[e]:r[e]=sr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);ur.strings=t}return ur.strings}var cr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=nr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,lr=146;function dr(r,e,t){var n=t>0?t:R(r)+1,o=new Array(n),i=M(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(cr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(r){r?this.mode|=fr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return nr.isDir(this.mode)}},isDevice:{get:function(){return nr.isChrdev(this.mode)}}}),nr.FSNode=cr,nr.staticInit();var pr={z:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r)return K(28),-1;t=J()}return D[e>>2]=t/1e3|0,D[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},A:function(r,e){try{return r=or.getStr(r),or.doAccess(r,e)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},i:function(r,e,t){or.varargs=t;try{var n=or.getStreamFromFD(r);switch(e){case 0:return(o=or.get())<0?-28:nr.open(n.path,n.flags,0,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=or.get();return n.flags|=o,0;case 12:o=or.get();return k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return K(28),-1}}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},l:function(r,e){try{var t=or.getStreamFromFD(r);return or.doStat(nr.stat,t.path,e)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},e:function(){return 42},B:function(r,e,t){or.varargs=t;try{var n=or.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=or.get();return D[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=or.get();return nr.ioctl(n,e,o);default:I("bad ioctl syscall "+e)}}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},y:function(r,e,t,n,o,i){try{return function(r,e,t,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&r%65536!=0)return-28;if(0!=(32&n)){if(!(a=er(e)))return-48;s=!0}else{var u=nr.getStream(o);if(!u)return-8;var c=nr.mmap(u,r,e,i,t,n);a=c.ptr,s=c.allocated}return or.mappings[a]={malloc:a,len:e,allocated:s,fd:o,prot:t,flags:n,offset:i},a}(r,e,t,n,o,i)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},x:function(r,e){try{return function(r,e){var t=or.mappings[r];if(0===e||!t)return-28;if(e===t.len){var n=nr.getStream(t.fd);n&&2&t.prot&&or.doMsync(r,n,e,t.flags,t.offset),or.mappings[r]=null,t.allocated&&br(t.malloc)}return 0}(r,e)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},f:function(r,e,t){or.varargs=t;try{var n=or.getStr(r),o=t?or.get():0;return nr.open(n,e,o).fd}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},D:function(r,e){try{return r=or.getStr(r),or.doStat(nr.stat,r,e)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},C:function(r){try{return r=or.getStr(r),nr.unlink(r),0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),-r.errno}},t:function(){throw"longjmp"},s:function(){I()},E:function(r,e,t){var n=function(r,e){var t;for(ir.length=0,e>>=2;t=b[r++];){var n=t<105;n&&1&e&&e++,ir.push(n?S[e++>>1]:D[e]),++e}return ir}(e,t);return X[r].apply(null,n)},q:function(r,e,t){b.copyWithin(r,e,e+t)},r:function(r){var e,t,n=b.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),ar(Math.min(o,((e=Math.max(r,a))%(t=65536)>0&&(e+=t-e%t),e))))return!0}return!1},v:function(r,e){try{var t=0;return ur().forEach((function(n,o){var i=e+t;D[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)E[e++>>0]=r.charCodeAt(n);t||(E[e>>0]=0)}(n,i),t+=n.length+1})),0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},w:function(r,e){try{var t=ur();D[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),D[e>>2]=n,0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},a:function(r){!function(r,e){w||(o.onExit&&o.onExit(r),_=!0);f(r,new xr(r))}(r)},d:function(r){try{var e=or.getStreamFromFD(r);return nr.close(e),0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},u:function(r,e){try{var t=or.getStreamFromFD(r),n=t.tty?2:nr.isDir(t.mode)?3:nr.isLink(t.mode)?7:4;return E[e>>0]=n,0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},k:function(r,e,t,n){try{var o=or.getStreamFromFD(r),i=or.doReadv(o,e,t);return D[n>>2]=i,0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},o:function(r,e,t,n,o){try{var i=or.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(nr.llseek(i,a,n),G=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],D[o>>2]=G[0],D[o+4>>2]=G[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},j:function(r,e,t,n){try{var o=or.getStreamFromFD(r),i=or.doWritev(o,e,t);return D[n>>2]=i,0}catch(r){return void 0!==nr&&r instanceof nr.ErrnoError||I(r),r.errno}},c:function(){return m},p:function(r){var e=Date.now();return D[r>>2]=e/1e3|0,D[r+4>>2]=e%1e3*1e3|0,0},m:function(r,e,t,n,o,i,a){var s=Dr();try{return P.get(r)(e,t,n,o,i,a)}catch(r){if(Sr(s),r!==r+0&&"longjmp"!==r)throw r;Pr(1,0)}},n:function(r,e){var t=Dr();try{P.get(r)(e)}catch(r){if(Sr(t),r!==r+0&&"longjmp"!==r)throw r;Pr(1,0)}},b:function(r){m=r},g:function(r){var e=Date.now()/1e3|0;return r&&(D[r>>2]=e),e},h:function(r){return 0!==r&&rr(r,16),0}};!function(){var r={a:pr};function e(r,e){var t,n=r.exports;o.asm=n,C((v=o.asm.F).buffer),P=o.asm.O,t=o.asm.G,T.unshift(t),L()}function t(r){e(r.instance)}function i(e){return(h||"function"!=typeof fetch?Promise.resolve().then((function(){return V(U)})):fetch(U,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+U+"'";return r.arrayBuffer()})).catch((function(){return V(U)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(r){p("failed to asynchronously prepare wasm: "+r),I(r)}))}if(O(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(h||"function"!=typeof WebAssembly.instantiateStreaming||q(U)||"function"!=typeof fetch?i(t):fetch(U,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.G).apply(null,arguments)};var hr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(hr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.H).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(mr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.I).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_version_0=function(){return(vr=o._emscripten_bind_Graphviz_version_0=o.asm.J).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_lastError_0=function(){return(wr=o._emscripten_bind_Graphviz_lastError_0=o.asm.K).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_layout_3=function(){return(_r=o._emscripten_bind_Graphviz_layout_3=o.asm.L).apply(null,arguments)},yr=o._emscripten_bind_Graphviz_createFile_2=function(){return(yr=o._emscripten_bind_Graphviz_createFile_2=o.asm.M).apply(null,arguments)},gr=o._emscripten_bind_Graphviz___destroy___0=function(){return(gr=o._emscripten_bind_Graphviz___destroy___0=o.asm.N).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.P).apply(null,arguments)};var Er,br=o._free=function(){return(br=o._free=o.asm.Q).apply(null,arguments)},kr=o.___errno_location=function(){return(kr=o.___errno_location=o.asm.R).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.S).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.T).apply(null,arguments)},Pr=o._setThrew=function(){return(Pr=o._setThrew=o.asm.U).apply(null,arguments)},Fr=o._memalign=function(){return(Fr=o._memalign=o.asm.V).apply(null,arguments)};function xr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Ar(r){function e(){Er||(Er=!0,o.calledRun=!0,_||(o.noFSInit||nr.init.initialized||nr.init(),nr.ignorePermissions=!1,Y(T),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;Y(j)}()))}B>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),z.unshift(r);var r;Y(z)}(),B>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(N=function r(){Er||Ar(),Er||(N=r)},o.run=Ar,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Mr(){}function Rr(r){return(r||Mr).__cache__}function Cr(r,e){var t=Rr(e),n=t[r];return n||((n=Object.create((e||Mr).prototype)).ptr=r,t[r]=n)}Ar(),Mr.prototype=Object.create(Mr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.WrapperObject=Mr,o.getCache=Rr,o.wrapPointer=Cr,o.castObject=function(r,e){return Cr(r.ptr,e)},o.NULL=Cr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Rr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var zr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(zr.needed){for(var r=0;r<zr.temps.length;r++)o._free(zr.temps[r]);zr.temps.length=0,o._free(zr.buffer),zr.buffer=0,zr.size+=zr.needed,zr.needed=0}zr.buffer||(zr.size+=128,zr.buffer=o._malloc(zr.size),y(zr.buffer)),zr.pos=0},alloc:function(r,e){y(zr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,zr.pos+i>=zr.size?(y(i>0),zr.needed+=i,t=o._malloc(i),zr.temps.push(t)):(t=zr.buffer+zr.pos,zr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Tr(r){if("string"==typeof r){var e=dr(r),t=zr.alloc(e,E);return zr.copy(e,E,t),t}return r}function jr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Br(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=mr(r,e),Rr(Br)[this.ptr]=this}return jr.prototype=Object.create(Mr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.VoidPtr=jr,jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var r=this.ptr;hr(r)},Br.prototype=Object.create(Mr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},o.Graphviz=Br,Br.prototype.version=Br.prototype.version=function(){var r=this.ptr;return A(vr(r))},Br.prototype.lastError=Br.prototype.lastError=function(){var r=this.ptr;return A(wr(r))},Br.prototype.layout=Br.prototype.layout=function(r,e,t){var n=this.ptr;return zr.prepare(),r=r&&"object"==typeof r?r.ptr:Tr(r),e=e&&"object"==typeof e?e.ptr:Tr(e),t=t&&"object"==typeof t?t.ptr:Tr(t),A(_r(n,r,e,t))},Br.prototype.createFile=Br.prototype.createFile=function(r,e){var t=this.ptr;zr.prepare(),r=r&&"object"==typeof r?r.ptr:Tr(r),e=e&&"object"==typeof e?e.ptr:Tr(e),yr(t,r,e)},Br.prototype.__destroy__=Br.prototype.__destroy__=function(){var r=this.ptr;gr(r)},e.ready}}();r.exports=t}(s);var u=s.exports,c=Object.freeze(Object.assign(Object.create(null),s.exports,{default:u})),f=function(){return f=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},f.apply(this,arguments)},l=function(r,e){for(var t=0,n=e.length,o=r.length;t<n;t++,o++)r[o]=e[t];return r};function d(r){return{path:r.path,data:'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="'+r.width+'" height="'+r.height+'"></svg>'}}function p(r,e){var t,n=f({images:[],files:[]},e);l(l([],n.files),(t=n.images,t.map(d))).forEach((function(e){return r.createFile(e.path,e.data)}))}var h={layout:function(r,e,t,n){return void 0===e&&(e="svg"),void 0===t&&(t="dot"),r?a(c,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((function(o){var i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);p(i,n);var a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve("")},circo:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"circo",t)},dot:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"dot",t)},fdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"fdp",t)},sfdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"sfdp",t)},neato:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"neato",t)},osage:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"osage",t)},patchwork:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"patchwork",t)},twopi:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"twopi",t)}},m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var v={exports:{}};
|
|
68
|
-
/*!
|
|
69
|
-
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
70
|
-
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
71
|
-
* @license Licensed under MIT license
|
|
72
|
-
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
73
|
-
* @version v4.2.8+1e68dce6
|
|
74
|
-
*/function w(r){return void 0!==r.children}!function(r,e){r.exports=function(){function r(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}function e(r){return"function"==typeof r}var t=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){g[n]=r,g[n+1]=e,2===(n+=2)&&(i?i(E):k())};function s(r){i=r}function u(r){a=r}var c="undefined"!=typeof window?window:void 0,f=c||{},l=f.MutationObserver||f.WebKitMutationObserver,d="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){return function(){return process.nextTick(E)}}function v(){return void 0!==o?function(){o(E)}:y()}function w(){var r=0,e=new l(E),t=document.createTextNode("");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function _(){var r=new MessageChannel;return r.port1.onmessage=E,function(){return r.port2.postMessage(0)}}function y(){var r=setTimeout;return function(){return r(E,1)}}var g=new Array(1e3);function E(){for(var r=0;r<n;r+=2)(0,g[r])(g[r+1]),g[r]=void 0,g[r+1]=void 0;n=0}function b(){try{var r=Function("return this")().require("vertx");return o=r.runOnLoop||r.runOnContext,v()}catch(r){return y()}}var k=void 0;function D(r,e){var t=this,n=new this.constructor(F);void 0===n[P]&&J(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return W(o,n,i,t._result)}))}else U(t,n,r,e);return n}function S(r){var e=this;if(r&&"object"==typeof r&&r.constructor===e)return r;var t=new e(F);return N(t,r),t}k=d?h():l?w():p?_():void 0===c?b():y();var P=Math.random().toString(36).substring(2);function F(){}var x=void 0,A=1,M=2;function R(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function z(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function T(r,e,t){a((function(r){var n=!1,o=z(t,e,(function(t){n||(n=!0,e!==t?N(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),"Settle: "+(r._label||" unknown promise"));!n&&o&&(n=!0,I(r,o))}),r)}function j(r,e){e._state===A?L(r,e._result):e._state===M?I(r,e._result):U(e,void 0,(function(e){return N(r,e)}),(function(e){return I(r,e)}))}function B(r,t,n){t.constructor===r.constructor&&n===D&&t.constructor.resolve===S?j(r,t):void 0===n?L(r,t):e(n)?T(r,t,n):L(r,t)}function N(e,t){if(e===t)I(e,R());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}B(e,t,n)}else L(e,t)}function O(r){r._onerror&&r._onerror(r._result),H(r)}function L(r,e){r._state===x&&(r._result=e,r._state=A,0!==r._subscribers.length&&a(H,r))}function I(r,e){r._state===x&&(r._state=M,r._result=e,a(O,r))}function U(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+A]=t,o[i+M]=n,0===i&&r._state&&a(H,r)}function H(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?W(t,n,o,i):o(i);r._subscribers.length=0}}function W(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,C())}else a=o;t._state!==x||(i&&u?N(t,a):!1===u?I(t,s):r===A?L(t,a):r===M&&I(t,a))}function G(r,e){try{e((function(e){N(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var q=0;function V(){return q++}function J(r){r[P]=q++,r._state=void 0,r._result=void 0,r._subscribers=[]}function X(){return new Error("Array Methods must be provided an Array")}var Y=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(F),this.promise[P]||J(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,X())}return r.prototype._enumerate=function(r){for(var e=0;this._state===x&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===D&&r._state!==x)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(F);a?I(s,i):B(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===x&&(this._remaining--,r===M?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;U(r,void 0,(function(r){return t._settledAt(A,e,r)}),(function(r){return t._settledAt(M,e,r)}))},r}();function K(r){return new Y(this,r).promise}function $(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError("You must pass an array to race."))}))}function Q(r){var e=new this(F);return I(e,r),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function rr(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var er=function(){function r(e){this[P]=V(),this._result=this._state=void 0,this._subscribers=[],F!==e&&("function"!=typeof e&&Z(),this instanceof r?G(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==m)r=m;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=D,er.all=K,er.race=$,er.resolve=S,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}()}(v),v.exports.polyfill();var _=function(r){var e=[];return r.children.forEach((function(r){w(r)?e.push(_(r)):e.push(y(r))})),"subgraph cluster_".concat(r.id,' {\\nid="').concat(r.id,'";\\nlabel="').concat(r.text,'";\\nmargin=16;\\n').concat(e.join("\\n"),"\\n}")},y=function(r){return"".concat(r.id,' [id="').concat(r.id,'" label="').concat(r.text,'" width=').concat(b(r.width)," height=").concat(b(r.height),"]")},g=function(r){return 96*r/72},E=function(r){return 96*r},b=function(r){return r/96};function k(r){var e=r?r.split(",").map((function(r){return g(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function D(r,e){var t=r.split(",").map((function(r){return g(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function S(r,e,t){return void 0===t&&(t="json"),h[r](e,t).then((function(r){return"json"===t?JSON.parse(r):r}))}function P(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+"/dummy.js"}},e.raw)return S(t.engine,e.raw,"svg");var n={},o=[],i=[],a={},s=[],u=[],c={},f=[],l=[];function d(r,e){w(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return d(r,!1)})),e&&i.push(_(r))):(a[r.id]=r,s.push(r),e&&u.push(y(r)))}return e.items.forEach((function(r){return d(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,f.push(r),l.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,"".concat(e," -> ").concat(t,' [id="').concat(n,'", label="').concat(o,'"]')))})),S(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n".concat(i.join("\\n"),"\\n\\n").concat(l.join("\\n"),"\\n\\n").concat(u.join("\\n"),"\\n}")).then((function(e){var t=k(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=k(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,f=r.height,l=D(u,t),d=E(+c),p=E(+f),{x:l.x,y:l.y,width:d,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,f,l,d,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map((function(r){return D(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:f}}))}self.onmessage=function(r){P.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();`;
|
|
53
|
+
const workerCode = `!function(){"use strict";function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||e)}var e,t,n;e={exports:{}},t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(r){var e,n,o=void 0!==(r=r||{})?r:{};o.ready=new Promise(function(r,t){e=r,n=t});var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c,f="./this.program",l=!0,d="";"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),t&&(d=t),d=0!==d.indexOf("blob:")?d.substr(0,d.lastIndexOf("/")+1):"",s=function(r){var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},u=function(r,e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var p,h,m=o.print||console.log.bind(console),v=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments,o.thisProgram&&(f=o.thisProgram),o.quit,o.wasmBinary&&(p=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&O("no native wasm support detected");var w=!1;function _(r,e){r||O("Assertion failed: "+e)}var y,g,E,b,k,D,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&S)return S.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function F(r,e){return r?P(E,r,e):""}function x(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function A(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function M(r){y=r,o.HEAP8=g=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=b=new Int32Array(r),o.HEAPU8=E=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=k=new Float64Array(r)}o.INITIAL_MEMORY;var R=[],C=[],z=[],j=0,T=null;function B(r){j++,o.monitorRunDependencies&&o.monitorRunDependencies(j)}function N(r){if(j--,o.monitorRunDependencies&&o.monitorRunDependencies(j),0==j&&T){var e=T;T=null,e()}}function O(r){o.onAbort&&o.onAbort(r),v(r+=""),w=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var L,I,U,H,W="data:application/octet-stream;base64,";function q(r){return r.startsWith(W)}function G(r){try{if(r==L&&p)return new Uint8Array(p);if(!c)throw"both async and sync fetching of the wasm failed"}catch(r){O(r)}}q(L="expatlib.wasm")||(I=L,L=o.locateFile?o.locateFile(I,d):d+I);var V={11922:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},12140:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},12352:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function J(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?D.get(t)():D.get(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}var X={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(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:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=X.normalizeArray(r.split("/").filter(function(r){return!!r}),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=X.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=X.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return X.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return X.normalize(r.join("/"))},join2:function(r,e){return X.normalize(r+"/"+e)}},Y={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Q.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=X.normalizeArray(r.split("/").filter(function(r){return!!r}),!e).join("/"))||"."},relative:function(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=Y.resolve(r).substr(1),e=Y.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},K={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){K.ttys[r]={input:[],output:[],ops:e},Q.registerDevice(r,K.stream_ops)},stream_ops:{open:function(r){var e=K.ttys[r.node.rdev];if(!e)throw new Q.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Q.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Q.ErrnoError(29)}if(void 0===s&&0===i)throw new Q.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Q.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Q.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},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=ir(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(m(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(m(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(v(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(v(P(r.output,0)),r.output=[])}}},$={ops_table:null,mount:function(r){return $.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Q.isBlkdev(t)||Q.isFIFO(t))throw new Q.ErrnoError(63);$.ops_table||($.ops_table={dir:{node:{getattr:$.node_ops.getattr,setattr:$.node_ops.setattr,lookup:$.node_ops.lookup,mknod:$.node_ops.mknod,rename:$.node_ops.rename,unlink:$.node_ops.unlink,rmdir:$.node_ops.rmdir,readdir:$.node_ops.readdir,symlink:$.node_ops.symlink},stream:{llseek:$.stream_ops.llseek}},file:{node:{getattr:$.node_ops.getattr,setattr:$.node_ops.setattr},stream:{llseek:$.stream_ops.llseek,read:$.stream_ops.read,write:$.stream_ops.write,allocate:$.stream_ops.allocate,mmap:$.stream_ops.mmap,msync:$.stream_ops.msync}},link:{node:{getattr:$.node_ops.getattr,setattr:$.node_ops.setattr,readlink:$.node_ops.readlink},stream:{}},chrdev:{node:{getattr:$.node_ops.getattr,setattr:$.node_ops.setattr},stream:Q.chrdev_stream_ops}});var o=Q.createNode(r,e,t,n);return Q.isDir(o.mode)?(o.node_ops=$.ops_table.dir.node,o.stream_ops=$.ops_table.dir.stream,o.contents={}):Q.isFile(o.mode)?(o.node_ops=$.ops_table.file.node,o.stream_ops=$.ops_table.file.stream,o.usedBytes=0,o.contents=null):Q.isLink(o.mode)?(o.node_ops=$.ops_table.link.node,o.stream_ops=$.ops_table.link.stream):Q.isChrdev(o.mode)&&(o.node_ops=$.ops_table.chrdev.node,o.stream_ops=$.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=Q.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,Q.isDir(r.mode)?e.size=4096:Q.isFile(r.mode)?e.size=r.usedBytes:Q.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&&$.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Q.genericErrors[44]},mknod:function(r,e,t,n){return $.createNode(r,e,t,n)},rename:function(r,e,t){if(Q.isDir(r.mode)){var n;try{n=Q.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Q.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=Q.lookupNode(r,e);for(var n in t.contents)throw new Q.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=$.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Q.isLink(r.mode))throw new Q.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===g.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if($.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Q.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Q.ErrnoError(28);return n},allocate:function(r,e,t){$.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Q.ErrnoError(28);if(!Q.isFile(r.node.mode))throw new Q.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==y){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void O()))throw new Q.ErrnoError(48);g.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Q.isFile(r.node.mode))throw new Q.ErrnoError(43);return 2&o?0:($.stream_ops.write(r,e,0,n,t,!1),0)}}},Q={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(r,e){if(e=e||{},!(r=Y.resolve(Q.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Q.ErrnoError(32);for(var o=X.normalizeArray(r.split("/").filter(function(r){return!!r}),!1),i=Q.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Q.lookupNode(i,o[s]),a=X.join2(a,o[s]),Q.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Q.isLink(i.mode);){var f=Q.readlink(a);if(a=Y.resolve(X.dirname(a),f),i=Q.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Q.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var e;;){if(Q.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:function(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Q.nameTable.length},hashAddNode:function(r){var e=Q.hashName(r.parent.id,r.name);r.name_next=Q.nameTable[e],Q.nameTable[e]=r},hashRemoveNode:function(r){var e=Q.hashName(r.parent.id,r.name);if(Q.nameTable[e]===r)Q.nameTable[e]=r.name_next;else for(var t=Q.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:function(r,e){var t=Q.mayLookup(r);if(t)throw new Q.ErrnoError(t,r);for(var n=Q.hashName(r.id,e),o=Q.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Q.lookup(r,e)},createNode:function(r,e,t,n){var o=new Q.FSNode(r,e,t,n);return Q.hashAddNode(o),o},destroyNode:function(r){Q.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var e=Q.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:function(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:function(r,e){return Q.ignorePermissions?0:(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var e=Q.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:function(r,e){try{return Q.lookupNode(r,e),20}catch(r){}return Q.nodePermissions(r,"wx")},mayDelete:function(r,e,t){var n;try{n=Q.lookupNode(r,e)}catch(r){return r.errno}var o=Q.nodePermissions(r,"wx");if(o)return o;if(t){if(!Q.isDir(n.mode))return 54;if(Q.isRoot(n)||Q.getPath(n)===Q.cwd())return 10}else if(Q.isDir(n.mode))return 31;return 0},mayOpen:function(r,e){return r?Q.isLink(r.mode)?32:Q.isDir(r.mode)&&("r"!==Q.flagsToPermissionString(e)||512&e)?31:Q.nodePermissions(r,Q.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(r,e){r=r||0,e=e||Q.MAX_OPEN_FDS;for(var t=r;t<=e;t++)if(!Q.streams[t])return t;throw new Q.ErrnoError(33)},getStream:function(r){return Q.streams[r]},createStream:function(r,e,t){Q.FSStream||(Q.FSStream=function(){},Q.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Q.FSStream;for(var o in r)n[o]=r[o];r=n;var i=Q.nextfd(e,t);return r.fd=i,Q.streams[i]=r,r},closeStream:function(r){Q.streams[r]=null},chrdev_stream_ops:{open:function(r){var e=Q.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new Q.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,e){return r<<8|e},registerDevice:function(r,e){Q.devices[r]={stream_ops:e}},getDevice:function(r){return Q.devices[r]},getMounts:function(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:function(r,e){"function"==typeof r&&(e=r,r=!1),Q.syncFSRequests++,Q.syncFSRequests>1&&v("warning: "+Q.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Q.getMounts(Q.root.mount),n=0;function o(r){return Q.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach(function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)})},mount:function(r,e,t){var n,o="/"===t,i=!t;if(o&&Q.root)throw new Q.ErrnoError(10);if(!o&&!i){var a=Q.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Q.isMountpoint(n))throw new Q.ErrnoError(10);if(!Q.isDir(n.mode))throw new Q.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Q.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var e=Q.lookupPath(r,{follow_mount:!1});if(!Q.isMountpoint(e.node))throw new Q.ErrnoError(28);var t=e.node,n=t.mounted,o=Q.getMounts(n);Object.keys(Q.nameTable).forEach(function(r){for(var e=Q.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Q.destroyNode(e),e=t}}),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:function(r,e){return r.node_ops.lookup(r,e)},mknod:function(r,e,t){var n=Q.lookupPath(r,{parent:!0}).node,o=X.basename(r);if(!o||"."===o||".."===o)throw new Q.ErrnoError(28);var i=Q.mayCreate(n,o);if(i)throw new Q.ErrnoError(i);if(!n.node_ops.mknod)throw new Q.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:function(r,e){return e=void 0!==e?e:438,e&=4095,e|=32768,Q.mknod(r,e,0)},mkdir:function(r,e){return e=void 0!==e?e:511,e&=1023,e|=16384,Q.mknod(r,e,0)},mkdirTree:function(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Q.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,e,t){return void 0===t&&(t=e,e=438),e|=8192,Q.mknod(r,e,t)},symlink:function(r,e){if(!Y.resolve(r))throw new Q.ErrnoError(44);var t=Q.lookupPath(e,{parent:!0}).node;if(!t)throw new Q.ErrnoError(44);var n=X.basename(e),o=Q.mayCreate(t,n);if(o)throw new Q.ErrnoError(o);if(!t.node_ops.symlink)throw new Q.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:function(r,e){var t,n,o=X.dirname(r),i=X.dirname(e),a=X.basename(r),s=X.basename(e);if(t=Q.lookupPath(r,{parent:!0}).node,n=Q.lookupPath(e,{parent:!0}).node,!t||!n)throw new Q.ErrnoError(44);if(t.mount!==n.mount)throw new Q.ErrnoError(75);var u,c=Q.lookupNode(t,a),f=Y.relative(r,i);if("."!==f.charAt(0))throw new Q.ErrnoError(28);if("."!==(f=Y.relative(e,o)).charAt(0))throw new Q.ErrnoError(55);try{u=Q.lookupNode(n,s)}catch(r){}if(c!==u){var l=Q.isDir(c.mode),d=Q.mayDelete(t,a,l);if(d)throw new Q.ErrnoError(d);if(d=u?Q.mayDelete(n,s,l):Q.mayCreate(n,s))throw new Q.ErrnoError(d);if(!t.node_ops.rename)throw new Q.ErrnoError(63);if(Q.isMountpoint(c)||u&&Q.isMountpoint(u))throw new Q.ErrnoError(10);if(n!==t&&(d=Q.nodePermissions(t,"w")))throw new Q.ErrnoError(d);try{Q.trackingDelegate.willMovePath}catch(t){v("FS.trackingDelegate['willMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}Q.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Q.hashAddNode(c)}try{Q.trackingDelegate.onMovePath}catch(t){v("FS.trackingDelegate['onMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}}},rmdir:function(r){var e=Q.lookupPath(r,{parent:!0}).node,t=X.basename(r),n=Q.lookupNode(e,t),o=Q.mayDelete(e,t,!0);if(o)throw new Q.ErrnoError(o);if(!e.node_ops.rmdir)throw new Q.ErrnoError(63);if(Q.isMountpoint(n))throw new Q.ErrnoError(10);try{Q.trackingDelegate.willDeletePath}catch(e){v("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,t),Q.destroyNode(n);try{Q.trackingDelegate.onDeletePath}catch(e){v("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readdir:function(r){var e=Q.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Q.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(r){var e=Q.lookupPath(r,{parent:!0}).node,t=X.basename(r),n=Q.lookupNode(e,t),o=Q.mayDelete(e,t,!1);if(o)throw new Q.ErrnoError(o);if(!e.node_ops.unlink)throw new Q.ErrnoError(63);if(Q.isMountpoint(n))throw new Q.ErrnoError(10);try{Q.trackingDelegate.willDeletePath}catch(e){v("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.unlink(e,t),Q.destroyNode(n);try{Q.trackingDelegate.onDeletePath}catch(e){v("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readlink:function(r){var e=Q.lookupPath(r).node;if(!e)throw new Q.ErrnoError(44);if(!e.node_ops.readlink)throw new Q.ErrnoError(28);return Y.resolve(Q.getPath(e.parent),e.node_ops.readlink(e))},stat:function(r,e){var t=Q.lookupPath(r,{follow:!e}).node;if(!t)throw new Q.ErrnoError(44);if(!t.node_ops.getattr)throw new Q.ErrnoError(63);return t.node_ops.getattr(t)},lstat:function(r){return Q.stat(r,!0)},chmod:function(r,e,t){var n;if(!(n="string"==typeof r?Q.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Q.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,e){Q.chmod(r,e,!0)},fchmod:function(r,e){var t=Q.getStream(r);if(!t)throw new Q.ErrnoError(8);Q.chmod(t.node,e)},chown:function(r,e,t,n){var o;if(!(o="string"==typeof r?Q.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Q.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,e,t){Q.chown(r,e,t,!0)},fchown:function(r,e,t){var n=Q.getStream(r);if(!n)throw new Q.ErrnoError(8);Q.chown(n.node,e,t)},truncate:function(r,e){if(e<0)throw new Q.ErrnoError(28);var t;if(!(t="string"==typeof r?Q.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Q.ErrnoError(63);if(Q.isDir(t.mode))throw new Q.ErrnoError(31);if(!Q.isFile(t.mode))throw new Q.ErrnoError(28);var n=Q.nodePermissions(t,"w");if(n)throw new Q.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:function(r,e){var t=Q.getStream(r);if(!t)throw new Q.ErrnoError(8);if(0==(2097155&t.flags))throw new Q.ErrnoError(28);Q.truncate(t.node,e)},utime:function(r,e,t){var n=Q.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:function(r,e,t,n,i){if(""===r)throw new Q.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?Q.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=X.normalize(r);try{a=Q.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Q.ErrnoError(20)}else a=Q.mknod(r,t,0),s=!0;if(!a)throw new Q.ErrnoError(44);if(Q.isChrdev(a.mode)&&(e&=-513),65536&e&&!Q.isDir(a.mode))throw new Q.ErrnoError(54);if(!s){var u=Q.mayOpen(a,e);if(u)throw new Q.ErrnoError(u)}512&e&&Q.truncate(a,0),e&=-131713;var c=Q.createStream({node:a,path:Q.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Q.readFiles||(Q.readFiles={}),r in Q.readFiles||(Q.readFiles[r]=1,v("FS.trackingDelegate error on read file: "+r)));try{Q.trackingDelegate.onOpenFile}catch(e){v("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+e.message)}return c},close:function(r){if(Q.isClosed(r))throw new Q.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Q.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,e,t){if(Q.isClosed(r))throw new Q.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Q.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Q.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:function(r,e,t,n,o){if(n<0||o<0)throw new Q.ErrnoError(28);if(Q.isClosed(r))throw new Q.ErrnoError(8);if(1==(2097155&r.flags))throw new Q.ErrnoError(8);if(Q.isDir(r.node.mode))throw new Q.ErrnoError(31);if(!r.stream_ops.read)throw new Q.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Q.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:function(r,e,t,n,o,i){if(n<0||o<0)throw new Q.ErrnoError(28);if(Q.isClosed(r))throw new Q.ErrnoError(8);if(0==(2097155&r.flags))throw new Q.ErrnoError(8);if(Q.isDir(r.node.mode))throw new Q.ErrnoError(31);if(!r.stream_ops.write)throw new Q.ErrnoError(28);r.seekable&&1024&r.flags&&Q.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Q.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);a||(r.position+=s);try{r.path&&Q.trackingDelegate.onWriteToFile&&Q.trackingDelegate.onWriteToFile(r.path)}catch(e){v("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+e.message)}return s},allocate:function(r,e,t){if(Q.isClosed(r))throw new Q.ErrnoError(8);if(e<0||t<=0)throw new Q.ErrnoError(28);if(0==(2097155&r.flags))throw new Q.ErrnoError(8);if(!Q.isFile(r.node.mode)&&!Q.isDir(r.node.mode))throw new Q.ErrnoError(43);if(!r.stream_ops.allocate)throw new Q.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:function(r,e,t,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Q.ErrnoError(2);if(1==(2097155&r.flags))throw new Q.ErrnoError(2);if(!r.stream_ops.mmap)throw new Q.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:function(r,e,t,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0},munmap:function(r){return 0},ioctl:function(r,e,t){if(!r.stream_ops.ioctl)throw new Q.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:function(r,e){if((e=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=Q.open(r,e.flags),o=Q.stat(r).size,i=new Uint8Array(o);return Q.read(n,i,0,o,0),"utf8"===e.encoding?t=P(i,0):"binary"===e.encoding&&(t=i),Q.close(n),t},writeFile:function(r,e,t){(t=t||{}).flags=t.flags||577;var n=Q.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(A(e)+1),i=x(e,o,0,o.length);Q.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Q.write(n,e,0,e.byteLength,void 0,t.canOwn)}Q.close(n)},cwd:function(){return Q.currentPath},chdir:function(r){var e=Q.lookupPath(r,{follow:!0});if(null===e.node)throw new Q.ErrnoError(44);if(!Q.isDir(e.node.mode))throw new Q.ErrnoError(54);var t=Q.nodePermissions(e.node,"x");if(t)throw new Q.ErrnoError(t);Q.currentPath=e.path},createDefaultDirectories:function(){Q.mkdir("/tmp"),Q.mkdir("/home"),Q.mkdir("/home/web_user")},createDefaultDevices:function(){Q.mkdir("/dev"),Q.registerDevice(Q.makedev(1,3),{read:function(){return 0},write:function(r,e,t,n,o){return n}}),Q.mkdev("/dev/null",Q.makedev(1,3)),K.register(Q.makedev(5,0),K.default_tty_ops),K.register(Q.makedev(6,0),K.default_tty1_ops),Q.mkdev("/dev/tty",Q.makedev(5,0)),Q.mkdev("/dev/tty1",Q.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){O("randomDevice")}}();Q.createDevice("/dev","random",r),Q.createDevice("/dev","urandom",r),Q.mkdir("/dev/shm"),Q.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Q.mkdir("/proc");var r=Q.mkdir("/proc/self");Q.mkdir("/proc/self/fd"),Q.mount({mount:function(){var e=Q.createNode(r,"fd",16895,73);return e.node_ops={lookup:function(r,e){var t=+e,n=Q.getStream(t);if(!n)throw new Q.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?Q.createDevice("/dev","stdin",o.stdin):Q.symlink("/dev/tty","/dev/stdin"),o.stdout?Q.createDevice("/dev","stdout",null,o.stdout):Q.symlink("/dev/tty","/dev/stdout"),o.stderr?Q.createDevice("/dev","stderr",null,o.stderr):Q.symlink("/dev/tty1","/dev/stderr"),Q.open("/dev/stdin",0),Q.open("/dev/stdout",1),Q.open("/dev/stderr",1)},ensureErrnoError:function(){Q.ErrnoError||(Q.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Q.ErrnoError.prototype=new Error,Q.ErrnoError.prototype.constructor=Q.ErrnoError,[44].forEach(function(r){Q.genericErrors[r]=new Q.ErrnoError(r),Q.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:function(){Q.ensureErrnoError(),Q.nameTable=new Array(4096),Q.mount($,{},"/"),Q.createDefaultDirectories(),Q.createDefaultDevices(),Q.createSpecialDirectories(),Q.filesystems={MEMFS:$}},init:function(r,e,t){Q.init.initialized=!0,Q.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Q.createStandardStreams()},quit:function(){Q.init.initialized=!1;var r=o._fflush;r&&r(0);for(var e=0;e<Q.streams.length;e++){var t=Q.streams[e];t&&Q.close(t)}},getMode:function(r,e){var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:function(r,e){var t=Q.analyzePath(r,e);return t.exists?t.object:null},analyzePath:function(r,e){try{r=(n=Q.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=Q.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=X.basename(r),n=Q.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:function(r,e,t,n){r="string"==typeof r?r:Q.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=X.join2(r,i);try{Q.mkdir(a)}catch(r){}r=a}}return a},createFile:function(r,e,t,n,o){var i=X.join2("string"==typeof r?r:Q.getPath(r),e),a=Q.getMode(n,o);return Q.create(i,a)},createDataFile:function(r,e,t,n,o,i){var a=e?X.join2("string"==typeof r?r:Q.getPath(r),e):r,s=Q.getMode(n,o),u=Q.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}Q.chmod(u,146|s);var d=Q.open(u,577);Q.write(d,t,0,t.length,0,i),Q.close(d),Q.chmod(u,s)}return u},createDevice:function(r,e,t,n){var o=X.join2("string"==typeof r?r:Q.getPath(r),e),i=Q.getMode(!!t,!!n);Q.createDevice.major||(Q.createDevice.major=64);var a=Q.makedev(Q.createDevice.major++,0);return Q.registerDevice(a,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Q.ErrnoError(29)}if(void 0===u&&0===a)throw new Q.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,o,i){for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Q.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Q.mkdev(o,i,a)},forceLoadFile:function(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=ir(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Q.ErrnoError(29)}},createLazyFile:function(r,e,t,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.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]}},i.prototype.setDataGetter=function(r){this.getter=r},i.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,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter(function(r){var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(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!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),"undefined"!=typeof Uint8Array&&(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||[]):ir(o.responseText||"",!0)}(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]}),!i&&n||(a=n=1,n=this.getter(0).length,a=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=Q.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach(function(r){var e=s.stream_ops[r];u[r]=function(){return Q.forceLoadFile(s),e.apply(null,arguments)}}),u.read=function(r,e,t,n,o){Q.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(r,e,t,n,i,a,s,c,f,l){Browser.init();var d=e?Y.resolve(X.join2(r,e)):r;function p(t){function u(t){l&&l(),c||Q.createDataFile(r,e,t,n,i,f),a&&a(),N()}var p=!1;o.preloadPlugins.forEach(function(r){p||r.canHandle(d)&&(r.handle(t,d,u,function(){s&&s(),N()}),p=!0)}),p||u(t)}B(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;u(r,function(t){_(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&N()},function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()}),o&&B()}(t,function(r){p(r)},s):p(t)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=Q.indexedDB();try{var o=n.open(Q.DB_NAME(),Q.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=function(){m("creating db"),o.result.createObjectStore(Q.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([Q.DB_STORE_NAME],"readwrite"),i=n.objectStore(Q.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach(function(r){var e=i.put(Q.analyzePath(r).object.contents,r);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){a+ ++s==u&&c()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=Q.indexedDB();try{var o=n.open(Q.DB_NAME(),Q.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([Q.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(Q.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?e():t()}r.forEach(function(r){var e=a.get(r);e.onsuccess=function(){Q.analyzePath(r).exists&&Q.unlink(r),Q.createDataFile(X.dirname(r),X.basename(r),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){s+ ++u==c&&f()}}),i.onerror=t},o.onerror=t}},Z={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=Q.cwd();else{var o=Q.getStream(r);if(!o)throw new Q.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Q.ErrnoError(44);return n}return X.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&X.normalize(e)!==X.normalize(Q.getPath(r.node)))return-54;throw r}return b[t>>2]=n.dev,b[t+4>>2]=0,b[t+8>>2]=n.ino,b[t+12>>2]=n.mode,b[t+16>>2]=n.nlink,b[t+20>>2]=n.uid,b[t+24>>2]=n.gid,b[t+28>>2]=n.rdev,b[t+32>>2]=0,H=[n.size>>>0,(U=n.size,+Math.abs(U)>=1?U>0?(0|Math.min(+Math.floor(U/4294967296),4294967295))>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],b[t+40>>2]=H[0],b[t+44>>2]=H[1],b[t+48>>2]=4096,b[t+52>>2]=n.blocks,b[t+56>>2]=n.atime.getTime()/1e3|0,b[t+60>>2]=0,b[t+64>>2]=n.mtime.getTime()/1e3|0,b[t+68>>2]=0,b[t+72>>2]=n.ctime.getTime()/1e3|0,b[t+76>>2]=0,H=[n.ino>>>0,(U=n.ino,+Math.abs(U)>=1?U>0?(0|Math.min(+Math.floor(U/4294967296),4294967295))>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],b[t+80>>2]=H[0],b[t+84>>2]=H[1],0},doMsync:function(r,e,t,n,o){var i=E.slice(r,r+t);Q.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=X.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Q.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Q.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Q.readlink(r),o=Math.min(t,A(n)),i=g[e+o];return x(n,E,e,t+1),g[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t;if(!(t=Q.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&Q.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Q.getStream(t);return n&&Q.close(n),Q.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=b[e+8*i>>2],s=b[e+(8*i+4)>>2],u=Q.read(r,g,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=b[e+8*i>>2],s=b[e+(8*i+4)>>2],u=Q.write(r,g,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return Z.varargs+=4,b[Z.varargs-4>>2]},getStr:function(r){return F(r)},getStreamFromFD:function(r){var e=Q.getStream(r);if(!e)throw new Q.ErrnoError(8);return e},get64:function(r,e){return r}},rr=[];function er(r){try{return h.grow(r-y.byteLength+65535>>>16),M(h.buffer),1}catch(r){}}var tr={};function nr(){if(!nr.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 tr)void 0===tr[e]?delete r[e]:r[e]=tr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);nr.strings=t}return nr.strings}var or=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Q.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};function ir(r,e,t){var n=t>0?t:A(r)+1,o=new Array(n),i=x(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(or.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Q.isDir(this.mode)}},isDevice:{get:function(){return Q.isChrdev(this.mode)}}}),Q.FSNode=or,Q.staticInit();var ar={g:function(){return 42},i:function(r,e,t){Z.varargs=t;try{var n=Z.getStr(r),o=t?Z.get():0;return Q.open(n,e,o).fd}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),-r.errno}},b:function(){O()},a:function(r,e,t){var n=function(r,e){var t;for(rr.length=0,e>>=2;t=E[r++];){var n=t<105;n&&1&e&&e++,rr.push(n?k[e++>>1]:b[e]),++e}return rr}(e,t);return V[r].apply(null,n)},k:function(r,e,t){E.copyWithin(r,e,e+t)},l:function(r){var e,t,n=E.length;if((r>>>=0)>2147483648)return!1;for(var o=1;o<=4;o*=2){var i=n*(1+.2/o);if(i=Math.min(i,r+100663296),er(Math.min(2147483648,((e=Math.max(r,i))%(t=65536)>0&&(e+=t-e%t),e))))return!0}return!1},e:function(r,e){try{var t=0;return nr().forEach(function(n,o){var i=e+t;b[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)g[e++>>0]=r.charCodeAt(n);t||(g[e>>0]=0)}(n,i),t+=n.length+1}),0}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},f:function(r,e){try{var t=nr();b[r>>2]=t.length;var n=0;return t.forEach(function(r){n+=r.length+1}),b[e>>2]=n,0}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},c:function(r){try{var e=Z.getStreamFromFD(r);return Q.close(e),0}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},h:function(r,e,t,n){try{var o=Z.getStreamFromFD(r),i=Z.doReadv(o,e,t);return b[n>>2]=i,0}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},j:function(r,e,t,n,o){try{var i=Z.getStreamFromFD(r),a=4294967296*t+(e>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(Q.llseek(i,a,n),H=[i.position>>>0,(U=i.position,+Math.abs(U)>=1?U>0?(0|Math.min(+Math.floor(U/4294967296),4294967295))>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],b[o>>2]=H[0],b[o+4>>2]=H[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},d:function(r,e,t,n){try{var o=Z.getStreamFromFD(r),i=Z.doWritev(o,e,t);return b[n>>2]=i,0}catch(r){return void 0!==Q&&r instanceof Q.ErrnoError||O(r),r.errno}},m:function(r){var e=Date.now();return b[r>>2]=e/1e3|0,b[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ar};function e(r,e){var t,n=r.exports;o.asm=n,M((h=o.asm.n).buffer),D=o.asm.H,t=o.asm.o,C.unshift(t),N()}function t(r){e(r.instance)}function i(e){return(!p&&l&&"function"==typeof fetch?fetch(L,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+L+"'";return r.arrayBuffer()}).catch(function(){return G(L)}):Promise.resolve().then(function(){return G(L)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(e,function(r){v("failed to asynchronously prepare wasm: "+r),O(r)})}if(B(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return v("Module.instantiateWasm callback failed with error: "+r),!1}(p||"function"!=typeof WebAssembly.instantiateStreaming||q(L)||"function"!=typeof fetch?i(t):fetch(L,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,r).then(t,function(r){return v("wasm streaming compile failed: "+r),v("falling back to ArrayBuffer instantiation"),i(t)})})).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.o).apply(null,arguments)};var sr,ur=o._emscripten_bind_CExpat_CExpat_0=function(){return(ur=o._emscripten_bind_CExpat_CExpat_0=o.asm.p).apply(null,arguments)},cr=o._emscripten_bind_CExpat_version_0=function(){return(cr=o._emscripten_bind_CExpat_version_0=o.asm.q).apply(null,arguments)},fr=o._emscripten_bind_CExpat_create_0=function(){return(fr=o._emscripten_bind_CExpat_create_0=o.asm.r).apply(null,arguments)},lr=o._emscripten_bind_CExpat_destroy_0=function(){return(lr=o._emscripten_bind_CExpat_destroy_0=o.asm.s).apply(null,arguments)},dr=o._emscripten_bind_CExpat_parse_1=function(){return(dr=o._emscripten_bind_CExpat_parse_1=o.asm.t).apply(null,arguments)},pr=o._emscripten_bind_CExpat_tag_0=function(){return(pr=o._emscripten_bind_CExpat_tag_0=o.asm.u).apply(null,arguments)},hr=o._emscripten_bind_CExpat_attrs_0=function(){return(hr=o._emscripten_bind_CExpat_attrs_0=o.asm.v).apply(null,arguments)},mr=o._emscripten_bind_CExpat_content_0=function(){return(mr=o._emscripten_bind_CExpat_content_0=o.asm.w).apply(null,arguments)},vr=o._emscripten_bind_CExpat_startElement_0=function(){return(vr=o._emscripten_bind_CExpat_startElement_0=o.asm.x).apply(null,arguments)},wr=o._emscripten_bind_CExpat_endElement_0=function(){return(wr=o._emscripten_bind_CExpat_endElement_0=o.asm.y).apply(null,arguments)},_r=o._emscripten_bind_CExpat_characterData_0=function(){return(_r=o._emscripten_bind_CExpat_characterData_0=o.asm.z).apply(null,arguments)},yr=o._emscripten_bind_CExpat___destroy___0=function(){return(yr=o._emscripten_bind_CExpat___destroy___0=o.asm.A).apply(null,arguments)},gr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(gr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.B).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Er=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.C).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_startElement_0=function(){return(br=o._emscripten_bind_CExpatJS_startElement_0=o.asm.D).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_endElement_0=function(){return(kr=o._emscripten_bind_CExpatJS_endElement_0=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(Dr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.F).apply(null,arguments)},Sr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Sr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.G).apply(null,arguments)};function Pr(r){function t(){sr||(sr=!0,o.calledRun=!0,w||(o.noFSInit||Q.init.initialized||Q.init(),Q.ignorePermissions=!1,J(C),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),z.unshift(r);var r;J(z)}()))}j>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),R.unshift(r);var r;J(R)}(),j>0||(o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),t()},1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)},T=function r(){sr||Pr(),sr||(T=r)},o.run=Pr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Fr(){}function xr(r){return(r||Fr).__cache__}function Ar(r,e){var t=xr(e),n=t[r];return n||((n=Object.create((e||Fr).prototype)).ptr=r,t[r]=n)}Pr(),Fr.prototype=Object.create(Fr.prototype),Fr.prototype.constructor=Fr,Fr.prototype.__class__=Fr,Fr.__cache__={},o.WrapperObject=Fr,o.getCache=xr,o.wrapPointer=Ar,o.castObject=function(r,e){return Ar(r.ptr,e)},o.NULL=Ar(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete xr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Mr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Mr.needed){for(var r=0;r<Mr.temps.length;r++)o._free(Mr.temps[r]);Mr.temps.length=0,o._free(Mr.buffer),Mr.buffer=0,Mr.size+=Mr.needed,Mr.needed=0}Mr.buffer||(Mr.size+=128,Mr.buffer=o._malloc(Mr.size),_(Mr.buffer)),Mr.pos=0},alloc:function(r,e){_(Mr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Mr.pos+i>=Mr.size?(_(i>0),Mr.needed+=i,t=o._malloc(i),Mr.temps.push(t)):(t=Mr.buffer+Mr.pos,Mr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Rr(){this.ptr=ur(),xr(Rr)[this.ptr]=this}function Cr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function zr(){this.ptr=Er(),xr(zr)[this.ptr]=this}return Rr.prototype=Object.create(Fr.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.CExpat=Rr,Rr.prototype.version=Rr.prototype.version=function(){var r=this.ptr;return F(cr(r))},Rr.prototype.create=Rr.prototype.create=function(){var r=this.ptr;return!!fr(r)},Rr.prototype.destroy=Rr.prototype.destroy=function(){var r=this.ptr;lr(r)},Rr.prototype.parse=Rr.prototype.parse=function(r){var e=this.ptr;return Mr.prepare(),r=r&&"object"==typeof r?r.ptr:function(r){if("string"==typeof r){var e=ir(r),t=Mr.alloc(e,g);return Mr.copy(e,g,t),t}return r}(r),!!dr(e,r)},Rr.prototype.tag=Rr.prototype.tag=function(){var r=this.ptr;return F(pr(r))},Rr.prototype.attrs=Rr.prototype.attrs=function(){var r=this.ptr;return F(hr(r))},Rr.prototype.content=Rr.prototype.content=function(){var r=this.ptr;return F(mr(r))},Rr.prototype.startElement=Rr.prototype.startElement=function(){var r=this.ptr;vr(r)},Rr.prototype.endElement=Rr.prototype.endElement=function(){var r=this.ptr;wr(r)},Rr.prototype.characterData=Rr.prototype.characterData=function(){var r=this.ptr;_r(r)},Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Fr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.VoidPtr=Cr,Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;gr(r)},zr.prototype=Object.create(Rr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.CExpatJS=zr,zr.prototype.startElement=zr.prototype.startElement=function(){var r=this.ptr;br(r)},zr.prototype.endElement=zr.prototype.endElement=function(){var r=this.ptr;kr(r)},zr.prototype.characterData=zr.prototype.characterData=function(){var r=this.ptr;Dr(r)},zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var r=this.ptr;Sr(r)},r.ready},e.exports=n;var o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function i(r,e,t){var n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:function(r,t){return function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return o;var e=o;return o=r,e}()||t||".","/")+"/"+function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,"/")}})),n.__hpcc_promise}!function(){function r(r,e){this.tag=r,this.attrs=e,this._content=""}Object.defineProperty(r.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),r.prototype.appendContent=function(r){this._content+=r}}();var a={exports:{}};!function(r,e){var t=function(){var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise(function(r,e){t=r,n=e});var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c,f="./this.program",l=function(r,e){throw e},d=!0,p="";"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),r&&(p=r),p=0!==p.indexOf("blob:")?p.substr(0,p.lastIndexOf("/")+1):"",s=function(r){var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},u=function(r,e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var h=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments,o.thisProgram&&(f=o.thisProgram),o.quit&&(l=o.quit);var v=16;var w,_=0,y=function(r){_=r},g=function(){return _};o.wasmBinary&&(w=o.wasmBinary);var E,b=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&V("no native wasm support detected");var k=!1;function D(r,e){r||V("Assertion failed: "+e)}var S,P,F,x,A,M,R,C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&C)return C.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function j(r,e){return r?z(F,r,e):""}function T(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function B(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function N(r){S=r,o.HEAP8=P=new Int8Array(r),o.HEAP16=x=new Int16Array(r),o.HEAP32=A=new Int32Array(r),o.HEAPU8=F=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var O=[],L=[],I=[],U=0;var H=0,W=null;function q(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function G(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&W){var e=W;W=null,e()}}function V(r){o.onAbort&&o.onAbort(r),m(r+=""),k=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var J,X,Y,K,$="data:application/octet-stream;base64,";function Q(r){return r.startsWith($)}function Z(r){try{if(r==J&&w)return new Uint8Array(w);if(!c)throw"both async and sync fetching of the wasm failed"}catch(r){V(r)}}Q(J="graphvizlib.wasm")||(X=J,J=o.locateFile?o.locateFile(X,p):p+X);var rr,er={141888:function(r,e){var t=j(r),n=j(e);lr.createPath("/",ir.dirname(t)),lr.writeFile(ir.join("/",t),n)}};function tr(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?R.get(t)():R.get(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}rr=function(){return performance.now()};var nr=!0;function or(r){return A[Ar()>>2]=r,r}var ir={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(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:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=ir.normalizeArray(r.split("/").filter(function(r){return!!r}),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=ir.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=ir.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return ir.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return ir.normalize(r.join("/"))},join2:function(r,e){return ir.normalize(r+"/"+e)}};var ar={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:lr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=ir.normalizeArray(r.split("/").filter(function(r){return!!r}),!e).join("/"))||"."},relative:function(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=ar.resolve(r).substr(1),e=ar.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},sr={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){sr.ttys[r]={input:[],output:[],ops:e},lr.registerDevice(r,sr.stream_ops)},stream_ops:{open:function(r){var e=sr.ttys[r.node.rdev];if(!e)throw new lr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new lr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new lr.ErrnoError(29)}if(void 0===s&&0===i)throw new lr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new lr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new lr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},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=_r(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(h(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(h(z(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(m(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(m(z(r.output,0)),r.output=[])}}};function ur(r,e){F.fill(0,r,r+e)}function cr(r){r=function(r,e){return e||(e=v),Math.ceil(r/e)*e}(r,65536);var e=zr(65536,r);return e?(ur(e,r),e):0}var fr={ops_table:null,mount:function(r){return fr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(lr.isBlkdev(t)||lr.isFIFO(t))throw new lr.ErrnoError(63);fr.ops_table||(fr.ops_table={dir:{node:{getattr:fr.node_ops.getattr,setattr:fr.node_ops.setattr,lookup:fr.node_ops.lookup,mknod:fr.node_ops.mknod,rename:fr.node_ops.rename,unlink:fr.node_ops.unlink,rmdir:fr.node_ops.rmdir,readdir:fr.node_ops.readdir,symlink:fr.node_ops.symlink},stream:{llseek:fr.stream_ops.llseek}},file:{node:{getattr:fr.node_ops.getattr,setattr:fr.node_ops.setattr},stream:{llseek:fr.stream_ops.llseek,read:fr.stream_ops.read,write:fr.stream_ops.write,allocate:fr.stream_ops.allocate,mmap:fr.stream_ops.mmap,msync:fr.stream_ops.msync}},link:{node:{getattr:fr.node_ops.getattr,setattr:fr.node_ops.setattr,readlink:fr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:fr.node_ops.getattr,setattr:fr.node_ops.setattr},stream:lr.chrdev_stream_ops}});var o=lr.createNode(r,e,t,n);return lr.isDir(o.mode)?(o.node_ops=fr.ops_table.dir.node,o.stream_ops=fr.ops_table.dir.stream,o.contents={}):lr.isFile(o.mode)?(o.node_ops=fr.ops_table.file.node,o.stream_ops=fr.ops_table.file.stream,o.usedBytes=0,o.contents=null):lr.isLink(o.mode)?(o.node_ops=fr.ops_table.link.node,o.stream_ops=fr.ops_table.link.stream):lr.isChrdev(o.mode)&&(o.node_ops=fr.ops_table.chrdev.node,o.stream_ops=fr.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=lr.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,lr.isDir(r.mode)?e.size=4096:lr.isFile(r.mode)?e.size=r.usedBytes:lr.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&&fr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw lr.genericErrors[44]},mknod:function(r,e,t,n){return fr.createNode(r,e,t,n)},rename:function(r,e,t){if(lr.isDir(r.mode)){var n;try{n=lr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new lr.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=lr.lookupNode(r,e);for(var n in t.contents)throw new lr.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=fr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!lr.isLink(r.mode))throw new lr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===P.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(fr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&lr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new lr.ErrnoError(28);return n},allocate:function(r,e,t){fr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new lr.ErrnoError(28);if(!lr.isFile(r.node.mode))throw new lr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==S){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=cr(t)))throw new lr.ErrnoError(48);P.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!lr.isFile(r.node.mode))throw new lr.ErrnoError(43);return 2&o?0:(fr.stream_ops.write(r,e,0,n,t,!1),0)}}};var lr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(r,e){if(e=e||{},!(r=ar.resolve(lr.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new lr.ErrnoError(32);for(var o=ir.normalizeArray(r.split("/").filter(function(r){return!!r}),!1),i=lr.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=lr.lookupNode(i,o[s]),a=ir.join2(a,o[s]),lr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;lr.isLink(i.mode);){var f=lr.readlink(a);if(a=ar.resolve(ir.dirname(a),f),i=lr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new lr.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var e;;){if(lr.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:function(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%lr.nameTable.length},hashAddNode:function(r){var e=lr.hashName(r.parent.id,r.name);r.name_next=lr.nameTable[e],lr.nameTable[e]=r},hashRemoveNode:function(r){var e=lr.hashName(r.parent.id,r.name);if(lr.nameTable[e]===r)lr.nameTable[e]=r.name_next;else for(var t=lr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:function(r,e){var t=lr.mayLookup(r);if(t)throw new lr.ErrnoError(t,r);for(var n=lr.hashName(r.id,e),o=lr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return lr.lookup(r,e)},createNode:function(r,e,t,n){var o=new lr.FSNode(r,e,t,n);return lr.hashAddNode(o),o},destroyNode:function(r){lr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var e=lr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:function(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:function(r,e){return lr.ignorePermissions?0:(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var e=lr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:function(r,e){try{lr.lookupNode(r,e);return 20}catch(r){}return lr.nodePermissions(r,"wx")},mayDelete:function(r,e,t){var n;try{n=lr.lookupNode(r,e)}catch(r){return r.errno}var o=lr.nodePermissions(r,"wx");if(o)return o;if(t){if(!lr.isDir(n.mode))return 54;if(lr.isRoot(n)||lr.getPath(n)===lr.cwd())return 10}else if(lr.isDir(n.mode))return 31;return 0},mayOpen:function(r,e){return r?lr.isLink(r.mode)?32:lr.isDir(r.mode)&&("r"!==lr.flagsToPermissionString(e)||512&e)?31:lr.nodePermissions(r,lr.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(r,e){r=r||0,e=e||lr.MAX_OPEN_FDS;for(var t=r;t<=e;t++)if(!lr.streams[t])return t;throw new lr.ErrnoError(33)},getStream:function(r){return lr.streams[r]},createStream:function(r,e,t){lr.FSStream||(lr.FSStream=function(){},lr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new lr.FSStream;for(var o in r)n[o]=r[o];r=n;var i=lr.nextfd(e,t);return r.fd=i,lr.streams[i]=r,r},closeStream:function(r){lr.streams[r]=null},chrdev_stream_ops:{open:function(r){var e=lr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new lr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,e){return r<<8|e},registerDevice:function(r,e){lr.devices[r]={stream_ops:e}},getDevice:function(r){return lr.devices[r]},getMounts:function(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:function(r,e){"function"==typeof r&&(e=r,r=!1),lr.syncFSRequests++,lr.syncFSRequests>1&&m("warning: "+lr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=lr.getMounts(lr.root.mount),n=0;function o(r){return lr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach(function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)})},mount:function(r,e,t){var n,o="/"===t,i=!t;if(o&&lr.root)throw new lr.ErrnoError(10);if(!o&&!i){var a=lr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,lr.isMountpoint(n))throw new lr.ErrnoError(10);if(!lr.isDir(n.mode))throw new lr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?lr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var e=lr.lookupPath(r,{follow_mount:!1});if(!lr.isMountpoint(e.node))throw new lr.ErrnoError(28);var t=e.node,n=t.mounted,o=lr.getMounts(n);Object.keys(lr.nameTable).forEach(function(r){for(var e=lr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&lr.destroyNode(e),e=t}}),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:function(r,e){return r.node_ops.lookup(r,e)},mknod:function(r,e,t){var n=lr.lookupPath(r,{parent:!0}).node,o=ir.basename(r);if(!o||"."===o||".."===o)throw new lr.ErrnoError(28);var i=lr.mayCreate(n,o);if(i)throw new lr.ErrnoError(i);if(!n.node_ops.mknod)throw new lr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:function(r,e){return e=void 0!==e?e:438,e&=4095,e|=32768,lr.mknod(r,e,0)},mkdir:function(r,e){return e=void 0!==e?e:511,e&=1023,e|=16384,lr.mknod(r,e,0)},mkdirTree:function(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{lr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,e,t){return void 0===t&&(t=e,e=438),e|=8192,lr.mknod(r,e,t)},symlink:function(r,e){if(!ar.resolve(r))throw new lr.ErrnoError(44);var t=lr.lookupPath(e,{parent:!0}).node;if(!t)throw new lr.ErrnoError(44);var n=ir.basename(e),o=lr.mayCreate(t,n);if(o)throw new lr.ErrnoError(o);if(!t.node_ops.symlink)throw new lr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:function(r,e){var t,n,o=ir.dirname(r),i=ir.dirname(e),a=ir.basename(r),s=ir.basename(e);if(t=lr.lookupPath(r,{parent:!0}).node,n=lr.lookupPath(e,{parent:!0}).node,!t||!n)throw new lr.ErrnoError(44);if(t.mount!==n.mount)throw new lr.ErrnoError(75);var u,c=lr.lookupNode(t,a),f=ar.relative(r,i);if("."!==f.charAt(0))throw new lr.ErrnoError(28);if("."!==(f=ar.relative(e,o)).charAt(0))throw new lr.ErrnoError(55);try{u=lr.lookupNode(n,s)}catch(r){}if(c!==u){var l=lr.isDir(c.mode),d=lr.mayDelete(t,a,l);if(d)throw new lr.ErrnoError(d);if(d=u?lr.mayDelete(n,s,l):lr.mayCreate(n,s))throw new lr.ErrnoError(d);if(!t.node_ops.rename)throw new lr.ErrnoError(63);if(lr.isMountpoint(c)||u&&lr.isMountpoint(u))throw new lr.ErrnoError(10);if(n!==t&&(d=lr.nodePermissions(t,"w")))throw new lr.ErrnoError(d);try{lr.trackingDelegate.willMovePath}catch(t){m("FS.trackingDelegate['willMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}lr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{lr.hashAddNode(c)}try{lr.trackingDelegate.onMovePath}catch(t){m("FS.trackingDelegate['onMovePath']('"+r+"', '"+e+"') threw an exception: "+t.message)}}},rmdir:function(r){var e=lr.lookupPath(r,{parent:!0}).node,t=ir.basename(r),n=lr.lookupNode(e,t),o=lr.mayDelete(e,t,!0);if(o)throw new lr.ErrnoError(o);if(!e.node_ops.rmdir)throw new lr.ErrnoError(63);if(lr.isMountpoint(n))throw new lr.ErrnoError(10);try{lr.trackingDelegate.willDeletePath}catch(e){m("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,t),lr.destroyNode(n);try{lr.trackingDelegate.onDeletePath}catch(e){m("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readdir:function(r){var e=lr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new lr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(r){var e=lr.lookupPath(r,{parent:!0}).node,t=ir.basename(r),n=lr.lookupNode(e,t),o=lr.mayDelete(e,t,!1);if(o)throw new lr.ErrnoError(o);if(!e.node_ops.unlink)throw new lr.ErrnoError(63);if(lr.isMountpoint(n))throw new lr.ErrnoError(10);try{lr.trackingDelegate.willDeletePath}catch(e){m("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.unlink(e,t),lr.destroyNode(n);try{lr.trackingDelegate.onDeletePath}catch(e){m("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readlink:function(r){var e=lr.lookupPath(r).node;if(!e)throw new lr.ErrnoError(44);if(!e.node_ops.readlink)throw new lr.ErrnoError(28);return ar.resolve(lr.getPath(e.parent),e.node_ops.readlink(e))},stat:function(r,e){var t=lr.lookupPath(r,{follow:!e}).node;if(!t)throw new lr.ErrnoError(44);if(!t.node_ops.getattr)throw new lr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:function(r){return lr.stat(r,!0)},chmod:function(r,e,t){var n;"string"==typeof r?n=lr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new lr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,e){lr.chmod(r,e,!0)},fchmod:function(r,e){var t=lr.getStream(r);if(!t)throw new lr.ErrnoError(8);lr.chmod(t.node,e)},chown:function(r,e,t,n){var o;"string"==typeof r?o=lr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new lr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,e,t){lr.chown(r,e,t,!0)},fchown:function(r,e,t){var n=lr.getStream(r);if(!n)throw new lr.ErrnoError(8);lr.chown(n.node,e,t)},truncate:function(r,e){if(e<0)throw new lr.ErrnoError(28);var t;"string"==typeof r?t=lr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new lr.ErrnoError(63);if(lr.isDir(t.mode))throw new lr.ErrnoError(31);if(!lr.isFile(t.mode))throw new lr.ErrnoError(28);var n=lr.nodePermissions(t,"w");if(n)throw new lr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:function(r,e){var t=lr.getStream(r);if(!t)throw new lr.ErrnoError(8);if(0==(2097155&t.flags))throw new lr.ErrnoError(28);lr.truncate(t.node,e)},utime:function(r,e,t){var n=lr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:function(r,e,t,n,i){if(""===r)throw new lr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?lr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=ir.normalize(r);try{a=lr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new lr.ErrnoError(20)}else a=lr.mknod(r,t,0),s=!0;if(!a)throw new lr.ErrnoError(44);if(lr.isChrdev(a.mode)&&(e&=-513),65536&e&&!lr.isDir(a.mode))throw new lr.ErrnoError(54);if(!s){var u=lr.mayOpen(a,e);if(u)throw new lr.ErrnoError(u)}512&e&&lr.truncate(a,0),e&=-131713;var c=lr.createStream({node:a,path:lr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(lr.readFiles||(lr.readFiles={}),r in lr.readFiles||(lr.readFiles[r]=1,m("FS.trackingDelegate error on read file: "+r)));try{lr.trackingDelegate.onOpenFile}catch(e){m("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+e.message)}return c},close:function(r){if(lr.isClosed(r))throw new lr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{lr.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,e,t){if(lr.isClosed(r))throw new lr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new lr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new lr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:function(r,e,t,n,o){if(n<0||o<0)throw new lr.ErrnoError(28);if(lr.isClosed(r))throw new lr.ErrnoError(8);if(1==(2097155&r.flags))throw new lr.ErrnoError(8);if(lr.isDir(r.node.mode))throw new lr.ErrnoError(31);if(!r.stream_ops.read)throw new lr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new lr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:function(r,e,t,n,o,i){if(n<0||o<0)throw new lr.ErrnoError(28);if(lr.isClosed(r))throw new lr.ErrnoError(8);if(0==(2097155&r.flags))throw new lr.ErrnoError(8);if(lr.isDir(r.node.mode))throw new lr.ErrnoError(31);if(!r.stream_ops.write)throw new lr.ErrnoError(28);r.seekable&&1024&r.flags&&lr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new lr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);a||(r.position+=s);try{r.path&&lr.trackingDelegate.onWriteToFile&&lr.trackingDelegate.onWriteToFile(r.path)}catch(e){m("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+e.message)}return s},allocate:function(r,e,t){if(lr.isClosed(r))throw new lr.ErrnoError(8);if(e<0||t<=0)throw new lr.ErrnoError(28);if(0==(2097155&r.flags))throw new lr.ErrnoError(8);if(!lr.isFile(r.node.mode)&&!lr.isDir(r.node.mode))throw new lr.ErrnoError(43);if(!r.stream_ops.allocate)throw new lr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:function(r,e,t,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new lr.ErrnoError(2);if(1==(2097155&r.flags))throw new lr.ErrnoError(2);if(!r.stream_ops.mmap)throw new lr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:function(r,e,t,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0},munmap:function(r){return 0},ioctl:function(r,e,t){if(!r.stream_ops.ioctl)throw new lr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:function(r,e){if((e=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=lr.open(r,e.flags),o=lr.stat(r).size,i=new Uint8Array(o);return lr.read(n,i,0,o,0),"utf8"===e.encoding?t=z(i,0):"binary"===e.encoding&&(t=i),lr.close(n),t},writeFile:function(r,e,t){(t=t||{}).flags=t.flags||577;var n=lr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(B(e)+1),i=T(e,o,0,o.length);lr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");lr.write(n,e,0,e.byteLength,void 0,t.canOwn)}lr.close(n)},cwd:function(){return lr.currentPath},chdir:function(r){var e=lr.lookupPath(r,{follow:!0});if(null===e.node)throw new lr.ErrnoError(44);if(!lr.isDir(e.node.mode))throw new lr.ErrnoError(54);var t=lr.nodePermissions(e.node,"x");if(t)throw new lr.ErrnoError(t);lr.currentPath=e.path},createDefaultDirectories:function(){lr.mkdir("/tmp"),lr.mkdir("/home"),lr.mkdir("/home/web_user")},createDefaultDevices:function(){lr.mkdir("/dev"),lr.registerDevice(lr.makedev(1,3),{read:function(){return 0},write:function(r,e,t,n,o){return n}}),lr.mkdev("/dev/null",lr.makedev(1,3)),sr.register(lr.makedev(5,0),sr.default_tty_ops),sr.register(lr.makedev(6,0),sr.default_tty1_ops),lr.mkdev("/dev/tty",lr.makedev(5,0)),lr.mkdev("/dev/tty1",lr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){V("randomDevice")}}();lr.createDevice("/dev","random",r),lr.createDevice("/dev","urandom",r),lr.mkdir("/dev/shm"),lr.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){lr.mkdir("/proc");var r=lr.mkdir("/proc/self");lr.mkdir("/proc/self/fd"),lr.mount({mount:function(){var e=lr.createNode(r,"fd",16895,73);return e.node_ops={lookup:function(r,e){var t=+e,n=lr.getStream(t);if(!n)throw new lr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?lr.createDevice("/dev","stdin",o.stdin):lr.symlink("/dev/tty","/dev/stdin"),o.stdout?lr.createDevice("/dev","stdout",null,o.stdout):lr.symlink("/dev/tty","/dev/stdout"),o.stderr?lr.createDevice("/dev","stderr",null,o.stderr):lr.symlink("/dev/tty1","/dev/stderr"),lr.open("/dev/stdin",0),lr.open("/dev/stdout",1),lr.open("/dev/stderr",1)},ensureErrnoError:function(){lr.ErrnoError||(lr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},lr.ErrnoError.prototype=new Error,lr.ErrnoError.prototype.constructor=lr.ErrnoError,[44].forEach(function(r){lr.genericErrors[r]=new lr.ErrnoError(r),lr.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:function(){lr.ensureErrnoError(),lr.nameTable=new Array(4096),lr.mount(fr,{},"/"),lr.createDefaultDirectories(),lr.createDefaultDevices(),lr.createSpecialDirectories(),lr.filesystems={MEMFS:fr}},init:function(r,e,t){lr.init.initialized=!0,lr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,lr.createStandardStreams()},quit:function(){lr.init.initialized=!1;var r=o._fflush;r&&r(0);for(var e=0;e<lr.streams.length;e++){var t=lr.streams[e];t&&lr.close(t)}},getMode:function(r,e){var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:function(r,e){var t=lr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:function(r,e){try{r=(n=lr.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=lr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=ir.basename(r),n=lr.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:function(r,e,t,n){r="string"==typeof r?r:lr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ir.join2(r,i);try{lr.mkdir(a)}catch(r){}r=a}}return a},createFile:function(r,e,t,n,o){var i=ir.join2("string"==typeof r?r:lr.getPath(r),e),a=lr.getMode(n,o);return lr.create(i,a)},createDataFile:function(r,e,t,n,o,i){var a=e?ir.join2("string"==typeof r?r:lr.getPath(r),e):r,s=lr.getMode(n,o),u=lr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),f=0,l=t.length;f<l;++f)c[f]=t.charCodeAt(f);t=c}lr.chmod(u,146|s);var d=lr.open(u,577);lr.write(d,t,0,t.length,0,i),lr.close(d),lr.chmod(u,s)}return u},createDevice:function(r,e,t,n){var o=ir.join2("string"==typeof r?r:lr.getPath(r),e),i=lr.getMode(!!t,!!n);lr.createDevice.major||(lr.createDevice.major=64);var a=lr.makedev(lr.createDevice.major++,0);return lr.registerDevice(a,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new lr.ErrnoError(29)}if(void 0===u&&0===a)throw new lr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,o,i){for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new lr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),lr.mkdev(o,i,a)},forceLoadFile:function(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=_r(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new lr.ErrnoError(29)}},createLazyFile:function(r,e,t,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.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]}},i.prototype.setDataGetter=function(r){this.getter=r},i.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,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter(function(r){var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(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!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),"undefined"!=typeof Uint8Array&&(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||[]):_r(o.responseText||"",!0)}(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]}),!i&&n||(a=n=1,n=this.getter(0).length,a=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=lr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach(function(r){var e=s.stream_ops[r];u[r]=function(){return lr.forceLoadFile(s),e.apply(null,arguments)}}),u.read=function(r,e,t,n,o){lr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(r,e,t,n,i,a,s,c,f,l){Browser.init();var d=e?ar.resolve(ir.join2(r,e)):r;function p(t){function u(t){l&&l(),c||lr.createDataFile(r,e,t,n,i,f),a&&a(),G()}var p=!1;o.preloadPlugins.forEach(function(r){p||r.canHandle(d)&&(r.handle(t,d,u,function(){s&&s(),G()}),p=!0)}),p||u(t)}q(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;u(r,function(t){D(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&G()},function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()}),o&&q()}(t,function(r){p(r)},s):p(t)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=lr.indexedDB();try{var o=n.open(lr.DB_NAME(),lr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=function(){h("creating db"),o.result.createObjectStore(lr.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([lr.DB_STORE_NAME],"readwrite"),i=n.objectStore(lr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach(function(r){var e=i.put(lr.analyzePath(r).object.contents,r);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){a+ ++s==u&&c()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:function(r,e,t){e=e||function(){},t=t||function(){};var n=lr.indexedDB();try{var o=n.open(lr.DB_NAME(),lr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([lr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(lr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?e():t()}r.forEach(function(r){var e=a.get(r);e.onsuccess=function(){lr.analyzePath(r).exists&&lr.unlink(r),lr.createDataFile(ir.dirname(r),ir.basename(r),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){s+ ++u==c&&f()}}),i.onerror=t},o.onerror=t}},dr={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=lr.cwd();else{var o=lr.getStream(r);if(!o)throw new lr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new lr.ErrnoError(44);return n}return ir.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&ir.normalize(e)!==ir.normalize(lr.getPath(r.node)))return-54;throw r}return A[t>>2]=n.dev,A[t+4>>2]=0,A[t+8>>2]=n.ino,A[t+12>>2]=n.mode,A[t+16>>2]=n.nlink,A[t+20>>2]=n.uid,A[t+24>>2]=n.gid,A[t+28>>2]=n.rdev,A[t+32>>2]=0,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+40>>2]=K[0],A[t+44>>2]=K[1],A[t+48>>2]=4096,A[t+52>>2]=n.blocks,A[t+56>>2]=n.atime.getTime()/1e3|0,A[t+60>>2]=0,A[t+64>>2]=n.mtime.getTime()/1e3|0,A[t+68>>2]=0,A[t+72>>2]=n.ctime.getTime()/1e3|0,A[t+76>>2]=0,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+80>>2]=K[0],A[t+84>>2]=K[1],0},doMsync:function(r,e,t,n,o){var i=F.slice(r,r+t);lr.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=ir.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),lr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return lr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=lr.readlink(r),o=Math.min(t,B(n)),i=P[e+o];return T(n,F,e,t+1),P[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t;if(!(t=lr.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&lr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=lr.getStream(t);return n&&lr.close(n),lr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=A[e+8*i>>2],s=A[e+(8*i+4)>>2],u=lr.read(r,P,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=A[e+8*i>>2],s=A[e+(8*i+4)>>2],u=lr.write(r,P,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return dr.varargs+=4,A[dr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var e=lr.getStream(r);if(!e)throw new lr.ErrnoError(8);return e},get64:function(r,e){return r}};var pr=[];function hr(r){try{return E.grow(r-S.byteLength+65535>>>16),N(E.buffer),1}catch(r){}}var mr={};function vr(){if(!vr.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]);vr.strings=t}return vr.strings}var wr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=lr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};function _r(r,e,t){var n=t>0?t:B(r)+1,o=new Array(n),i=T(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(wr.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return lr.isDir(this.mode)}},isDevice:{get:function(){return lr.isChrdev(this.mode)}}}),lr.FSNode=wr,lr.staticInit();var yr={z:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r||!nr)return or(28),-1;t=rr()}return A[e>>2]=t/1e3|0,A[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},A:function(r,e){try{return r=dr.getStr(r),dr.doAccess(r,e)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},i:function(r,e,t){dr.varargs=t;try{var n=dr.getStreamFromFD(r);switch(e){case 0:return(o=dr.get())<0?-28:lr.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=dr.get();return n.flags|=o,0;case 12:return o=dr.get(),x[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return or(28),-1;default:return-28}}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},l:function(r,e){try{var t=dr.getStreamFromFD(r);return dr.doStat(lr.stat,t.path,e)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},e:function(){return 42},B:function(r,e,t){dr.varargs=t;try{var n=dr.getStreamFromFD(r);switch(e){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=dr.get();return A[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=dr.get(),lr.ioctl(n,e,o);case 21523:case 21524:return n.tty?0:-59;default:V("bad ioctl syscall "+e)}}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},y:function(r,e,t,n,o,i){try{return function(r,e,t,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&r%65536!=0)return-28;if(0!=(32&n)){if(!(a=cr(e)))return-48;s=!0}else{var u=lr.getStream(o);if(!u)return-8;var c=lr.mmap(u,r,e,i,t,n);a=c.ptr,s=c.allocated}return dr.mappings[a]={malloc:a,len:e,allocated:s,fd:o,prot:t,flags:n,offset:i},a}(r,e,t,n,o,i)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},x:function(r,e){try{return function(r,e){var t=dr.mappings[r];if(0===e||!t)return-28;if(e===t.len){var n=lr.getStream(t.fd);n&&2&t.prot&&dr.doMsync(r,n,e,t.flags,t.offset),dr.mappings[r]=null,t.allocated&&xr(t.malloc)}return 0}(r,e)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},f:function(r,e,t){dr.varargs=t;try{var n=dr.getStr(r),o=t?dr.get():0;return lr.open(n,e,o).fd}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},D:function(r,e){try{return r=dr.getStr(r),dr.doStat(lr.stat,r,e)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},C:function(r){try{return r=dr.getStr(r),lr.unlink(r),0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),-r.errno}},t:function(){throw"longjmp"},s:function(){V()},E:function(r,e,t){var n=function(r,e){var t;for(pr.length=0,e>>=2;t=F[r++];){var n=t<105;n&&1&e&&e++,pr.push(n?M[e++>>1]:A[e]),++e}return pr}(e,t);return er[r].apply(null,n)},q:function(r,e,t){F.copyWithin(r,e,e+t)},r:function(r){var e,t,n=F.length;if((r>>>=0)>2147483648)return!1;for(var o=1;o<=4;o*=2){var i=n*(1+.2/o);if(i=Math.min(i,r+100663296),hr(Math.min(2147483648,((e=Math.max(r,i))%(t=65536)>0&&(e+=t-e%t),e))))return!0}return!1},v:function(r,e){try{var t=0;return vr().forEach(function(n,o){var i=e+t;A[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)P[e++>>0]=r.charCodeAt(n);t||(P[e>>0]=0)}(n,i),t+=n.length+1}),0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},w:function(r,e){try{var t=vr();A[r>>2]=t.length;var n=0;return t.forEach(function(r){n+=r.length+1}),A[e>>2]=n,0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},a:function(r){!function(r,e){b||U>0||(o.onExit&&o.onExit(r),k=!0),l(r,new jr(r))}(r)},d:function(r){try{var e=dr.getStreamFromFD(r);return lr.close(e),0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},u:function(r,e){try{var t=dr.getStreamFromFD(r),n=t.tty?2:lr.isDir(t.mode)?3:lr.isLink(t.mode)?7:4;return P[e>>0]=n,0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},k:function(r,e,t,n){try{var o=dr.getStreamFromFD(r),i=dr.doReadv(o,e,t);return A[n>>2]=i,0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},o:function(r,e,t,n,o){try{var i=dr.getStreamFromFD(r),a=4294967296*t+(e>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(lr.llseek(i,a,n),K=[i.position>>>0,(Y=i.position,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[o>>2]=K[0],A[o+4>>2]=K[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},j:function(r,e,t,n){try{var o=dr.getStreamFromFD(r),i=dr.doWritev(o,e,t);return A[n>>2]=i,0}catch(r){return void 0!==lr&&r instanceof lr.ErrnoError||V(r),r.errno}},c:function(){return g()},p:function(r){var e=Date.now();return A[r>>2]=e/1e3|0,A[r+4>>2]=e%1e3*1e3|0,0},m:function(r,e,t,n,o,i,a){var s=Mr();try{return R.get(r)(e,t,n,o,i,a)}catch(r){if(Rr(s),r!==r+0&&"longjmp"!==r)throw r;Cr(1,0)}},n:function(r,e){var t=Mr();try{R.get(r)(e)}catch(r){if(Rr(t),r!==r+0&&"longjmp"!==r)throw r;Cr(1,0)}},b:function(r){y(r)},g:function(r){var e=Date.now()/1e3|0;return r&&(A[r>>2]=e),e},h:function(r){return 0!==r&&ur(r,16),0}};!function(){var r={a:yr};function e(r,e){var t,n=r.exports;o.asm=n,N((E=o.asm.F).buffer),R=o.asm.O,t=o.asm.G,L.unshift(t),G()}function t(r){e(r.instance)}function i(e){return(!w&&d&&"function"==typeof fetch?fetch(J,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+J+"'";return r.arrayBuffer()}).catch(function(){return Z(J)}):Promise.resolve().then(function(){return Z(J)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(e,function(r){m("failed to asynchronously prepare wasm: "+r),V(r)})}if(q(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return m("Module.instantiateWasm callback failed with error: "+r),!1}(w||"function"!=typeof WebAssembly.instantiateStreaming||Q(J)||"function"!=typeof fetch?i(t):fetch(J,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,r).then(t,function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),i(t)})})).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.G).apply(null,arguments)};var gr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(gr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.H).apply(null,arguments)},Er=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(Er=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.I).apply(null,arguments)},br=o._emscripten_bind_Graphviz_version_0=function(){return(br=o._emscripten_bind_Graphviz_version_0=o.asm.J).apply(null,arguments)},kr=o._emscripten_bind_Graphviz_lastError_0=function(){return(kr=o._emscripten_bind_Graphviz_lastError_0=o.asm.K).apply(null,arguments)},Dr=o._emscripten_bind_Graphviz_layout_3=function(){return(Dr=o._emscripten_bind_Graphviz_layout_3=o.asm.L).apply(null,arguments)},Sr=o._emscripten_bind_Graphviz_createFile_2=function(){return(Sr=o._emscripten_bind_Graphviz_createFile_2=o.asm.M).apply(null,arguments)},Pr=o._emscripten_bind_Graphviz___destroy___0=function(){return(Pr=o._emscripten_bind_Graphviz___destroy___0=o.asm.N).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.P).apply(null,arguments)};var Fr,xr=o._free=function(){return(xr=o._free=o.asm.Q).apply(null,arguments)},Ar=o.___errno_location=function(){return(Ar=o.___errno_location=o.asm.R).apply(null,arguments)},Mr=o.stackSave=function(){return(Mr=o.stackSave=o.asm.S).apply(null,arguments)},Rr=o.stackRestore=function(){return(Rr=o.stackRestore=o.asm.T).apply(null,arguments)},Cr=o._setThrew=function(){return(Cr=o._setThrew=o.asm.U).apply(null,arguments)},zr=o._memalign=function(){return(zr=o._memalign=o.asm.V).apply(null,arguments)};function jr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Tr(r){function e(){Fr||(Fr=!0,o.calledRun=!0,k||(o.noFSInit||lr.init.initialized||lr.init(),lr.ignorePermissions=!1,tr(L),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),I.unshift(r);var r;tr(I)}()))}H>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),O.unshift(r);var r;tr(O)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),e()},1)):e()))}if(W=function r(){Fr||Tr(),Fr||(W=r)},o.run=Tr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Br(){}function Nr(r){return(r||Br).__cache__}function Or(r,e){var t=Nr(e),n=t[r];return n||((n=Object.create((e||Br).prototype)).ptr=r,t[r]=n)}Tr(),Br.prototype=Object.create(Br.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},o.WrapperObject=Br,o.getCache=Nr,o.wrapPointer=Or,o.castObject=function(r,e){return Or(r.ptr,e)},o.NULL=Or(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Nr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Lr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Lr.needed){for(var r=0;r<Lr.temps.length;r++)o._free(Lr.temps[r]);Lr.temps.length=0,o._free(Lr.buffer),Lr.buffer=0,Lr.size+=Lr.needed,Lr.needed=0}Lr.buffer||(Lr.size+=128,Lr.buffer=o._malloc(Lr.size),D(Lr.buffer)),Lr.pos=0},alloc:function(r,e){D(Lr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Lr.pos+i>=Lr.size?(D(i>0),Lr.needed+=i,t=o._malloc(i),Lr.temps.push(t)):(t=Lr.buffer+Lr.pos,Lr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Ir(r){if("string"==typeof r){var e=_r(r),t=Lr.alloc(e,P);return Lr.copy(e,P,t),t}return r}function Ur(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Hr(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Er(r,e),Nr(Hr)[this.ptr]=this}return Ur.prototype=Object.create(Br.prototype),Ur.prototype.constructor=Ur,Ur.prototype.__class__=Ur,Ur.__cache__={},o.VoidPtr=Ur,Ur.prototype.__destroy__=Ur.prototype.__destroy__=function(){var r=this.ptr;gr(r)},Hr.prototype=Object.create(Br.prototype),Hr.prototype.constructor=Hr,Hr.prototype.__class__=Hr,Hr.__cache__={},o.Graphviz=Hr,Hr.prototype.version=Hr.prototype.version=function(){var r=this.ptr;return j(br(r))},Hr.prototype.lastError=Hr.prototype.lastError=function(){var r=this.ptr;return j(kr(r))},Hr.prototype.layout=Hr.prototype.layout=function(r,e,t){var n=this.ptr;return Lr.prepare(),r=r&&"object"==typeof r?r.ptr:Ir(r),e=e&&"object"==typeof e?e.ptr:Ir(e),t=t&&"object"==typeof t?t.ptr:Ir(t),j(Dr(n,r,e,t))},Hr.prototype.createFile=Hr.prototype.createFile=function(r,e){var t=this.ptr;Lr.prepare(),r=r&&"object"==typeof r?r.ptr:Ir(r),e=e&&"object"==typeof e?e.ptr:Ir(e),Sr(t,r,e)},Hr.prototype.__destroy__=Hr.prototype.__destroy__=function(){var r=this.ptr;Pr(r)},e.ready}}();r.exports=t}(a);var s=a.exports,u=Object.freeze(Object.assign(Object.create(null),a.exports,{default:s})),c=function(){return(c=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}).apply(this,arguments)},f=function(r,e){for(var t=0,n=e.length,o=r.length;t<n;t++,o++)r[o]=e[t];return r};function l(r){return{path:r.path,data:'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="'+r.width+'" height="'+r.height+'"></svg>'}}function d(r,e){var t,n=c({images:[],files:[]},e);f(f([],n.files),(t=n.images,t.map(l))).forEach(function(e){return r.createFile(e.path,e.data)})}var p={layout:function(r,e,t,n){return void 0===e&&(e="svg"),void 0===t&&(t="dot"),r?i(u,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then(function(o){var i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);d(i,n);var a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a}):Promise.resolve("")},circo:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"circo",t)},dot:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"dot",t)},fdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"fdp",t)},sfdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"sfdp",t)},neato:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"neato",t)},osage:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"osage",t)},patchwork:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"patchwork",t)},twopi:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"twopi",t)}},h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(function(r,e,t){return r(t={path:e,exports:{},require:function(r,e){return m(null==e&&t.path)}},t.exports),t.exports})(function(r,e){r.exports=function(){function r(r){return"function"==typeof r}var e=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},t=0,n=void 0,o=void 0,i=function(r,e){d[t]=r,d[t+1]=e,2===(t+=2)&&(o?o(p):y())},a="undefined"!=typeof window?window:void 0,s=a||{},u=s.MutationObserver||s.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function l(){var r=setTimeout;return function(){return r(p,1)}}var d=new Array(1e3);function p(){for(var r=0;r<t;r+=2){var e=d[r],n=d[r+1];e(n),d[r]=void 0,d[r+1]=void 0}t=0}var m,v,w,_,y=void 0;function g(r,e){var t=this,n=new this.constructor(k);void 0===n[b]&&B(n);var o=t._state;if(o){var a=arguments[o-1];i(function(){return j(o,n,a,t._result)})}else C(t,n,r,e);return n}function E(r){if(r&&"object"==typeof r&&r.constructor===this)return r;var e=new this(k);return x(e,r),e}c?y=function(){return process.nextTick(p)}:u?(v=0,w=new u(p),_=document.createTextNode(""),w.observe(_,{characterData:!0}),y=function(){_.data=v=++v%2}):f?((m=new MessageChannel).port1.onmessage=p,y=function(){return m.port2.postMessage(0)}):y=void 0===a?function(){try{var r=Function("return this")().require("vertx");return void 0!==(n=r.runOnLoop||r.runOnContext)?function(){n(p)}:l()}catch(r){return l()}}():l();var b=Math.random().toString(36).substring(2);function k(){}var D=void 0,S=1,P=2;function F(e,t,n){t.constructor===e.constructor&&n===g&&t.constructor.resolve===E?function(r,e){e._state===S?M(r,e._result):e._state===P?R(r,e._result):C(e,void 0,function(e){return x(r,e)},function(e){return R(r,e)})}(e,t):void 0===n?M(e,t):r(n)?function(r,e,t){i(function(r){var n=!1,o=function(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}(t,e,function(t){n||(n=!0,e!==t?x(r,t):M(r,t))},function(e){n||(n=!0,R(r,e))},r._label);!n&&o&&(n=!0,R(r,o))},r)}(e,t,n):M(e,t)}function x(r,e){if(r===e)R(r,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(n=e),null===n||"object"!==o&&"function"!==o)M(r,e);else{var t=void 0;try{t=e.then}catch(e){return void R(r,e)}F(r,e,t)}var n,o}function A(r){r._onerror&&r._onerror(r._result),z(r)}function M(r,e){r._state===D&&(r._result=e,r._state=S,0!==r._subscribers.length&&i(z,r))}function R(r,e){r._state===D&&(r._state=P,r._result=e,i(A,r))}function C(r,e,t,n){var o=r._subscribers,a=o.length;r._onerror=null,o[a]=e,o[a+S]=t,o[a+P]=n,0===a&&r._state&&i(z,r)}function z(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?j(t,n,o,i):o(i);r._subscribers.length=0}}function j(e,t,n,o){var i=r(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void R(t,new TypeError("A promises callback cannot return that same promise."))}else a=o;t._state!==D||(i&&u?x(t,a):!1===u?R(t,s):e===S?M(t,a):e===P&&R(t,a))}var T=0;function B(r){r[b]=T++,r._state=void 0,r._result=void 0,r._subscribers=[]}var N=function(){function r(r,t){this._instanceConstructor=r,this.promise=new r(k),this.promise[b]||B(this.promise),e(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&M(this.promise,this._result))):R(this.promise,new Error("Array Methods must be provided an Array"))}return r.prototype._enumerate=function(r){for(var e=0;this._state===D&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===E){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===g&&r._state!==D)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===O){var s=new t(k);a?R(s,i):F(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t(function(e){return e(r)}),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===D&&(this._remaining--,r===P?R(n,t):this._result[e]=t),0===this._remaining&&M(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;C(r,void 0,function(r){return t._settledAt(S,e,r)},function(r){return t._settledAt(P,e,r)})},r}(),O=function(){function e(r){this[b]=T++,this._result=this._state=void 0,this._subscribers=[],k!==r&&("function"!=typeof r&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(r,e){try{e(function(e){x(r,e)},function(e){R(r,e)})}catch(e){R(r,e)}}(this,r):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(r){return this.then(null,r)},e.prototype.finally=function(e){var t=this.constructor;return r(e)?this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})}):this.then(e,e)},e}();return O.prototype.then=g,O.all=function(r){return new N(this,r).promise},O.race=function(r){var t=this;return e(r)?new t(function(e,n){for(var o=r.length,i=0;i<o;i++)t.resolve(r[i]).then(e,n)}):new t(function(r,e){return e(new TypeError("You must pass an array to race."))})},O.resolve=E,O.reject=function(r){var e=new this(k);return R(e,r),e},O._setScheduler=function(r){o=r},O._setAsap=function(r){i=r},O._asap=i,O.polyfill=function(){var r=void 0;if(void 0!==h)r=h;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=O},O.Promise=O,O}()}).polyfill();function v(r){return void 0!==r.children}var w=function(r){var e=[];return r.children.forEach(function(r){v(r)?e.push(w(r)):e.push(_(r))}),"subgraph cluster_"+r.id+' {\\nid="'+r.id+'";\\nlabel="'+r.text+'";\\nmargin=16;\\n'+e.join("\\n")+"\\n}"},_=function(r){return r.id+' [id="'+r.id+'" label="'+r.text+'" width='+b(r.width)+" height="+b(r.height)+"]"},y=function(r,e,t,n){return r+" -> "+e+' [id="'+t+'", label="'+n+'"]'},g=function(r){return 96*r/72},E=function(r){return 96*r},b=function(r){return r/96};function k(r){var e=r?r.split(",").map(function(r){return g(+r)}):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function D(r,e){var t=r.split(",").map(function(r){return g(+r)}),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function S(r,e,t){return void 0===t&&(t="json"),p[r](e,t).then(function(r){return"json"===t?JSON.parse(r):r})}function P(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+"/dummy.js"}},e.raw)return S(t.engine,e.raw,"svg");var n={},o=[],i=[],a={},s=[],u=[],c={},f=[],l=[];return e.items.forEach(function(r){return function r(e,t){v(e)?(n[e.id]=e,o.push(e),e.children.forEach(function(e){return r(e,!1)}),t&&i.push(w(e))):(a[e.id]=e,s.push(e),t&&u.push(_(e)))}(r,!0)}),e.links.forEach(function(r){c[r.id]=r,f.push(r),l.push(y(r.source.id,r.target.id,r.id,r.text))}),S(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n"+i.join("\\n")+"\\n\\n"+l.join("\\n")+"\\n\\n"+u.join("\\n")+"\\n}").then(function(e){var t=k(e.bb);return e.objects&&e.objects.forEach(function(r){if(r.nodes){var e=function(r,e){var t=k(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,f=r.height,l=D(u,t),d=E(+c),p=E(+f),{x:l.x,y:l.y,width:d,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,f,l,d,p}),e.edges&&e.edges.forEach(function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map(function(r){return D(r,t)}).map(function(r){return[r.x-t.width/2,r.y-t.height/2]}),o=n.shift();return r(r([],n),[o])}return[]}(e,t))}),{clusters:o,nodes:s,links:f}})}self.onmessage=function(r){P.apply(void 0,r.data).then(function(r){self.postMessage(r)})}}();`;
|
|
75
54
|
|
|
76
55
|
const workerBlob = new Blob([workerCode], { type: "application/javascript" });
|
|
77
56
|
const workerUrl = URL.createObjectURL(workerBlob);
|