jessibuca-pro-face-detector-demo.js 76.4 KB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),i=n(t),a=n(r);function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function u(e,t){return e(t={exports:{}},t.exports),t.exports}var c=s(u((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=u((function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),l=s(f),d=u((function(e){var t=f.default;e.exports=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));s(d);var p=u((function(e){var t=f.default;e.exports=function(e){var r=d(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}));s(p);var h=s(u((function(e){function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),m=u((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));s(m);var v=s(u((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports}))),y=u((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));s(y);var w=u((function(e){var t=f.default;e.exports=function(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return y(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),g=s(w),_=u((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),E=s(_),b=u((function(e,t){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),function(t){var n,s;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(e,t){n=e,s=t})),(t=void 0!==t?t:{}).locateFile=function(e){return"jessibuca-pro-face-detector-decoder.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_FACE_DETECTOR_WASM_URL&&""!=JESSIBUCA_PRO_FACE_DETECTOR_WASM_URL?JESSIBUCA_PRO_FACE_DETECTOR_WASM_URL:e};var u,c,f,d,p,h,m=Object.assign({},t),v="./this.program",y="object"==("undefined"==typeof window?"undefined":l(window)),w="function"==typeof importScripts,g="object"==("undefined"==typeof process?"undefined":l(process))&&"object"==l(process.versions)&&"string"==typeof process.versions.node,_="";g?(_=w?o.default.dirname(_)+"/":__dirname+"/",h=function(){p||(d=i.default,p=o.default)},u=function(e,t){return h(),e=p.normalize(e),d.readFileSync(e,t?void 0:"utf8")},f=function(e){var t=u(e,!0);return t.buffer||(t=new Uint8Array(t)),t},c=function(e,t,r){h(),e=p.normalize(e),d.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof re))throw e})),process.on("unhandledRejection",(function(e){throw e})),t.inspect=function(){return"[Emscripten Module object]"}):(y||w)&&(w?_=self.location.href:"undefined"!=typeof document&&document.currentScript&&(_=document.currentScript.src),r&&(_=r),_=0!==_.indexOf("blob:")?_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},w&&(f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),c=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var E,b,k=t.print||console.log.bind(console),P=t.printErr||console.warn.bind(console);Object.assign(t,m),m=null,t.arguments&&t.arguments,t.thisProgram&&(v=t.thisProgram),t.quit&&t.quit,t.wasmBinary&&(E=t.wasmBinary),t.noExitRuntime,"object"!=("undefined"==typeof WebAssembly?"undefined":l(WebAssembly))&&Z("no native wasm support detected");var S=!1;function D(e,t){e||Z(t)}var T,F,C,A,x,M,$,j,O,R,B="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&B)return B.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<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 N(e,t){return e?z(C,e,t):""}function W(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function I(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t}t.INITIAL_MEMORY;var U,L,H,q=[],V=[],Y=[],X=0,G=null;function J(e){X++,t.monitorRunDependencies&&t.monitorRunDependencies(X)}function K(e){if(X--,t.monitorRunDependencies&&t.monitorRunDependencies(X),0==X&&G){var r=G;G=null,r()}}function Z(e){t.onAbort&&t.onAbort(e),P(e="Aborted("+e+")"),S=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw s(r),r}function Q(e){return e.startsWith("data:application/octet-stream;base64,")}function ee(e){return e.startsWith("file://")}function te(e){try{if(e==U&&E)return new Uint8Array(E);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}function re(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ne(e){for(;e.length>0;)e.shift()(t)}function oe(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){$[this.ptr+4>>2]=e},this.get_type=function(){return $[this.ptr+4>>2]},this.set_destructor=function(e){$[this.ptr+8>>2]=e},this.get_destructor=function(){return $[this.ptr+8>>2]},this.set_refcount=function(e){M[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,F[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=F[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,F[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=F[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=M[this.ptr>>2];M[this.ptr>>2]=e+1},this.release_ref=function(){var e=M[this.ptr>>2];return M[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){$[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return $[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Jt(this.get_type()))return $[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}Q(U="jessibuca-pro-face-detector-decoder.wasm")||(U=function(e){return t.locateFile?t.locateFile(e,_):_+e}(U));var ie={isAbs:function(e){return"/"===e.charAt(0)},splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t=ie.isAbs(e),r="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ie.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return ie.normalize(e.join("/"))},join2:function(e,t){return ie.normalize(e+"/"+t)}},ae={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:le.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ie.isAbs(n)}return(t?"/":"")+(e=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ae.resolve(e).substr(1),t=ae.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.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("/")}};function se(e,t,r){var n=r>0?r:I(e)+1,o=new Array(n),i=W(e,o,0,o.length);return t&&(o.length=i),o}var ue={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){ue.ttys[e]={input:[],output:[],ops:t},le.registerDevice(e,ue.stream_ops)},stream_ops:{open:function(e){var t=ue.ttys[e.node.rdev];if(!t)throw new le.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new le.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new le.ErrnoError(29)}if(void 0===s&&0===i)throw new le.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new le.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new le.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(g){var r=Buffer.alloc(256),n=0;try{n=d.readSync(process.stdin.fd,r,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}t=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=se(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(k(z(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(k(z(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(P(z(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(P(z(e.output,0)),e.output=[])}}};function ce(e){Z()}var fe={ops_table:null,mount:function(e){return fe.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(le.isBlkdev(r)||le.isFIFO(r))throw new le.ErrnoError(63);fe.ops_table||(fe.ops_table={dir:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr,lookup:fe.node_ops.lookup,mknod:fe.node_ops.mknod,rename:fe.node_ops.rename,unlink:fe.node_ops.unlink,rmdir:fe.node_ops.rmdir,readdir:fe.node_ops.readdir,symlink:fe.node_ops.symlink},stream:{llseek:fe.stream_ops.llseek}},file:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr},stream:{llseek:fe.stream_ops.llseek,read:fe.stream_ops.read,write:fe.stream_ops.write,allocate:fe.stream_ops.allocate,mmap:fe.stream_ops.mmap,msync:fe.stream_ops.msync}},link:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr,readlink:fe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr},stream:le.chrdev_stream_ops}});var o=le.createNode(e,t,r,n);return le.isDir(o.mode)?(o.node_ops=fe.ops_table.dir.node,o.stream_ops=fe.ops_table.dir.stream,o.contents={}):le.isFile(o.mode)?(o.node_ops=fe.ops_table.file.node,o.stream_ops=fe.ops_table.file.stream,o.usedBytes=0,o.contents=null):le.isLink(o.mode)?(o.node_ops=fe.ops_table.link.node,o.stream_ops=fe.ops_table.link.stream):le.isChrdev(o.mode)&&(o.node_ops=fe.ops_table.chrdev.node,o.stream_ops=fe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=le.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,le.isDir(e.mode)?t.size=4096:le.isFile(e.mode)?t.size=e.usedBytes:le.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&fe.resizeFileStorage(e,t.size)},lookup:function(e,t){throw le.genericErrors[44]},mknod:function(e,t,r,n){return fe.createNode(e,t,r,n)},rename:function(e,t,r){if(le.isDir(e.mode)){var n;try{n=le.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new le.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=le.lookupNode(e,t);for(var n in r.contents)throw new le.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=fe.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!le.isLink(e.mode))throw new le.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(fe.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&le.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new le.ErrnoError(28);return n},allocate:function(e,t,r){fe.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o){if(!le.isFile(e.node.mode))throw new le.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==T){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(i=ce()))throw new le.ErrnoError(48);F.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(e,t,r,n,o){if(!le.isFile(e.node.mode))throw new le.ErrnoError(43);return 2&o||fe.stream_ops.write(e,t,0,n,r,!1),0}}},le={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ae.resolve(le.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if((t=Object.assign(r,t)).recurse_count>8)throw new le.ErrnoError(32);for(var n=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=le.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&t.parent)break;if(o=le.lookupNode(o,n[a]),i=ie.join2(i,n[a]),le.isMountpoint(o)&&(!s||s&&t.follow_mount)&&(o=o.mounted.root),!s||t.follow)for(var u=0;le.isLink(o.mode);){var c=le.readlink(i);i=ae.resolve(ie.dirname(i),c);var f=le.lookupPath(i,{recurse_count:t.recurse_count+1});if(o=f.node,u++>40)throw new le.ErrnoError(32)}}return{path:i,node:o}},getPath:function(e){for(var t;;){if(le.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%le.nameTable.length},hashAddNode:function(e){var t=le.hashName(e.parent.id,e.name);e.name_next=le.nameTable[t],le.nameTable[t]=e},hashRemoveNode:function(e){var t=le.hashName(e.parent.id,e.name);if(le.nameTable[t]===e)le.nameTable[t]=e.name_next;else for(var r=le.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=le.mayLookup(e);if(r)throw new le.ErrnoError(r,e);for(var n=le.hashName(e.id,t),o=le.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return le.lookup(e,t)},createNode:function(e,t,r,n){var o=new le.FSNode(e,t,r,n);return le.hashAddNode(o),o},destroyNode:function(e){le.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=le.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return le.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){var t=le.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return le.lookupNode(e,t),20}catch(e){}return le.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=le.lookupNode(e,t)}catch(e){return e.errno}var o=le.nodePermissions(e,"wx");if(o)return o;if(r){if(!le.isDir(n.mode))return 54;if(le.isRoot(n)||le.getPath(n)===le.cwd())return 10}else if(le.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?le.isLink(e.mode)?32:le.isDir(e.mode)&&("r"!==le.flagsToPermissionString(t)||512&t)?31:le.nodePermissions(e,le.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le.MAX_OPEN_FDS,r=e;r<=t;r++)if(!le.streams[r])return r;throw new le.ErrnoError(33)},getStream:function(e){return le.streams[e]},createStream:function(e,t,r){le.FSStream||(le.FSStream=function(){this.shared={}},le.FSStream.prototype={},Object.defineProperties(le.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new le.FSStream,e);var n=le.nextfd(t,r);return e.fd=n,le.streams[n]=e,e},closeStream:function(e){le.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=le.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new le.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){le.devices[e]={stream_ops:t}},getDevice:function(e){return le.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),le.syncFSRequests++,le.syncFSRequests>1&&P("warning: "+le.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=le.getMounts(le.root.mount),n=0;function o(e){return le.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){var n,o="/"===r,i=!r;if(o&&le.root)throw new le.ErrnoError(10);if(!o&&!i){var a=le.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,le.isMountpoint(n))throw new le.ErrnoError(10);if(!le.isDir(n.mode))throw new le.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?le.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var t=le.lookupPath(e,{follow_mount:!1});if(!le.isMountpoint(t.node))throw new le.ErrnoError(28);var r=t.node,n=r.mounted,o=le.getMounts(n);Object.keys(le.nameTable).forEach((function(e){for(var t=le.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&le.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=le.lookupPath(e,{parent:!0}).node,o=ie.basename(e);if(!o||"."===o||".."===o)throw new le.ErrnoError(28);var i=le.mayCreate(n,o);if(i)throw new le.ErrnoError(i);if(!n.node_ops.mknod)throw new le.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,le.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,le.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{le.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,le.mknod(e,t,r)},symlink:function(e,t){if(!ae.resolve(e))throw new le.ErrnoError(44);var r=le.lookupPath(t,{parent:!0}).node;if(!r)throw new le.ErrnoError(44);var n=ie.basename(t),o=le.mayCreate(r,n);if(o)throw new le.ErrnoError(o);if(!r.node_ops.symlink)throw new le.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=ie.dirname(e),i=ie.dirname(t),a=ie.basename(e),s=ie.basename(t);if(r=le.lookupPath(e,{parent:!0}).node,n=le.lookupPath(t,{parent:!0}).node,!r||!n)throw new le.ErrnoError(44);if(r.mount!==n.mount)throw new le.ErrnoError(75);var u,c=le.lookupNode(r,a),f=ae.relative(e,i);if("."!==f.charAt(0))throw new le.ErrnoError(28);if("."!==(f=ae.relative(t,o)).charAt(0))throw new le.ErrnoError(55);try{u=le.lookupNode(n,s)}catch(e){}if(c!==u){var l=le.isDir(c.mode),d=le.mayDelete(r,a,l);if(d)throw new le.ErrnoError(d);if(d=u?le.mayDelete(n,s,l):le.mayCreate(n,s))throw new le.ErrnoError(d);if(!r.node_ops.rename)throw new le.ErrnoError(63);if(le.isMountpoint(c)||u&&le.isMountpoint(u))throw new le.ErrnoError(10);if(n!==r&&(d=le.nodePermissions(r,"w")))throw new le.ErrnoError(d);le.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{le.hashAddNode(c)}}},rmdir:function(e){var t=le.lookupPath(e,{parent:!0}).node,r=ie.basename(e),n=le.lookupNode(t,r),o=le.mayDelete(t,r,!0);if(o)throw new le.ErrnoError(o);if(!t.node_ops.rmdir)throw new le.ErrnoError(63);if(le.isMountpoint(n))throw new le.ErrnoError(10);t.node_ops.rmdir(t,r),le.destroyNode(n)},readdir:function(e){var t=le.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new le.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=le.lookupPath(e,{parent:!0}).node;if(!t)throw new le.ErrnoError(44);var r=ie.basename(e),n=le.lookupNode(t,r),o=le.mayDelete(t,r,!1);if(o)throw new le.ErrnoError(o);if(!t.node_ops.unlink)throw new le.ErrnoError(63);if(le.isMountpoint(n))throw new le.ErrnoError(10);t.node_ops.unlink(t,r),le.destroyNode(n)},readlink:function(e){var t=le.lookupPath(e).node;if(!t)throw new le.ErrnoError(44);if(!t.node_ops.readlink)throw new le.ErrnoError(28);return ae.resolve(le.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=le.lookupPath(e,{follow:!t}).node;if(!r)throw new le.ErrnoError(44);if(!r.node_ops.getattr)throw new le.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return le.stat(e,!0)},chmod:function(e,t,r){var n;if(!(n="string"==typeof e?le.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new le.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,t){le.chmod(e,t,!0)},fchmod:function(e,t){var r=le.getStream(e);if(!r)throw new le.ErrnoError(8);le.chmod(r.node,t)},chown:function(e,t,r,n){var o;if(!(o="string"==typeof e?le.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new le.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,t,r){le.chown(e,t,r,!0)},fchown:function(e,t,r){var n=le.getStream(e);if(!n)throw new le.ErrnoError(8);le.chown(n.node,t,r)},truncate:function(e,t){if(t<0)throw new le.ErrnoError(28);var r;if(!(r="string"==typeof e?le.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new le.ErrnoError(63);if(le.isDir(r.mode))throw new le.ErrnoError(31);if(!le.isFile(r.mode))throw new le.ErrnoError(28);var n=le.nodePermissions(r,"w");if(n)throw new le.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=le.getStream(e);if(!r)throw new le.ErrnoError(8);if(0==(2097155&r.flags))throw new le.ErrnoError(28);le.truncate(r.node,t)},utime:function(e,t,r){var n=le.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,r,n){if(""===e)throw new le.ErrnoError(44);var o;if(n=void 0===n?438:n,n=64&(r="string"==typeof r?le.modeStringToFlags(r):r)?4095&n|32768:0,"object"==l(e))o=e;else{e=ie.normalize(e);try{o=le.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var i=!1;if(64&r)if(o){if(128&r)throw new le.ErrnoError(20)}else o=le.mknod(e,n,0),i=!0;if(!o)throw new le.ErrnoError(44);if(le.isChrdev(o.mode)&&(r&=-513),65536&r&&!le.isDir(o.mode))throw new le.ErrnoError(54);if(!i){var a=le.mayOpen(o,r);if(a)throw new le.ErrnoError(a)}512&r&&!i&&le.truncate(o,0),r&=-131713;var s=le.createStream({node:o,path:le.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!t.logReadFiles||1&r||(le.readFiles||(le.readFiles={}),e in le.readFiles||(le.readFiles[e]=1)),s},close:function(e){if(le.isClosed(e))throw new le.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{le.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(le.isClosed(e))throw new le.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new le.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new le.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new le.ErrnoError(28);if(le.isClosed(e))throw new le.ErrnoError(8);if(1==(2097155&e.flags))throw new le.ErrnoError(8);if(le.isDir(e.node.mode))throw new le.ErrnoError(31);if(!e.stream_ops.read)throw new le.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new le.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new le.ErrnoError(28);if(le.isClosed(e))throw new le.ErrnoError(8);if(0==(2097155&e.flags))throw new le.ErrnoError(8);if(le.isDir(e.node.mode))throw new le.ErrnoError(31);if(!e.stream_ops.write)throw new le.ErrnoError(28);e.seekable&&1024&e.flags&&le.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new le.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:function(e,t,r){if(le.isClosed(e))throw new le.ErrnoError(8);if(t<0||r<=0)throw new le.ErrnoError(28);if(0==(2097155&e.flags))throw new le.ErrnoError(8);if(!le.isFile(e.node.mode)&&!le.isDir(e.node.mode))throw new le.ErrnoError(43);if(!e.stream_ops.allocate)throw new le.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new le.ErrnoError(2);if(1==(2097155&e.flags))throw new le.ErrnoError(2);if(!e.stream_ops.mmap)throw new le.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:function(e,t,r,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new le.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var n=le.open(e,r.flags),o=le.stat(e),i=o.size,a=new Uint8Array(i);return le.read(n,a,0,i,0),"utf8"===r.encoding?t=z(a,0):"binary"===r.encoding&&(t=a),le.close(n),t},writeFile:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=le.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(I(t)+1),i=W(t,o,0,o.length);le.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");le.write(n,t,0,t.byteLength,void 0,r.canOwn)}le.close(n)},cwd:function(){return le.currentPath},chdir:function(e){var t=le.lookupPath(e,{follow:!0});if(null===t.node)throw new le.ErrnoError(44);if(!le.isDir(t.node.mode))throw new le.ErrnoError(54);var r=le.nodePermissions(t.node,"x");if(r)throw new le.ErrnoError(r);le.currentPath=t.path},createDefaultDirectories:function(){le.mkdir("/tmp"),le.mkdir("/home"),le.mkdir("/home/web_user")},createDefaultDevices:function(){le.mkdir("/dev"),le.registerDevice(le.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),le.mkdev("/dev/null",le.makedev(1,3)),ue.register(le.makedev(5,0),ue.default_tty_ops),ue.register(le.makedev(6,0),ue.default_tty1_ops),le.mkdev("/dev/tty",le.makedev(5,0)),le.mkdev("/dev/tty1",le.makedev(6,0));var e=function(){if("object"==("undefined"==typeof crypto?"undefined":l(crypto))&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(g)try{var t=a.default;return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){return Z("randomDevice")}}();le.createDevice("/dev","random",e),le.createDevice("/dev","urandom",e),le.mkdir("/dev/shm"),le.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){le.mkdir("/proc");var e=le.mkdir("/proc/self");le.mkdir("/proc/self/fd"),le.mount({mount:function(){var t=le.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(e,t){var r=+t,n=le.getStream(r);if(!n)throw new le.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){t.stdin?le.createDevice("/dev","stdin",t.stdin):le.symlink("/dev/tty","/dev/stdin"),t.stdout?le.createDevice("/dev","stdout",null,t.stdout):le.symlink("/dev/tty","/dev/stdout"),t.stderr?le.createDevice("/dev","stderr",null,t.stderr):le.symlink("/dev/tty1","/dev/stderr"),le.open("/dev/stdin",0),le.open("/dev/stdout",1),le.open("/dev/stderr",1)},ensureErrnoError:function(){le.ErrnoError||(le.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},le.ErrnoError.prototype=new Error,le.ErrnoError.prototype.constructor=le.ErrnoError,[44].forEach((function(e){le.genericErrors[e]=new le.ErrnoError(e),le.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){le.ensureErrnoError(),le.nameTable=new Array(4096),le.mount(fe,{},"/"),le.createDefaultDirectories(),le.createDefaultDevices(),le.createSpecialDirectories(),le.filesystems={MEMFS:fe}},init:function(e,r,n){le.init.initialized=!0,le.ensureErrnoError(),t.stdin=e||t.stdin,t.stdout=r||t.stdout,t.stderr=n||t.stderr,le.createStandardStreams()},quit:function(){le.init.initialized=!1;for(var e=0;e<le.streams.length;e++){var t=le.streams[e];t&&le.close(t)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:function(e,t){var r=le.analyzePath(e,t);return r.exists?r.object:null},analyzePath:function(e,t){try{e=(n=le.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=le.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ie.basename(e),n=le.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:function(e,t,r,n){e="string"==typeof e?e:le.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ie.join2(e,i);try{le.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){var i=ie.join2("string"==typeof e?e:le.getPath(e),t),a=le.getMode(n,o);return le.create(i,a)},createDataFile:function(e,t,r,n,o,i){var a=t;e&&(e="string"==typeof e?e:le.getPath(e),a=t?ie.join2(e,t):e);var s=le.getMode(n,o),u=le.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}le.chmod(u,146|s);var d=le.open(u,577);le.write(d,r,0,r.length,0,i),le.close(d),le.chmod(u,s)}return u},createDevice:function(e,t,r,n){var o=ie.join2("string"==typeof e?e:le.getPath(e),t),i=le.getMode(!!r,!!n);le.createDevice.major||(le.createDevice.major=64);var a=le.makedev(le.createDevice.major++,0);return le.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new le.ErrnoError(29)}if(void 0===u&&0===a)throw new le.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new le.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),le.mkdev(o,i,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(u(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new le.ErrnoError(29)}},createLazyFile:function(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):se(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,k("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){if(!w)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=le.createFile(e,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((function(e){var t=u.stream_ops[e];c[e]=function(){return le.forceLoadFile(u),t.apply(null,arguments)}})),c.read=function(e,t,r,n,o){return le.forceLoadFile(u),f(e,t,r,n,o)},c.mmap=function(e,t,r,n,o){le.forceLoadFile(u);var i=ce();if(!i)throw new le.ErrnoError(48);return f(e,F,i,t,r),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:function(e,t,r,n,o,i,a,s,u,f){var l=t?ae.resolve(ie.join2(e,t)):e;function d(r){function c(r){f&&f(),s||le.createDataFile(e,t,r,n,o,u),i&&i(),K()}Browser.handledByPreloadPlugin(r,l,c,(function(){a&&a(),K()}))||c(r)}J(),"string"==typeof r?function(e,t,r,n){var o=n?"":"al "+e;c(e,(function(r){D(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&K()}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&J()}(r,(function(e){return d(e)}),a):d(r)},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(e,t,r){t=t||function(){},r=r||function(){};var n=le.indexedDB();try{var o=n.open(le.DB_NAME(),le.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=function(){k("creating db"),o.result.createObjectStore(le.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([le.DB_STORE_NAME],"readwrite"),i=n.objectStore(le.DB_STORE_NAME),a=0,s=0,u=e.length;function c(){0==s?t():r()}e.forEach((function(e){var t=i.put(le.analyzePath(e).object.contents,e);t.onsuccess=function(){++a+s==u&&c()},t.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=le.indexedDB();try{var o=n.open(le.DB_NAME(),le.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([le.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(le.DB_STORE_NAME),s=0,u=0,c=e.length;function f(){0==u?t():r()}e.forEach((function(e){var t=a.get(e);t.onsuccess=function(){le.analyzePath(e).exists&&le.unlink(e),le.createDataFile(ie.dirname(e),ie.basename(e),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},de={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(ie.isAbs(t))return t;var n;if(-100===e)n=le.cwd();else{var o=le.getStream(e);if(!o)throw new le.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new le.ErrnoError(44);return n}return ie.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ie.normalize(t)!==ie.normalize(le.getPath(e.node)))return-54;throw e}return M[r>>2]=n.dev,M[r+4>>2]=0,M[r+8>>2]=n.ino,M[r+12>>2]=n.mode,M[r+16>>2]=n.nlink,M[r+20>>2]=n.uid,M[r+24>>2]=n.gid,M[r+28>>2]=n.rdev,M[r+32>>2]=0,H=[n.size>>>0,(L=n.size,+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[r+40>>2]=H[0],M[r+44>>2]=H[1],M[r+48>>2]=4096,M[r+52>>2]=n.blocks,H=[Math.floor(n.atime.getTime()/1e3)>>>0,(L=Math.floor(n.atime.getTime()/1e3),+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[r+56>>2]=H[0],M[r+60>>2]=H[1],M[r+64>>2]=0,H=[Math.floor(n.mtime.getTime()/1e3)>>>0,(L=Math.floor(n.mtime.getTime()/1e3),+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[r+72>>2]=H[0],M[r+76>>2]=H[1],M[r+80>>2]=0,H=[Math.floor(n.ctime.getTime()/1e3)>>>0,(L=Math.floor(n.ctime.getTime()/1e3),+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[r+88>>2]=H[0],M[r+92>>2]=H[1],M[r+96>>2]=0,H=[n.ino>>>0,(L=n.ino,+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[r+104>>2]=H[0],M[r+108>>2]=H[1],0},doMsync:function(e,t,r,n,o){var i=C.slice(e,e+r);le.msync(t,i,o,r,n)},varargs:void 0,get:function(){return de.varargs+=4,M[de.varargs-4>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=le.getStream(e);if(!t)throw new le.ErrnoError(8);return t}};function pe(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var he=void 0;function me(e){for(var t="",r=e;C[r];)t+=he[C[r++]];return t}var ve={},ye={},we={};function ge(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function _e(e,t){return e=ge(e),new Function("body","return function "+e+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(t)}function Ee(e,t){var r=_e(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var be=void 0;function ke(e){throw new be(e)}var Pe=void 0;function Se(e){throw new Pe(e)}function De(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Se("Mismatched type converter count");for(var o=0;o<e.length;++o)Te(e[o],n[o])}e.forEach((function(e){we[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){ye.hasOwnProperty(e)?o[t]=ye[e]:(i.push(e),ve.hasOwnProperty(e)||(ve[e]=[]),ve[e].push((function(){o[t]=ye[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Te(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||ke('type "'+n+'" must have a positive integer typeid pointer'),ye.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;ke("Cannot register type '"+n+"' twice")}if(ye[e]=t,delete we[e],ve.hasOwnProperty(e)){var o=ve[e];delete ve[e],o.forEach((function(e){return e()}))}}function Fe(e){if(!(this instanceof Je))return!1;if(!(e instanceof Je))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Ce(e){ke(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Ae=!1;function xe(e){}function Me(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function $e(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=$e(e,t,r.baseClass);return null===n?null:r.downcast(n)}var je={};function Oe(){return Object.keys(Ie).length}function Re(){var e=[];for(var t in Ie)Ie.hasOwnProperty(t)&&e.push(Ie[t]);return e}var Be=[];function ze(){for(;Be.length;){var e=Be.pop();e.$$.deleteScheduled=!1,e.delete()}}var Ne=void 0;function We(e){Ne=e,Be.length&&Ne&&Ne(ze)}var Ie={};function Ue(e,t){return t=function(e,t){for(void 0===t&&ke("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Ie[t]}function Le(e,t){return t.ptrType&&t.ptr||Se("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Se("Both smartPtrType and smartPtr must be specified"),t.count={value:1},qe(Object.create(e,{$$:{value:t}}))}function He(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Ue(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Le(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Le(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=je[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=$e(t,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Le(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):Le(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function qe(e){return"undefined"==typeof FinalizationRegistry?(qe=function(e){return e},e):(Ae=new FinalizationRegistry((function(e){Me(e.$$)})),qe=function(e){var t=e.$$;if(t.smartPtr){var r={$$:t};Ae.register(e,r,e)}return e},xe=function(e){return Ae.unregister(e)},qe(e))}function Ve(){if(this.$$.ptr||Ce(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=qe(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ye(){this.$$.ptr||Ce(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ke("Object already scheduled for deletion"),xe(this),Me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Xe(){return!this.$$.ptr}function Ge(){return this.$$.ptr||Ce(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ke("Object already scheduled for deletion"),Be.push(this),1===Be.length&&Ne&&Ne(ze),this.$$.deleteScheduled=!0,this}function Je(){}function Ke(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ke("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Ze(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Qe(e,t,r){for(;t!==r;)t.upcast||ke("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function et(e,t){if(null===t)return this.isReference&&ke("null is not a valid "+this.name),0;t.$$||ke('Cannot pass "'+Pt(t)+'" as a '+this.name),t.$$.ptr||ke("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Qe(t.$$.ptr,r,this.registeredClass)}function tt(e,t){var r;if(null===t)return this.isReference&&ke("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||ke('Cannot pass "'+Pt(t)+'" as a '+this.name),t.$$.ptr||ke("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ke("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Qe(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ke("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:ke("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,kt.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:ke("Unsupporting sharing policy")}return r}function rt(e,t){if(null===t)return this.isReference&&ke("null is not a valid "+this.name),0;t.$$||ke('Cannot pass "'+Pt(t)+'" as a '+this.name),t.$$.ptr||ke("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ke("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Qe(t.$$.ptr,r,this.registeredClass)}function nt(e){return this.fromWireType(M[e>>2])}function ot(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function it(e){this.rawDestructor&&this.rawDestructor(e)}function at(e){null!==e&&e.delete()}function st(e,t,r,n,o,i,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=tt:n?(this.toWireType=et,this.destructorFunction=null):(this.toWireType=rt,this.destructorFunction=null)}var ut=[];function ct(e){var t=ut[e];return t||(e>=ut.length&&(ut.length=e+1),ut[e]=t=R.get(e)),t}function ft(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):ct(r).apply(null,n)}function lt(e,t){var r,n,o,i=(e=me(e)).includes("j")?(r=e,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),ft(r,n,o)}):ct(t);return"function"!=typeof i&&ke("unknown function pointer with signature "+e+": "+t),i}var dt=void 0;function pt(e){var t=Xt(e),r=me(t);return Vt(t),r}function ht(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||ye[t]||(we[t]?we[t].forEach(e):(r.push(t),n[t]=!0))})),new dt(e+": "+r.map(pt).join([", "]))}function mt(e,t){for(var r=[],n=0;n<e;n++)r.push($[t+4*n>>2]);return r}function vt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function yt(e,t,r,n,o){var i=t.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",d="";for(u=0;u<i-2;++u)f+=(0!==u?", ":"")+"arg"+u,d+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ge(e)+"("+f+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[ke,n,o,vt,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+t[u+2].name+"\n",m.push("argType"+u),v.push(t[u+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),p+=(c?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<t.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+t[u].name+"\n",m.push(y+"_dtor"),v.push(t[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",m.push(p),function(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+l(e)+" which is not a function");var r=_e(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}(Function,m).apply(null,v)}var wt=[],gt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function _t(e){e>4&&0==--gt[e].refcount&&(gt[e]=void 0,wt.push(e))}function Et(){for(var e=0,t=5;t<gt.length;++t)void 0!==gt[t]&&++e;return e}function bt(){for(var e=5;e<gt.length;++e)if(void 0!==gt[e])return gt[e];return null}var kt={toValue:function(e){return e||ke("Cannot use deleted val. handle = "+e),gt[e].value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=wt.length?wt.pop():gt.length;return gt[t]={refcount:1,value:e},t}}};function Pt(e){if(null===e)return"null";var t=l(e);return"object"===t||"array"===t||"function"===t?e.toString():""+e}function St(e,t){switch(t){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(O[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Dt(e,t,r){switch(t){case 0:return r?function(e){return F[e]}:function(e){return C[e]};case 1:return r?function(e){return A[e>>1]}:function(e){return x[e>>1]};case 2:return r?function(e){return M[e>>2]}:function(e){return $[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Tt,Ft="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Ct(e,t){for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&x[n];)++n;if((r=n<<1)-e>32&&Ft)return Ft.decode(C.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=A[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function At(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);A[t>>1]=a,t+=2}return A[t>>1]=0,t-n}function xt(e){return 2*e.length}function Mt(e,t){for(var r=0,n="";!(r>=t/4);){var o=M[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function $t(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),M[t>>2]=a,(t+=4)+4>o)break}return M[t>>2]=0,t-n}function jt(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}Tt=g?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:function(){return performance.now()};var Ot={};function Rt(){if(!Rt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==("undefined"==typeof navigator?"undefined":l(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:v||"./this.program"};for(var t in Ot)void 0===Ot[t]?delete e[t]:e[t]=Ot[t];var r=[];for(var t in e)r.push(t+"="+e[t]);Rt.strings=r}return Rt.strings}function Bt(e){return e%4==0&&(e%100!=0||e%400==0)}var zt=[31,29,31,30,31,30,31,31,30,31,30,31],Nt=[31,28,31,30,31,30,31,31,30,31,30,31];function Wt(e,t,r,n){var o=M[n+40>>2],i={tm_sec:M[n>>2],tm_min:M[n+4>>2],tm_hour:M[n+8>>2],tm_mday:M[n+12>>2],tm_mon:M[n+16>>2],tm_year:M[n+20>>2],tm_wday:M[n+24>>2],tm_yday:M[n+28>>2],tm_isdst:M[n+32>>2],tm_gmtoff:M[n+36>>2],tm_zone:o?N(o):""},a=N(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function d(e,t){return l(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function h(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var r=new Date(e.getTime());t>0;){var n=Bt(r.getFullYear()),o=r.getMonth(),i=(n?zt:Nt)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=h(r),i=h(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}(Bt(e.tm_year+1900)?zt:Nt,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Bt(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Bt(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),v)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),v[u](i)));var y=se(a=a.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(e,t){F.set(e,t)}(y,e),y.length-1)}var It=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=le.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Ut=365,Lt=146;Object.defineProperties(It.prototype,{read:{get:function(){return(this.mode&Ut)===Ut},set:function(e){e?this.mode|=Ut:this.mode&=-366}},write:{get:function(){return(this.mode&Lt)===Lt},set:function(e){e?this.mode|=Lt:this.mode&=-147}},isFolder:{get:function(){return le.isDir(this.mode)}},isDevice:{get:function(){return le.isChrdev(this.mode)}}}),le.FSNode=It,le.staticInit(),t.FS_createPath=le.createPath,t.FS_createDataFile=le.createDataFile,t.FS_createPreloadedFile=le.createPreloadedFile,t.FS_unlink=le.unlink,t.FS_createLazyFile=le.createLazyFile,t.FS_createDevice=le.createDevice,function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);he=e}(),be=t.BindingError=Ee(Error,"BindingError"),Pe=t.InternalError=Ee(Error,"InternalError"),Je.prototype.isAliasOf=Fe,Je.prototype.clone=Ve,Je.prototype.delete=Ye,Je.prototype.isDeleted=Xe,Je.prototype.deleteLater=Ge,t.getInheritedInstanceCount=Oe,t.getLiveInheritedInstances=Re,t.flushPendingDeletes=ze,t.setDelayFunction=We,st.prototype.getPointee=ot,st.prototype.destructor=it,st.prototype.argPackAdvance=8,st.prototype.readValueFromPointer=nt,st.prototype.deleteObject=at,st.prototype.fromWireType=He,dt=t.UnboundTypeError=Ee(Error,"UnboundTypeError"),t.count_emval_handles=Et,t.get_first_emval=bt;var Ht={d:function(e){return qt(e+24)+24},c:function(e,t,r){throw new oe(e).init(t,r),e},m:function(e,t,r){de.varargs=r;try{var n=de.getStreamFromFD(e);switch(t){case 0:return(o=de.get())<0?-28:le.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.get(),A[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,M[Yt()>>2]=i,-1}}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return-e.errno}var i},z:function(e,t,r){de.varargs=r;try{var n=de.getStreamFromFD(e);switch(t){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=de.get();return M[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=de.get(),le.ioctl(n,t,o);default:Z("bad ioctl syscall "+t)}}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return-e.errno}},l:function(e,t,r,n){de.varargs=n;try{t=de.getStr(t),t=de.calculateAt(e,t);var o=n?de.get():0;return le.open(t,r,o).fd}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return-e.errno}},u:function(e,t,r,n,o){},q:function(e,t,r,n,o){var i=pe(r);Te(e,{name:t=me(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=F;else if(2===r)n=A;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=M}return this.fromWireType(n[e>>i])},destructorFunction:null})},G:function(e,r,n,o,i,a,s,u,c,f,l,d,p){l=me(l),a=lt(i,a),u&&(u=lt(s,u)),f&&(f=lt(c,f)),p=lt(d,p);var h=ge(l);!function(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&ke("Cannot register public name '"+e+"' twice"),Ke(t,e,e),t.hasOwnProperty(n)&&ke("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}(h,(function(){ht("Cannot construct "+l+" due to unbound types",[o])})),De([e,r,n],o?[o]:[],(function(r){var n,i;r=r[0],i=o?(n=r.registeredClass).instancePrototype:Je.prototype;var s=_e(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new be("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new be(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new be("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:s}});s.prototype=c;var d=new Ze(l,s,c,p,n,a,u,f),m=new st(l,d,!0,!1,!1),v=new st(l+"*",d,!1,!1,!1),y=new st(l+" const*",d,!1,!0,!1);return je[e]={pointerType:v,constPointerType:y},function(e,r,n){t.hasOwnProperty(e)||Se("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}(h,s),[m,v,y]}))},A:function(e,t,r,n,o,i){D(t>0);var a=mt(t,r);o=lt(n,o),De([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new be("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){ht("Cannot construct "+e.name+" due to unbound types",a)},De([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=yt(r,n,null,o,i),[]})),[]}))},f:function(e,t,r,n,o,i,a,s){var u=mt(r,n);t=me(t),i=lt(o,i),De([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){ht("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===r-2?(o.argCount=r-2,o.className=e.name,c[t]=o):(Ke(c,t,n),c[t].overloadTable[r-2]=o),De([],u,(function(o){var s=yt(n,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=r-2,c[t]=s):c[t].overloadTable[r-2]=s,[]})),[]}))},F:function(e,t){Te(e,{name:t=me(t),fromWireType:function(e){var t=kt.toValue(e);return _t(e),t},toWireType:function(e,t){return kt.toHandle(t)},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:null})},o:function(e,t,r){var n=pe(r);Te(e,{name:t=me(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:St(t,n),destructorFunction:null})},b:function(e,t,r,n,o){t=me(t);var i=pe(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<<s>>>s}}var u=t.includes("unsigned");Te(e,{name:t,fromWireType:a,toWireType:u?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Dt(t,i,0!==n),destructorFunction:null})},a:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=$,r=t[e>>=2],o=t[e+1];return new n(T,o,r)}Te(e,{name:r=me(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},n:function(e,t){var r="std::string"===(t=me(t));Te(e,{name:t,fromWireType:function(e){var t,n=$[e>>2],o=e+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=N(i,s-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);t=c.join("")}return Vt(e),t},toWireType:function(e,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=r&&o?I(t):t.length;var i=qt(4+n+1),a=i+4;if($[i>>2]=n,r&&o)W(t,C,a,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(Vt(a),ke("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=t[s];return null!==e&&e.push(Vt,i),i},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(e){Vt(e)}})},j:function(e,t,r){var n,o,i,a,s;r=me(r),2===t?(n=Ct,o=At,a=xt,i=function(){return x},s=1):4===t&&(n=Mt,o=$t,a=jt,i=function(){return $},s=2),Te(e,{name:r,fromWireType:function(e){for(var r,o=$[e>>2],a=i(),u=e+4,c=0;c<=o;++c){var f=e+4+c*t;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=f+t}}return Vt(e),r},toWireType:function(e,n){"string"!=typeof n&&ke("Cannot pass non-string to C++ string type "+r);var i=a(n),u=qt(4+i+t);return $[u>>2]=i>>s,o(n,u+4,i+t),null!==e&&e.push(Vt,u),u},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(e){Vt(e)}})},r:function(e,t){Te(e,{isVoid:!0,name:t=me(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},D:function(){return Date.now()},s:function(e){do{var t=$[e>>2],r=$[(e+=4)>>2],n=$[(e+=4)>>2];e+=4;var o=N(t);le.createPath("/",ie.dirname(o),!0,!0),le.createDataFile(o,null,F.subarray(n,n+r),!0,!0,!0)}while($[e>>2])},C:function(){return!0},p:_t,g:function(){Z("")},B:Tt,E:function(e,t,r){C.copyWithin(e,t,t+r)},w:function(e){C.length,Z("OOM")},x:function(e,t){var r=0;return Rt().forEach((function(n,o){var i=t+r;$[e+4*o>>2]=i,function(e,t,r){for(var n=0;n<e.length;++n)F[t++>>0]=e.charCodeAt(n);r||(F[t>>0]=0)}(n,i),r+=n.length+1})),0},y:function(e,t){var r=Rt();$[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),$[t>>2]=n,0},i:function(e){try{var t=de.getStreamFromFD(e);return le.close(t),0}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return e.errno}},k:function(e,t,r,n){try{var o=function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=$[t>>2],s=$[t+4>>2];t+=8;var u=le.read(e,F,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(de.getStreamFromFD(e),t,r);return M[n>>2]=o,0}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return e.errno}},t:function(e,t,r,n,o){try{var i=(u=r)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=de.getStreamFromFD(e);return le.llseek(a,i,n),H=[a.position>>>0,(L=a.position,+Math.abs(L)>=1?L>0?(0|Math.min(+Math.floor(L/4294967296),4294967295))>>>0:~~+Math.ceil((L-+(~~L>>>0))/4294967296)>>>0:0)],M[o>>2]=H[0],M[o+4>>2]=H[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return e.errno}var s,u},h:function(e,t,r,n){try{var o=function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=$[t>>2],s=$[t+4>>2];t+=8;var u=le.write(e,F,a,s,n);if(u<0)return-1;o+=u}return o}(de.getStreamFromFD(e),t,r);return $[n>>2]=o,0}catch(e){if(void 0===le||!(e instanceof le.ErrnoError))throw e;return e.errno}},e:function(e){},v:function(e,t,r,n){return Wt(e,t,r,n)}};!function(){var e={a:Ht};function r(e,r){var n,o,i=e.exports;t.asm=i,b=t.asm.H,n=b.buffer,T=n,t.HEAP8=F=new Int8Array(n),t.HEAP16=A=new Int16Array(n),t.HEAP32=M=new Int32Array(n),t.HEAPU8=C=new Uint8Array(n),t.HEAPU16=x=new Uint16Array(n),t.HEAPU32=$=new Uint32Array(n),t.HEAPF32=j=new Float32Array(n),t.HEAPF64=O=new Float64Array(n),R=t.asm.K,o=t.asm.I,V.unshift(o),K()}function n(e){r(e.instance)}function o(t){return function(){if(!E&&(y||w)){if("function"==typeof fetch&&!ee(U))return fetch(U,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+U+"'";return e.arrayBuffer()})).catch((function(){return te(U)}));if(c)return new Promise((function(e,t){c(U,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return te(U)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){P("failed to asynchronously prepare wasm: "+e),Z(e)}))}if(J(),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(e){return P("Module.instantiateWasm callback failed with error: "+e),!1}(E||"function"!=typeof WebAssembly.instantiateStreaming||Q(U)||ee(U)||g||"function"!=typeof fetch?o(n):fetch(U,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return P("wasm streaming compile failed: "+e),P("falling back to ArrayBuffer instantiation"),o(n)}))}))).catch(s)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.I).apply(null,arguments)};var qt=t._malloc=function(){return(qt=t._malloc=t.asm.J).apply(null,arguments)},Vt=t._free=function(){return(Vt=t._free=t.asm.L).apply(null,arguments)},Yt=t.___errno_location=function(){return(Yt=t.___errno_location=t.asm.M).apply(null,arguments)},Xt=t.___getTypeName=function(){return(Xt=t.___getTypeName=t.asm.N).apply(null,arguments)};t.___embind_register_native_and_builtin_types=function(){return(t.___embind_register_native_and_builtin_types=t.asm.O).apply(null,arguments)};var Gt,Jt=t.___cxa_is_pointer_type=function(){return(Jt=t.___cxa_is_pointer_type=t.asm.P).apply(null,arguments)};function Kt(e){function r(){Gt||(Gt=!0,t.calledRun=!0,S||(t.noFSInit||le.init.initialized||le.init(),le.ignorePermissions=!1,ne(V),n(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),Y.unshift(e);var e;ne(Y)}()))}X>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),q.unshift(e);var e;ne(q)}(),X>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),r()}),1)):r()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.Q).apply(null,arguments)},t.dynCall_jiii=function(){return(t.dynCall_jiii=t.asm.R).apply(null,arguments)},t.dynCall_jii=function(){return(t.dynCall_jii=t.asm.S).apply(null,arguments)},t.dynCall_viji=function(){return(t.dynCall_viji=t.asm.T).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.U).apply(null,arguments)},t.dynCall_viijii=function(){return(t.dynCall_viijii=t.asm.V).apply(null,arguments)},t.dynCall_iiiiij=function(){return(t.dynCall_iiiiij=t.asm.W).apply(null,arguments)},t.dynCall_iiiiijj=function(){return(t.dynCall_iiiiijj=t.asm.X).apply(null,arguments)},t.dynCall_iiiiiijj=function(){return(t.dynCall_iiiiiijj=t.asm.Y).apply(null,arguments)},t.___emscripten_embedded_file_data=804648,t.addRunDependency=J,t.removeRunDependency=K,t.FS_createPath=le.createPath,t.FS_createDataFile=le.createDataFile,t.FS_createPreloadedFile=le.createPreloadedFile,t.FS_createLazyFile=le.createLazyFile,t.FS_createDevice=le.createDevice,t.FS_unlink=le.unlink,G=function e(){Gt||Kt(),Gt||(G=e)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Kt(),e.exports=t,t.ready});e.exports=n})),k=function(){function e(){c(this,e)}return h(e,[{key:"on",value:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this}},{key:"once",value:function(e,t,r){var n=this;function o(){n.off(e,o);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];t.apply(r,a)}return o._=t,this.on(e,o,r)}},{key:"emit",value:function(e){for(var t=((this.e||(this.e={}))[e]||[]).slice(),r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;i+=1)t[i].fn.apply(t[i].ctx,n);return this}},{key:"off",value:function(e,t){var r=this.e||(this.e={});if(!e)return Object.keys(r).forEach((function(e){delete r[e]})),void delete this.e;var n=r[e],o=[];if(n&&t)for(var i=0,a=n.length;i<a;i+=1)n[i].fn!==t&&n[i].fn._!==t&&o.push(n[i]);return o.length?r[e]=o:delete r[e],this}}]),e}();function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E(e);if(t){var o=E(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}var S=function(e){v(r,e);var t=P(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c(this,r),(e=t.call(this)).module=null,e.detector=null,e.startTimestamp=null,e.detectWidth=n.detectWidth||192,e}return h(r,[{key:"destroy",value:function(){this.off(),this.detector&&(this.detector.clear(),this.detector.delete()),this.module&&(this.module=null),this.startTimestamp=null}},{key:"load",value:function(){var e=this;return new Promise((function(t,r){b().then((function(n){e.module=n,e.module.FaceDetector?(t(),e.detector=new e.module.FaceDetector(e),e.detector.setDetectWidth(e.detectWidth)):r("load jessibuca face detector fail")})).catch((function(e){console.error(e),r("load jessibuca face detector error")}))}))}},{key:"detect",value:function(e){if(!this.detector)return e.data;if(null===this.startTimestamp&&(this.startTimestamp=Date.now()),Date.now()-this.startTimestamp>6e5)return e.data;var t=this.detector.detect(e.data,e.width,e.height),r=t+3*(e.width*e.height)/2;return this.module.HEAPU8.subarray(t,r)}}]),r}(k);window.JessibucaProFaceDetector=S}));