nwlink 0.0.13 → 0.0.14
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.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={7481:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||__filename,function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c,l,h,f=Object.assign({},i),p=[],d="./this.program",m=(t,e)=>{throw e},v="object"==typeof window,g="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,D="";_?(D=g?r(1017).dirname(D)+"/":__dirname+"/",h=()=>{l||(c=r(7147),l=r(1017))},a=function(t,e){return h(),t=l.normalize(t),c.readFileSync(t,e?void 0:"utf8")},u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{h(),t=l.normalize(t),c.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof xt))throw t})),process.on("unhandledRejection",(function(t){throw t})),m=(t,e)=>{if($())throw process.exitCode=t,e;var r;(r=e)instanceof xt||b("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}):(v||g)&&(g?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),n&&(D=n),D=0!==D.indexOf("blob:")?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},g&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,f),f=null,i.arguments&&(p=i.arguments),i.thisProgram&&(d=i.thisProgram),i.quit&&(m=i.quit),i.wasmBinary&&(y=i.wasmBinary);var E,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&et("no native wasm support detected");var F,k=!1;function A(t,e){t||et(e)}var x,S,O,T,P,R,B="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&B)return B.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[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 I(t,e){return t?j(O,t,e):""}function L(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function N(t,e,r){return L(t,O,e,r)}function M(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function U(t){x=t,i.HEAP8=S=new Int8Array(t),i.HEAP16=T=new Int16Array(t),i.HEAP32=P=new Int32Array(t),i.HEAPU8=O=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=R=new Uint32Array(t),i.HEAPF32=new Float32Array(t),i.HEAPF64=new Float64Array(t)}i.INITIAL_MEMORY;var H=[],z=[],V=[],G=[];function $(){return C}var q,W,Y,K,X=0,Z=null,Q=null;function J(t){X++,i.monitorRunDependencies&&i.monitorRunDependencies(X)}function tt(t){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==Z&&(clearInterval(Z),Z=null),Q)){var e=Q;Q=null,e()}}function et(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),k=!0,F=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function rt(t){return t.startsWith("data:application/octet-stream;base64,")}function nt(t){try{if(t==q&&y)return new Uint8Array(y);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){et(t)}}function ot(t){for(;t.length>0;)t.shift()(i)}rt(q="ld.wasm")||(W=q,q=i.locateFile?i.locateFile(W,D):D+W);var it={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=it.isAbs(t),r="/"===t.substr(-1);return(t=it.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=it.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=it.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments,0);return it.normalize(t.join("/"))},join2:(t,e)=>it.normalize(t+"/"+e)},at={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:ht.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=it.isAbs(n)}return(e?"/":"")+(t=it.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=at.resolve(t).substr(1),e=at.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(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("/")}},st={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){st.ttys[t]={input:[],output:[],ops:e},ht.registerDevice(t,st.stream_ops)},stream_ops:{open:function(t){var e=st.ttys[t.node.rdev];if(!e)throw new ht.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new ht.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new ht.ErrnoError(29)}if(void 0===s&&0===i)throw new ht.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new ht.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new ht.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if(_){var r=Buffer.alloc(256),n=0;try{n=c.readSync(process.stdin.fd,r,0,256,-1)}catch(t){if(!t.toString().includes("EOF"))throw t;n=0}e=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;t.input=Et(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(w(j(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(w(j(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(b(j(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(b(j(t.output,0)),t.output=[])}}};function ut(t){et()}var ct,lt={ops_table:null,mount:function(t){return lt.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(ht.isBlkdev(r)||ht.isFIFO(r))throw new ht.ErrnoError(63);lt.ops_table||(lt.ops_table={dir:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr,lookup:lt.node_ops.lookup,mknod:lt.node_ops.mknod,rename:lt.node_ops.rename,unlink:lt.node_ops.unlink,rmdir:lt.node_ops.rmdir,readdir:lt.node_ops.readdir,symlink:lt.node_ops.symlink},stream:{llseek:lt.stream_ops.llseek}},file:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr},stream:{llseek:lt.stream_ops.llseek,read:lt.stream_ops.read,write:lt.stream_ops.write,allocate:lt.stream_ops.allocate,mmap:lt.stream_ops.mmap,msync:lt.stream_ops.msync}},link:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr,readlink:lt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr},stream:ht.chrdev_stream_ops}});var o=ht.createNode(t,e,r,n);return ht.isDir(o.mode)?(o.node_ops=lt.ops_table.dir.node,o.stream_ops=lt.ops_table.dir.stream,o.contents={}):ht.isFile(o.mode)?(o.node_ops=lt.ops_table.file.node,o.stream_ops=lt.ops_table.file.stream,o.usedBytes=0,o.contents=null):ht.isLink(o.mode)?(o.node_ops=lt.ops_table.link.node,o.stream_ops=lt.ops_table.link.stream):ht.isChrdev(o.mode)&&(o.node_ops=lt.ops_table.chrdev.node,o.stream_ops=lt.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=ht.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,ht.isDir(t.mode)?e.size=4096:ht.isFile(t.mode)?e.size=t.usedBytes:ht.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&<.resizeFileStorage(t,e.size)},lookup:function(t,e){throw ht.genericErrors[44]},mknod:function(t,e,r,n){return lt.createNode(t,e,r,n)},rename:function(t,e,r){if(ht.isDir(t.mode)){var n;try{n=ht.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new ht.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=ht.lookupNode(t,e);for(var n in r.contents)throw new ht.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=lt.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!ht.isLink(t.mode))throw new ht.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===S.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(lt.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&ht.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new ht.ErrnoError(28);return n},allocate:function(t,e,r){lt.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o){if(!ht.isFile(t.node.mode))throw new ht.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==x){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),a=!0,!(i=ut()))throw new ht.ErrnoError(48);S.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,e,r,n,o){if(!ht.isFile(t.node.mode))throw new ht.ErrnoError(43);return 2&o||lt.stream_ops.write(t,e,0,n,r,!1),0}}},ht={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,e={})=>{if(!(t=at.resolve(ht.cwd(),t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ht.ErrnoError(32);for(var r=it.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=ht.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&e.parent)break;if(n=ht.lookupNode(n,r[i]),o=it.join2(o,r[i]),ht.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;ht.isLink(n.mode);){var u=ht.readlink(o);if(o=at.resolve(it.dirname(o),u),n=ht.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new ht.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var e;;){if(ht.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:(t,e)=>{for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%ht.nameTable.length},hashAddNode:t=>{var e=ht.hashName(t.parent.id,t.name);t.name_next=ht.nameTable[e],ht.nameTable[e]=t},hashRemoveNode:t=>{var e=ht.hashName(t.parent.id,t.name);if(ht.nameTable[e]===t)ht.nameTable[e]=t.name_next;else for(var r=ht.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:(t,e)=>{var r=ht.mayLookup(t);if(r)throw new ht.ErrnoError(r,t);for(var n=ht.hashName(t.id,e),o=ht.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return ht.lookup(t,e)},createNode:(t,e,r,n)=>{var o=new ht.FSNode(t,e,r,n);return ht.hashAddNode(o),o},destroyNode:t=>{ht.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var e=ht.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>ht.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var e=ht.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:(t,e)=>{try{return ht.lookupNode(t,e),20}catch(t){}return ht.nodePermissions(t,"wx")},mayDelete:(t,e,r)=>{var n;try{n=ht.lookupNode(t,e)}catch(t){return t.errno}var o=ht.nodePermissions(t,"wx");if(o)return o;if(r){if(!ht.isDir(n.mode))return 54;if(ht.isRoot(n)||ht.getPath(n)===ht.cwd())return 10}else if(ht.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?ht.isLink(t.mode)?32:ht.isDir(t.mode)&&("r"!==ht.flagsToPermissionString(e)||512&e)?31:ht.nodePermissions(t,ht.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,e=ht.MAX_OPEN_FDS)=>{for(var r=t;r<=e;r++)if(!ht.streams[r])return r;throw new ht.ErrnoError(33)},getStream:t=>ht.streams[t],createStream:(t,e,r)=>{ht.FSStream||(ht.FSStream=function(){this.shared={}},ht.FSStream.prototype={},Object.defineProperties(ht.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},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(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new ht.FSStream,t);var n=ht.nextfd(e,r);return t.fd=n,ht.streams[n]=t,t},closeStream:t=>{ht.streams[t]=null},chrdev_stream_ops:{open:t=>{var e=ht.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new ht.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice:(t,e)=>{ht.devices[t]={stream_ops:e}},getDevice:t=>ht.devices[t],getMounts:t=>{for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:(t,e)=>{"function"==typeof t&&(e=t,t=!1),ht.syncFSRequests++,ht.syncFSRequests>1&&b("warning: "+ht.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=ht.getMounts(ht.root.mount),n=0;function o(t){return ht.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:(t,e,r)=>{var n,o="/"===r,i=!r;if(o&&ht.root)throw new ht.ErrnoError(10);if(!o&&!i){var a=ht.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,ht.isMountpoint(n))throw new ht.ErrnoError(10);if(!ht.isDir(n.mode))throw new ht.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?ht.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var e=ht.lookupPath(t,{follow_mount:!1});if(!ht.isMountpoint(e.node))throw new ht.ErrnoError(28);var r=e.node,n=r.mounted,o=ht.getMounts(n);Object.keys(ht.nameTable).forEach((t=>{for(var e=ht.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&&ht.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod:(t,e,r)=>{var n=ht.lookupPath(t,{parent:!0}).node,o=it.basename(t);if(!o||"."===o||".."===o)throw new ht.ErrnoError(28);var i=ht.mayCreate(n,o);if(i)throw new ht.ErrnoError(i);if(!n.node_ops.mknod)throw new ht.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ht.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ht.mknod(t,e,0)),mkdirTree:(t,e)=>{for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{ht.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>(void 0===r&&(r=e,e=438),e|=8192,ht.mknod(t,e,r)),symlink:(t,e)=>{if(!at.resolve(t))throw new ht.ErrnoError(44);var r=ht.lookupPath(e,{parent:!0}).node;if(!r)throw new ht.ErrnoError(44);var n=it.basename(e),o=ht.mayCreate(r,n);if(o)throw new ht.ErrnoError(o);if(!r.node_ops.symlink)throw new ht.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:(t,e)=>{var r,n,o=it.dirname(t),i=it.dirname(e),a=it.basename(t),s=it.basename(e);if(r=ht.lookupPath(t,{parent:!0}).node,n=ht.lookupPath(e,{parent:!0}).node,!r||!n)throw new ht.ErrnoError(44);if(r.mount!==n.mount)throw new ht.ErrnoError(75);var u,c=ht.lookupNode(r,a),l=at.relative(t,i);if("."!==l.charAt(0))throw new ht.ErrnoError(28);if("."!==(l=at.relative(e,o)).charAt(0))throw new ht.ErrnoError(55);try{u=ht.lookupNode(n,s)}catch(t){}if(c!==u){var h=ht.isDir(c.mode),f=ht.mayDelete(r,a,h);if(f)throw new ht.ErrnoError(f);if(f=u?ht.mayDelete(n,s,h):ht.mayCreate(n,s))throw new ht.ErrnoError(f);if(!r.node_ops.rename)throw new ht.ErrnoError(63);if(ht.isMountpoint(c)||u&&ht.isMountpoint(u))throw new ht.ErrnoError(10);if(n!==r&&(f=ht.nodePermissions(r,"w")))throw new ht.ErrnoError(f);ht.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{ht.hashAddNode(c)}}},rmdir:t=>{var e=ht.lookupPath(t,{parent:!0}).node,r=it.basename(t),n=ht.lookupNode(e,r),o=ht.mayDelete(e,r,!0);if(o)throw new ht.ErrnoError(o);if(!e.node_ops.rmdir)throw new ht.ErrnoError(63);if(ht.isMountpoint(n))throw new ht.ErrnoError(10);e.node_ops.rmdir(e,r),ht.destroyNode(n)},readdir:t=>{var e=ht.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new ht.ErrnoError(54);return e.node_ops.readdir(e)},unlink:t=>{var e=ht.lookupPath(t,{parent:!0}).node;if(!e)throw new ht.ErrnoError(44);var r=it.basename(t),n=ht.lookupNode(e,r),o=ht.mayDelete(e,r,!1);if(o)throw new ht.ErrnoError(o);if(!e.node_ops.unlink)throw new ht.ErrnoError(63);if(ht.isMountpoint(n))throw new ht.ErrnoError(10);e.node_ops.unlink(e,r),ht.destroyNode(n)},readlink:t=>{var e=ht.lookupPath(t).node;if(!e)throw new ht.ErrnoError(44);if(!e.node_ops.readlink)throw new ht.ErrnoError(28);return at.resolve(ht.getPath(e.parent),e.node_ops.readlink(e))},stat:(t,e)=>{var r=ht.lookupPath(t,{follow:!e}).node;if(!r)throw new ht.ErrnoError(44);if(!r.node_ops.getattr)throw new ht.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>ht.stat(t,!0),chmod:(t,e,r)=>{var n;if(!(n="string"==typeof t?ht.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,e)=>{ht.chmod(t,e,!0)},fchmod:(t,e)=>{var r=ht.getStream(t);if(!r)throw new ht.ErrnoError(8);ht.chmod(r.node,e)},chown:(t,e,r,n)=>{var o;if(!(o="string"==typeof t?ht.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,e,r)=>{ht.chown(t,e,r,!0)},fchown:(t,e,r)=>{var n=ht.getStream(t);if(!n)throw new ht.ErrnoError(8);ht.chown(n.node,e,r)},truncate:(t,e)=>{if(e<0)throw new ht.ErrnoError(28);var r;if(!(r="string"==typeof t?ht.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);if(ht.isDir(r.mode))throw new ht.ErrnoError(31);if(!ht.isFile(r.mode))throw new ht.ErrnoError(28);var n=ht.nodePermissions(r,"w");if(n)throw new ht.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:(t,e)=>{var r=ht.getStream(t);if(!r)throw new ht.ErrnoError(8);if(0==(2097155&r.flags))throw new ht.ErrnoError(28);ht.truncate(r.node,e)},utime:(t,e,r)=>{var n=ht.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:(t,e,r)=>{if(""===t)throw new ht.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?ht.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=it.normalize(t);try{n=ht.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new ht.ErrnoError(20)}else n=ht.mknod(t,r,0),o=!0;if(!n)throw new ht.ErrnoError(44);if(ht.isChrdev(n.mode)&&(e&=-513),65536&e&&!ht.isDir(n.mode))throw new ht.ErrnoError(54);if(!o){var a=ht.mayOpen(n,e);if(a)throw new ht.ErrnoError(a)}512&e&&!o&&ht.truncate(n,0),e&=-131713;var s=ht.createStream({node:n,path:ht.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&e||(ht.readFiles||(ht.readFiles={}),t in ht.readFiles||(ht.readFiles[t]=1)),s},close:t=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{ht.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,e,r)=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new ht.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new ht.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:(t,e,r,n,o)=>{if(n<0||o<0)throw new ht.ErrnoError(28);if(ht.isClosed(t))throw new ht.ErrnoError(8);if(1==(2097155&t.flags))throw new ht.ErrnoError(8);if(ht.isDir(t.node.mode))throw new ht.ErrnoError(31);if(!t.stream_ops.read)throw new ht.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new ht.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:(t,e,r,n,o,i)=>{if(n<0||o<0)throw new ht.ErrnoError(28);if(ht.isClosed(t))throw new ht.ErrnoError(8);if(0==(2097155&t.flags))throw new ht.ErrnoError(8);if(ht.isDir(t.node.mode))throw new ht.ErrnoError(31);if(!t.stream_ops.write)throw new ht.ErrnoError(28);t.seekable&&1024&t.flags&&ht.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new ht.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);return a||(t.position+=s),s},allocate:(t,e,r)=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);if(e<0||r<=0)throw new ht.ErrnoError(28);if(0==(2097155&t.flags))throw new ht.ErrnoError(8);if(!ht.isFile(t.node.mode)&&!ht.isDir(t.node.mode))throw new ht.ErrnoError(43);if(!t.stream_ops.allocate)throw new ht.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:(t,e,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new ht.ErrnoError(2);if(1==(2097155&t.flags))throw new ht.ErrnoError(2);if(!t.stream_ops.mmap)throw new ht.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl:(t,e,r)=>{if(!t.stream_ops.ioctl)throw new ht.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:(t,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=ht.open(t,e.flags),o=ht.stat(t).size,i=new Uint8Array(o);return ht.read(n,i,0,o,0),"utf8"===e.encoding?r=j(i,0):"binary"===e.encoding&&(r=i),ht.close(n),r},writeFile:(t,e,r={})=>{r.flags=r.flags||577;var n=ht.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(M(e)+1),i=L(e,o,0,o.length);ht.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ht.write(n,e,0,e.byteLength,void 0,r.canOwn)}ht.close(n)},cwd:()=>ht.currentPath,chdir:t=>{var e=ht.lookupPath(t,{follow:!0});if(null===e.node)throw new ht.ErrnoError(44);if(!ht.isDir(e.node.mode))throw new ht.ErrnoError(54);var r=ht.nodePermissions(e.node,"x");if(r)throw new ht.ErrnoError(r);ht.currentPath=e.path},createDefaultDirectories:()=>{ht.mkdir("/tmp"),ht.mkdir("/home"),ht.mkdir("/home/web_user")},createDefaultDevices:()=>{ht.mkdir("/dev"),ht.registerDevice(ht.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),ht.mkdev("/dev/null",ht.makedev(1,3)),st.register(ht.makedev(5,0),st.default_tty_ops),st.register(ht.makedev(6,0),st.default_tty1_ops),ht.mkdev("/dev/tty",ht.makedev(5,0)),ht.mkdev("/dev/tty1",ht.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}if(_)try{var e=r(6113);return function(){return e.randomBytes(1)[0]}}catch(t){}return function(){et("randomDevice")}}();ht.createDevice("/dev","random",t),ht.createDevice("/dev","urandom",t),ht.mkdir("/dev/shm"),ht.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ht.mkdir("/proc");var t=ht.mkdir("/proc/self");ht.mkdir("/proc/self/fd"),ht.mount({mount:()=>{var e=ht.createNode(t,"fd",16895,73);return e.node_ops={lookup:(t,e)=>{var r=+e,n=ht.getStream(r);if(!n)throw new ht.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{i.stdin?ht.createDevice("/dev","stdin",i.stdin):ht.symlink("/dev/tty","/dev/stdin"),i.stdout?ht.createDevice("/dev","stdout",null,i.stdout):ht.symlink("/dev/tty","/dev/stdout"),i.stderr?ht.createDevice("/dev","stderr",null,i.stderr):ht.symlink("/dev/tty1","/dev/stderr"),ht.open("/dev/stdin",0),ht.open("/dev/stdout",1),ht.open("/dev/stderr",1)},ensureErrnoError:()=>{ht.ErrnoError||(ht.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},ht.ErrnoError.prototype=new Error,ht.ErrnoError.prototype.constructor=ht.ErrnoError,[44].forEach((t=>{ht.genericErrors[t]=new ht.ErrnoError(t),ht.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{ht.ensureErrnoError(),ht.nameTable=new Array(4096),ht.mount(lt,{},"/"),ht.createDefaultDirectories(),ht.createDefaultDevices(),ht.createSpecialDirectories(),ht.filesystems={MEMFS:lt}},init:(t,e,r)=>{ht.init.initialized=!0,ht.ensureErrnoError(),i.stdin=t||i.stdin,i.stdout=e||i.stdout,i.stderr=r||i.stderr,ht.createStandardStreams()},quit:()=>{ht.init.initialized=!1;for(var t=0;t<ht.streams.length;t++){var e=ht.streams[t];e&&ht.close(e)}},getMode:(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:(t,e)=>{var r=ht.analyzePath(t,e);return r.exists?r.object:null},analyzePath:(t,e)=>{try{t=(n=ht.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ht.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=it.basename(t),n=ht.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:(t,e,r,n)=>{t="string"==typeof t?t:ht.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=it.join2(t,i);try{ht.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,e,r,n,o)=>{var i=it.join2("string"==typeof t?t:ht.getPath(t),e),a=ht.getMode(n,o);return ht.create(i,a)},createDataFile:(t,e,r,n,o,i)=>{var a=e;t&&(t="string"==typeof t?t:ht.getPath(t),a=e?it.join2(t,e):t);var s=ht.getMode(n,o),u=ht.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,h=r.length;l<h;++l)c[l]=r.charCodeAt(l);r=c}ht.chmod(u,146|s);var f=ht.open(u,577);ht.write(f,r,0,r.length,0,i),ht.close(f),ht.chmod(u,s)}return u},createDevice:(t,e,r,n)=>{var o=it.join2("string"==typeof t?t:ht.getPath(t),e),i=ht.getMode(!!r,!!n);ht.createDevice.major||(ht.createDevice.major=64);var a=ht.makedev(ht.createDevice.major++,0);return ht.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new ht.ErrnoError(29)}if(void 0===u&&0===a)throw new ht.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,e,r,o,i)=>{for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new ht.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),ht.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=Et(a(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new ht.ErrnoError(29)}},createLazyFile:(t,e,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+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",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Et(o.responseText||"",!0)})(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,w("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(!g)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=ht.createFile(t,e,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 l(t,e,r,n,o){var i=t.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++)e[r+s]=i[o+s];else for(s=0;s<a;s++)e[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((t=>{var e=u.stream_ops[t];c[t]=function(){return ht.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(t,e,r,n,o)=>(ht.forceLoadFile(u),l(t,e,r,n,o)),c.mmap=(t,e,r,n,o)=>{ht.forceLoadFile(u);var i=ut();if(!i)throw new ht.ErrnoError(48);return l(t,S,i,e,r),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(t,e,r,n,o,i,a,u,c,l)=>{var h=e?at.resolve(it.join2(t,e)):t;function f(r){function s(r){l&&l(),u||ht.createDataFile(t,e,r,n,o,c),i&&i(),tt()}Browser.handledByPreloadPlugin(r,h,s,(()=>{a&&a(),tt()}))||s(r)}J(),"string"==typeof r?function(t,e,r,n){var o=n?"":"al "+t;s(t,(function(r){A(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(r)),o&&tt()}),(function(e){if(!r)throw'Loading data file "'+t+'" failed.';r()})),o&&J()}(r,(t=>f(t)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=ht.indexedDB();try{var o=n.open(ht.DB_NAME(),ht.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(ht.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ht.DB_STORE_NAME],"readwrite"),i=n.objectStore(ht.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((t=>{var e=i.put(ht.analyzePath(t).object.contents,t);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=ht.indexedDB();try{var o=n.open(ht.DB_NAME(),ht.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([ht.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(ht.DB_STORE_NAME),s=0,u=0,c=t.length;function l(){0==u?e():r()}t.forEach((t=>{var e=a.get(t);e.onsuccess=()=>{ht.analyzePath(t).exists&&ht.unlink(t),ht.createDataFile(it.dirname(t),it.basename(t),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=r},o.onerror=r}},ft={DEFAULT_POLLMASK:5,calculateAt:function(t,e,r){if(it.isAbs(e))return e;var n;if(-100===t)n=ht.cwd();else{var o=ht.getStream(t);if(!o)throw new ht.ErrnoError(8);n=o.path}if(0==e.length){if(!r)throw new ht.ErrnoError(44);return n}return it.join2(n,e)},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&it.normalize(e)!==it.normalize(ht.getPath(t.node)))return-54;throw t}return P[r>>2]=n.dev,P[r+4>>2]=0,P[r+8>>2]=n.ino,P[r+12>>2]=n.mode,P[r+16>>2]=n.nlink,P[r+20>>2]=n.uid,P[r+24>>2]=n.gid,P[r+28>>2]=n.rdev,P[r+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)],P[r+40>>2]=K[0],P[r+44>>2]=K[1],P[r+48>>2]=4096,P[r+52>>2]=n.blocks,P[r+56>>2]=n.atime.getTime()/1e3|0,P[r+60>>2]=0,P[r+64>>2]=n.mtime.getTime()/1e3|0,P[r+68>>2]=0,P[r+72>>2]=n.ctime.getTime()/1e3|0,P[r+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)],P[r+80>>2]=K[0],P[r+84>>2]=K[1],0},doMsync:function(t,e,r,n,o){var i=O.slice(t,t+r);ht.msync(e,i,o,r,n)},varargs:void 0,get:function(){return ft.varargs+=4,P[ft.varargs-4>>2]},getStr:function(t){return I(t)},getStreamFromFD:function(t){var e=ht.getStream(t);if(!e)throw new ht.ErrnoError(8);return e}},pt={BUCKET_BUFFER_SIZE:8192,mount:function(t){return ht.createNode(null,"/",16895,0)},createPipe:function(){var t={buckets:[],refcnt:2};t.buckets.push({buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var e=pt.nextname(),r=pt.nextname(),n=ht.createNode(pt.root,e,4096,0),o=ht.createNode(pt.root,r,4096,0);n.pipe=t,o.pipe=t;var i=ht.createStream({path:e,node:n,flags:0,seekable:!1,stream_ops:pt.stream_ops});n.stream=i;var a=ht.createStream({path:r,node:o,flags:1,seekable:!1,stream_ops:pt.stream_ops});return o.stream=a,{readable_fd:i.fd,writable_fd:a.fd}},stream_ops:{poll:function(t){var e=t.node.pipe;if(1==(2097155&t.flags))return 260;if(e.buckets.length>0)for(var r=0;r<e.buckets.length;r++){var n=e.buckets[r];if(n.offset-n.roffset>0)return 65}return 0},ioctl:function(t,e,r){return 28},fsync:function(t){return 28},read:function(t,e,r,n,o){for(var i=t.node.pipe,a=0,s=0;s<i.buckets.length;s++){var u=i.buckets[s];a+=u.offset-u.roffset}A(e instanceof ArrayBuffer||ArrayBuffer.isView(e));var c=e.subarray(r,r+n);if(n<=0)return 0;if(0==a)throw new ht.ErrnoError(6);var l=Math.min(a,n),h=l,f=0;for(s=0;s<i.buckets.length;s++){var p=i.buckets[s],d=p.offset-p.roffset;if(l<=d){var m=p.buffer.subarray(p.roffset,p.offset);l<d?(m=m.subarray(0,l),p.roffset+=l):f++,c.set(m);break}m=p.buffer.subarray(p.roffset,p.offset),c.set(m),c=c.subarray(m.byteLength),l-=m.byteLength,f++}return f&&f==i.buckets.length&&(f--,i.buckets[f].offset=0,i.buckets[f].roffset=0),i.buckets.splice(0,f),h},write:function(t,e,r,n,o){var i=t.node.pipe;A(e instanceof ArrayBuffer||ArrayBuffer.isView(e));var a=e.subarray(r,r+n),s=a.byteLength;if(s<=0)return 0;var u=null;0==i.buckets.length?(u={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(u)):u=i.buckets[i.buckets.length-1],A(u.offset<=pt.BUCKET_BUFFER_SIZE);var c=pt.BUCKET_BUFFER_SIZE-u.offset;if(c>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;c>0&&(u.buffer.set(a.subarray(0,c),u.offset),u.offset+=c,a=a.subarray(c,a.byteLength));for(var l=a.byteLength/pt.BUCKET_BUFFER_SIZE|0,h=a.byteLength%pt.BUCKET_BUFFER_SIZE,f=0;f<l;f++){var p={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:pt.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(p),p.buffer.set(a.subarray(0,pt.BUCKET_BUFFER_SIZE)),a=a.subarray(pt.BUCKET_BUFFER_SIZE,a.byteLength)}return h>0&&(p={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0},i.buckets.push(p),p.buffer.set(a)),s},close:function(t){var e=t.node.pipe;e.refcnt--,0===e.refcnt&&(e.buckets=null)}},nextname:function(){return pt.nextname.current||(pt.nextname.current=0),"pipe["+pt.nextname.current+++"]"}},dt="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function mt(t){try{return E.grow(t-x.byteLength+65535>>>16),U(E.buffer),1}catch(t){}}ct=_?()=>{var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:()=>performance.now();var vt={};function gt(){if(!gt.strings){var t={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",_:d||"./this.program"};for(var e in vt)void 0===vt[e]?delete t[e]:t[e]=vt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);gt.strings=r}return gt.strings}function _t(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=R[e>>2],s=R[e+4>>2];e+=8;var u=ht.read(t,S,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function Dt(t,e){return e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN}var yt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=ht.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},wt=365,bt=146;function Et(t,e,r){var n=r>0?r:M(t)+1,o=new Array(n),i=L(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(yt.prototype,{read:{get:function(){return(this.mode&wt)===wt},set:function(t){t?this.mode|=wt:this.mode&=-366}},write:{get:function(){return(this.mode&bt)===bt},set:function(t){t?this.mode|=bt:this.mode&=-147}},isFolder:{get:function(){return ht.isDir(this.mode)}},isDevice:{get:function(){return ht.isChrdev(this.mode)}}}),ht.FSNode=yt,ht.staticInit();var Ct,Ft={a:function(t,e,r,n){et("Assertion failed: "+I(t)+", at: "+[e?I(e):"unknown filename",r,n?I(n):"unknown function"])},G:function(t,e){try{return t=ft.getStr(t),ht.chmod(t,e),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},F:function(t){try{var e=ft.getStreamFromFD(t);return ht.createStream(e,0).fd}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},H:function(t,e,r,n){try{if(e=ft.getStr(e),e=ft.calculateAt(t,e),-8&r)return-28;var o=ht.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&&ht.nodePermissions(o,i)?-2:0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},e:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){case 0:return(o=ft.get())<0?-28:ht.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ft.get();return n.flags|=o,0;case 5:return o=ft.get(),T[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,P[kt()>>2]=i,-1}}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}var i},z:function(t,e){try{var r=ft.getStreamFromFD(t);return ft.doStat(ht.stat,r.path,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},v:function(t,e){try{if(0===e)return-28;var r=ht.cwd(),n=M(r)+1;return e<n?-68:(N(r,t,e),n)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},m:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);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=ft.get();return P[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ft.get(),ht.ioctl(n,e,o);default:et("bad ioctl syscall "+e)}}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},x:function(t,e){try{return t=ft.getStr(t),ft.doStat(ht.lstat,t,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},w:function(t,e,r,n){try{e=ft.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=ft.calculateAt(t,e,i),ft.doStat(o?ht.lstat:ht.stat,e,r)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},h:function(t,e,r,n){ft.varargs=n;try{e=ft.getStr(e),e=ft.calculateAt(t,e);var o=n?ft.get():0;return ht.open(e,r,o).fd}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},t:function(t){try{if(0==t)throw new ht.ErrnoError(21);var e=pt.createPipe();return P[t>>2]=e.readable_fd,P[t+4>>2]=e.writable_fd,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},s:function(t,e,r,n){try{if(e=ft.getStr(e),e=ft.calculateAt(t,e),n<=0)return-28;var o=ht.readlink(e),i=Math.min(n,M(o)),a=S[r+i];return N(o,r,n+1),S[r+i]=a,i}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},q:function(t){try{return t=ft.getStr(t),ht.rmdir(t),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},y:function(t,e){try{return t=ft.getStr(t),ft.doStat(ht.stat,t,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},g:function(t,e,r){try{return e=ft.getStr(e),e=ft.calculateAt(t,e),0===r?ht.unlink(e):512===r?ht.rmdir(e):et("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},C:function(t){},E:function(t,e){et(dt)},D:function(t,e){et(dt)},l:function(){return Date.now()},B:function(){return!0},b:function(){et("")},k:ct,A:function(t,e,r){O.copyWithin(t,e,e+r)},f:function(t){var e,r,n=O.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),mt(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},n:function(t,e){var r=0;return gt().forEach((function(n,o){var i=e+r;R[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)S[e++>>0]=t.charCodeAt(n);r||(S[e>>0]=0)}(n,i),r+=n.length+1})),0},r:function(t,e){var r=gt();R[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),R[e>>2]=n,0},d:function(t){Tt(t)},c:function(t){try{var e=ft.getStreamFromFD(t);return ht.close(e),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},u:function(t,e){try{var r=ft.getStreamFromFD(t),n=r.tty?2:ht.isDir(r.mode)?3:ht.isLink(r.mode)?7:4;return S[e>>0]=n,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},o:function(t,e,r,n,o,i){try{var a=Dt(n,o);if(isNaN(a))return 61;var s=_t(ft.getStreamFromFD(t),e,r,a);return P[i>>2]=s,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},j:function(t,e,r,n){try{var o=_t(ft.getStreamFromFD(t),e,r);return P[n>>2]=o,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},p:function(t,e,r,n,o){try{var i=Dt(e,r);if(isNaN(i))return 61;var a=ft.getStreamFromFD(t);return ht.llseek(a,i,n),K=[a.position>>>0,(Y=a.position,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[o>>2]=K[0],P[o+4>>2]=K[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},i:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=R[e>>2],s=R[e+4>>2];e+=8;var u=ht.write(t,S,a,s,n);if(u<0)return-1;o+=u}return o}(ft.getStreamFromFD(t),e,r);return R[n>>2]=o,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},I:function(t){Pt(t)}},kt=(function(){var t={a:Ft};function e(t,e){var r,n=t.exports;i.asm=n,U((E=i.asm.J).buffer),i.asm.N,r=i.asm.K,z.unshift(r),tt()}function r(t){e(t.instance)}function n(e){return(y||!v&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return nt(q)})):fetch(q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+q+"'";return t.arrayBuffer()})).catch((function(){return nt(q)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),et(t)}))}if(J(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){return b("Module.instantiateWasm callback failed with error: "+t),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||rt(q)||_||"function"!=typeof fetch?n(r):fetch(q,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.K).apply(null,arguments)},i.___errno_location=function(){return(kt=i.___errno_location=i.asm.L).apply(null,arguments)}),At=(i._main=function(){return(i._main=i.asm.M).apply(null,arguments)},i.stackAlloc=function(){return(At=i.stackAlloc=i.asm.O).apply(null,arguments)});function xt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function St(t){var e=i._main;(t=t||[]).unshift(d);var r=t.length,n=At(4*(r+1)),o=n>>2;t.forEach((t=>{P[o++]=function(t){var e=M(t)+1,r=At(e);return L(t,S,r,e),r}(t)})),P[o]=0;try{var a=e(r,n);return Tt(a),a}catch(t){return function(t){if(t instanceof xt||"unwind"==t)return F;m(1,t)}(t)}}function Ot(t){function r(){Ct||(Ct=!0,i.calledRun=!0,k||(i.noFSInit||ht.init.initialized||ht.init(),ht.ignorePermissions=!1,st.init(),pt.root=ht.mount(pt,{},null),ot(z),ot(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),Rt&&St(t),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),G.unshift(t);var t;ot(G)}()))}t=t||p,X>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),H.unshift(t);var t;ot(H)}(),X>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}function Tt(t,e){F=t,Pt(t)}function Pt(t){F=t,$()||(i.onExit&&i.onExit(t),k=!0),m(t,new xt(t))}if(i.FS=ht,Q=function t(){Ct||Ot(),Ct||(Q=t)},i.run=Ot,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var Rt=!0;return i.noInitialRun&&(Rt=!1),Ot(),t.ready});t.exports=o},3825:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||__filename,function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c,l,h,f=Object.assign({},i),p=[],d="./this.program",m=(t,e)=>{throw e},v="object"==typeof window,g="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,D="";_?(D=g?r(1017).dirname(D)+"/":__dirname+"/",h=()=>{l||(c=r(7147),l=r(1017))},a=function(t,e){return h(),t=l.normalize(t),c.readFileSync(t,e?void 0:"utf8")},u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{h(),t=l.normalize(t),c.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Et))throw t})),process.on("unhandledRejection",(function(t){throw t})),m=(t,e)=>{if(G())throw process.exitCode=t,e;var r;(r=e)instanceof Et||b("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}):(v||g)&&(g?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),n&&(D=n),D=0!==D.indexOf("blob:")?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},g&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,f),f=null,i.arguments&&(p=i.arguments),i.thisProgram&&(d=i.thisProgram),i.quit&&(m=i.quit),i.wasmBinary&&(y=i.wasmBinary);var E,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&tt("no native wasm support detected");var F,k,A,x,S,O,T,P=!1,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function B(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&R)return R.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[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(t,e){return t?B(x,t,e):""}function I(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function L(t,e,r){return I(t,x,e,r)}function N(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function M(t){k=t,i.HEAP8=A=new Int8Array(t),i.HEAP16=S=new Int16Array(t),i.HEAP32=O=new Int32Array(t),i.HEAPU8=x=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=T=new Uint32Array(t),i.HEAPF32=new Float32Array(t),i.HEAPF64=new Float64Array(t)}i.INITIAL_MEMORY;var U=[],H=[],z=[],V=[];function G(){return C}var $,q,W,Y,K=0,X=null,Z=null;function Q(t){K++,i.monitorRunDependencies&&i.monitorRunDependencies(K)}function J(t){if(K--,i.monitorRunDependencies&&i.monitorRunDependencies(K),0==K&&(null!==X&&(clearInterval(X),X=null),Z)){var e=Z;Z=null,e()}}function tt(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),P=!0,F=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function et(t){return t.startsWith("data:application/octet-stream;base64,")}function rt(t){try{if(t==$&&y)return new Uint8Array(y);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){tt(t)}}function nt(t){for(;t.length>0;)t.shift()(i)}et($="objcopy.wasm")||(q=$,$=i.locateFile?i.locateFile(q,D):D+q);var ot={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=ot.isAbs(t),r="/"===t.substr(-1);return(t=ot.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=ot.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=ot.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments,0);return ot.normalize(t.join("/"))},join2:(t,e)=>ot.normalize(t+"/"+e)},it={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:lt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=ot.isAbs(n)}return(e?"/":"")+(t=ot.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=it.resolve(t).substr(1),e=it.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(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("/")}},at={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){at.ttys[t]={input:[],output:[],ops:e},lt.registerDevice(t,at.stream_ops)},stream_ops:{open:function(t){var e=at.ttys[t.node.rdev];if(!e)throw new lt.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new lt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new lt.ErrnoError(29)}if(void 0===s&&0===i)throw new lt.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new lt.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new lt.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if(_){var r=Buffer.alloc(256),n=0;try{n=c.readSync(process.stdin.fd,r,0,256,-1)}catch(t){if(!t.toString().includes("EOF"))throw t;n=0}e=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;t.input=_t(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(w(B(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(w(B(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(b(B(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(b(B(t.output,0)),t.output=[])}}};function st(t){tt()}var ut={ops_table:null,mount:function(t){return ut.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(lt.isBlkdev(r)||lt.isFIFO(r))throw new lt.ErrnoError(63);ut.ops_table||(ut.ops_table={dir:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,lookup:ut.node_ops.lookup,mknod:ut.node_ops.mknod,rename:ut.node_ops.rename,unlink:ut.node_ops.unlink,rmdir:ut.node_ops.rmdir,readdir:ut.node_ops.readdir,symlink:ut.node_ops.symlink},stream:{llseek:ut.stream_ops.llseek}},file:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:{llseek:ut.stream_ops.llseek,read:ut.stream_ops.read,write:ut.stream_ops.write,allocate:ut.stream_ops.allocate,mmap:ut.stream_ops.mmap,msync:ut.stream_ops.msync}},link:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,readlink:ut.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:lt.chrdev_stream_ops}});var o=lt.createNode(t,e,r,n);return lt.isDir(o.mode)?(o.node_ops=ut.ops_table.dir.node,o.stream_ops=ut.ops_table.dir.stream,o.contents={}):lt.isFile(o.mode)?(o.node_ops=ut.ops_table.file.node,o.stream_ops=ut.ops_table.file.stream,o.usedBytes=0,o.contents=null):lt.isLink(o.mode)?(o.node_ops=ut.ops_table.link.node,o.stream_ops=ut.ops_table.link.stream):lt.isChrdev(o.mode)&&(o.node_ops=ut.ops_table.chrdev.node,o.stream_ops=ut.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=lt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,lt.isDir(t.mode)?e.size=4096:lt.isFile(t.mode)?e.size=t.usedBytes:lt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ut.resizeFileStorage(t,e.size)},lookup:function(t,e){throw lt.genericErrors[44]},mknod:function(t,e,r,n){return ut.createNode(t,e,r,n)},rename:function(t,e,r){if(lt.isDir(t.mode)){var n;try{n=lt.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new lt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=lt.lookupNode(t,e);for(var n in r.contents)throw new lt.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=ut.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!lt.isLink(t.mode))throw new lt.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===A.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(ut.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&<.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new lt.ErrnoError(28);return n},allocate:function(t,e,r){ut.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o){if(!lt.isFile(t.node.mode))throw new lt.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==k){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),a=!0,!(i=st()))throw new lt.ErrnoError(48);A.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,e,r,n,o){if(!lt.isFile(t.node.mode))throw new lt.ErrnoError(43);return 2&o||ut.stream_ops.write(t,e,0,n,r,!1),0}}};function ct(t,e,r,n){var o=n?"":"al "+t;s(t,(function(r){var n;n='Loading data file "'+t+'" failed (no arrayBuffer).',r||tt(n),e(new Uint8Array(r)),o&&J()}),(function(e){if(!r)throw'Loading data file "'+t+'" failed.';r()})),o&&Q()}var lt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,e={})=>{if(!(t=it.resolve(lt.cwd(),t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new lt.ErrnoError(32);for(var r=ot.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=lt.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&e.parent)break;if(n=lt.lookupNode(n,r[i]),o=ot.join2(o,r[i]),lt.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;lt.isLink(n.mode);){var u=lt.readlink(o);if(o=it.resolve(ot.dirname(o),u),n=lt.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new lt.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var e;;){if(lt.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:(t,e)=>{for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%lt.nameTable.length},hashAddNode:t=>{var e=lt.hashName(t.parent.id,t.name);t.name_next=lt.nameTable[e],lt.nameTable[e]=t},hashRemoveNode:t=>{var e=lt.hashName(t.parent.id,t.name);if(lt.nameTable[e]===t)lt.nameTable[e]=t.name_next;else for(var r=lt.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:(t,e)=>{var r=lt.mayLookup(t);if(r)throw new lt.ErrnoError(r,t);for(var n=lt.hashName(t.id,e),o=lt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return lt.lookup(t,e)},createNode:(t,e,r,n)=>{var o=new lt.FSNode(t,e,r,n);return lt.hashAddNode(o),o},destroyNode:t=>{lt.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var e=lt.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>lt.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var e=lt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:(t,e)=>{try{return lt.lookupNode(t,e),20}catch(t){}return lt.nodePermissions(t,"wx")},mayDelete:(t,e,r)=>{var n;try{n=lt.lookupNode(t,e)}catch(t){return t.errno}var o=lt.nodePermissions(t,"wx");if(o)return o;if(r){if(!lt.isDir(n.mode))return 54;if(lt.isRoot(n)||lt.getPath(n)===lt.cwd())return 10}else if(lt.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?lt.isLink(t.mode)?32:lt.isDir(t.mode)&&("r"!==lt.flagsToPermissionString(e)||512&e)?31:lt.nodePermissions(t,lt.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,e=lt.MAX_OPEN_FDS)=>{for(var r=t;r<=e;r++)if(!lt.streams[r])return r;throw new lt.ErrnoError(33)},getStream:t=>lt.streams[t],createStream:(t,e,r)=>{lt.FSStream||(lt.FSStream=function(){this.shared={}},lt.FSStream.prototype={},Object.defineProperties(lt.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},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(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new lt.FSStream,t);var n=lt.nextfd(e,r);return t.fd=n,lt.streams[n]=t,t},closeStream:t=>{lt.streams[t]=null},chrdev_stream_ops:{open:t=>{var e=lt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new lt.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice:(t,e)=>{lt.devices[t]={stream_ops:e}},getDevice:t=>lt.devices[t],getMounts:t=>{for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:(t,e)=>{"function"==typeof t&&(e=t,t=!1),lt.syncFSRequests++,lt.syncFSRequests>1&&b("warning: "+lt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=lt.getMounts(lt.root.mount),n=0;function o(t){return lt.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:(t,e,r)=>{var n,o="/"===r,i=!r;if(o&<.root)throw new lt.ErrnoError(10);if(!o&&!i){var a=lt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,lt.isMountpoint(n))throw new lt.ErrnoError(10);if(!lt.isDir(n.mode))throw new lt.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?lt.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var e=lt.lookupPath(t,{follow_mount:!1});if(!lt.isMountpoint(e.node))throw new lt.ErrnoError(28);var r=e.node,n=r.mounted,o=lt.getMounts(n);Object.keys(lt.nameTable).forEach((t=>{for(var e=lt.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&<.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod:(t,e,r)=>{var n=lt.lookupPath(t,{parent:!0}).node,o=ot.basename(t);if(!o||"."===o||".."===o)throw new lt.ErrnoError(28);var i=lt.mayCreate(n,o);if(i)throw new lt.ErrnoError(i);if(!n.node_ops.mknod)throw new lt.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,lt.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,lt.mknod(t,e,0)),mkdirTree:(t,e)=>{for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{lt.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>(void 0===r&&(r=e,e=438),e|=8192,lt.mknod(t,e,r)),symlink:(t,e)=>{if(!it.resolve(t))throw new lt.ErrnoError(44);var r=lt.lookupPath(e,{parent:!0}).node;if(!r)throw new lt.ErrnoError(44);var n=ot.basename(e),o=lt.mayCreate(r,n);if(o)throw new lt.ErrnoError(o);if(!r.node_ops.symlink)throw new lt.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:(t,e)=>{var r,n,o=ot.dirname(t),i=ot.dirname(e),a=ot.basename(t),s=ot.basename(e);if(r=lt.lookupPath(t,{parent:!0}).node,n=lt.lookupPath(e,{parent:!0}).node,!r||!n)throw new lt.ErrnoError(44);if(r.mount!==n.mount)throw new lt.ErrnoError(75);var u,c=lt.lookupNode(r,a),l=it.relative(t,i);if("."!==l.charAt(0))throw new lt.ErrnoError(28);if("."!==(l=it.relative(e,o)).charAt(0))throw new lt.ErrnoError(55);try{u=lt.lookupNode(n,s)}catch(t){}if(c!==u){var h=lt.isDir(c.mode),f=lt.mayDelete(r,a,h);if(f)throw new lt.ErrnoError(f);if(f=u?lt.mayDelete(n,s,h):lt.mayCreate(n,s))throw new lt.ErrnoError(f);if(!r.node_ops.rename)throw new lt.ErrnoError(63);if(lt.isMountpoint(c)||u&<.isMountpoint(u))throw new lt.ErrnoError(10);if(n!==r&&(f=lt.nodePermissions(r,"w")))throw new lt.ErrnoError(f);lt.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{lt.hashAddNode(c)}}},rmdir:t=>{var e=lt.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=lt.lookupNode(e,r),o=lt.mayDelete(e,r,!0);if(o)throw new lt.ErrnoError(o);if(!e.node_ops.rmdir)throw new lt.ErrnoError(63);if(lt.isMountpoint(n))throw new lt.ErrnoError(10);e.node_ops.rmdir(e,r),lt.destroyNode(n)},readdir:t=>{var e=lt.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new lt.ErrnoError(54);return e.node_ops.readdir(e)},unlink:t=>{var e=lt.lookupPath(t,{parent:!0}).node;if(!e)throw new lt.ErrnoError(44);var r=ot.basename(t),n=lt.lookupNode(e,r),o=lt.mayDelete(e,r,!1);if(o)throw new lt.ErrnoError(o);if(!e.node_ops.unlink)throw new lt.ErrnoError(63);if(lt.isMountpoint(n))throw new lt.ErrnoError(10);e.node_ops.unlink(e,r),lt.destroyNode(n)},readlink:t=>{var e=lt.lookupPath(t).node;if(!e)throw new lt.ErrnoError(44);if(!e.node_ops.readlink)throw new lt.ErrnoError(28);return it.resolve(lt.getPath(e.parent),e.node_ops.readlink(e))},stat:(t,e)=>{var r=lt.lookupPath(t,{follow:!e}).node;if(!r)throw new lt.ErrnoError(44);if(!r.node_ops.getattr)throw new lt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>lt.stat(t,!0),chmod:(t,e,r)=>{var n;if(!(n="string"==typeof t?lt.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,e)=>{lt.chmod(t,e,!0)},fchmod:(t,e)=>{var r=lt.getStream(t);if(!r)throw new lt.ErrnoError(8);lt.chmod(r.node,e)},chown:(t,e,r,n)=>{var o;if(!(o="string"==typeof t?lt.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,e,r)=>{lt.chown(t,e,r,!0)},fchown:(t,e,r)=>{var n=lt.getStream(t);if(!n)throw new lt.ErrnoError(8);lt.chown(n.node,e,r)},truncate:(t,e)=>{if(e<0)throw new lt.ErrnoError(28);var r;if(!(r="string"==typeof t?lt.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);if(lt.isDir(r.mode))throw new lt.ErrnoError(31);if(!lt.isFile(r.mode))throw new lt.ErrnoError(28);var n=lt.nodePermissions(r,"w");if(n)throw new lt.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:(t,e)=>{var r=lt.getStream(t);if(!r)throw new lt.ErrnoError(8);if(0==(2097155&r.flags))throw new lt.ErrnoError(28);lt.truncate(r.node,e)},utime:(t,e,r)=>{var n=lt.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:(t,e,r)=>{if(""===t)throw new lt.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?lt.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=ot.normalize(t);try{n=lt.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new lt.ErrnoError(20)}else n=lt.mknod(t,r,0),o=!0;if(!n)throw new lt.ErrnoError(44);if(lt.isChrdev(n.mode)&&(e&=-513),65536&e&&!lt.isDir(n.mode))throw new lt.ErrnoError(54);if(!o){var a=lt.mayOpen(n,e);if(a)throw new lt.ErrnoError(a)}512&e&&!o&<.truncate(n,0),e&=-131713;var s=lt.createStream({node:n,path:lt.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&e||(lt.readFiles||(lt.readFiles={}),t in lt.readFiles||(lt.readFiles[t]=1)),s},close:t=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{lt.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,e,r)=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new lt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new lt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:(t,e,r,n,o)=>{if(n<0||o<0)throw new lt.ErrnoError(28);if(lt.isClosed(t))throw new lt.ErrnoError(8);if(1==(2097155&t.flags))throw new lt.ErrnoError(8);if(lt.isDir(t.node.mode))throw new lt.ErrnoError(31);if(!t.stream_ops.read)throw new lt.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new lt.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:(t,e,r,n,o,i)=>{if(n<0||o<0)throw new lt.ErrnoError(28);if(lt.isClosed(t))throw new lt.ErrnoError(8);if(0==(2097155&t.flags))throw new lt.ErrnoError(8);if(lt.isDir(t.node.mode))throw new lt.ErrnoError(31);if(!t.stream_ops.write)throw new lt.ErrnoError(28);t.seekable&&1024&t.flags&<.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new lt.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);return a||(t.position+=s),s},allocate:(t,e,r)=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);if(e<0||r<=0)throw new lt.ErrnoError(28);if(0==(2097155&t.flags))throw new lt.ErrnoError(8);if(!lt.isFile(t.node.mode)&&!lt.isDir(t.node.mode))throw new lt.ErrnoError(43);if(!t.stream_ops.allocate)throw new lt.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:(t,e,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new lt.ErrnoError(2);if(1==(2097155&t.flags))throw new lt.ErrnoError(2);if(!t.stream_ops.mmap)throw new lt.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl:(t,e,r)=>{if(!t.stream_ops.ioctl)throw new lt.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:(t,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=lt.open(t,e.flags),o=lt.stat(t).size,i=new Uint8Array(o);return lt.read(n,i,0,o,0),"utf8"===e.encoding?r=B(i,0):"binary"===e.encoding&&(r=i),lt.close(n),r},writeFile:(t,e,r={})=>{r.flags=r.flags||577;var n=lt.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(N(e)+1),i=I(e,o,0,o.length);lt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");lt.write(n,e,0,e.byteLength,void 0,r.canOwn)}lt.close(n)},cwd:()=>lt.currentPath,chdir:t=>{var e=lt.lookupPath(t,{follow:!0});if(null===e.node)throw new lt.ErrnoError(44);if(!lt.isDir(e.node.mode))throw new lt.ErrnoError(54);var r=lt.nodePermissions(e.node,"x");if(r)throw new lt.ErrnoError(r);lt.currentPath=e.path},createDefaultDirectories:()=>{lt.mkdir("/tmp"),lt.mkdir("/home"),lt.mkdir("/home/web_user")},createDefaultDevices:()=>{lt.mkdir("/dev"),lt.registerDevice(lt.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),lt.mkdev("/dev/null",lt.makedev(1,3)),at.register(lt.makedev(5,0),at.default_tty_ops),at.register(lt.makedev(6,0),at.default_tty1_ops),lt.mkdev("/dev/tty",lt.makedev(5,0)),lt.mkdev("/dev/tty1",lt.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}if(_)try{var e=r(6113);return function(){return e.randomBytes(1)[0]}}catch(t){}return function(){tt("randomDevice")}}();lt.createDevice("/dev","random",t),lt.createDevice("/dev","urandom",t),lt.mkdir("/dev/shm"),lt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{lt.mkdir("/proc");var t=lt.mkdir("/proc/self");lt.mkdir("/proc/self/fd"),lt.mount({mount:()=>{var e=lt.createNode(t,"fd",16895,73);return e.node_ops={lookup:(t,e)=>{var r=+e,n=lt.getStream(r);if(!n)throw new lt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{i.stdin?lt.createDevice("/dev","stdin",i.stdin):lt.symlink("/dev/tty","/dev/stdin"),i.stdout?lt.createDevice("/dev","stdout",null,i.stdout):lt.symlink("/dev/tty","/dev/stdout"),i.stderr?lt.createDevice("/dev","stderr",null,i.stderr):lt.symlink("/dev/tty1","/dev/stderr"),lt.open("/dev/stdin",0),lt.open("/dev/stdout",1),lt.open("/dev/stderr",1)},ensureErrnoError:()=>{lt.ErrnoError||(lt.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},lt.ErrnoError.prototype=new Error,lt.ErrnoError.prototype.constructor=lt.ErrnoError,[44].forEach((t=>{lt.genericErrors[t]=new lt.ErrnoError(t),lt.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{lt.ensureErrnoError(),lt.nameTable=new Array(4096),lt.mount(ut,{},"/"),lt.createDefaultDirectories(),lt.createDefaultDevices(),lt.createSpecialDirectories(),lt.filesystems={MEMFS:ut}},init:(t,e,r)=>{lt.init.initialized=!0,lt.ensureErrnoError(),i.stdin=t||i.stdin,i.stdout=e||i.stdout,i.stderr=r||i.stderr,lt.createStandardStreams()},quit:()=>{lt.init.initialized=!1;for(var t=0;t<lt.streams.length;t++){var e=lt.streams[t];e&<.close(e)}},getMode:(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:(t,e)=>{var r=lt.analyzePath(t,e);return r.exists?r.object:null},analyzePath:(t,e)=>{try{t=(n=lt.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=lt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ot.basename(t),n=lt.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:(t,e,r,n)=>{t="string"==typeof t?t:lt.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ot.join2(t,i);try{lt.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,e,r,n,o)=>{var i=ot.join2("string"==typeof t?t:lt.getPath(t),e),a=lt.getMode(n,o);return lt.create(i,a)},createDataFile:(t,e,r,n,o,i)=>{var a=e;t&&(t="string"==typeof t?t:lt.getPath(t),a=e?ot.join2(t,e):t);var s=lt.getMode(n,o),u=lt.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,h=r.length;l<h;++l)c[l]=r.charCodeAt(l);r=c}lt.chmod(u,146|s);var f=lt.open(u,577);lt.write(f,r,0,r.length,0,i),lt.close(f),lt.chmod(u,s)}return u},createDevice:(t,e,r,n)=>{var o=ot.join2("string"==typeof t?t:lt.getPath(t),e),i=lt.getMode(!!r,!!n);lt.createDevice.major||(lt.createDevice.major=64);var a=lt.makedev(lt.createDevice.major++,0);return lt.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new lt.ErrnoError(29)}if(void 0===u&&0===a)throw new lt.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,e,r,o,i)=>{for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new lt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),lt.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=_t(a(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new lt.ErrnoError(29)}},createLazyFile:(t,e,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+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",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):_t(o.responseText||"",!0)})(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,w("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(!g)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=lt.createFile(t,e,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 l(t,e,r,n,o){var i=t.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++)e[r+s]=i[o+s];else for(s=0;s<a;s++)e[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((t=>{var e=u.stream_ops[t];c[t]=function(){return lt.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(t,e,r,n,o)=>(lt.forceLoadFile(u),l(t,e,r,n,o)),c.mmap=(t,e,r,n,o)=>{lt.forceLoadFile(u);var i=st();if(!i)throw new lt.ErrnoError(48);return l(t,A,i,e,r),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(t,e,r,n,o,i,a,s,u,c)=>{var l=e?it.resolve(ot.join2(t,e)):t;function h(r){function h(r){c&&c(),s||lt.createDataFile(t,e,r,n,o,u),i&&i(),J()}Browser.handledByPreloadPlugin(r,l,h,(()=>{a&&a(),J()}))||h(r)}Q(),"string"==typeof r?ct(r,(t=>h(t)),a):h(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=lt.indexedDB();try{var o=n.open(lt.DB_NAME(),lt.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(lt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([lt.DB_STORE_NAME],"readwrite"),i=n.objectStore(lt.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((t=>{var e=i.put(lt.analyzePath(t).object.contents,t);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=lt.indexedDB();try{var o=n.open(lt.DB_NAME(),lt.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([lt.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(lt.DB_STORE_NAME),s=0,u=0,c=t.length;function l(){0==u?e():r()}t.forEach((t=>{var e=a.get(t);e.onsuccess=()=>{lt.analyzePath(t).exists&<.unlink(t),lt.createDataFile(ot.dirname(t),ot.basename(t),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=r},o.onerror=r}},ht={DEFAULT_POLLMASK:5,calculateAt:function(t,e,r){if(ot.isAbs(e))return e;var n;if(-100===t)n=lt.cwd();else{var o=lt.getStream(t);if(!o)throw new lt.ErrnoError(8);n=o.path}if(0==e.length){if(!r)throw new lt.ErrnoError(44);return n}return ot.join2(n,e)},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&ot.normalize(e)!==ot.normalize(lt.getPath(t.node)))return-54;throw t}return O[r>>2]=n.dev,O[r+4>>2]=0,O[r+8>>2]=n.ino,O[r+12>>2]=n.mode,O[r+16>>2]=n.nlink,O[r+20>>2]=n.uid,O[r+24>>2]=n.gid,O[r+28>>2]=n.rdev,O[r+32>>2]=0,Y=[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)],O[r+40>>2]=Y[0],O[r+44>>2]=Y[1],O[r+48>>2]=4096,O[r+52>>2]=n.blocks,O[r+56>>2]=n.atime.getTime()/1e3|0,O[r+60>>2]=0,O[r+64>>2]=n.mtime.getTime()/1e3|0,O[r+68>>2]=0,O[r+72>>2]=n.ctime.getTime()/1e3|0,O[r+76>>2]=0,Y=[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)],O[r+80>>2]=Y[0],O[r+84>>2]=Y[1],0},doMsync:function(t,e,r,n,o){var i=x.slice(t,t+r);lt.msync(e,i,o,r,n)},varargs:void 0,get:function(){return ht.varargs+=4,O[ht.varargs-4>>2]},getStr:function(t){return j(t)},getStreamFromFD:function(t){var e=lt.getStream(t);if(!e)throw new lt.ErrnoError(8);return e}};function ft(t){try{return E.grow(t-k.byteLength+65535>>>16),M(E.buffer),1}catch(t){}}var pt={};function dt(){if(!dt.strings){var t={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",_:d||"./this.program"};for(var e in pt)void 0===pt[e]?delete t[e]:t[e]=pt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);dt.strings=r}return dt.strings}var mt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=lt.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},vt=365,gt=146;function _t(t,e,r){var n=r>0?r:N(t)+1,o=new Array(n),i=I(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(mt.prototype,{read:{get:function(){return(this.mode&vt)===vt},set:function(t){t?this.mode|=vt:this.mode&=-366}},write:{get:function(){return(this.mode>)===gt},set:function(t){t?this.mode|=gt:this.mode&=-147}},isFolder:{get:function(){return lt.isDir(this.mode)}},isDevice:{get:function(){return lt.isChrdev(this.mode)}}}),lt.FSNode=mt,lt.staticInit();var Dt,yt={b:function(t,e,r,n){tt("Assertion failed: "+j(t)+", at: "+[e?j(e):"unknown filename",r,n?j(n):"unknown function"])},k:function(t,e){try{return t=ht.getStr(t),lt.chmod(t,e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},D:function(t){try{var e=ht.getStreamFromFD(t);return lt.createStream(e,0).fd}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},E:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e),-8&r)return-28;var o=lt.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&<.nodePermissions(o,i)?-2:0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},B:function(t,e){try{return lt.fchmod(t,e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},d:function(t,e,r){ht.varargs=r;try{var n=ht.getStreamFromFD(t);switch(e){case 0:return(o=ht.get())<0?-28:lt.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ht.get();return n.flags|=o,0;case 5:return o=ht.get(),S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,O[wt()>>2]=i,-1}}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}var i},z:function(t,e){try{var r=ht.getStreamFromFD(t);return ht.doStat(lt.stat,r.path,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},v:function(t,e){try{if(0===e)return-28;var r=lt.cwd(),n=N(r)+1;return e<n?-68:(L(r,t,e),n)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},l:function(t,e,r){ht.varargs=r;try{var n=ht.getStreamFromFD(t);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=ht.get();return O[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ht.get(),lt.ioctl(n,e,o);default:tt("bad ioctl syscall "+e)}}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},x:function(t,e){try{return t=ht.getStr(t),ht.doStat(lt.lstat,t,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},u:function(t,e,r){try{return e=ht.getStr(e),e=ht.calculateAt(t,e),"/"===(e=ot.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),lt.mkdir(e,r,0),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},w:function(t,e,r,n){try{e=ht.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=ht.calculateAt(t,e,i),ht.doStat(o?lt.lstat:lt.stat,e,r)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},i:function(t,e,r,n){ht.varargs=n;try{e=ht.getStr(e),e=ht.calculateAt(t,e);var o=n?ht.get():0;return lt.open(e,r,o).fd}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},t:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e),n<=0)return-28;var o=lt.readlink(e),i=Math.min(n,N(o)),a=A[r+i];return L(o,r,n+1),A[r+i]=a,i}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},s:function(t){try{return t=ht.getStr(t),lt.rmdir(t),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},y:function(t,e){try{return t=ht.getStr(t),ht.doStat(lt.stat,t,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},r:function(t,e,r){try{return e=ht.getStr(e),e=ht.calculateAt(t,e),0===r?lt.unlink(e):512===r?lt.rmdir(e):tt("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},q:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e,!0),r){var o=O[r>>2],i=O[r+4>>2];a=1e3*o+i/1e6,s=1e3*(o=O[(r+=8)>>2])+(i=O[r+4>>2])/1e6}else var a=Date.now(),s=a;return lt.utime(e,a,s),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},j:function(){return Date.now()},C:function(){return!0},a:function(){tt("")},A:function(t,e,r){x.copyWithin(t,e,e+r)},e:function(t){var e,r,n=x.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ft(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},m:function(t,e){var r=0;return dt().forEach((function(n,o){var i=e+r;T[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)A[e++>>0]=t.charCodeAt(n);r||(A[e>>0]=0)}(n,i),r+=n.length+1})),0},o:function(t,e){var r=dt();T[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),T[e>>2]=n,0},f:function(t){kt(t)},c:function(t){try{var e=ht.getStreamFromFD(t);return lt.close(e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},p:function(t,e){try{var r=ht.getStreamFromFD(t),n=r.tty?2:lt.isDir(r.mode)?3:lt.isLink(r.mode)?7:4;return A[e>>0]=n,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},h:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=T[e>>2],s=T[e+4>>2];e+=8;var u=lt.read(t,A,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(ht.getStreamFromFD(t),e,r);return O[n>>2]=o,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},n:function(t,e,r,n,o){try{var i=(u=r)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=ht.getStreamFromFD(t);return lt.llseek(a,i,n),Y=[a.position>>>0,(W=a.position,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],O[o>>2]=Y[0],O[o+4>>2]=Y[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}var s,u},g:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=T[e>>2],s=T[e+4>>2];e+=8;var u=lt.write(t,A,a,s,n);if(u<0)return-1;o+=u}return o}(ht.getStreamFromFD(t),e,r);return T[n>>2]=o,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},F:function(t){At(t)}},wt=(function(){var t={a:yt};function e(t,e){var r,n=t.exports;i.asm=n,M((E=i.asm.G).buffer),i.asm.K,r=i.asm.H,H.unshift(r),J()}function r(t){e(t.instance)}function n(e){return(y||!v&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return rt($)})):fetch($,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+$+"'";return t.arrayBuffer()})).catch((function(){return rt($)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),tt(t)}))}if(Q(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){return b("Module.instantiateWasm callback failed with error: "+t),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||et($)||_||"function"!=typeof fetch?n(r):fetch($,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.H).apply(null,arguments)},i._main=function(){return(i._main=i.asm.I).apply(null,arguments)},i.___errno_location=function(){return(wt=i.___errno_location=i.asm.J).apply(null,arguments)}),bt=i.stackAlloc=function(){return(bt=i.stackAlloc=i.asm.L).apply(null,arguments)};function Et(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Ct(t){var e=i._main;(t=t||[]).unshift(d);var r=t.length,n=bt(4*(r+1)),o=n>>2;t.forEach((t=>{O[o++]=function(t){var e=N(t)+1,r=bt(e);return I(t,A,r,e),r}(t)})),O[o]=0;try{var a=e(r,n);return kt(a),a}catch(t){return function(t){if(t instanceof Et||"unwind"==t)return F;m(1,t)}(t)}}function Ft(t){function r(){Dt||(Dt=!0,i.calledRun=!0,P||(i.noFSInit||lt.init.initialized||lt.init(),lt.ignorePermissions=!1,at.init(),nt(H),nt(z),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),xt&&Ct(t),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),V.unshift(t);var t;nt(V)}()))}t=t||p,K>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),U.unshift(t);var t;nt(U)}(),K>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}function kt(t,e){F=t,At(t)}function At(t){F=t,G()||(i.onExit&&i.onExit(t),P=!0),m(t,new Et(t))}if(i.FS=lt,Z=function t(){Dt||Ft(),Dt||(Z=t)},i.run=Ft,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var xt=!0;return i.noInitialRun&&(xt=!1),Ft(),t.ready});t.exports=o},7757:(t,e,r)=>{t.exports=r(5666)},4277:t=>{"use strict";t.exports=({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}},382:(t,e,r)=>{if("undefined"!=typeof SHARED_CONFIG)r.p=SHARED_CONFIG.url_base.cdn+"/";else{var n=r(1017).resolve;r.p=n(__dirname)+"/"}},9846:t=>{"use strict";t.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},4601:(t,e,r)=>{"use strict";var n;try{throw new Error}catch(t){n=t}var o=r(679),i=r(7824);function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new i(16),this._normalQueue=new i(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=o}function s(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},a.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout((function(){t(e)}),0);else try{this._schedule((function(){t(e)}))}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},a.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},a.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},a.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,t.exports.firstLineError=n},3635:t=>{"use strict";t.exports=function(t,e,r,n){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(i),l=new t(e);l._propagateFrom(this,1);var h=this._target();if(l._setBoundTo(c),c instanceof t){var f={promiseRejectionQueued:!1,promise:l,target:h,bindingPromise:c};h._then(e,a,void 0,l,f),c._then(s,u,void 0,l,f),l._setOnCancel(c)}else l._resolveCallback(h);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},3786:(t,e,r)=>{"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var o=r(7502)();o.noConflict=function(){try{Promise===o&&(Promise=n)}catch(t){}return o},t.exports=o},2293:(t,e,r)=>{"use strict";var n=Object.create;if(n){var o=n(null),i=n(null);o[" size"]=i[" size"]=0}t.exports=function(t){var e,n,a=r(5942),s=a.canEvaluate,u=a.isIdentifier,c=function(t){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,t))(f)},l=function(t){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",t))},h=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!u(t))return null;if(n=e(t),r[t]=n,r[" size"]++,r[" size"]>512){for(var o=Object.keys(r),i=0;i<256;++i)delete r[o[i]];r[" size"]=o.length-256}}return n};function f(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var o="Object "+a.classString(e)+" has no method '"+a.toString(r)+"'";throw new t.TypeError(o)}return n}function p(t){return f(t,this.pop()).apply(t,this)}function d(t){return t[this]}function m(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return h(t,c,o)},n=function(t){return h(t,l,i)},t.prototype.call=function(t){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),o=1;o<r;++o)n[o-1]=arguments[o];if(s){var i=e(t);if(null!==i)return this._then(i,void 0,void 0,n,void 0)}return n.push(t),this._then(p,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=m;else if(s){var r=n(t);e=null!==r?r:d}else e=d;return this._then(e,void 0,void 0,t,void 0)}}},1735:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i=r(5942),a=i.tryCatch,s=i.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},9976:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(5942),n=r(9571).keys,o=e.tryCatch,i=e.errorObj;return function(r,a,s){return function(u){var c=s._boundValue();t:for(var l=0;l<r.length;++l){var h=r[l];if(h===Error||null!=h&&h.prototype instanceof Error){if(u instanceof h)return o(a).call(c,u)}else if("function"==typeof h){var f=o(h).call(c,u);if(f===i)return f;if(f)return o(a).call(c,u)}else if(e.isObject(u)){for(var p=n(h),d=0;d<p.length;++d){var m=p[d];if(h[m]!=u[m])continue t}return o(a).call(c,u)}}return t}}}},5910:t=>{"use strict";t.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function o(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},461:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i,a,s,u,c=t._async,l=r(7621).Warning,h=r(5942),f=r(9571),p=h.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,m=/\((?:timers\.js):\d+:\d+\)/,v=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,_=null,D=!1,y=!(0==h.env("BLUEBIRD_DEBUG")||!h.env("BLUEBIRD_DEBUG")&&"development"!==h.env("NODE_ENV")),w=!(0==h.env("BLUEBIRD_WARNINGS")||!y&&!h.env("BLUEBIRD_WARNINGS")),b=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!y&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}u=function(t){e.push(t),setTimeout(r,1)},f.defineProperty(t,"_unhandledRejectionCheck",{value:r}),f.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),u(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){W("rejectionHandled",i,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),W("unhandledRejection",a,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return V(t,e,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=h.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();i=h.contextBind(r,e)};var C=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!et.longStackTraces&&K()){var r=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,o=t.prototype._dereferenceTrace;et.longStackTraces=!0,C=function(){if(c.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=r,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=o,e.deactivateLongStackTraces(),et.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=H,t.prototype._dereferenceTrace=z,e.activateLongStackTraces()}},t.hasLongStackTraces=function(){return et.longStackTraces&&K()};var F={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},k=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return f.defineProperty(n,"promise",{value:r.promise}),f.defineProperty(n,"reason",{value:r.reason}),t(F[e],n)}}if("function"==typeof Event){e=new Event("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,f.defineProperty(n,"promise",{value:r.promise}),f.defineProperty(n,"reason",{value:r.reason}),t(F[e],n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(F[e],n)}}catch(t){}return function(){return!1}}(),A=h.isNode?function(){return process.emit.apply(process,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function x(t,e){return{promise:e}}var S={promiseCreated:x,promiseFulfilled:x,promiseRejected:x,promiseResolved:x,promiseCancelled:x,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:x},O=function(t){var e=!1;try{e=A.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var r=!1;try{r=k(t,S[t].apply(null,arguments))}catch(t){c.throwLater(t),r=!0}return r||e};function T(){return!1}function P(t,e,r){var n=this;try{t(e,r,(function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+h.toString(t));n._attachCancellationCallback(t)}))}catch(t){return t}}function R(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function B(){return this._onCancelField}function j(t){this._onCancelField=t}function I(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&C()),"warnings"in e){var r=e.warnings;et.warnings=!!r,E=et.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!et.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=I,t.prototype._propagateFrom=L,t.prototype._onCancel=B,t.prototype._setOnCancel=j,t.prototype._attachCancellationCallback=R,t.prototype._execute=P,N=L,et.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!et.monitoring?(et.monitoring=!0,t.prototype._fireEvent=O):!e.monitoring&&et.monitoring&&(et.monitoring=!1,t.prototype._fireEvent=T)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var i=et.asyncHooks,a=!!e.asyncHooks;i!==a&&(et.asyncHooks=a,a?n():o())}return t},t.prototype._fireEvent=T,t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(t){},t.prototype._attachCancellationCallback=function(t){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var N=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function M(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new J(this._peekContext())}function H(t,e){if(p(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=$(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function V(e,r,n){if(et.warnings){var o,i=new l(e);if(r)n._attachExtraTrace(i);else if(et.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(i);else{var a=$(i);i.stack=a.message+"\n"+a.stack.join("\n")}O("warning",i)||q(i,"",!0)}}function G(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],o=" (No stack trace)"===n||g.test(n),i=o&&X(n);o&&!i&&(D&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function $(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||g.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:G(e)}}function q(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var o=t.stack;n=e+_(o,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function W(t,e,r,n){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){c.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||o||q(r,"Unhandled rejection "):O(t,n)}function Y(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():h.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){var e=41;if(t.length<e)return t;return t.substr(0,e-3)+"..."}(e)+">, no stack trace)"}function K(){return"function"==typeof tt}var X=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match(Z);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function J(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);tt(this,J),e>32&&this.uncycle()}h.inherits(J,Error),e.CapturedTrace=J,J.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,o=this;void 0!==o;++n)e.push(o),o=o._parent;for(n=(t=this._length=n)-1;n>=0;--n){var i=e[n].stack;void 0===r[i]&&(r[i]=n)}for(n=0;n<t;++n){var a=r[e[n].stack];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var u=s._length+1,c=n-2;c>=0;--c)e[c]._length=u,u++;return}}}},J.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=$(t),r=e.message,n=[e.stack],o=this;void 0!==o;)n.push(G(o.stack.split("\n"))),o=o._parent;!function(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],o=e.length-1,i=e[o],a=-1,s=n.length-1;s>=0;--s)if(n[s]===i){a=s;break}for(s=a;s>=0;--s){var u=n[s];if(e[o]!==u)break;e.pop(),o--}e=n}}(n),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(n),h.notEnumerableProp(t,"stack",function(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var tt=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():Y(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=t,_=e;var r=Error.captureStackTrace;return X=function(t){return d.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,o=new Error;if("string"==typeof o.stack&&o.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,_=e,D=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return!("stack"in o)&&n&&"number"==typeof Error.stackTraceLimit?(g=t,_=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}):(_=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Y(e):e.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},h.isNode&&process.stderr.isTTY?s=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var et={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return b&&t.longStackTraces(),{asyncHooks:function(){return et.asyncHooks},longStackTraces:function(){return et.longStackTraces},warnings:function(){return et.warnings},cancellation:function(){return et.cancellation},monitoring:function(){return et.monitoring},propagateFromFunction:function(){return N},boundValueFunction:function(){return M},checkForgottenReturns:function(t,e,r,n,o){if(void 0===t&&null!==e&&E){if(void 0!==o&&o._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=G(s),c=u.length-1;c>=0;--c){var l=u[c];if(!m.test(l)){var h=l.match(v);h&&(i="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(u.length>0){var f=u[0];for(c=0;c<s.length;++c)if(s[c]===f){c>0&&(a="\n"+s[c-1]);break}}}var p="a promise was created in a "+r+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(p,!0,e)}},setBounds:function(t,e){if(K()){for(var r,n,o=(t.stack||"").split("\n"),i=(e.stack||"").split("\n"),a=-1,s=-1,u=0;u<o.length;++u){if(c=Q(o[u])){r=c.fileName,a=c.line;break}}for(u=0;u<i.length;++u){var c;if(c=Q(i[u])){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(X=function(t){if(d.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}},warn:V,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),V(r)},CapturedTrace:J,fireDomEvent:k,fireGlobalEvent:A}}},5632:t=>{"use strict";t.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var o=function(){return n};return this.caught(r,o)}}},6574:t=>{"use strict";t.exports=function(t,e){var r=t.reduce,n=t.all;function o(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(o,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(o,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},7621:(t,e,r)=>{"use strict";var n,o,i=r(9571),a=i.freeze,s=r(5942),u=s.inherits,c=s.notEnumerableProp;function l(t,e){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var h=l("Warning","warning"),f=l("CancellationError","cancellation error"),p=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{n=TypeError,o=RangeError}catch(t){n=l("TypeError","type error"),o=l("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<m.length;++v)"function"==typeof Array.prototype[m[v]]&&(d.prototype[m[v]]=Array.prototype[m[v]]);i.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;function _(t){if(!(this instanceof _))return new _(t);c(this,"name","OperationalError"),c(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(c(this,"message",t.message),c(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",o=n.split("\n"),i=0;i<o.length;++i)o[i]=t+o[i];e+=(n=o.join("\n"))+"\n"}return g--,e},u(_,Error);var D=Error.__BluebirdErrorTypes__;D||(D=a({CancellationError:f,TimeoutError:p,OperationalError:_,RejectionError:_,AggregateError:d}),i.defineProperty(Error,"__BluebirdErrorTypes__",{value:D,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:o,CancellationError:D.CancellationError,OperationalError:D.OperationalError,TimeoutError:D.TimeoutError,AggregateError:D.AggregateError,Warning:h}},9571:t=>{var e=function(){"use strict";return void 0===this}();if(e)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:e,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var r={}.hasOwnProperty,n={}.toString,o={}.constructor.prototype,i=function(t){var e=[];for(var n in t)r.call(t,n)&&e.push(n);return e};t.exports={isArray:function(t){try{return"[object Array]"===n.call(t)}catch(t){return!1}},keys:i,names:i,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:e,propertyIsWritable:function(){return!0}}}},6777:t=>{"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,o){return r(t,n,o,e)}}},7707:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=t.CancellationError,a=o.errorObj,s=r(9976)(n);function u(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function c(t){this.finallyHandler=t}function l(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function h(){return p.call(this,this.promise._target()._settledValue())}function f(t){if(!l(this,t))return a.e=t,a}function p(r){var o=this.promise,s=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?s.call(o._boundValue()):s.call(o._boundValue(),r);if(u===n)return u;if(void 0!==u){o._setReturnedNonUndefined();var p=e(u,o);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new i("late cancellation observer");return o._attachExtraTrace(d),a.e=d,a}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(h,f,void 0,this,void 0)}}}return o.isRejected()?(l(this),a.e=r,a):(l(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){l(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,p);var n,i=new Array(r-1),a=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!o.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+o.classString(u)));i[a++]=u}i.length=a;var c=arguments[n];return this._passThrough(s(i,c,this),1,void 0,p)},u}},687:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(7621).TypeError,u=r(5942),c=u.errorObj,l=u.tryCatch,h=[];function f(e,r,o,i){if(a.cancellation()){var s=new t(n),u=this._finallyPromise=new t(n);this._promise=s.lastly((function(){return u})),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new t(n))._captureStackTrace()}this._stack=i,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(f,i),f.prototype._isResolved=function(){return null===this._promise},f.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},f.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=l(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=l(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},f.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=l(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},f.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=l(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},f.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},f.prototype.promise=function(){return this._promise},f.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},f.prototype._continue=function(e){var r=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var i=o(n,this._promise);if(i instanceof t||(i=function(e,r,n){for(var i=0;i<r.length;++i){n._pushContext();var a=l(r[i])(e);if(n._popContext(),a===c){n._pushContext();var s=t.reject(c.e);return n._popContext(),s}var u=o(a,n);if(u instanceof t)return u}return null}(i,this._yieldHandlers,this._promise),null!==i)){var a=(i=i._target())._bitField;0==(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!=(33554432&a)?t._async.invoke(this._promiseFulfilled,this,i._value()):0!=(16777216&a)?t._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=f,o=(new Error).stack;return function(){var e=t.apply(this,arguments),i=new n(void 0,void 0,r,o),a=i.promise();return i._generator=e,i._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new s("expecting a function but got "+u.classString(t));h.push(t)},t.spawn=function(r){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new f(r,this),o=n.promise();return n._run(t.spawn),o}}},7717:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a,s=r(5942),u=s.canEvaluate,c=s.tryCatch,l=s.errorObj;if(u){for(var h=function(t){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,t))},f=function(t){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,t))},p=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var o=r.join(" = ")+" = null;",a="var promise;\n"+r.map((function(t){return" \n promise = "+t+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "})).join("\n"),s=r.join(", "),u="Holder$"+e,h="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";return h=h.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,o).replace(/\[CancellationCode\]/g,a),new Function("tryCatch","errorObj","Promise","async",h)(c,l,t,i)},d=[],m=[],v=[],g=0;g<8;++g)d.push(p(g+1)),m.push(h(g+1)),v.push(f(g+1));a=function(t){this._reject(t)}}t.join=function(){var r,i=arguments.length-1;if(i>0&&"function"==typeof arguments[i]&&(r=arguments[i],i<=8&&u)){(b=new t(o))._captureStackTrace();for(var c=d[i-1],l=new c(r),h=m,f=0;f<i;++f){var p=n(arguments[f],b);if(p instanceof t){var g=(p=p._target())._bitField;0==(50397184&g)?(p._then(h[f],a,void 0,b,l),v[f](p,l),l.asyncNeeded=!1):0!=(33554432&g)?h[f].call(b,p._value(),l):0!=(16777216&g)?b._reject(p._reason()):b._cancel()}else h[f].call(b,p,l)}if(!b._isFateSealed()){if(l.asyncNeeded){var _=t._getContext();l.fn=s.contextBind(_,l.fn)}b._setAsyncGuaranteed(),b._setOnCancel(l)}return b}for(var D=arguments.length,y=new Array(D),w=0;w<D;++w)y[w]=arguments[w];r&&y.pop();var b=new e(y).promise();return void 0!==r?b.spread(r):b}}},6343:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=s.tryCatch,c=s.errorObj,l=t._async;function h(e,r,n,o){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=o===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],l.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var u=0;u<e.length;++u){var c=e[u];c instanceof t&&c.suppressUnhandledRejections()}}function f(e,r,o,i){if("function"!=typeof r)return n("expecting a function but got "+s.classString(r));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(o)));if("number"!=typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(o.concurrency)));a=o.concurrency}return new h(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,i).promise()}s.inherits(h,e),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(e,r){var n=this._values,i=this.length(),s=this._preservedValues,l=this._limit;if(r<0){if(n[r=-1*r-1]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var h=this._promise,f=this._callback,p=h._boundValue();h._pushContext();var d=u(f).call(p,e,r,i),m=h._popContext();if(a.checkForgottenReturns(d,m,null!==s?"Promise.filter":"Promise.map",h),d===c)return this._reject(d.e),!0;var v=o(d,this._promise);if(v instanceof t){var g=(v=v._target())._bitField;if(0==(50397184&g))return l>=1&&this._inFlight++,n[r]=v,v._proxy(this,-1*(r+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}return++this._totalResolved>=i&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},h.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),o=0,i=0;i<r;++i)t[i]&&(n[o++]=e[i]);n.length=o,this._resolve(n)},h.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return f(this,t,e,null)},t.map=function(t,e,r,n){return f(t,e,r,n)}}},6926:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a=r(5942),s=a.tryCatch;t.method=function(r){if("function"!=typeof r)throw new t.TypeError("expecting a function but got "+a.classString(r));return function(){var n=new t(e);n._captureStackTrace(),n._pushContext();var o=s(r).apply(this,arguments),a=n._popContext();return i.checkForgottenReturns(o,a,"Promise.method",n),n._resolveFromSyncValue(o),n}},t.attempt=t.try=function(r){if("function"!=typeof r)return o("expecting a function but got "+a.classString(r));var n,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];n=a.isArray(c)?s(r).apply(l,c):s(r).call(l,c)}else n=s(r)();var h=u._popContext();return i.checkForgottenReturns(n,h,"Promise.try",u),u._resolveFromSyncValue(n),u},t.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},1776:(t,e,r)=>{"use strict";var n=r(5942),o=n.maybeWrapAsError,i=r(7621).OperationalError,a=r(9571);var s=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}(t)){(e=new i(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=a.keys(t),o=0;o<r.length;++o){var u=r[o];s.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(r,n){if(null!==t){if(r){var i=u(o(r));t._attachExtraTrace(i),t._reject(i)}else if(e){for(var a=arguments.length,s=new Array(Math.max(a-1,0)),c=1;c<a;++c)s[c-1]=arguments[c];t._fulfill(s)}else t._fulfill(n);t=null}}}},1941:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(5942),n=t._async,o=e.tryCatch,i=e.errorObj;function a(t,r){if(!e.isArray(t))return s.call(this,t,r);var a=o(r).apply(this._boundValue(),[null].concat(t));a===i&&n.throwLater(a.e)}function s(t,e){var r=this._boundValue(),a=void 0===t?o(e).call(r,null):o(e).call(r,null,t);a===i&&n.throwLater(a.e)}function u(t,e){if(!t){var r=new Error(t+"");r.cause=t,t=r}var a=o(e).call(this._boundValue(),t);a===i&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var r=s;void 0!==e&&Object(e).spread&&(r=a),this._then(r,u,void 0,this,t)}return this}}},7502:(t,e,r)=>{"use strict";t.exports=function(){var e=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new P.PromiseInspection(this._target())},o=function(t){return P.reject(new g(t))};function i(){}var a={},s=r(5942);s.setReflectHandler(n);var u=function(){var t=process.domain;return void 0===t?null:t},c=function(){return{domain:u(),async:null}},l=s.isNode&&s.nodeSupportsAsyncResource?r(852).AsyncResource:null,h=function(){return{domain:u(),async:new l("Bluebird::Promise")}},f=s.isNode?c:function(){return null};s.notEnumerableProp(P,"_getContext",f);var p=r(9571),d=r(4601),m=new d;p.defineProperty(P,"_async",{value:m});var v=r(7621),g=P.TypeError=v.TypeError;P.RangeError=v.RangeError;var _=P.CancellationError=v.CancellationError;P.TimeoutError=v.TimeoutError,P.OperationalError=v.OperationalError,P.RejectionError=v.OperationalError,P.AggregateError=v.AggregateError;var D=function(){},y={},w={},b=r(1778)(P,D),E=r(1640)(P,D,b,o,i),C=r(5910)(P),F=C.create,k=r(461)(P,C,(function(){f=h,s.notEnumerableProp(P,"_getContext",h)}),(function(){f=c,s.notEnumerableProp(P,"_getContext",c)})),A=(k.CapturedTrace,r(7707)(P,b,w)),x=r(9976)(w),S=r(1776),O=s.errorObj,T=s.tryCatch;function P(t){t!==D&&function(t,e){if(null==t||t.constructor!==P)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new g("expecting a function but got "+s.classString(e))}(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function R(t){this.promise._resolveCallback(t)}function B(t){this.promise._rejectCallback(t,!1)}function j(t){var e=new P(D);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return P.prototype.toString=function(){return"[object Promise]"},P.prototype.caught=P.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var a=arguments[r];if(!s.isObject(a))return o("Catch statement predicate: expecting an object but got "+s.classString(a));n[i++]=a}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new g("The last argument to .catch() must be a function, got "+s.toString(t));return this.then(void 0,x(n,t,this))}return this.then(void 0,t)},P.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},P.prototype.then=function(t,e){if(k.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+s.classString(t);arguments.length>1&&(r+=", "+s.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},P.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},P.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+s.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},P.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},P.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},P.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},P.getNewLibraryCopy=t.exports,P.is=function(t){return t instanceof P},P.fromNode=P.fromCallback=function(t){var e=new P(D);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=T(t)(S(e,r));return n===O&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},P.all=function(t){return new E(t).promise()},P.cast=function(t){var e=b(t);return e instanceof P||((e=new P(D))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},P.resolve=P.fulfilled=P.cast,P.reject=P.rejected=function(t){var e=new P(D);return e._captureStackTrace(),e._rejectCallback(t,!0),e},P.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+s.classString(t));return m.setScheduler(t)},P.prototype._then=function(t,e,r,n,o){var i=void 0!==o,a=i?o:new P(D),u=this._target(),c=u._bitField;i||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=f();if(0!=(50397184&c)){var h,p,d=u._settlePromiseCtx;0!=(33554432&c)?(p=u._rejectionHandler0,h=t):0!=(16777216&c)?(p=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(d=u._settlePromiseLateCancellationObserver,p=new _("late cancellation observer"),u._attachExtraTrace(p),h=e),m.invoke(d,u,{handler:s.contextBind(l,h),promise:a,receiver:n,value:p})}else u._addCallbacks(t,e,a,n,l);return a},P.prototype._length=function(){return 65535&this._bitField},P.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},P.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},P.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},P.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},P.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},P.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},P.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},P.prototype._isFinal=function(){return(4194304&this._bitField)>0},P.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},P.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},P.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},P.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},P.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},P.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},P.prototype._promiseAt=function(t){return this[4*t-4+2]},P.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},P.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},P.prototype._boundValue=function(){},P.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,o=t._receiverAt(0);void 0===o&&(o=a),this._addCallbacks(e,r,n,o,null)},P.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=a),this._addCallbacks(r,n,o,i,null)},P.prototype._addCallbacks=function(t,e,r,n,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=s.contextBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=s.contextBind(o,e));else{var a=4*i-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=s.contextBind(o,t)),"function"==typeof e&&(this[a+1]=s.contextBind(o,e))}return this._setLength(i+1),i},P.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},P.prototype._resolveCallback=function(t,r){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(e(),!1);var n=b(t,this);if(!(n instanceof P))return this._fulfill(t);r&&this._propagateFrom(n,2);var o=n._target();if(o!==this){var i=o._bitField;if(0==(50397184&i)){var a=this._length();a>0&&o._migrateCallback0(this);for(var s=1;s<a;++s)o._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&i))this._fulfill(o._value());else if(0!=(16777216&i))this._reject(o._reason());else{var u=new _("late cancellation observer");o._attachExtraTrace(u),this._reject(u)}}else this._reject(e())}},P.prototype._rejectCallback=function(t,e,r){var n=s.ensureErrorObject(t),o=n===t;if(!o&&!r&&k.warnings()){var i="a promise was rejected with a non-error: "+s.classString(t);this._warn(i,!0)}this._attachExtraTrace(n,!!e&&o),this._reject(t)},P.prototype._resolveFromExecutor=function(t){if(t!==D){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,(function(t){e._resolveCallback(t)}),(function(t){e._rejectCallback(t,r)}));r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},P.prototype._settlePromiseFromHandler=function(t,e,r,n){var o=n._bitField;if(0==(65536&o)){var i;n._pushContext(),e===y?r&&"number"==typeof r.length?i=T(t).apply(this._boundValue(),r):(i=O).e=new g("cannot .spread() a non-array: "+s.classString(r)):i=T(t).call(e,r);var a=n._popContext();0==(65536&(o=n._bitField))&&(i===w?n._reject(r):i===O?n._rejectCallback(i.e,!1):(k.checkForgottenReturns(i,a,"",n,this),n._resolveCallback(i)))}},P.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},P.prototype._followee=function(){return this._rejectionHandler0},P.prototype._setFollowee=function(t){this._rejectionHandler0=t},P.prototype._settlePromise=function(t,e,r,o){var a=t instanceof P,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=t,T(e).call(r,o)===O&&t._reject(O.e)):e===n?t._fulfill(n.call(r)):r instanceof i?r._promiseCancelled(t):a||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof i?r._isResolved()||(0!=(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(u&&t._setAsyncGuaranteed(),0!=(33554432&s)?t._fulfill(o):t._reject(o))},P.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,o=t.value;"function"==typeof e?r instanceof P?this._settlePromiseFromHandler(e,n,o,r):e.call(n,o,r):r instanceof P&&r._reject(o)},P.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},P.prototype._settlePromise0=function(t,e,r){var n=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,o,e)},P.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},P.prototype._fulfill=function(t){var r=this._bitField;if(!((117506048&r)>>>16)){if(t===this){var n=e();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&r)>0&&(0!=(134217728&r)?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},P.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return m.fatalError(t,s.isNode);(65535&e)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},P.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},P.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},P.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},P.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&p.defineProperty(P.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),P.defer=P.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new P(D),resolve:R,reject:B}},s.notEnumerableProp(P,"_makeSelfResolutionError",e),r(6926)(P,D,b,o,k),r(3635)(P,D,b,k),r(1735)(P,E,o,k),r(5632)(P),r(1958)(P),r(7717)(P,E,b,D,m),P.Promise=P,P.version="3.7.2",r(2293)(P),r(687)(P,o,D,b,i,k),r(6343)(P,E,o,b,D,k),r(1941)(P),r(9346)(P,D),r(5733)(P,E,b,o),r(4648)(P,D,b,o),r(3609)(P,E,o,b,D,k),r(8615)(P,E,k),r(4488)(P,E,o),r(8418)(P,D,k),r(4525)(P,o,b,F,D,k),r(9846)(P),r(6574)(P,D),r(6777)(P,D),s.toFastProperties(P),s.toFastProperties(P.prototype),j({a:1}),j({b:2}),j({c:3}),j(1),j((function(){})),j(void 0),j(!1),j(new P(D)),k.setBounds(d.firstLineError,s.lastLineError),P}},1640:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a=r(5942);a.isArray;function s(r){var n=this._promise=new t(e);r instanceof t&&(n._propagateFrom(r,3),r.suppressUnhandledRejections()),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,i){var s=n(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,i);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===i?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var c=o("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var o=this._promise,i=!1,a=null,s=0;s<r;++s){var u=n(e[s],o);a=u instanceof t?(u=u._target())._bitField:null,i?null!==a&&u.suppressUnhandledRejections():null!==a?0==(50397184&a)?(u._proxy(this,s),this._values[s]=u):i=0!=(33554432&a)?this._promiseFulfilled(u._value(),s):0!=(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(u,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},9346:(t,e,r)=>{"use strict";t.exports=function(t,e){var n={},o=r(5942),i=r(1776),a=o.withAppended,s=o.maybeWrapAsError,u=o.canEvaluate,c=r(7621).TypeError,l={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),f=function(t){return o.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!h.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function m(t,e,r){var n=o.getDataPropertyOrDefault(t,e+r,l);return!!n&&d(n)}function v(t,e,r,n){for(var i=o.inheritedDataKeys(t),a=[],s=0;s<i.length;++s){var u=i[s],l=t[u],h=n===f||f(u);"function"!=typeof l||d(l)||m(t,u,e)||!n(u,l,t,h)||a.push(u,l)}return function(t,e,r){for(var n=0;n<t.length;n+=2){var o=t[n];if(r.test(o))for(var i=o.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===i)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(a,e,r),a}var g;g=function(r,u,c,l,h,f){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(l)-1),d=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(n=t+1;n<=3;++n)e.push(n);return e}(p),m="string"==typeof r||u===n;function v(t){var e,r=(e=t,o.filledRange(e,"_arg","")).join(", "),n=t>0?", ":"";return(m?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",r).replace(", ",n)}var g="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",_="'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, "+f+"); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+v(d[e]);return t+=" \n default: \n var args = new Array(len + 1); \n var i = 0; \n for (var i = 0; i < len; ++i) { \n args[i] = arguments[i]; \n } \n args[i] = nodeback; \n [CodeForCall] \n break; \n ".replace("[CodeForCall]",m?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",g);return _=_.replace("Parameters",function(t){return o.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",_)(t,l,u,a,s,i,o.tryCatch,o.errorObj,o.notEnumerableProp,e)};var _=u?g:function(r,u,c,l,h,f){var p=function(){return this}(),d=r;function m(){var o=u;u===n&&(o=this);var c=new t(e);c._captureStackTrace();var l="string"==typeof d&&this!==p?this[d]:r,h=i(c,f);try{l.apply(o,a(arguments,h))}catch(t){c._rejectCallback(s(t),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof d&&(r=l),o.notEnumerableProp(m,"__isPromisified__",!0),m};function D(t,e,r,i,a){for(var s=new RegExp(e.replace(/([$])/,"\\$")+"$"),u=v(t,e,s,r),c=0,l=u.length;c<l;c+=2){var h=u[c],f=u[c+1],p=h+e;if(i===_)t[p]=_(h,n,h,f,e,a);else{var d=i(f,(function(){return _(h,n,h,f,e,a)}));o.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return o.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new c("expecting a function but got "+o.classString(t));if(d(t))return t;var r=function(t,e,r){return _(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return o.copyDescriptors(t,r,p),r},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var i=e.filter;"function"!=typeof i&&(i=f);var a=e.promisifier;if("function"!=typeof a&&(a=_),!o.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=o.inheritedDataKeys(t),u=0;u<s.length;++u){var l=t[s[u]];"constructor"!==s[u]&&o.isClass(l)&&(D(l.prototype,n,i,a,r),D(l,n,i,a,r))}return D(t,n,i,a,r)}}},5733:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i,a=r(5942),s=a.isObject,u=r(9571);"function"==typeof Map&&(i=Map);var c=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var o=new Array(2*n.size);return n.forEach(r,o),o}}();function l(t){var e,r=!1;if(void 0!==i&&t instanceof i)e=c(t),r=!0;else{var n=u.keys(t),o=n.length;e=new Array(2*o);for(var a=0;a<o;++a){var s=n[a];e[a]=t[s],e[a+o]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function h(e){var r,i=n(e);return s(i)?(r=i instanceof t?i._then(t.props,void 0,void 0,void 0,void 0):new l(i).promise(),i instanceof t&&r._propagateFrom(i,2),r):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(l,e),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new i,r=t.length/2|0,n=0;n<r;++n){var o=t[r+n],a=t[n];e.set(o,a)}return e}(this._values);else{r={};for(var n=this.length(),o=0,a=this.length();o<a;++o)r[this._values[o+n]]=this._values[o]}return this._resolve(r),!0}return!1},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return h(this)},t.props=function(t){return h(t)}}},7824:t=>{"use strict";function e(t){this._capacity=t,this._length=0,this._front=0}e.prototype._willBeOverCapacity=function(t){return this._capacity<t},e.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},e.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var o=this._front+n-3;this._checkCapacity(n);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=r,this._length=n},e.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},e.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,o){for(var i=0;i<o;++i)r[i+n]=t[i+e],t[i+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=e},4648:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i=r(5942);function a(r,s){var u,c=n(r);if(c instanceof t)return(u=c).then((function(t){return a(t,u)}));if(null===(r=i.asArray(r)))return o("expecting an array or an iterable object but got "+i.classString(r));var l=new t(e);void 0!==s&&l._propagateFrom(s,3);for(var h=l._fulfill,f=l._reject,p=0,d=r.length;p<d;++p){var m=r[p];(void 0!==m||p in r)&&t.cast(m)._then(h,f,void 0,l,null)}return l}t.race=function(t){return a(t,void 0)},t.prototype.race=function(){return a(this,void 0)}}},3609:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=s.tryCatch;function c(e,r,n,o){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=o===i?Array(this._length):0===o?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function l(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function h(t,e,r,o){return"function"!=typeof e?n("expecting a function but got "+s.classString(e)):new c(t,e,r,o).promise()}function f(e){this.accum=e,this.array._gotAccum(e);var r=o(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(p,void 0,void 0,this,void 0)):p.call(this,r)}function p(e){var r,n=this.array,o=n._promise,i=u(n._fn);o._pushContext(),(r=void 0!==n._eachValues?i.call(o._boundValue(),e,this.index,this.length):i.call(o._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var s=o._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",o),r}s.inherits(c,e),c.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},c.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var r,n;this._values=e;var o=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var i=n;i<o;++i){var a=e[i];a instanceof t&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<o;++n){var s={accum:null,value:e[n],index:n,length:o,array:this};r=r._then(f,void 0,void 0,s,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(l,l,void 0,r,this)},t.prototype.reduce=function(t,e){return h(this,t,e,null)},t.reduce=function(t,e,r,n){return h(t,e,r,n)}}},679:(t,e,r)=>{"use strict";var n,o=r(5942),i=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,s=process.nextTick;n=o.isRecentNode?function(t){a.call(global,t)}:function(t){s.call(process,t)}}else if("function"==typeof i&&"function"==typeof i.resolve){var u=i.resolve();n=function(t){u.then(t)}}else n="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){t.classList.toggle("foo"),r=!1})).observe(n,e);return function(o){var i=new MutationObserver((function(){i.disconnect(),o()}));i.observe(t,e),r||(r=!0,n.classList.toggle("foo"))}}();t.exports=n},8615:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=t.PromiseInspection;function i(t){this.constructor$(t)}r(5942).inherits(i,e),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},t.allSettled=function(t){return new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},4488:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=r(7621).RangeError,a=r(7621).AggregateError,s=o.isArray,u={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(t),o=r.promise();return r.setHowMany(e),r.init(),o}o.inherits(c,e),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new i(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return l(t,e)},t.prototype.some=function(t){return l(this,t)},t._SomePromiseArray=c}},1958:t=>{"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},1778:(t,e,r)=>{"use strict";t.exports=function(t,e){var n=r(5942),o=n.errorObj,i=n.isObject;var a={}.hasOwnProperty;return function(r,s){if(i(r)){if(r instanceof t)return r;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return o.e=t,o}}(r);if(u===o){s&&s._pushContext();var c=t.reject(u.e);return s&&s._popContext(),c}if("function"==typeof u){if(function(t){try{return a.call(t,"_promise0")}catch(t){return!1}}(r)){c=new t(e);return r._then(c._fulfill,c._reject,void 0,c,null),c}return function(r,i,a){var s=new t(e),u=s;a&&a._pushContext();s._captureStackTrace(),a&&a._popContext();var c=!0,l=n.tryCatch(i).call(r,h,f);c=!1,s&&l===o&&(s._rejectCallback(l.e,!0,!0),s=null);function h(t){s&&(s._resolveCallback(t),s=null)}function f(t){s&&(s._rejectCallback(t,c,!0),s=null)}return u}(r,u,s)}}return r}}},8418:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=t.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return u(+this).thenReturn(t)},u=t.delay=function(r,o){var i,u;return void 0!==o?(i=t.resolve(o)._then(s,null,null,r,void 0),n.cancellation()&&o instanceof t&&i._setOnCancel(o)):(i=new t(e),u=setTimeout((function(){i._fulfill()}),+r),n.cancellation()&&i._setOnCancel(new a(u)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};t.prototype.delay=function(t){return u(t,this)};function c(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var r,s;t=+t;var u=new a(setTimeout((function(){r.isPending()&&function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new i("operation timed out"):new i(e),o.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,s)}),t));return n.cancellation()?(s=this.then(),(r=s._then(c,l,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,l,void 0,u,void 0),r}}},4525:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=r(7621).TypeError,c=r(5942).inherits,l=s.errorObj,h=s.tryCatch,f={};function p(t){setTimeout((function(){throw t}),0)}function d(e,r){var o=0,a=e.length,s=new t(i);return function i(){if(o>=a)return s._fulfill();var u=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[o++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(i,p,null,null,null)}i()}(),s}function m(t,e,r){this._data=t,this._promise=e,this._context=r}function v(t,e,r){this.constructor$(t,e,r)}function g(t){return m.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function _(t){this.length=t,this.promise=null,this[t-1]=null}m.prototype.data=function(){return this._data},m.prototype.promise=function(){return this._promise},m.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():f},m.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==f?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},m.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(v,m),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},_.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var r=arguments.length;if(r<2)return e("you must pass at least 2 arguments to Promise.using");var o,i=arguments[r-1];if("function"!=typeof i)return e("expecting a function but got "+s.classString(i));var u=!0;2===r&&Array.isArray(arguments[0])?(r=(o=arguments[0]).length,u=!1):(o=arguments,r--);for(var c=new _(r),f=0;f<r;++f){var p=o[f];if(m.isDisposer(p)){var v=p;(p=p.promise())._setDisposable(v)}else{var D=n(p);D instanceof t&&(p=D._then(g,null,null,{resources:c,index:f},void 0))}c[f]=p}var y=new Array(c.length);for(f=0;f<y.length;++f)y[f]=t.resolve(c[f]).reflect();var w=t.all(y).then((function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return l.e=r.error(),l;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}b._pushContext(),i=h(i);var n=u?i.apply(void 0,t):i(t),o=b._popContext();return a.checkForgottenReturns(n,o,"Promise.using",b),n})),b=w.lastly((function(){var e=new t.PromiseInspection(w);return d(c,e)}));return c.promise=b,b._setOnCancel(c),b},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,o());throw new u}}},5942:function(t,e,r){"use strict";var n=r(9571),o="undefined"==typeof navigator,i={e:{}},a,s="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function u(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return i.e=t,i}}function c(t){return a=t,u}var l=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function f(t){return"function"==typeof t||"object"==typeof t&&null!==t}function p(t){return h(t)?new Error(F(t)):t}function d(t,e){var r,n=t.length,o=new Array(n+1);for(r=0;r<n;++r)o[r]=t[r];return o[r]=e,o}function m(t,e,r){if(!n.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var o=Object.getOwnPropertyDescriptor(t,e);return null!=o?null==o.get&&null==o.set?o.value:r:void 0}function v(t,e,r){if(h(t))return t;var o={value:r,configurable:!0,enumerable:!1,writable:!0};return n.defineProperty(t,e,o),t}function g(t){throw t}var _=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(n.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var o=[],i=Object.create(null);null!=t&&!e(t);){var a;try{a=r(t)}catch(t){return o}for(var s=0;s<a.length;++s){var u=a[s];if(!i[u]){i[u]=!0;var c=Object.getOwnPropertyDescriptor(t,u);null!=c&&null==c.get&&null==c.set&&o.push(u)}}t=n.getPrototypeOf(t)}return o}}var o={}.hasOwnProperty;return function(r){if(e(r))return[];var n=[];t:for(var i in r)if(o.call(r,i))n.push(i);else{for(var a=0;a<t.length;++a)if(o.call(t[a],i))continue t;n.push(i)}return n}}(),D=/this\s*\.\s*\S+\s*=/;function y(t){try{if("function"==typeof t){var e=n.names(t.prototype),r=n.isES5&&e.length>1,o=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=D.test(t+"")&&n.names(t).length>0;if(r||o||i)return!0}return!1}catch(t){return!1}}function w(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var b=/^[a-z$_][a-z$_0-9]*$/i;function E(t){return b.test(t)}function C(t,e,r){for(var n=new Array(t),o=0;o<t;++o)n[o]=e+o+r;return n}function F(t){try{return t+""}catch(t){return"[no string representation]"}}function k(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function A(t){try{v(t,"isOperational",!0)}catch(t){}}function x(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function S(t){return k(t)&&n.propertyIsWritable(t,"stack")}var O="stack"in new Error?function(t){return S(t)?t:new Error(F(t))}:function(t){if(S(t))return t;try{throw new Error(F(t))}catch(t){return t}};function T(t){return{}.toString.call(t)}function P(t,e,r){for(var o=n.names(t),i=0;i<o.length;++i){var a=o[i];if(r(a))try{n.defineProperty(e,a,n.getDescriptor(t,a))}catch(t){}}}var R=function(t){return n.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var B="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};R=function(t){return n.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?B(t):null}}var j="undefined"!=typeof process&&"[object process]"===T(process).toLowerCase(),I="undefined"!=typeof process&&void 0!==process.env,L;function N(t){return I?process.env[t]:void 0}function M(){if("function"==typeof Promise)try{if("[object Promise]"===T(new Promise((function(){}))))return Promise}catch(t){}}function U(t,e){if(null===t||"function"!=typeof e||e===L)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){for(var t=arguments.length+2,e=new Array(t),o=2;o<t;++o)e[o]=arguments[o-2];return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return e}var H={setReflectHandler:function(t){L=t},isClass:y,isIdentifier:E,inheritedDataKeys:_,getDataPropertyOrDefault:m,thrower:g,isArray:n.isArray,asArray:R,notEnumerableProp:v,isPrimitive:h,isObject:f,isError:k,canEvaluate:o,errorObj:i,tryCatch:c,inherits:l,withAppended:d,maybeWrapAsError:p,toFastProperties:w,filledRange:C,toString:F,canAttachTrace:S,ensureErrorObject:O,originatesFromRejection:x,markAsOriginatingFromRejection:A,classString:T,copyDescriptors:P,isNode:j,hasEnvVariables:I,env:N,global:s,getNativePromise:M,contextBind:U},z;H.isRecentNode=H.isNode&&(process.versions&&process.versions.node?z=process.versions.node.split(".").map(Number):process.version&&(z=process.version.split(".").map(Number)),0===z[0]&&z[1]>10||z[0]>0),H.nodeSupportsAsyncResource=H.isNode&&function(){var t=!1;try{t="function"==typeof r(852).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),H.isNode&&H.toFastProperties(process);try{throw new Error}catch(t){H.lastLineError=t}t.exports=H},6002:(t,e,r)=>{const n=r(8672),o=r(7056),i=r(8035),a=r(2138),s=r(5566),u=r(6835),c=r(1145);t.exports={Bar:n,SingleBar:n,MultiBar:o,Presets:i,Format:{Formatter:a,BarFormat:u,ValueFormat:s,TimeFormat:c}}},4958:t=>{t.exports=class{constructor(t,e,r){this.etaBufferLength=t||100,this.valueBuffer=[r],this.timeBuffer=[e],this.eta="0"}update(t,e,r){this.valueBuffer.push(e),this.timeBuffer.push(t),this.calculate(r-e)}getTime(){return this.eta}calculate(t){const e=this.valueBuffer.length,r=Math.min(this.etaBufferLength,e),n=(this.valueBuffer[e-1]-this.valueBuffer[e-r])/(this.timeBuffer[e-1]-this.timeBuffer[e-r]);this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);const o=Math.ceil(t/n/1e3);isNaN(o)?this.eta="NULL":isFinite(o)?this.eta=o>1e7?"INF":o<0?0:o:this.eta="INF"}}},6835:t=>{t.exports=function(t,e){const r=Math.round(t*e.barsize),n=e.barsize-r;return e.barCompleteString.substr(0,r)+e.barGlue+e.barIncompleteString.substr(0,n)}},1145:t=>{t.exports=function(t,e,r){function n(t){return r?r*Math.round(t/r):t}function o(t){return(e.autopaddingChar+t).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}},5566:t=>{t.exports=function(t,e,r){if(!0!==e.autopadding)return t;return"percentage"===r?(n=t,o=3,(e.autopaddingChar+n).slice(-o)):t;var n,o}},2138:(t,e,r)=>{const n=r(4223),o=r(5566),i=r(6835),a=r(1145);t.exports=function(t,e,r){let s=t.format;const u=t.formatTime||a,c=t.formatValue||o,l=t.formatBar||i,h=Math.floor(100*e.progress)+"",f=e.stopTime||Date.now(),p=Math.round((f-e.startTime)/1e3),d=Object.assign({},r,{bar:l(e.progress,t),percentage:c(h,t,"percentage"),total:c(e.total,t,"total"),value:c(e.value,t,"value"),eta:c(e.eta,t,"eta"),eta_formatted:u(e.eta,t,5),duration:c(p,t,"duration"),duration_formatted:u(p,t,1)});s=s.replace(/\{(\w+)\}/g,(function(t,e){return void 0!==d[e]?d[e]:t}));const m=Math.max(0,e.maxWidth-n(s)-2),v=Math.floor(m/2);switch(t.align){case"right":s=m>0?" ".repeat(m)+s:s;break;case"center":s=v>0?" ".repeat(v)+s:s}return s}},9251:(t,e,r)=>{const n=r(4958),o=r(3603),i=r(2138),a=r(2361);t.exports=class extends a{constructor(t){super(),this.options=t,this.terminal=this.options.terminal?this.options.terminal:new o(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new n(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter="function"==typeof this.options.format?this.options.format:i}render(t=!1){const e={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();const r=this.formatter(this.options,e,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=r)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(r),this.terminal.clearRight(),this.lastDrawnString=r,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,e,r){this.value=e||0,this.total=void 0!==t&&t>=0?t:100,this.startValue=e||0,this.payload=r||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new n(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,e)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,e={}){"number"==typeof t&&(this.value=t,this.eta.update(Date.now(),t,this.total));const r=("object"==typeof t?t:e)||{};this.emit("update",this.total,this.value);for(const t in r)this.payload[t]=r[t];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,e={}){"object"==typeof t?this.update(this.value+1,t):this.update(this.value+t,e)}getTotal(){return this.total}setTotal(t){void 0!==t&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}},7056:(t,e,r)=>{const n=r(3603),o=r(9251),i=r(8020),a=r(2361);t.exports=class extends a{constructor(t,e){super(),this.bars=[],this.options=i.parse(t,e),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new n(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,e,r,n={}){const i=new o(Object.assign({},this.options,n));return this.bars.push(i),!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,e,r),this.emit("start")),i}remove(t){const e=this.bars.indexOf(t);return!(e<0)&&(this.bars.splice(e,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find((t=>t.isActive))&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}},8020:t=>{function e(t,e){return null==t?e:t}t.exports={parse:function(t,r){const n={},o=Object.assign({},r,t);return n.throttleTime=1e3/e(o.fps,10),n.stream=e(o.stream,process.stderr),n.terminal=e(o.terminal,null),n.clearOnComplete=e(o.clearOnComplete,!1),n.stopOnComplete=e(o.stopOnComplete,!1),n.barsize=e(o.barsize,40),n.align=e(o.align,"left"),n.hideCursor=e(o.hideCursor,!1),n.linewrap=e(o.linewrap,!1),n.barCompleteString=new Array(n.barsize+1).join(o.barCompleteChar||"="),n.barIncompleteString=new Array(n.barsize+1).join(o.barIncompleteChar||"-"),n.barGlue=e(o.barGlue,""),n.format=e(o.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=e(o.formatTime,null),n.formatValue=e(o.formatValue,null),n.formatBar=e(o.formatBar,null),n.etaBufferLength=e(o.etaBuffer,10),n.etaAsynchronousUpdate=e(o.etaAsynchronousUpdate,!1),n.progressCalculationRelative=e(o.progressCalculationRelative,!1),n.synchronousUpdate=e(o.synchronousUpdate,!0),n.noTTYOutput=e(o.noTTYOutput,!1),n.notTTYSchedule=e(o.notTTYSchedule,2e3),n.emptyOnZero=e(o.emptyOnZero,!1),n.forceRedraw=e(o.forceRedraw,!1),n.autopadding=e(o.autopadding,!1),n.autopaddingChar=n.autopadding?e(o.autopaddingChar," "):"",n.gracefulExit=e(o.gracefulExit,!1),n}}},8672:(t,e,r)=>{const n=r(9251),o=r(8020);t.exports=class extends n{constructor(t,e){super(o.parse(t,e)),this.timer=null,this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,e){this.timer&&(super.update(t,e),this.options.synchronousUpdate&&this.lastRedraw+2*this.options.throttleTime<Date.now()&&this.render())}start(t,e,r){!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),super.start(t,e,r),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}},3603:(t,e,r)=>{const n=r(4521);t.exports=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("7")}cursorRestore(){this.stream.isTTY&&this.stream.write("8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("[?25h"):this.stream.write("[?25l"))}cursorTo(t=null,e=null){this.stream.isTTY&&n.cursorTo(this.stream,t,e)}cursorRelative(t=null,e=null){this.stream.isTTY&&(this.dy=this.dy+e,n.moveCursor(this.stream,t,e))}cursorRelativeReset(){this.stream.isTTY&&(n.moveCursor(this.stream,0,-this.dy),n.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&n.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&n.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&n.clearScreenDown(this.stream)}newline(){this.stream.write("\n"),this.dy++}write(t,e=!1){!0===this.linewrap&&!1===e?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("[?7h"):this.stream.write("[?7l"))}isTTY(){return!0===this.stream.isTTY}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}}},8035:(t,e,r)=>{const n=r(1953),o=r(6787),i=r(1090),a=r(135);t.exports={legacy:n,shades_classic:o,shades_grey:i,rect:a}},1953:t=>{t.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}},135:t=>{t.exports={format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}},6787:t=>{t.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}},1090:t=>{t.exports={format:" [90m{bar}[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}},809:t=>{"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},9397:(t,e)=>{!function(t){var e=/\S/,r=/\"/g,n=/\n/g,o=/\r/g,i=/\\/g,a=/\u2028/,s=/\u2029/;function u(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function c(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function l(t,e,r){if(e.charAt(r)!=t.charAt(0))return!1;for(var n=1,o=t.length;n<o;n++)if(e.charAt(r+n)!=t.charAt(n))return!1;return!0}t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(r,n){var o=r.length,i=0,a=null,s=null,h="",f=[],p=!1,d=0,m=0,v="{{",g="}}";function _(){h.length>0&&(f.push({tag:"_t",text:new String(h)}),h="")}function D(r,n){if(_(),r&&function(){for(var r=!0,n=m;n<f.length;n++)if(!(r=t.tags[f[n].tag]<t.tags._v||"_t"==f[n].tag&&null===f[n].text.match(e)))return!1;return r}())for(var o,i=m;i<f.length;i++)f[i].text&&((o=f[i+1])&&">"==o.tag&&(o.indent=f[i].text.toString()),f.splice(i,1));else n||f.push({tag:"\n"});p=!1,m=f.length}function y(t,e){var r="="+g,n=t.indexOf(r,e),o=c(t.substring(t.indexOf("=",e)+1,n)).split(" ");return v=o[0],g=o[o.length-1],n+r.length-1}for(n&&(n=n.split(" "),v=n[0],g=n[1]),d=0;d<o;d++)0==i?l(v,r,d)?(--d,_(),i=1):"\n"==r.charAt(d)?D(p):h+=r.charAt(d):1==i?(d+=v.length-1,"="==(a=(s=t.tags[r.charAt(d+1)])?r.charAt(d+1):"_v")?(d=y(r,d),i=0):(s&&d++,i=2),p=d):l(g,r,d)?(f.push({tag:a,n:c(h),otag:v,ctag:g,i:"/"==a?p-v.length:d+g.length}),h="",d+=g.length-1,i=0,"{"==a&&("}}"==g?d++:u(f[f.length-1]))):h+=r.charAt(d);return D(p,!0),f};var h={_t:!0,"\n":!0,$:!0,"/":!0};function f(e,r,n,o){var i,a=[],s=null,u=null;for(i=n[n.length-1];e.length>0;){if(u=e.shift(),i&&"<"==i.tag&&!(u.tag in h))throw new Error("Illegal content in < super tag.");if(t.tags[u.tag]<=t.tags.$||p(u,o))n.push(u),u.nodes=f(e,u.tag,n,o);else{if("/"==u.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+u.n);if(s=n.pop(),u.n!=s.n&&!d(u.n,s.n,o))throw new Error("Nesting error: "+s.n+" vs. "+u.n);return s.end=u.i,a}"\n"==u.tag&&(u.last=0==e.length||"\n"==e[0].tag)}a.push(u)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return a}function p(t,e){for(var r=0,n=e.length;r<n;r++)if(e[r].o==t.n)return t.tag="#",!0}function d(t,e,r){for(var n=0,o=r.length;n<o;n++)if(r[n].c==t&&r[n].o==e)return!0}function m(t){var e=[];for(var r in t.partials)e.push('"'+g(r)+'":{name:"'+g(t.partials[r].name)+'", '+m(t.partials[r])+"}");return"partials: {"+e.join(",")+"}, subs: "+function(t){var e=[];for(var r in t)e.push('"'+g(r)+'": function(c,p,t,i) {'+t[r]+"}");return"{ "+e.join(",")+" }"}(t.subs)}t.stringify=function(e,r,n){return"{code: function (c,p,i) { "+t.wrapMain(e.code)+" },"+m(e)+"}"};var v=0;function g(t){return t.replace(i,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(o,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function _(t){return~t.indexOf(".")?"d":"f"}function D(t,e){var r="<"+(e.prefix||"")+t.n+v++;return e.partials[r]={name:t.n,partials:{}},e.code+='t.b(t.rp("'+g(r)+'",c,p,"'+(t.indent||"")+'"));',r}function y(t,e){e.code+="t.b(t.t(t."+_(t.n)+'("'+g(t.n)+'",c,p,0)));'}function w(t){return"t.b("+t+");"}t.generate=function(e,r,n){v=0;var o={code:"",subs:{},partials:{}};return t.walk(e,o),n.asString?this.stringify(o,r,n):this.makeTemplate(o,r,n)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,e,r){var n=this.makePartials(t);return n.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(n,e,this,r)},t.makePartials=function(t){var e,r={subs:{},partials:t.partials,name:t.name};for(e in r.partials)r.partials[e]=this.makePartials(r.partials[e]);for(e in t.subs)r.subs[e]=new Function("c","p","t","i",t.subs[e]);return r},t.codegen={"#":function(e,r){r.code+="if(t.s(t."+_(e.n)+'("'+g(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(e.nodes,r),r.code+="});c.pop();}"},"^":function(e,r){r.code+="if(!t.s(t."+_(e.n)+'("'+g(e.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(e.nodes,r),r.code+="};"},">":D,"<":function(e,r){var n={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,n);var o=r.partials[D(e,r)];o.subs=n.subs,o.partials=n.partials},$:function(e,r){var n={subs:{},code:"",partials:r.partials,prefix:e.n};t.walk(e.nodes,n),r.subs[e.n]=n.code,r.inPartial||(r.code+='t.sub("'+g(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=w('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+_(t.n)+'("'+g(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=w('"'+g(t.text)+'"')},"{":y,"&":y},t.walk=function(e,r){for(var n,o=0,i=e.length;o<i;o++)(n=t.codegen[e[o].tag])&&n(e[o],r);return r},t.parse=function(t,e,r){return f(t,0,[],(r=r||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,r){r=r||{};var n=t.cacheKey(e,r),o=this.cache[n];if(o){var i=o.partials;for(var a in i)delete i[a].instance;return o}return o=this.generate(this.parse(this.scan(e,r.delimiters),e,r),e,r),this.cache[n]=o}}(e)},5485:(t,e,r)=>{var n=r(9397);n.Template=r(2882).Template,n.template=n.Template,t.exports=n},2882:(t,e)=>{!function(t){function e(t,e,r){var n;return e&&"object"==typeof e&&(void 0!==e[t]?n=e[t]:r&&e.get&&"function"==typeof e.get&&(n=e.get(t))),n}t.Template=function(t,e,r,n){t=t||{},this.r=t.code||this.r,this.c=r,this.options=n||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,r){return""},v:function(t){return t=u(t),s.test(t)?t.replace(r,"&").replace(n,"<").replace(o,">").replace(i,"'").replace(a,"""):t},t:u,render:function(t,e,r){return this.ri([t],e||{},r)},ri:function(t,e,r){return this.r(t,e,r)},ep:function(t,e){var r=this.partials[t],n=e[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[t].base=n,r.subs){for(key in e.stackText||(e.stackText={}),r.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);n=function(t,e,r,n,o,i){function a(){}function s(){}var u;a.prototype=t,s.prototype=t.subs;var c=new a;for(u in c.subs=new s,c.subsText={},c.buf="",n=n||{},c.stackSubs=n,c.subsText=i,e)n[u]||(n[u]=e[u]);for(u in n)c.subs[u]=n[u];for(u in o=o||{},c.stackPartials=o,r)o[u]||(o[u]=r[u]);for(u in o)c.partials[u]=o[u];return c}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=n,n},rp:function(t,e,r,n){var o=this.ep(t,r);return o?o.ri(e,r,n):""},rs:function(t,e,r){var n=t[t.length-1];if(c(n))for(var o=0;o<n.length;o++)t.push(n[o]),r(t,e,this),t.pop();else r(t,e,this)},s:function(t,e,r,n,o,i,a){var s;return(!c(t)||0!==t.length)&&("function"==typeof t&&(t=this.ms(t,e,r,n,o,i,a)),s=!!t,!n&&s&&e&&e.push("object"==typeof t?t:e[e.length-1]),s)},d:function(t,r,n,o){var i,a=t.split("."),s=this.f(a[0],r,n,o),u=this.options.modelGet,l=null;if("."===t&&c(r[r.length-2]))s=r[r.length-1];else for(var h=1;h<a.length;h++)void 0!==(i=e(a[h],s,u))?(l=s,s=i):s="";return!(o&&!s)&&(o||"function"!=typeof s||(r.push(l),s=this.mv(s,r,n),r.pop()),s)},f:function(t,r,n,o){for(var i=!1,a=!1,s=this.options.modelGet,u=r.length-1;u>=0;u--)if(void 0!==(i=e(t,r[u],s))){a=!0;break}return a?(o||"function"!=typeof i||(i=this.mv(i,r,n)),i):!o&&""},ls:function(t,e,r,n,o){var i=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(u(t.call(e,n)),e,r)),this.options.delimiters=i,!1},ct:function(t,e,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,r)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,r,n,o,i,a){var s,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,r,s.substring(o,i),a)):c},mv:function(t,e,r){var n=e[e.length-1],o=t.call(n);return"function"==typeof o?this.ct(u(o.call(n)),n,r):o},sub:function(t,e,r,n){var o=this.subs[t];o&&(this.activeSub=t,o(e,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,o=/>/g,i=/\'/g,a=/\"/g,s=/[&<>\"\']/;function u(t){return String(null==t?"":t)}var c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},1903:t=>{"use strict";const e=t=>!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141));t.exports=e,t.exports.default=e},5405:(t,e,r)=>{var n=r(8887),o=r(6325),i=65536,a=15,s=f(5<<20),u=function(){try{return new Uint32Array(i)}catch(r){for(var t=new Array(i),e=0;e<i;e++)t[e]=0;return t}}(),c=407708164,l=2147483648,h={4:65536,5:262144,6:1048576,7:4194304};function f(t){try{return new Uint8Array(t)}catch(n){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e}}function p(t,e,r){if(void 0!==typeof t.buffer){if(Uint8Array.prototype.slice)return t.slice(e,r);var n=t.length;e=(e|=0)<0?Math.max(n+e,0):Math.min(e,n),r=(r=void 0===r?n:0|r)<0?Math.max(n+r,0):Math.min(r,n);for(var o=new Uint8Array(r-e),i=e,a=0;i<r;)o[a++]=t[i++];return o}return t.slice(e,r)}e.compressBound=function(t){return t+t/255+16|0},e.decompressBound=function(t){var e=0;if(o.readU32(t,e)!==c)throw new Error("invalid magic number");e+=4;var r=t[e++];if(64!=(192&r))throw new Error("incompatible descriptor version "+(192&r));var n=0!=(16&r),i=0!=(8&r),a=t[e++]>>4&7;if(void 0===h[a])throw new Error("invalid block size "+a);var s=h[a];if(i)return o.readU64(t,e);e++;for(var u=0;;){var f=o.readU32(t,e);if(e+=4,u+=f&l?f&=2147483647:s,0===f)return u;n&&(e+=4),e+=f}},e.makeBuffer=f,e.decompressBlock=function(t,e,r,n,o){var i,a,s,u,c;for(s=r+n;r<s;){var l=t[r++],h=l>>4;if(h>0){if(15===h)for(;h+=t[r],255===t[r++];);for(u=r+h;r<u;)e[o++]=t[r++]}if(r>=s)break;if(i=15&l,a=t[r++]|t[r++]<<8,15===i)for(;i+=t[r],255===t[r++];);for(u=(c=o-a)+(i+=4);c<u;)e[o++]=0|e[c++]}return o},e.compressBlock=function(t,e,r,n,i){var s,u,c,l,h,f,p,d;if(f=0,p=n+r,u=r,n>=13)for(var m=67;r+4<p-5;){var v=o.readU32(t,r),g=o.hashU32(v)>>>0;if(s=i[g=(g>>16^g)>>>0&65535]-1,i[g]=r+1,s<0||r-s>>>16>0||o.readU32(t,s)!==v)r+=m++>>6;else{for(m=67,h=r-u,l=r-s,s+=4,c=r+=4;r<p-5&&t[r]===t[s];)r++,s++;var _=(c=r-c)<15?c:15;if(h>=a){for(e[f++]=240+_,d=h-a;d>=255;d-=255)e[f++]=255;e[f++]=d}else e[f++]=(h<<4)+_;for(var D=0;D<h;D++)e[f++]=t[u+D];if(e[f++]=l,e[f++]=l>>8,c>=15){for(d=c-15;d>=255;d-=255)e[f++]=255;e[f++]=d}u=r}}if(0===u)return 0;if((h=p-u)>=a){for(e[f++]=240,d=h-a;d>=255;d-=255)e[f++]=255;e[f++]=d}else e[f++]=h<<4;for(r=u;r<p;)e[f++]=t[r++];return f},e.decompressFrame=function(t,r){var n,i,a,s,u=0,f=0;if(o.readU32(t,u)!==c)throw new Error("invalid magic number");if(u+=4,64!=(192&(s=t[u++])))throw new Error("incompatible descriptor version");n=0!=(16&s),i=0!=(4&s),a=0!=(8&s);var p=t[u++]>>4&7;if(void 0===h[p])throw new Error("invalid block size");for(a&&(u+=8),u++;;){var d;if(d=o.readU32(t,u),u+=4,0===d)break;if(n&&(u+=4),0!=(d&l)){d&=2147483647;for(var m=0;m<d;m++)r[f++]=t[u++]}else f=e.decompressBlock(t,r,u,d,f),u+=d}return i&&(u+=4),f},e.compressFrame=function(t,r){var a=0;o.writeU32(r,a,c),a+=4,r[a++]=64,r[a++]=112,r[a]=n.hash(0,r,4,a-4)>>8,a++;var l=h[7],f=t.length,p=0;for(!function(t){for(var e=0;e<i;e++)u[e]=0}();f>0;){var d,m=f>l?l:f;if((d=e.compressBlock(t,s,p,m,u))>m||0===d){o.writeU32(r,a,2147483648|m),a+=4;for(var v=p+m;p<v;)r[a++]=t[p++];f-=m}else{o.writeU32(r,a,d),a+=4;for(var g=0;g<d;)r[a++]=s[g++];p+=m,f-=m}}return o.writeU32(r,a,0),a+=4},e.decompress=function(t,r){var n,o;return void 0===r&&(r=e.decompressBound(t)),n=e.makeBuffer(r),(o=e.decompressFrame(t,n))!==r&&(n=p(n,0,o)),n},e.compress=function(t,r){var n,o;return void 0===r&&(r=e.compressBound(t.length)),n=e.makeBuffer(r),(o=e.compressFrame(t,n))!==r&&(n=p(n,0,o)),n}},6325:(t,e)=>{e.hashU32=function(t){return-1252372727^(t=(t=(t=(t=-949894596^(t=(t|=0)+2127912214+(t<<12)|0)^t>>>19)+374761393+(t<<5)|0)+-744332180^t<<9)+-42973499+(t<<3)|0)^t>>>16|0},e.readU64=function(t,e){var r=0;return r|=t[e++]<<0,r|=t[e++]<<8,r|=t[e++]<<16,r|=t[e++]<<24,r|=t[e++]<<32,r|=t[e++]<<40,r|=t[e++]<<48,r|=t[e++]<<56},e.readU32=function(t,e){var r=0;return r|=t[e++]<<0,r|=t[e++]<<8,r|=t[e++]<<16,r|=t[e++]<<24},e.writeU32=function(t,e,r){t[e++]=r>>0&255,t[e++]=r>>8&255,t[e++]=r>>16&255,t[e++]=r>>24&255},e.imul=function(t,e){var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16)|0}},8887:(t,e,r)=>{var n=r(6325),o=2654435761,i=2246822519,a=3266489917,s=374761393;function u(t,e){return(t|=0)>>>(32-(e|=0)|0)|t<<e|0}function c(t,e,r){return t|=0,e|=0,r|=0,0|n.imul(t>>>(32-e|0)|t<<e,r)}function l(t,e){return(t|=0)>>>(e|=0)^t|0}function h(t,e,r,o,i){return c(n.imul(e,r)+t,o,i)}function f(t,e,r){return c(t+n.imul(e[r],s),11,o)}function p(t,e,r){return h(t,n.readU32(e,r),a,17,668265263)}function d(t,e,r){return[h(t[0],n.readU32(e,r+0),i,13,o),h(t[1],n.readU32(e,r+4),i,13,o),h(t[2],n.readU32(e,r+8),i,13,o),h(t[3],n.readU32(e,r+12),i,13,o)]}e.hash=function(t,e,r,c){var h,m;if(m=c,c>=16){for(h=[t+o+i,t+i,t,t-o];c>=16;)h=d(h,e,r),r+=16,c-=16;h=u(h[0],1)+u(h[1],7)+u(h[2],12)+u(h[3],18)+m}else h=t+s+c>>>0;for(;c>=4;)h=p(h,e,r),r+=4,c-=4;for(;c>0;)h=f(h,e,r),r++,c--;return(h=l(n.imul(l(n.imul(l(h,15),i),13),a),16))>>>0}},7475:(t,e,r)=>{var n=r(5485);t.exports=function(){var t=new n.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b("MEMORY {"),n.b("\n"+r),n.b(" FLASH (rx) : ORIGIN = "),n.b(n.v(n.f("flashStart",t,e,0))),n.b(", LENGTH = "),n.b(n.v(n.f("flashLength",t,e,0))),n.b("\n"+r),n.b(" RAM (rwx) : ORIGIN = "),n.b(n.v(n.f("ramStart",t,e,0))),n.b(", LENGTH = "),n.b(n.v(n.f("ramLength",t,e,0))),n.b("\n"+r),n.b("}"),n.b("\n"),n.b("\n"+r),n.b("ENTRY(_start);"),n.b("\n"),n.b("\n"+r),n.b("SECTIONS {"),n.b("\n"+r),n.b(" .eadk_app_info ORIGIN(FLASH) : {"),n.b("\n"+r),n.b(" LONG(0xDEC0BEBA);"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_api_level))"),n.b("\n"+r),n.b(" LONG(ADDR(.rodata.eadk_app_name) - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(SIZEOF(.rodata.eadk_app_icon));"),n.b("\n"+r),n.b(" LONG(ADDR(.rodata.eadk_app_icon) - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(_start - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(_eadk_app_end - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(0xDEC0BEBA);"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .text : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" *(.text)"),n.b("\n"+r),n.b(" *(.text.*)"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata.eadk_app_name : {"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_app_name))"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata.eadk_app_icon : {"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_app_icon))"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata : {"),n.b("\n"+r),n.b(" *(.rodata)"),n.b("\n"+r),n.b(" *(.rodata.*)"),n.b("\n"+r),n.b(" _eadk_app_end = .;"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .data : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" _data_section_start_flash = LOADADDR(.data);"),n.b("\n"+r),n.b(" _data_section_start_ram = .;"),n.b("\n"+r),n.b(" *(.data)"),n.b("\n"+r),n.b(" *(.data.*)"),n.b("\n"+r),n.b(" _data_section_end_ram = .;"),n.b("\n"+r),n.b(" } >RAM AT >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .bss : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" _bss_section_start_ram = .;"),n.b("\n"+r),n.b(" *(.bss)"),n.b("\n"+r),n.b(" *(.bss.*)"),n.b("\n"+r),n.b(" _bss_section_end_ram = .;"),n.b("\n"+r),n.b(" } >RAM"),n.b("\n"),n.b("\n"+r),n.b(" .heap : {"),n.b("\n"+r),n.b(" _heap_start = .;"),n.b("\n"+r),n.b(" . = (ORIGIN(RAM) + LENGTH(RAM));"),n.b("\n"+r),n.b(" _heap_end = .;"),n.b("\n"+r),n.b(" } >RAM"),n.b("\n"+r),n.b("}"),n.b("\n"),n.b("\n"+r),n.b('ASSERT(SIZEOF(.eadk_app_info) == 32, "Missing api level. Please define a .rodata.eadk_api_level section.");'),n.b("\n"+r),n.b('ASSERT(SIZEOF(.rodata.eadk_app_name) > 0, "Missing app name. Please define a .rodata.eadk_app_name section.");'),n.b("\n"+r),n.b('ASSERT(SIZEOF(.rodata.eadk_app_icon) > 0, "Missing app icon. Please define a .rodata.eadk_app_icon section.");'),n.b("\n"),n.fl()},partials:{},subs:{}},'MEMORY {\n FLASH (rx) : ORIGIN = {{ flashStart }}, LENGTH = {{ flashLength }}\n RAM (rwx) : ORIGIN = {{ ramStart }}, LENGTH = {{ ramLength }}\n}\n\nENTRY(_start);\n\nSECTIONS {\n .eadk_app_info ORIGIN(FLASH) : {\n LONG(0xDEC0BEBA);\n KEEP(*(.rodata.eadk_api_level))\n LONG(ADDR(.rodata.eadk_app_name) - ORIGIN(FLASH));\n LONG(SIZEOF(.rodata.eadk_app_icon));\n LONG(ADDR(.rodata.eadk_app_icon) - ORIGIN(FLASH));\n LONG(_start - ORIGIN(FLASH));\n LONG(_eadk_app_end - ORIGIN(FLASH));\n LONG(0xDEC0BEBA);\n } >FLASH\n\n .text : {\n . = ALIGN(4);\n *(.text)\n *(.text.*)\n } >FLASH\n\n .rodata.eadk_app_name : {\n KEEP(*(.rodata.eadk_app_name))\n } >FLASH\n\n .rodata.eadk_app_icon : {\n KEEP(*(.rodata.eadk_app_icon))\n } >FLASH\n\n .rodata : {\n *(.rodata)\n *(.rodata.*)\n _eadk_app_end = .;\n } >FLASH\n\n .data : {\n . = ALIGN(4);\n _data_section_start_flash = LOADADDR(.data);\n _data_section_start_ram = .;\n *(.data)\n *(.data.*)\n _data_section_end_ram = .;\n } >RAM AT >FLASH\n\n .bss : {\n . = ALIGN(4);\n _bss_section_start_ram = .;\n *(.bss)\n *(.bss.*)\n _bss_section_end_ram = .;\n } >RAM\n\n .heap : {\n _heap_start = .;\n . = (ORIGIN(RAM) + LENGTH(RAM));\n _heap_end = .;\n } >RAM\n}\n\nASSERT(SIZEOF(.eadk_app_info) == 32, "Missing api level. Please define a .rodata.eadk_api_level section.");\nASSERT(SIZEOF(.rodata.eadk_app_name) > 0, "Missing app name. Please define a .rodata.eadk_app_name section.");\nASSERT(SIZEOF(.rodata.eadk_app_icon) > 0, "Missing app icon. Please define a .rodata.eadk_app_icon section.");\n',n);return t.render.apply(t,arguments)}},9983:(t,e,r)=>{"use strict";let n=r(7084),o=[function(){},function(t,e,r,n){if(n===e.length)throw new Error("Ran out of data");let o=e[n];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=255},function(t,e,r,n){if(n+1>=e.length)throw new Error("Ran out of data");let o=e[n];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=e[n+1]},function(t,e,r,n){if(n+2>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=255},function(t,e,r,n){if(n+3>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=e[n+3]}],i=[function(){},function(t,e,r,n){let o=e[0];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=n},function(t,e,r){let n=e[0];t[r]=n,t[r+1]=n,t[r+2]=n,t[r+3]=e[1]},function(t,e,r,n){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=n},function(t,e,r){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3]}];function a(t,e,r,n,i,a){let s=t.width,u=t.height,c=t.index;for(let t=0;t<u;t++)for(let u=0;u<s;u++){let s=r(u,t,c);o[n](e,i,s,a),a+=n}return a}function s(t,e,r,n,o,a){let s=t.width,u=t.height,c=t.index;for(let t=0;t<u;t++){for(let u=0;u<s;u++){let s=o.get(n),l=r(u,t,c);i[n](e,s,l,a)}o.resetAfterLine()}}e.dataToBitMap=function(t,e){let r,o,i=e.width,u=e.height,c=e.depth,l=e.bpp,h=e.interlace;8!==c&&(r=function(t,e){let r=[],n=0;function o(){if(n===t.length)throw new Error("Ran out of data");let o,i,a,s,u,c,l,h,f=t[n];switch(n++,e){default:throw new Error("unrecognised depth");case 16:l=t[n],n++,r.push((f<<8)+l);break;case 4:l=15&f,h=f>>4,r.push(h,l);break;case 2:u=3&f,c=f>>2&3,l=f>>4&3,h=f>>6&3,r.push(h,l,c,u);break;case 1:o=1&f,i=f>>1&1,a=f>>2&1,s=f>>3&1,u=f>>4&1,c=f>>5&1,l=f>>6&1,h=f>>7&1,r.push(h,l,c,u,s,a,i,o)}}return{get:function(t){for(;r.length<t;)o();let e=r.slice(0,t);return r=r.slice(t),e},resetAfterLine:function(){r.length=0},end:function(){if(n!==t.length)throw new Error("extra data found")}}}(t,c)),o=c<=8?Buffer.alloc(i*u*4):new Uint16Array(i*u*4);let f,p,d=Math.pow(2,c)-1,m=0;if(h)f=n.getImagePasses(i,u),p=n.getInterlaceIterator(i,u);else{let t=0;p=function(){let e=t;return t+=4,e},f=[{width:i,height:u}]}for(let e=0;e<f.length;e++)8===c?m=a(f[e],o,p,l,t,m):s(f[e],o,p,l,r,d);if(8===c){if(m!==t.length)throw new Error("extra data found")}else r.end();return o}},9027:(t,e,r)=>{"use strict";let n=r(3482);t.exports=function(t,e,r,o){let i=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(o.colorType);if(o.colorType===o.inputColorType){let e=function(){let t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256!==new Int16Array(t)[0]}();if(8===o.bitDepth||16===o.bitDepth&&e)return t}let a=16!==o.bitDepth?t:new Uint16Array(t.buffer),s=255,u=n.COLORTYPE_TO_BPP_MAP[o.inputColorType];4!==u||o.inputHasAlpha||(u=3);let c=n.COLORTYPE_TO_BPP_MAP[o.colorType];16===o.bitDepth&&(s=65535,c*=2);let l=Buffer.alloc(e*r*c),h=0,f=0,p=o.bgColor||{};function d(){let t,e,r,u=s;switch(o.inputColorType){case n.COLORTYPE_COLOR_ALPHA:u=a[h+3],t=a[h],e=a[h+1],r=a[h+2];break;case n.COLORTYPE_COLOR:t=a[h],e=a[h+1],r=a[h+2];break;case n.COLORTYPE_ALPHA:u=a[h+1],t=a[h],e=t,r=t;break;case n.COLORTYPE_GRAYSCALE:t=a[h],e=t,r=t;break;default:throw new Error("input color type:"+o.inputColorType+" is not supported at present")}return o.inputHasAlpha&&(i||(u/=s,t=Math.min(Math.max(Math.round((1-u)*p.red+u*t),0),s),e=Math.min(Math.max(Math.round((1-u)*p.green+u*e),0),s),r=Math.min(Math.max(Math.round((1-u)*p.blue+u*r),0),s))),{red:t,green:e,blue:r,alpha:u}}void 0===p.red&&(p.red=s),void 0===p.green&&(p.green=s),void 0===p.blue&&(p.blue=s);for(let t=0;t<r;t++)for(let t=0;t<e;t++){let t=d();switch(o.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===o.bitDepth?(l[f]=t.red,l[f+1]=t.green,l[f+2]=t.blue,i&&(l[f+3]=t.alpha)):(l.writeUInt16BE(t.red,f),l.writeUInt16BE(t.green,f+2),l.writeUInt16BE(t.blue,f+4),i&&l.writeUInt16BE(t.alpha,f+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;8===o.bitDepth?(l[f]=e,i&&(l[f+1]=t.alpha)):(l.writeUInt16BE(e,f),i&&l.writeUInt16BE(t.alpha,f+2));break}default:throw new Error("unrecognised color Type "+o.colorType)}h+=u,f+=c}return l}},8442:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=t.exports=function(){o.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n.inherits(i,o),i.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},i.prototype.write=function(t,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let r;return r=Buffer.isBuffer(t)?t:Buffer.from(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},i.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},i.prototype._processRead=function(t){this._reads.shift();let e=0,r=0,n=Buffer.alloc(t.length);for(;e<t.length;){let o=this._buffers[r++],i=Math.min(o.length,t.length-e);o.copy(n,e,0,i),e+=i,i!==o.length&&(this._buffers[--r]=o.slice(i))}r>0&&this._buffers.splice(0,r),this._buffered-=t.length,t.func.call(this,n)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else{if(!(this._buffered>=t.length))break;this._processRead(t)}}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}},3482:t=>{"use strict";t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},3500:t=>{"use strict";let e=[];!function(){for(let t=0;t<256;t++){let r=t;for(let t=0;t<8;t++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}}();let r=t.exports=function(){this._crc=-1};r.prototype.write=function(t){for(let r=0;r<t.length;r++)this._crc=e[255&(this._crc^t[r])]^this._crc>>>8;return!0},r.prototype.crc32=function(){return-1^this._crc},r.crc32=function(t){let r=-1;for(let n=0;n<t.length;n++)r=e[255&(r^t[n])]^r>>>8;return-1^r}},8876:(t,e,r)=>{"use strict";let n=r(6744);let o={0:function(t,e,r,n,o){for(let i=0;i<r;i++)n[o+i]=t[e+i]},1:function(t,e,r,n,o,i){for(let a=0;a<r;a++){let r=a>=i?t[e+a-i]:0,s=t[e+a]-r;n[o+a]=s}},2:function(t,e,r,n,o){for(let i=0;i<r;i++){let a=e>0?t[e+i-r]:0,s=t[e+i]-a;n[o+i]=s}},3:function(t,e,r,n,o,i){for(let a=0;a<r;a++){let s=a>=i?t[e+a-i]:0,u=e>0?t[e+a-r]:0,c=t[e+a]-(s+u>>1);n[o+a]=c}},4:function(t,e,r,o,i,a){for(let s=0;s<r;s++){let u=s>=a?t[e+s-a]:0,c=e>0?t[e+s-r]:0,l=e>0&&s>=a?t[e+s-(r+a)]:0,h=t[e+s]-n(u,c,l);o[i+s]=h}}},i={0:function(t,e,r){let n=0,o=e+r;for(let r=e;r<o;r++)n+=Math.abs(t[r]);return n},1:function(t,e,r,n){let o=0;for(let i=0;i<r;i++){let r=i>=n?t[e+i-n]:0,a=t[e+i]-r;o+=Math.abs(a)}return o},2:function(t,e,r){let n=0,o=e+r;for(let i=e;i<o;i++){let o=e>0?t[i-r]:0,a=t[i]-o;n+=Math.abs(a)}return n},3:function(t,e,r,n){let o=0;for(let i=0;i<r;i++){let a=i>=n?t[e+i-n]:0,s=e>0?t[e+i-r]:0,u=t[e+i]-(a+s>>1);o+=Math.abs(u)}return o},4:function(t,e,r,o){let i=0;for(let a=0;a<r;a++){let s=a>=o?t[e+a-o]:0,u=e>0?t[e+a-r]:0,c=e>0&&a>=o?t[e+a-(r+o)]:0,l=t[e+a]-n(s,u,c);i+=Math.abs(l)}return i}};t.exports=function(t,e,r,n,a){let s;if("filterType"in n&&-1!==n.filterType){if("number"!=typeof n.filterType)throw new Error("unrecognised filter types");s=[n.filterType]}else s=[0,1,2,3,4];16===n.bitDepth&&(a*=2);let u=e*a,c=0,l=0,h=Buffer.alloc((u+1)*r),f=s[0];for(let e=0;e<r;e++){if(s.length>1){let e=1/0;for(let r=0;r<s.length;r++){let n=i[s[r]](t,l,u,a);n<e&&(f=s[r],e=n)}}h[c]=f,c++,o[f](t,l,u,h,c,a),c+=u,l+=u}return h}},4603:(t,e,r)=>{"use strict";let n=r(3837),o=r(8442),i=r(2769),a=t.exports=function(t){o.call(this);let e=[],r=this;this._filter=new i(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){r.emit("complete",Buffer.concat(e))}}),this._filter.start()};n.inherits(a,o)},8692:(t,e,r)=>{"use strict";let n=r(33),o=r(2769);e.process=function(t,e){let r=[],i=new n(t);return new o(e,{read:i.read.bind(i),write:function(t){r.push(t)},complete:function(){}}).start(),i.process(),Buffer.concat(r)}},2769:(t,e,r)=>{"use strict";let n=r(7084),o=r(6744);function i(t,e,r){let n=t*e;return 8!==r&&(n=Math.ceil(n/(8/r))),n}let a=t.exports=function(t,e){let r=t.width,o=t.height,a=t.interlace,s=t.bpp,u=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],a){let t=n.getImagePasses(r,o);for(let e=0;e<t.length;e++)this._images.push({byteWidth:i(t[e].width,s,u),height:t[e].height,lineIndex:0})}else this._images.push({byteWidth:i(r,s,u),height:o,lineIndex:0});this._xComparison=8===u?s:16===u?2*s:1};a.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},a.prototype._unFilterType1=function(t,e,r){let n=this._xComparison,o=n-1;for(let i=0;i<r;i++){let r=t[1+i],a=i>o?e[i-n]:0;e[i]=r+a}},a.prototype._unFilterType2=function(t,e,r){let n=this._lastLine;for(let o=0;o<r;o++){let r=t[1+o],i=n?n[o]:0;e[o]=r+i}},a.prototype._unFilterType3=function(t,e,r){let n=this._xComparison,o=n-1,i=this._lastLine;for(let a=0;a<r;a++){let r=t[1+a],s=i?i[a]:0,u=a>o?e[a-n]:0,c=Math.floor((u+s)/2);e[a]=r+c}},a.prototype._unFilterType4=function(t,e,r){let n=this._xComparison,i=n-1,a=this._lastLine;for(let s=0;s<r;s++){let r=t[1+s],u=a?a[s]:0,c=s>i?e[s-n]:0,l=s>i&&a?a[s-n]:0,h=o(c,u,l);e[s]=r+h}},a.prototype._reverseFilterLine=function(t){let e,r=t[0],n=this._images[this._imageIndex],o=n.byteWidth;if(0===r)e=t.slice(1,o+1);else switch(e=Buffer.alloc(o),r){case 1:this._unFilterType1(t,e,o);break;case 2:this._unFilterType2(t,e,o);break;case 3:this._unFilterType3(t,e,o);break;case 4:this._unFilterType4(t,e,o);break;default:throw new Error("Unrecognised filter type - "+r)}this.write(e),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=e,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},8417:t=>{"use strict";t.exports=function(t,e,r=!1){let n=e.depth,o=e.width,i=e.height,a=e.colorType,s=e.transColor,u=e.palette,c=t;return 3===a?function(t,e,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=o[t[i]];if(!r)throw new Error("index "+t[i]+" not in palette");for(let t=0;t<4;t++)e[i+t]=r[t];i+=4}}(t,c,o,i,u):(s&&function(t,e,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=!1;if(1===o.length?o[0]===t[i]&&(r=!0):o[0]===t[i]&&o[1]===t[i+1]&&o[2]===t[i+2]&&(r=!0),r)for(let t=0;t<4;t++)e[i+t]=0;i+=4}}(t,c,o,i,s),8===n||r||(16===n&&(c=Buffer.alloc(o*i*4)),function(t,e,r,n,o){let i=Math.pow(2,o)-1,a=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++){for(let r=0;r<4;r++)e[a+r]=Math.floor(255*t[a+r]/i+.5);a+=4}}(t,c,o,i,n))),c}},7084:(t,e)=>{"use strict";let r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];e.getImagePasses=function(t,e){let n=[],o=t%8,i=e%8,a=(t-o)/8,s=(e-i)/8;for(let t=0;t<r.length;t++){let e=r[t],u=a*e.x.length,c=s*e.y.length;for(let t=0;t<e.x.length&&e.x[t]<o;t++)u++;for(let t=0;t<e.y.length&&e.y[t]<i;t++)c++;u>0&&c>0&&n.push({width:u,height:c,index:t})}return n},e.getInterlaceIterator=function(t){return function(e,n,o){let i=e%r[o].x.length,a=(e-i)/r[o].x.length*8+r[o].x[i],s=n%r[o].y.length;return 4*a+((n-s)/r[o].y.length*8+r[o].y[s])*t*4}}},6838:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=r(3482),a=r(9432),s=t.exports=function(t){o.call(this);let e=t||{};this._packer=new a(e),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,o),s.prototype.pack=function(t,e,r,n){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,r)),n&&this.emit("data",this._packer.packGAMA(n));let o=this._packer.filterData(t,e,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}},8360:(t,e,r)=>{"use strict";let n=!0,o=r(9796);o.deflateSync||(n=!1);let i=r(3482),a=r(9432);t.exports=function(t,e){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r=new a(e||{}),s=[];s.push(Buffer.from(i.PNG_SIGNATURE)),s.push(r.packIHDR(t.width,t.height)),t.gamma&&s.push(r.packGAMA(t.gamma));let u=r.filterData(t.data,t.width,t.height),c=o.deflateSync(u,r.getDeflateOptions());if(u=null,!c||!c.length)throw new Error("bad png - invalid compressed data response");return s.push(r.packIDAT(c)),s.push(r.packIEND()),Buffer.concat(s)}},9432:(t,e,r)=>{"use strict";let n=r(3482),o=r(3500),i=r(9027),a=r(8876),s=r(9796),u=t.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||s.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:n.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.colorType))throw new Error("option color type:"+t.colorType+" is not supported at present");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw new Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};u.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},u.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},u.prototype.filterData=function(t,e,r){let o=i(t,e,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return a(o,e,r,this._options,s)},u.prototype._packChunk=function(t,e){let r=e?e.length:0,n=Buffer.alloc(r+12);return n.writeUInt32BE(r,0),n.writeUInt32BE(t,4),e&&e.copy(n,8),n.writeInt32BE(o.crc32(n.slice(4,n.length-4)),n.length-4),n},u.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,e)},u.prototype.packIHDR=function(t,e){let r=Buffer.alloc(13);return r.writeUInt32BE(t,0),r.writeUInt32BE(e,4),r[8]=this._options.bitDepth,r[9]=this._options.colorType,r[10]=0,r[11]=0,r[12]=0,this._packChunk(n.TYPE_IHDR,r)},u.prototype.packIDAT=function(t){return this._packChunk(n.TYPE_IDAT,t)},u.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}},6744:t=>{"use strict";t.exports=function(t,e,r){let n=t+e-r,o=Math.abs(n-t),i=Math.abs(n-e),a=Math.abs(n-r);return o<=i&&o<=a?t:i<=a?e:r}},7900:(t,e,r)=>{"use strict";let n=r(3837),o=r(9796),i=r(8442),a=r(4603),s=r(8550),u=r(9983),c=r(8417),l=t.exports=function(t){i.call(this),this._parser=new s(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};n.inherits(l,i),l.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",(function(){}))),this.errord=!0},l.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=o.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,e=Math.max(t,o.Z_MIN_CHUNK);this._inflate=o.createInflate({chunkSize:e});let r=t,n=this.emit.bind(this,"error");this._inflate.on("error",(function(t){r&&n(t)})),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){r&&(t.length>r&&(t=t.slice(0,r)),r-=t.length,i(t))})),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},l.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new a(this._bitmapInfo)},l.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},l.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},l.prototype._simpleTransparency=function(){this._metaData.alpha=!0},l.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},l.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},l.prototype._complete=function(t){if(this.errord)return;let e;try{let r=u.dataToBitMap(t,this._bitmapInfo);e=c(r,this._bitmapInfo,this._options.skipRescale),r=null}catch(t){return void this._handleError(t)}this.emit("parsed",e)}},2416:(t,e,r)=>{"use strict";let n=!0,o=r(9796),i=r(9653);o.deflateSync||(n=!1);let a=r(33),s=r(8692),u=r(8550),c=r(9983),l=r(8417);t.exports=function(t,e){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r,h,f;let p=[];let d=new a(t),m=new u(e,{read:d.read.bind(d),error:function(t){r=t},metadata:function(t){h=t},gamma:function(t){f=t},palette:function(t){h.palette=t},transColor:function(t){h.transColor=t},inflateData:function(t){p.push(t)},simpleTransparency:function(){h.alpha=!0}});if(m.start(),d.process(),r)throw r;let v,g=Buffer.concat(p);if(p.length=0,h.interlace)v=o.inflateSync(g);else{let t=(1+(h.width*h.bpp*h.depth+7>>3))*h.height;v=i(g,{chunkSize:t,maxLength:t})}if(g=null,!v||!v.length)throw new Error("bad png - invalid inflate data response");let _=s.process(v,h);g=null;let D=c.dataToBitMap(_,h);_=null;let y=l(D,h,e.skipRescale);return h.data=y,h.gamma=f||0,h}},8550:(t,e,r)=>{"use strict";let n=r(3482),o=r(3500),i=t.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};i.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(t){let e=n.PNG_SIGNATURE;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),r=t.readUInt32BE(4),i="";for(let e=4;e<8;e++)i+=String.fromCharCode(t[e]);let a=Boolean(32&t[4]);if(this._hasIHDR||r===n.TYPE_IHDR){if(this._crc=new o,this._crc.write(Buffer.from(i)),this._chunks[r])return this._chunks[r](e);a?this.read(e+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+i))}else this.error(new Error("Expected IHDR on beggining"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==e?this.error(new Error("Crc error - "+e+" - "+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),r=t.readUInt32BE(4),o=t[8],i=t[9],a=t[10],s=t[11],u=t[12];if(8!==o&&4!==o&&2!==o&&1!==o&&16!==o)return void this.error(new Error("Unsupported bit depth "+o));if(!(i in n.COLORTYPE_TO_BPP_MAP))return void this.error(new Error("Unsupported color type"));if(0!==a)return void this.error(new Error("Unsupported compression method"));if(0!==s)return void this.error(new Error("Unsupported filter method"));if(0!==u&&1!==u)return void this.error(new Error("Unsupported interlace method"));this._colorType=i;let c=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:o,interlace:Boolean(u),palette:Boolean(i&n.COLORTYPE_PALETTE),color:Boolean(i&n.COLORTYPE_COLOR),alpha:Boolean(i&n.COLORTYPE_ALPHA),bpp:c,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let r=0;r<e;r++)this._palette.push([t[3*r],t[3*r+1],t[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===n.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===n.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===n.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/n.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},i.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(e);let r=t-e.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},i.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},i.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},6117:(t,e,r)=>{"use strict";let n=r(2416),o=r(8360);e.read=function(t,e){return n(t,e||{})},e.write=function(t,e){return o(t,e)}},5477:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=r(7900),a=r(6838),s=r(6117),u=e.y=function(t){o.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(t){this.data=t,this.emit("parsed",t)}.bind(this)),this._packer=new a(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n.inherits(u,o),u.sync=s,u.prototype.pack=function(){return this.data&&this.data.length?(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u.prototype.parse=function(t,e){if(e){let t,r;t=function(t){this.removeListener("error",r),this.data=t,e(null,this)}.bind(this),r=function(r){this.removeListener("parsed",t),e(r,null)}.bind(this),this.once("parsed",t),this.once("error",r)}return this.end(t),this},u.prototype.write=function(t){return this._parser.write(t),!0},u.prototype.end=function(t){this._parser.end(t)},u.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},u.prototype._gamma=function(t){this.gamma=t},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u.bitblt=function(t,e,r,n,o,i,a,s){if(n|=0,o|=0,i|=0,a|=0,s|=0,(r|=0)>t.width||n>t.height||r+o>t.width||n+i>t.height)throw new Error("bitblt reading outside image");if(a>e.width||s>e.height||a+o>e.width||s+i>e.height)throw new Error("bitblt writing outside image");for(let u=0;u<i;u++)t.data.copy(e.data,(s+u)*e.width+a<<2,(n+u)*t.width+r<<2,(n+u)*t.width+r+o<<2)},u.prototype.bitblt=function(t,e,r,n,o,i,a){return u.bitblt(this,t,e,r,n,o,i,a),this},u.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let r=0;r<t.width;r++){let n=t.width*e+r<<2;for(let e=0;e<3;e++){let r=t.data[n+e]/255;r=Math.pow(r,1/2.2/t.gamma),t.data[n+e]=Math.round(255*r)}}t.gamma=0}},u.prototype.adjustGamma=function(){u.adjustGamma(this)}},9653:(t,e,r)=>{"use strict";let n=r(9491).ok,o=r(9796),i=r(3837),a=r(4300).kMaxLength;function s(t){if(!(this instanceof s))return new s(t);t&&t.chunkSize<o.Z_MIN_CHUNK&&(t.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function u(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function c(t,e){return function(t,e){if("string"==typeof e&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let r=t._finishFlushFlag;return null==r&&(r=o.Z_FINISH),t._processChunk(e,r)}(new s(e),t)}s.prototype._processChunk=function(t,e,r){if("function"==typeof r)return o.Inflate._processChunk.call(this,t,e,r);let i,s,c=this,l=t&&t.length,h=this._chunkSize-this._offset,f=this._maxLength,p=0,d=[],m=0;function v(t,e){if(c._hadError)return;let r=h-e;if(n(r>=0,"have should not go down"),r>0){let t=c._buffer.slice(c._offset,c._offset+r);if(c._offset+=r,t.length>f&&(t=t.slice(0,f)),d.push(t),m+=t.length,f-=t.length,0===f)return!1}return(0===e||c._offset>=c._chunkSize)&&(h=c._chunkSize,c._offset=0,c._buffer=Buffer.allocUnsafe(c._chunkSize)),0===e&&(p+=l-t,l=t,!0)}this.on("error",(function(t){i=t})),n(this._handle,"zlib binding closed");do{s=this._handle.writeSync(e,t,p,l,this._buffer,this._offset,h),s=s||this._writeState}while(!this._hadError&&v(s[0],s[1]));if(this._hadError)throw i;if(m>=a)throw u(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+a.toString(16)+" bytes");let g=Buffer.concat(d,m);return u(this),g},i.inherits(s,o.Inflate),t.exports=e=c,e.Inflate=s,e.createInflate=function(t){return new s(t)},e.inflateSync=c},33:t=>{"use strict";let e=t.exports=function(t){this._buffer=t,this._reads=[]};e.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},e.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=t.length||t.allowLess))break;{this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}},5666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=F(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",m={};function v(){}function g(){}function _(){}var D={};u(D,i,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(S([])));w&&w!==r&&n.call(w,i)&&(D=w);var b=_.prototype=v.prototype=Object.create(D);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function F(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=_,u(b,"constructor",_),u(_,"constructor",g),g.displayName=u(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(C.prototype),u(C.prototype,a,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new C(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),u(b,s,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},4223:(t,e,r)=>{"use strict";const n=r(6003),o=r(1903),i=r(809),a=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=n(t)).length)return 0;t=t.replace(i()," ");let e=0;for(let r=0;r<t.length;r++){const n=t.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,e+=o(n)?2:1))}return e};t.exports=a,t.exports.default=a},6003:(t,e,r)=>{"use strict";const n=r(4277);t.exports=t=>"string"==typeof t?t.replace(n(),""):t},8006:t=>{"use strict";t.exports={type:"Buffer",data:[127,69,76,70,1,1,1,0,0,0,0,0,0,0,0,0,1,0,40,0,1,0,0,0,0,0,0,0,0,0,0,0,136,13,0,0,0,0,0,5,52,0,0,0,0,0,40,0,45,0,44,0,6,73,10,104,16,68,8,96,5,73,136,66,33,191,12,34,4,75,26,96,79,240,255,50,16,70,112,71,0,0,0,0,0,0,0,0,0,0,0,0,0,32,112,71,1,32,112,71,79,240,255,48,112,71,0,32,112,71,0,32,112,71,79,240,255,48,112,71,79,246,255,115,19,181,8,70,0,147,5,73,0,35,20,70,9,104,26,70,255,247,254,255,32,70,2,176,16,189,0,191,0,0,0,0,11,74,12,75,12,73,155,26,1,59,9,210,11,74,0,33,11,75,155,26,1,59,8,210,0,33,8,70,255,247,254,191,17,248,1,11,2,248,1,11,238,231,2,248,1,27,241,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,223,112,71,16,181,1,223,4,70,224,178,16,189,16,181,45,223,4,70,32,70,16,189,130,176,2,171,3,233,3,0,19,223,2,176,112,71,130,176,2,171,3,233,3,0,20,223,2,176,112,71,130,176,2,171,3,233,3,0,18,223,2,176,112,71,16,181,21,223,4,70,224,178,16,189,0,34,0,35,19,181,108,70,205,233,0,35,34,223,32,96,97,96,212,233,0,1,2,176,16,189,0,34,0,35,19,181,108,70,205,233,0,35,33,223,32,96,97,96,212,233,0,1,2,176,16,189,16,181,23,223,4,70,160,178,16,189,50,223,112,71,49,223,112,71,0,34,0,35,19,181,108,70,205,233,0,35,48,223,32,96,97,96,212,233,0,1,2,176,16,189,119,180,13,77,1,145,41,104,189,248,24,96,17,240,1,15,10,76,8,209,121,70,137,13,137,5,1,245,128,49,48,49,33,96,1,33,41,96,33,104,6,150,12,104,1,153,164,70,3,176,112,188,96,71,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,65,51,0,0,0,97,101,97,98,105,0,1,41,0,0,0,5,55,69,45,77,0,6,13,7,77,9,2,10,8,18,4,20,1,21,1,23,3,24,1,25,1,26,1,27,1,28,1,30,4,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,39,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,4,0,0,0,28,0,0,0,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,4,0,0,0,32,0,0,0,0,0,0,0,0,0,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,4,0,0,0,48,0,0,0,0,0,0,0,0,0,12,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,35,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,4,0,0,0,56,0,0,0,0,0,0,0,0,0,27,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,39,0,7,0,0,0,1,0,0,0,10,0,0,0,18,0,23,0,22,0,0,0,1,0,0,0,14,0,0,0,18,0,17,0,45,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,51,0,0,0,1,0,0,0,14,0,0,0,18,0,18,0,250,0,0,0,0,0,0,0,4,0,0,0,17,0,33,0,82,0,0,0,1,0,0,0,4,0,0,0,18,0,4,0,89,0,0,0,1,0,0,0,26,0,0,0,18,0,22,0,118,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,142,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,152,0,0,0,1,0,0,0,4,0,0,0,18,0,5,0,160,0,0,0,1,0,0,0,6,0,0,0,18,0,6,0,166,0,0,0,1,0,0,0,64,0,0,0,18,0,27,0,191,0,0,0,1,0,0,0,40,0,0,0,18,0,2,0,197,0,0,0,1,0,0,0,4,0,0,0,18,0,25,0,216,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,228,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,249,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,18,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,37,1,0,0,1,0,0,0,68,0,0,0,18,0,12,0,44,1,0,0,1,0,0,0,4,0,0,0,18,0,8,0,51,1,0,0,1,0,0,0,10,0,0,0,18,0,16,0,63,1,0,0,1,0,0,0,14,0,0,0,18,0,19,0,86,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,108,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,113,1,0,0,1,0,0,0,4,0,0,0,18,0,24,0,132,1,0,0,0,0,0,0,4,0,0,0,17,0,31,0,151,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,174,1,0,0,1,0,0,0,26,0,0,0,18,0,21,0,193,1,0,0,1,0,0,0,36,0,0,0,18,0,10,0,200,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,226,1,0,0,1,0,0,0,26,0,0,0,18,0,26,0,245,1,0,0,1,0,0,0,4,0,0,0,18,0,7,0,251,1,0,0,1,0,0,0,10,0,0,0,18,0,20,0,24,2,0,0,1,0,0,0,4,0,0,0,18,0,14,0,54,2,0,0,1,0,0,0,10,0,0,0,18,0,15,0,80,2,0,0,1,0,0,0,6,0,0,0,18,0,9,0,0,36,116,0,36,100,0,101,97,100,107,95,101,118,101,110,116,95,103,101,116,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,0,101,114,114,110,111,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,95,117,110,105,102,111,114,109,0,95,102,115,116,97,116,0,95,90,50,51,101,97,100,107,95,107,101,121,98,111,97,114,100,95,112,111,112,95,115,116,97,116,101,118,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,114,97,109,0,95,104,101,97,112,95,101,110,100,0,95,105,115,97,116,116,121,0,95,111,112,101,110,0,101,97,100,107,95,100,105,115,112,108,97,121,95,100,114,97,119,95,115,116,114,105,110,103,0,95,115,98,114,107,0,101,97,100,107,95,116,105,109,105,110,103,95,109,115,108,101,101,112,0,95,104,101,97,112,95,115,116,97,114,116,0,95,98,115,115,95,115,101,99,116,105,111,110,95,101,110,100,95,114,97,109,0,95,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,105,122,101,0,95,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,116,97,114,116,0,95,108,115,101,101,107,0,101,97,100,107,95,114,97,110,100,111,109,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,108,108,95,114,101,99,116,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,101,110,100,95,114,97,109,0,109,97,105,110,0,101,97,100,107,95,116,105,109,105,110,103,95,117,115,108,101,101,112,0,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,0,95,98,115,115,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,114,97,109,0,101,97,100,107,95,107,101,121,98,111,97,114,100,95,115,99,97,110,0,95,119,114,105,116,101,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,102,108,97,115,104,0,101,97,100,107,95,116,105,109,105,110,103,95,109,105,108,108,105,115,0,95,114,101,97,100,0,101,97,100,107,95,100,105,115,112,108,97,121,95,119,97,105,116,95,102,111,114,95,118,98,108,97,110,107,0,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,115,101,116,95,98,114,105,103,104,116,110,101,115,115,0,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,98,114,105,103,104,116,110,101,115,115,0,95,99,108,111,115,101,0,0,28,0,0,0,2,2,0,0,32,0,0,0,2,46,0,0,36,0,0,0,2,40,0,0,20,0,0,0,10,49,0,0,32,0,0,0,2,1,0,0,28,0,0,0,30,61,0,0,48,0,0,0,2,45,0,0,52,0,0,0,2,60,0,0,56,0,0,0,2,67,0,0,60,0,0,0,2,64,0,0,64,0,0,0,2,53,0,0,56,0,0,0,2,3,0,0,60,0,0,0,2,4,0,0,0,0,0,0,2,55,0,0,0,0,0,0,2,54,0,0,0,0,0,0,2,52,0,0,0,46,115,121,109,116,97,98,0,46,115,116,114,116,97,98,0,46,115,104,115,116,114,116,97,98,0,46,116,101,120,116,0,46,114,101,108,46,116,101,120,116,46,95,115,98,114,107,0,46,116,101,120,116,46,95,102,115,116,97,116,0,46,116,101,120,116,46,95,105,115,97,116,116,121,0,46,116,101,120,116,46,95,111,112,101,110,0,46,116,101,120,116,46,95,114,101,97,100,0,46,116,101,120,116,46,95,108,115,101,101,107,0,46,116,101,120,116,46,95,99,108,111,115,101,0,46,114,101,108,46,116,101,120,116,46,95,119,114,105,116,101,0,46,114,101,108,46,116,101,120,116,46,95,115,116,97,114,116,0,46,116,101,120,116,46,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,115,101,116,95,98,114,105,103,104,116,110,101,115,115,0,46,116,101,120,116,46,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,98,114,105,103,104,116,110,101,115,115,0,46,116,101,120,116,46,101,97,100,107,95,114,97,110,100,111,109,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,95,117,110,105,102,111,114,109,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,108,108,95,114,101,99,116,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,119,97,105,116,95,102,111,114,95,118,98,108,97,110,107,0,46,116,101,120,116,46,101,97,100,107,95,107,101,121,98,111,97,114,100,95,115,99,97,110,0,46,116,101,120,116,46,95,90,50,51,101,97,100,107,95,107,101,121,98,111,97,114,100,95,112,111,112,95,115,116,97,116,101,118,0,46,116,101,120,116,46,101,97,100,107,95,101,118,101,110,116,95,103,101,116,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,117,115,108,101,101,112,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,109,115,108,101,101,112,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,109,105,108,108,105,115,0,46,114,101,108,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,100,114,97,119,95,115,116,114,105,110,103,0,46,114,111,100,97,116,97,46,108,111,99,97,116,105,111,110,46,48,0,46,100,97,116,97,0,46,114,101,108,46,100,97,116,97,46,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,0,46,114,101,108,46,100,97,116,97,46,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,105,122,101,0,46,114,101,108,46,100,97,116,97,46,104,101,97,112,95,101,110,100,46,49,0,46,98,115,115,0,46,98,115,115,46,95,90,71,86,90,76,50,53,116,114,97,109,112,111,108,105,110,101,70,117,110,99,116,105,111,110,65,100,100,114,101,115,115,105,69,54,111,114,105,103,105,110,0,46,98,115,115,46,95,90,90,76,50,53,116,114,97,109,112,111,108,105,110,101,70,117,110,99,116,105,111,110,65,100,100,114,101,115,115,105,69,54,111,114,105,103,105,110,0,46,99,111,109,109,101,110,116,0,46,65,82,77,46,97,116,116,114,105,98,117,116,101,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,37,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,52,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,33,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,232,9,0,0,24,0,0,0,42,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,49,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,92,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,62,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,96,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,76,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,100,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,106,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,100,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,110,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,113,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,114,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,130,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,120,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,126,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,0,10,0,0,16,0,0,0,42,0,0,0,10,0,0,0,4,0,0,0,8,0,0,0,147,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,156,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,143,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,16,10,0,0,48,0,0,0,42,0,0,0,12,0,0,0,4,0,0,0,8,0,0,0,160,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,224,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,196,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,228,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,228,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,238,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,246,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,248,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,19,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,6,1,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,56,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,20,1,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,85,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,34,1,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,120,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,44,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,145,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,70,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,180,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,96,1,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,201,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,106,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,226,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,110,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,251,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,114,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,24,2,0,0,1,0,0,0,6,0,0,0,0,0,0,0,140,1,0,0,64,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,20,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,64,10,0,0,16,0,0,0,42,0,0,0,27,0,0,0,4,0,0,0,8,0,0,0,55,2,0,0,1,0,0,0,2,0,0,0,0,0,0,0,204,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,74,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,208,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,84,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,208,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,80,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,80,10,0,0,8,0,0,0,42,0,0,0,31,0,0,0,4,0,0,0,8,0,0,0,113,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,212,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,109,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,88,10,0,0,8,0,0,0,42,0,0,0,33,0,0,0,4,0,0,0,8,0,0,0,147,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,143,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,96,10,0,0,8,0,0,0,42,0,0,0,35,0,0,0,4,0,0,0,8,0,0,0,164,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,169,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,217,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,7,3,0,0,1,0,0,0,48,0,0,0,0,0,0,0,220,1,0,0,222,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,16,3,0,0,3,0,0,112,0,0,0,0,0,0,0,0,186,2,0,0,52,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,240,2,0,0,160,4,0,0,43,0,0,0,38,0,0,0,4,0,0,0,16,0,0,0,9,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,87,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,17,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,104,10,0,0,32,3,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]}},7573:(t,e,r)=>{"use strict";t.exports=r.p+"toolchain/ld.wasm"},3835:(t,e,r)=>{"use strict";t.exports=r.p+"toolchain/objcopy.wasm"},9491:t=>{"use strict";t.exports=require("assert")},852:t=>{"use strict";t.exports=require("async_hooks")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},7461:(t,e,r)=>{const{Argument:n}=r(8998),{Command:o}=r(5282),{CommanderError:i,InvalidArgumentError:a}=r(8056),{Help:s}=r(8917),{Option:u}=r(5790);(e=t.exports=new o).program=e,e.Argument=n,e.Command=o,e.CommanderError=i,e.Help=s,e.InvalidArgumentError=a,e.InvalidOptionArgumentError=a,e.Option=u},8998:(t,e,r)=>{const{InvalidArgumentError:n}=r(8056);e.Argument=class{constructor(t,e){switch(this.description=e||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?e.concat(t):[t]}default(t,e){return this.defaultValue=t,this.defaultValueDescription=e,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,e)=>{if(!this.argChoices.includes(t))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,e):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},e.humanReadableArgName=function(t){const e=t.name()+(!0===t.variadic?"...":"");return t.required?"<"+e+">":"["+e+"]"}},5282:(t,e,r)=>{const n=r(2361).EventEmitter,o=r(2081),i=r(1017),a=r(7147),s=r(7282),{Argument:u,humanReadableArgName:c}=r(8998),{CommanderError:l}=r(8056),{Help:h}=r(8917),{Option:f,splitOptionFlags:p,DualOptions:d}=r(5790),{suggestSimilar:m}=r(1812);class v extends n{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>s.stdout.write(t),writeErr:t=>s.stderr.write(t),getOutHelpWidth:()=>s.stdout.isTTY?s.stdout.columns:void 0,getErrHelpWidth:()=>s.stderr.isTTY?s.stderr.columns:void 0,outputError:(t,e)=>e(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._hasHelpOption=t._hasHelpOption,this._helpFlags=t._helpFlags,this._helpDescription=t._helpDescription,this._helpShortFlag=t._helpShortFlag,this._helpLongFlag=t._helpLongFlag,this._helpCommandName=t._helpCommandName,this._helpCommandnameAndArgs=t._helpCommandnameAndArgs,this._helpCommandDescription=t._helpCommandDescription,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}command(t,e,r){let n=e,o=r;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const[,i,a]=t.match(/([^ ]+) *(.*)/),s=this.createCommand(i);return n&&(s.description(n),s._executableHandler=!0),o.isDefault&&(this._defaultCommandName=s._name),s._hidden=!(!o.noHelp&&!o.hidden),s._executableFile=o.executableFile||null,a&&s.arguments(a),this.commands.push(s),s.parent=this,s.copyInheritedSettings(this),n?this:s}createCommand(t){return new v(t)}createHelp(){return Object.assign(new h,this.configureHelp())}configureHelp(t){return void 0===t?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return void 0===t?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return"string"!=typeof t&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,e){if(!t._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(e=e||{}).isDefault&&(this._defaultCommandName=t._name),(e.noHelp||e.hidden)&&(t._hidden=!0),this.commands.push(t),t.parent=this,this}createArgument(t,e){return new u(t,e)}argument(t,e,r,n){const o=this.createArgument(t,e);return"function"==typeof r?o.default(n).argParser(r):o.default(r),this.addArgument(o),this}arguments(t){return t.split(/ +/).forEach((t=>{this.argument(t)})),this}addArgument(t){const e=this._args.slice(-1)[0];if(e&&e.variadic)throw new Error(`only the last argument can be variadic '${e.name()}'`);if(t.required&&void 0!==t.defaultValue&&void 0===t.parseArg)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this._args.push(t),this}addHelpCommand(t,e){return!1===t?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof t&&(this._helpCommandName=t.split(" ")[0],this._helpCommandnameAndArgs=t),this._helpCommandDescription=e||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(t,e){const r=["preAction","postAction"];if(!r.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(e):this._lifeCycleHooks[t]=[e],this}exitOverride(t){return this._exitCallback=t||(t=>{if("commander.executeSubCommandAsync"!==t.code)throw t}),this}_exit(t,e,r){this._exitCallback&&this._exitCallback(new l(t,e,r)),s.exit(t)}action(t){return this._actionHandler=e=>{const r=this._args.length,n=e.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),t.apply(this,n)},this}createOption(t,e){return new f(t,e)}addOption(t){const e=t.name(),r=t.attributeName();if(t.negate){const e=t.long.replace(/^--no-/,"--");this._findOption(e)||this.setOptionValueWithSource(r,void 0===t.defaultValue||t.defaultValue,"default")}else void 0!==t.defaultValue&&this.setOptionValueWithSource(r,t.defaultValue,"default");this.options.push(t);const n=(e,n,o)=>{null==e&&void 0!==t.presetArg&&(e=t.presetArg);const i=this.getOptionValue(r);if(null!==e&&t.parseArg)try{e=t.parseArg(e,i)}catch(t){if("commander.invalidArgument"===t.code){const e=`${n} ${t.message}`;this.error(e,{exitCode:t.exitCode,code:t.code})}throw t}else null!==e&&t.variadic&&(e=t._concatValue(e,i));null==e&&(e=!t.negate&&(!(!t.isBoolean()&&!t.optional)||"")),this.setOptionValueWithSource(r,e,o)};return this.on("option:"+e,(e=>{const r=`error: option '${t.flags}' argument '${e}' is invalid.`;n(e,r,"cli")})),t.envVar&&this.on("optionEnv:"+e,(e=>{const r=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;n(e,r,"env")})),this}_optionEx(t,e,r,n,o){if("object"==typeof e&&e instanceof f)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(e,r);if(i.makeOptionMandatory(!!t.mandatory),"function"==typeof n)i.default(o).argParser(n);else if(n instanceof RegExp){const t=n;n=(e,r)=>{const n=t.exec(e);return n?n[0]:r},i.default(o).argParser(n)}else i.default(n);return this.addOption(i)}option(t,e,r,n){return this._optionEx({},t,e,r,n)}requiredOption(t,e,r,n){return this._optionEx({mandatory:!0},t,e,r,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){if(this._passThroughOptions=!!t,this.parent&&t&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(t=!0){if(this._storeOptionsAsProperties=!!t,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,e){return this._storeOptionsAsProperties?this[t]=e:this._optionValues[t]=e,this}setOptionValueWithSource(t,e,r){return this.setOptionValue(t,e),this._optionValueSources[t]=r,this}getOptionValueSource(t){return this._optionValueSources[t]}_prepareUserArgs(t,e){if(void 0!==t&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");let r;switch(e=e||{},void 0===t&&(t=s.argv,s.versions&&s.versions.electron&&(e.from="electron")),this.rawArgs=t.slice(),e.from){case void 0:case"node":this._scriptPath=t[1],r=t.slice(2);break;case"electron":s.defaultApp?(this._scriptPath=t[1],r=t.slice(2)):r=t.slice(1);break;case"user":r=t.slice(0);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(t,e){const r=this._prepareUserArgs(t,e);return this._parseCommand([],r),this}async parseAsync(t,e){const r=this._prepareUserArgs(t,e);return await this._parseCommand([],r),this}_executeSubCommand(t,e){e=e.slice();let r=!1;const n=[".js",".ts",".tsx",".mjs",".cjs"];function u(t,e){const r=i.resolve(t,e);if(a.existsSync(r))return r;if(n.includes(i.extname(e)))return;const o=n.find((t=>a.existsSync(`${r}${t}`)));return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let c,h=t._executableFile||`${this._name}-${t._name}`,f=this._executableDir||"";if(this._scriptPath){let t;try{t=a.realpathSync(this._scriptPath)}catch(e){t=this._scriptPath}f=i.resolve(i.dirname(t),f)}if(f){let e=u(f,h);if(!e&&!t._executableFile&&this._scriptPath){const r=i.basename(this._scriptPath,i.extname(this._scriptPath));r!==this._name&&(e=u(f,`${r}-${t._name}`))}h=e||h}if(r=n.includes(i.extname(h)),"win32"!==s.platform?r?(e.unshift(h),e=_(s.execArgv).concat(e),c=o.spawn(s.argv[0],e,{stdio:"inherit"})):c=o.spawn(h,e,{stdio:"inherit"}):(e.unshift(h),e=_(s.execArgv).concat(e),c=o.spawn(s.execPath,e,{stdio:"inherit"})),!c.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((t=>{s.on(t,(()=>{!1===c.killed&&null===c.exitCode&&c.kill(t)}))}))}const p=this._exitCallback;p?c.on("close",(()=>{p(new l(s.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):c.on("close",s.exit.bind(s)),c.on("error",(e=>{if("ENOENT"===e.code){const e=f?`searched for local subcommand relative to directory '${f}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",r=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e}`;throw new Error(r)}if("EACCES"===e.code)throw new Error(`'${h}' not executable`);if(p){const t=new l(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,p(t)}else s.exit(1)})),this.runningCommand=c}_dispatchSubcommand(t,e,r){const n=this._findCommand(t);if(n||this.help({error:!0}),!n._executableHandler)return n._parseCommand(e,r);this._executeSubCommand(n,e.concat(r))}_checkNumberOfArguments(){this._args.forEach(((t,e)=>{t.required&&null==this.args[e]&&this.missingArgument(t.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const t=(t,e,r)=>{let n=e;if(null!==e&&t.parseArg)try{n=t.parseArg(e,r)}catch(r){if("commander.invalidArgument"===r.code){const n=`error: command-argument value '${e}' is invalid for argument '${t.name()}'. ${r.message}`;this.error(n,{exitCode:r.exitCode,code:r.code})}throw r}return n};this._checkNumberOfArguments();const e=[];this._args.forEach(((r,n)=>{let o=r.defaultValue;r.variadic?n<this.args.length?(o=this.args.slice(n),r.parseArg&&(o=o.reduce(((e,n)=>t(r,n,e)),r.defaultValue))):void 0===o&&(o=[]):n<this.args.length&&(o=this.args[n],r.parseArg&&(o=t(r,o,r.defaultValue))),e[n]=o})),this.processedArgs=e}_chainOrCall(t,e){return t&&t.then&&"function"==typeof t.then?t.then((()=>e())):e()}_chainOrCallHooks(t,e){let r=t;const n=[];return D(this).reverse().filter((t=>void 0!==t._lifeCycleHooks[e])).forEach((t=>{t._lifeCycleHooks[e].forEach((e=>{n.push({hookedCommand:t,callback:e})}))})),"postAction"===e&&n.reverse(),n.forEach((t=>{r=this._chainOrCall(r,(()=>t.callback(t.hookedCommand,this)))})),r}_parseCommand(t,e){const r=this.parseOptions(e);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(r.operands),e=r.unknown,this.args=t.concat(e),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),e);if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName)return 1===t.length&&this.help(),this._dispatchSubcommand(t[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return g(this,e),this._dispatchSubcommand(this._defaultCommandName,t,e);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),g(this,r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let r;return n(),this._processArguments(),r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs))),this.parent&&(r=this._chainOrCall(r,(()=>{this.parent.emit(o,t,e)}))),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,t,e);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,e);this.listenerCount("command:*")?this.emit("command:*",t,e):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find((e=>e._name===t||e._aliases.includes(t)))}_findOption(t){return this.options.find((e=>e.is(t)))}_checkForMissingMandatoryOptions(){for(let t=this;t;t=t.parent)t.options.forEach((e=>{e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const e=t.attributeName();return void 0!==this.getOptionValue(e)&&"default"!==this.getOptionValueSource(e)}));t.filter((t=>t.conflictsWith.length>0)).forEach((e=>{const r=t.find((t=>e.conflictsWith.includes(t.attributeName())));r&&this._conflictingOption(e,r)}))}_checkForConflictingOptions(){for(let t=this;t;t=t.parent)t._checkForConflictingLocalOptions()}parseOptions(t){const e=[],r=[];let n=e;const o=t.slice();function i(t){return t.length>1&&"-"===t[0]}let a=null;for(;o.length;){const t=o.shift();if("--"===t){n===r&&n.push(t),n.push(...o);break}if(!a||i(t)){if(a=null,i(t)){const e=this._findOption(t);if(e){if(e.required){const t=o.shift();void 0===t&&this.optionMissingArgument(e),this.emit(`option:${e.name()}`,t)}else if(e.optional){let t=null;o.length>0&&!i(o[0])&&(t=o.shift()),this.emit(`option:${e.name()}`,t)}else this.emit(`option:${e.name()}`);a=e.variadic?e:null;continue}}if(t.length>2&&"-"===t[0]&&"-"!==t[1]){const e=this._findOption(`-${t[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,t.slice(2)):(this.emit(`option:${e.name()}`),o.unshift(`-${t.slice(2)}`));continue}}if(/^--[^=]+=/.test(t)){const e=t.indexOf("="),r=this._findOption(t.slice(0,e));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,t.slice(e+1));continue}}if(i(t)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&0===e.length&&0===r.length){if(this._findCommand(t)){e.push(t),o.length>0&&r.push(...o);break}if(t===this._helpCommandName&&this._hasImplicitHelpCommand()){e.push(t),o.length>0&&e.push(...o);break}if(this._defaultCommandName){r.push(t),o.length>0&&r.push(...o);break}}if(this._passThroughOptions){n.push(t),o.length>0&&n.push(...o);break}n.push(t)}else this.emit(`option:${a.name()}`,t)}return{operands:e,unknown:r}}opts(){if(this._storeOptionsAsProperties){const t={},e=this.options.length;for(let r=0;r<e;r++){const e=this.options[r].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return D(this).reduce(((t,e)=>Object.assign(t,e.opts())),{})}error(t,e){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const r=e||{},n=r.exitCode||1,o=r.code||"commander.error";this._exit(n,o,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in s.env){const e=t.attributeName();(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,s.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}}))}_parseOptionsImplied(){const t=new d(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((r=>void 0!==r.implied&&e(r.attributeName())&&t.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((t=>{Object.keys(t.implied).filter((t=>!e(t))).forEach((e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")}))}))}missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){const e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){const r=t=>{const e=t.attributeName(),r=this.getOptionValue(e),n=this.options.find((t=>t.negate&&e===t.attributeName())),o=this.options.find((t=>!t.negate&&e===t.attributeName()));return n&&(void 0===n.presetArg&&!1===r||void 0!==n.presetArg&&r===n.presetArg)?n:o||t},n=t=>{const e=r(t),n=e.attributeName();return"env"===this.getOptionValueSource(n)?`environment variable '${e.envVar}'`:`option '${e.flags}'`},o=`error: ${n(t)} cannot be used with ${n(e)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{const t=n.createHelp().visibleOptions(n).filter((t=>t.long)).map((t=>t.long));r=r.concat(t),n=n.parent}while(n&&!n._enablePositionalOptions);e=m(t,r)}const r=`error: unknown option '${t}'${e}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const e=this._args.length,r=1===e?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${e} argument${r} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((t=>{r.push(t.name()),t.alias()&&r.push(t.alias())})),e=m(t,r)}const r=`error: unknown command '${t}'${e}`;this.error(r,{code:"commander.unknownCommand"})}version(t,e,r){if(void 0===t)return this._version;this._version=t,e=e||"-V, --version",r=r||"output the version number";const n=this.createOption(e,r);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`),this._exit(0,"commander.version",t)})),this}description(t,e){return void 0===t&&void 0===e?this._description:(this._description=t,e&&(this._argsDescription=e),this)}summary(t){return void 0===t?this._summary:(this._summary=t,this)}alias(t){if(void 0===t)return this._aliases[0];let e=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(e=this.commands[this.commands.length-1]),t===e._name)throw new Error("Command alias can't be the same as its name");return e._aliases.push(t),this}aliases(t){return void 0===t?this._aliases:(t.forEach((t=>this.alias(t))),this)}usage(t){if(void 0===t){if(this._usage)return this._usage;const t=this._args.map((t=>c(t)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=t,this}name(t){return void 0===t?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=i.basename(t,i.extname(t)),this}executableDir(t){return void 0===t?this._executableDir:(this._executableDir=t,this)}helpInformation(t){const e=this.createHelp();return void 0===e.helpWidth&&(e.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),e.formatHelp(this,e)}_getHelpContext(t){const e={error:!!(t=t||{}).error};let r;return r=e.error?t=>this._outputConfiguration.writeErr(t):t=>this._outputConfiguration.writeOut(t),e.write=t.write||r,e.command=this,e}outputHelp(t){let e;"function"==typeof t&&(e=t,t=void 0);const r=this._getHelpContext(t);D(this).reverse().forEach((t=>t.emit("beforeAllHelp",r))),this.emit("beforeHelp",r);let n=this.helpInformation(r);if(e&&(n=e(n),"string"!=typeof n&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(n),this.emit(this._helpLongFlag),this.emit("afterHelp",r),D(this).forEach((t=>t.emit("afterAllHelp",r)))}helpOption(t,e){if("boolean"==typeof t)return this._hasHelpOption=t,this;this._helpFlags=t||this._helpFlags,this._helpDescription=e||this._helpDescription;const r=p(this._helpFlags);return this._helpShortFlag=r.shortFlag,this._helpLongFlag=r.longFlag,this}help(t){this.outputHelp(t);let e=s.exitCode||0;0===e&&t&&"function"!=typeof t&&t.error&&(e=1),this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){const r=["beforeAll","before","after","afterAll"];if(!r.includes(t))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`);const n=`${t}Help`;return this.on(n,(t=>{let r;r="function"==typeof e?e({error:t.error,command:t.command}):e,r&&t.write(`${r}\n`)})),this}}function g(t,e){t._hasHelpOption&&e.find((e=>e===t._helpLongFlag||e===t._helpShortFlag))&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function _(t){return t.map((t=>{if(!t.startsWith("--inspect"))return t;let e,r,n="127.0.0.1",o="9229";return null!==(r=t.match(/^(--inspect(-brk)?)$/))?e=r[1]:null!==(r=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(e=r[1],/^\d+$/.test(r[3])?o=r[3]:n=r[3]):null!==(r=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(e=r[1],n=r[3],o=r[4]),e&&"0"!==o?`${e}=${n}:${parseInt(o)+1}`:t}))}function D(t){const e=[];for(let r=t;r;r=r.parent)e.push(r);return e}e.Command=v},8056:(t,e)=>{class r extends Error{constructor(t,e,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=e,this.exitCode=t,this.nestedError=void 0}}e.CommanderError=r,e.InvalidArgumentError=class extends r{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},8917:(t,e,r)=>{const{humanReadableArgName:n}=r(8998);e.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(t){const e=t.commands.filter((t=>!t._hidden));if(t._hasImplicitHelpCommand()){const[,r,n]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=t.createCommand(r).helpOption(!1);o.description(t._helpCommandDescription),n&&o.arguments(n),e.push(o)}return this.sortSubcommands&&e.sort(((t,e)=>t.name().localeCompare(e.name()))),e}visibleOptions(t){const e=t.options.filter((t=>!t.hidden)),r=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag),n=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(r||n){let o;o=r?n?t.createOption(t._helpFlags,t._helpDescription):t.createOption(t._helpShortFlag,t._helpDescription):t.createOption(t._helpLongFlag,t._helpDescription),e.push(o)}if(this.sortOptions){const t=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");e.sort(((e,r)=>t(e).localeCompare(t(r))))}return e}visibleArguments(t){return t._argsDescription&&t._args.forEach((e=>{e.description=e.description||t._argsDescription[e.name()]||""})),t._args.find((t=>t.description))?t._args:[]}subcommandTerm(t){const e=t._args.map((t=>n(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(e?" "+e:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,e){return e.visibleCommands(t).reduce(((t,r)=>Math.max(t,e.subcommandTerm(r).length)),0)}longestOptionTermLength(t,e){return e.visibleOptions(t).reduce(((t,r)=>Math.max(t,e.optionTerm(r).length)),0)}longestArgumentTermLength(t,e){return e.visibleArguments(t).reduce(((t,r)=>Math.max(t,e.argumentTerm(r).length)),0)}commandUsage(t){let e=t._name;t._aliases[0]&&(e=e+"|"+t._aliases[0]);let r="";for(let e=t.parent;e;e=e.parent)r=e.name()+" "+r;return r+e+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const e=[];if(t.argChoices&&e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`),void 0!==t.defaultValue){(t.required||t.optional||t.isBoolean()&&"boolean"==typeof t.defaultValue)&&e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}return void 0!==t.presetArg&&t.optional&&e.push(`preset: ${JSON.stringify(t.presetArg)}`),void 0!==t.envVar&&e.push(`env: ${t.envVar}`),e.length>0?`${t.description} (${e.join(", ")})`:t.description}argumentDescription(t){const e=[];if(t.argChoices&&e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`),void 0!==t.defaultValue&&e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),e.length>0){const r=`(${e.join(", ")})`;return t.description?`${t.description} ${r}`:r}return t.description}formatHelp(t,e){const r=e.padWidth(t,e),n=e.helpWidth||80;function o(t,o){if(o){const i=`${t.padEnd(r+2)}${o}`;return e.wrap(i,n-2,r+2)}return t}function i(t){return t.join("\n").replace(/^/gm," ".repeat(2))}let a=[`Usage: ${e.commandUsage(t)}`,""];const s=e.commandDescription(t);s.length>0&&(a=a.concat([s,""]));const u=e.visibleArguments(t).map((t=>o(e.argumentTerm(t),e.argumentDescription(t))));u.length>0&&(a=a.concat(["Arguments:",i(u),""]));const c=e.visibleOptions(t).map((t=>o(e.optionTerm(t),e.optionDescription(t))));c.length>0&&(a=a.concat(["Options:",i(c),""]));const l=e.visibleCommands(t).map((t=>o(e.subcommandTerm(t),e.subcommandDescription(t))));return l.length>0&&(a=a.concat(["Commands:",i(l),""])),a.join("\n")}padWidth(t,e){return Math.max(e.longestOptionTermLength(t,e),e.longestSubcommandTermLength(t,e),e.longestArgumentTermLength(t,e))}wrap(t,e,r,n=40){if(t.match(/[\n]\s+/))return t;const o=e-r;if(o<n)return t;const i=t.slice(0,r),a=t.slice(r),s=" ".repeat(r),u=new RegExp(".{1,"+(o-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return i+(a.match(u)||[]).map(((t,e)=>("\n"===t.slice(-1)&&(t=t.slice(0,t.length-1)),(e>0?s:"")+t.trimRight()))).join("\n")}}},5790:(t,e,r)=>{const{InvalidArgumentError:n}=r(8056);function o(t){let e,r;const n=t.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),r=n.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}e.Option=class{constructor(t,e){this.flags=t,this.description=e||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;const r=o(t);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(t,e){return this.defaultValue=t,this.defaultValueDescription=e,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){return this.implied=Object.assign(this.implied||{},t),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?e.concat(t):[t]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,e)=>{if(!this.argChoices.includes(t))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,e):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((t,e)=>t+e[0].toUpperCase()+e.slice(1)))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},e.splitOptionFlags=o,e.DualOptions=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach((t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)})),this.negativeOptions.forEach(((t,e)=>{this.positiveOptions.has(e)&&this.dualOptions.add(e)}))}valueFromOption(t,e){const r=e.attributeName();if(!this.dualOptions.has(r))return!0;const n=this.negativeOptions.get(r).presetArg,o=void 0!==n&&n;return e.negate===(o===t)}}},1812:(t,e)=>{e.suggestSimilar=function(t,e){if(!e||0===e.length)return"";e=Array.from(new Set(e));const r=t.startsWith("--");r&&(t=t.slice(2),e=e.map((t=>t.slice(2))));let n=[],o=3;return e.forEach((e=>{if(e.length<=1)return;const r=function(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);const r=[];for(let e=0;e<=t.length;e++)r[e]=[e];for(let t=0;t<=e.length;t++)r[0][t]=t;for(let n=1;n<=e.length;n++)for(let o=1;o<=t.length;o++){let i=1;i=t[o-1]===e[n-1]?0:1,r[o][n]=Math.min(r[o-1][n]+1,r[o][n-1]+1,r[o-1][n-1]+i),o>1&&n>1&&t[o-1]===e[n-2]&&t[o-2]===e[n-1]&&(r[o][n]=Math.min(r[o][n],r[o-2][n-2]+1))}return r[t.length][e.length]}(t,e),i=Math.max(t.length,e.length);(i-r)/i>.4&&(r<o?(o=r,n=[e]):r===o&&n.push(e))})),n.sort(((t,e)=>t.localeCompare(e))),r&&(n=n.map((t=>`--${t}`))),n.length>1?`\n(Did you mean one of ${n.join(", ")}?)`:1===n.length?`\n(Did you mean ${n[0]}?)`:""}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.p="";var n={};(()=>{"use strict";r.d(n,{default:()=>Cr});var t=r(7757),e=r.n(t);const o=require("usb");function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e="function"==typeof Map?new Map:void 0;return u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,f(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},u(t)}function c(t,e,r){return c=l()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&h(o,r.prototype),o},c.apply(null,arguments)}function l(){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(t){return!1}}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}const p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(p,t);var e,r,n,o,u,c=(e=p,r=l(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return s(this,t)});function p(t){var e;a(this,p);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(e=c.call.apply(c,[this].concat(n))).name=t,e}return n=p,o&&i(n.prototype,o),u&&i(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(u(Error));function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"append",value:function(e){for(var r="",n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];o.forEach((function(t){r+=t+","})),t.Content+=+new Date+","+e+","+r+"\n"}},{key:"info",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["info"].concat(r))}},{key:"warn",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["warn"].concat(r))}},{key:"error",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["error"].concat(r))}}],(r=null)&&d(e.prototype,r),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();m.Content="";const v=m;function g(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function D(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,s,"next",t)}function s(t){D(i,n,o,a,s,"throw",t)}a(void 0)}))}}function w(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e,r){return e&&w(t.prototype,e),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}function F(t,e){return F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},F(t,e)}function k(t){var e=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(t){return!1}}();return function(){var r,n=x(t);if(e){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return A(this,r)}}function A(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}var S=6,O=8,T=10,P=2,R=3,B=4,j=1033;function I(t){return{bLength:t.getUint8(0),bDescriptorType:t.getUint8(1),bInterfaceNumber:t.getUint8(2),bAlternateSetting:t.getUint8(3),bNumEndpoints:t.getUint8(4),bInterfaceClass:t.getUint8(5),bInterfaceSubClass:t.getUint8(6),bInterfaceProtocol:t.getUint8(7),iInterface:t.getUint8(8),endpoints:[]}}function L(t){var e=function(t){for(var e,r=t,n=[];r.byteLength>2;){var o=r.getUint8(0),i=r.getUint8(1),a=new DataView(r.buffer.slice(0,o));if(i==B)e=I(a),n.push(e);else{var s={bLength:o,bDescriptorType:i,data:a};e?e.endpoints.push(s):n.push(s)}r=new DataView(r.buffer.slice(o))}return n}(new DataView(t.buffer.slice(9)));return{bLength:t.getUint8(0),bDescriptorType:t.getUint8(1),wTotalLength:t.getUint16(2,!0),bNumInterfaces:t.getUint8(4),bConfigurationValue:t.getUint8(5),iConfiguration:t.getUint8(6),bmAttributes:t.getUint8(7),bMaxPower:t.getUint8(8),interfaces:e}}function N(t){return v.info("DFU","getConfiguration"),new Promise((function(e,r){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:O,value:0,index:0},1).then((function(t){"ok"==t.status?e(t.data.getInt8(0)):r(new Error("Wrong getConfiguration status: "+t.status))})).catch((function(t){r(new Error("Get configuration failed --\x3e "+t))}))}))}function M(t){return v.info("DFU","getInterface"),new Promise((function(e,r){t.device.controlTransferIn({requestType:"standard",recipient:"interface",request:T,value:0,index:t.settings.interface.interfaceNumber},1).then((function(t){"ok"==t.status?e(t.data.getInt8(0)):r(new Error("Wrong getInterface status: "+t.status))})).catch((function(t){r(new Error("Get interface failed --\x3e "+t))}))}))}function U(t,e){return v.info("DFU","getConfigurationDescriptor","index "+e),new Promise((function(r,n){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|P<<8,index:0},4).then((function(o){if("ok"==o.status){var i=o.data.getUint16(2,!0);t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|P<<8,index:0},i).then((function(t){"ok"==t.status?r(L(t.data)):n(new Error("Wrong getConfigurationDescriptor status: "+t.status))})).catch((function(t){n(t)}))}else n(new Error("Wrong getConfigurationDescriptor status: "+o.status))})).catch((function(t){n(new Error("Get configuration descriptor failed --\x3e "+t))}))}))}function H(t,e){return v.info("DFU","getStringDescriptor","index "+e),new Promise((function(r,n){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|R<<8,index:j},255).then((function(t){"ok"==t.status?(t.data.getInt8(1)!=R&&n(new Error("Wrong descriptor type: "+t.data.getInt8(1))),r(new TextDecoder("utf-16").decode(new Uint16Array(t.data.buffer,2)))):n(new Error("Wrong getStringDescriptor status: "+t.status))})).catch((function(t){n(new Error("Get string descriptor failed --\x3e "+t))}))}))}var z={Offset:0,Size:11,Signature:{Offset:0,Size:5}},V={Offset:11,TargetPrefix:{Offset:0,Size:274,Signature:{Offset:0,Size:6},NbElements:{Offset:270,Size:4}},Element:{Offset:274,Address:{Offset:0,Size:4},Size:{Offset:4,Size:4},Data:{Offset:8}}},G=1,$=2,q=3,W=4,Y=5,K=6,X=0,Z=2,Q=4,J=5,tt=7,et=10,rt=33,nt=65,ot=function(t){C(r,t);var e=k(r);function r(){E(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DFUError"].concat(n))}return b(r)}(p),it=function(t){C(r,t);var e=k(r);function r(){E(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DFUInterfaceError"].concat(n))}return b(r)}(p);function at(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return v.info("DFU","requestIn","bRequest: "+e,"data: "+r,"wValue: "+n),new Promise((function(o,i){t.device.controlTransferIn({requestType:"class",recipient:"interface",request:e,value:n,index:t.settings.interface.interfaceNumber},r).then((function(t){"ok"==t.status?o(t.data):i(new Error("Wrong requestIn status: "+t.status))})).catch((function(t){i(new Error("ControlTransferIn failed --\x3e "+t))}))}))}function st(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return v.info("DFU","requestOut","bRequest: "+e,"data: "+r,"wValue: "+n),new Promise((function(o,i){t.device.controlTransferOut({requestType:"class",recipient:"interface",request:e,value:n,index:t.settings.interface.interfaceNumber},r).then((function(t){"ok"==t.status?o(t.bytesWritten):i(new Error("Wrong requestOut status: "+t.status))})).catch((function(t){i(new Error("ControlTransferOut failed --\x3e "+t))}))}))}function ut(t){return v.info("DFU","getState"),new Promise((function(e,r){at(t,Y,1).then((function(t){e(t.getUint8(0))})).catch((function(t){r(new Error("Get state failed --\x3e "+t))}))}))}function ct(t){return v.info("DFU","getStatus"),new Promise((function(e,r){at(t,q,6).then((function(t){e({status:t.getUint8(0),pollTimeout:16777215&t.getUint32(1,!0),state:t.getUint8(4)})})).catch((function(t){r(new Error("Get status failed --\x3e "+t))}))}))}function lt(t){return ht.apply(this,arguments)}function ht(){return ht=y(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","abortToIdle"),t.prev=1,t.next=4,st(r,K);case 4:return t.next=6,ut(r);case 6:if((n=t.sent)!=et){t.next=13;break}return t.next=10,st(r,W);case 10:return t.next=12,ut(r);case 12:n=t.sent;case 13:if(n==Z){t.next=15;break}throw new Error("State is "+n.state+"instead of DFU IDLE (2).");case 15:t.next=20;break;case 17:throw t.prev=17,t.t0=t.catch(1),new Error("Abort to idle failed --\x3e "+t.t0);case 20:case"end":return t.stop()}}),t,null,[[1,17]])}))),ht.apply(this,arguments)}function ft(t,e){return pt.apply(this,arguments)}function pt(){return pt=y(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(t){return new Promise((function(e,r){setTimeout(e,t)}))},v.info("DFU","pollUntil",n),t.prev=2,t.next=5,ct(r);case 5:i=t.sent;case 6:if(n(i.state)||i.state==et){t.next=14;break}return t.next=9,o(i.pollTimeout);case 9:return t.next=11,ct(r);case 11:i=t.sent,t.next=6;break;case 14:return t.abrupt("return",i);case 17:throw t.prev=17,t.t0=t.catch(2),new Error("Poll until failed --\x3e "+t.t0);case 20:case"end":return t.stop()}}),t,null,[[2,17]])}))),pt.apply(this,arguments)}function dt(t,e){return mt.apply(this,arguments)}function mt(){return mt=y(e().mark((function t(r,n){var o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","setAddress",Number(n).toString(16)),o=new ArrayBuffer(5),(i=new DataView(o)).setUint8(0,rt),i.setUint32(1,n,!0),t.prev=5,t.next=8,st(r,G,o,0);case 8:return t.next=10,ft(r,(function(t){return t!=Q}));case 10:if((a=t.sent).status==X){t.next=13;break}throw"Status is "+a.status+" instead of Status OK (0).";case 13:t.next=18;break;case 15:throw t.prev=15,t.t0=t.catch(5),"Set address to "+n+" failed --\x3e "+t.t0;case 18:case"end":return t.stop()}}),t,null,[[5,15]])}))),mt.apply(this,arguments)}const vt=function(){function t(r,n){E(this,t),this.open=y(e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","open"),t.prev=1,t.next=4,this.device.open();case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new ot("OPEN failed --\x3e "+t.t0);case 9:if(r=this.settings.configuration.configurationValue,null!=this.device.configuration&&this.device.configuration.configurationValue==r){t.next=19;break}return t.prev=11,t.next=14,this.device.selectConfiguration(r);case 14:t.next=19;break;case 16:throw t.prev=16,t.t1=t.catch(11),new ot("OPEN failed: could not select configuration --\x3e "+t.t1);case 19:if(n=this.settings.interface.interfaceNumber,this.device.configuration.interfaces[n].claimed){t.next=29;break}return t.prev=21,t.next=24,this.device.claimInterface(n);case 24:t.next=29;break;case 26:throw t.prev=26,t.t2=t.catch(21),new it("OPEN failed: could not claim interface --\x3e "+t.t2);case 29:if(o=this.settings.alternate.alternateSetting,null!=this.device.configuration.interfaces[n].alternate&&this.device.configuration.interfaces[n].alternate==o){t.next=39;break}return t.prev=31,t.next=34,this.device.selectAlternateInterface(n,o);case 34:t.next=39;break;case 36:throw t.prev=36,t.t3=t.catch(31),new ot("OPEN failed: could not select alternate interface --\x3e "+t.t3);case 39:case"end":return t.stop()}}),t,this,[[1,6],[11,16],[21,26],[31,36]])}))),this.close=y(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","close"),t.prev=1,t.next=4,this.device.close();case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new ot("CLOSE failed --\x3e "+t.t0);case 9:case"end":return t.stop()}}),t,this,[[1,6]])}))),this.getMemoryLayout=y(e().mark((function t(){var r,n=this;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","getMemoryLayout"),t.prev=1,t.delegateYield(e().mark((function t(){var r,o,i,a,s,u,c,l,h;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N(n);case 2:return r=t.sent,t.next=5,U(n,r-1);case 5:return o=t.sent,t.next=8,M(n);case 8:return i=t.sent,a=o.interfaces[i].iInterface,t.next=12,H(n,a);case 12:for(s=t.sent,u=s.split("/"),c=[],l=function(t){var e=parseInt(u[t]),r=u[t+1].split(","),n=/(\d+)\*(\d+)([K|M])g/;r.forEach((function(t){var r=t.match(n),o=parseInt(r[1]),i=parseInt(r[2]),a=r[3];"K"==a?i*=1024:"M"==a&&(i*=1048576);var s=o*i,u={address:e,lastAddress:e+s-1,size:s,nbPage:o,pageSize:i};c.push(u),e+=s}))},h=1;h<u.length;h+=2)l(h);return t.abrupt("return",{v:c});case 18:case"end":return t.stop()}}),t)}))(),"t0",3);case 3:if("object"!=typeof(r=t.t0)){t.next=6;break}return t.abrupt("return",r.v);case 6:t.next=11;break;case 8:throw t.prev=8,t.t1=t.catch(1),new ot("GET MEMORY LAYOUT failed --\x3e "+t.t1);case 11:case"end":return t.stop()}}),t,null,[[1,8]])}))),this.upload=function(){var t=y(e().mark((function t(r,n,o){var i,a,s,u,c,l;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","upload","address "+Number(r).toString(16),"Length "+Number(n).toString(16)),t.prev=1,t.next=4,ut(this);case 4:if(t.sent==Z){t.next=8;break}return t.next=8,lt(this);case 8:return t.next=10,dt(this,r);case 10:return t.next=12,lt(this);case 12:i=2,a=new Uint8Array(n),s=0,o&&o(0);case 16:return c=Math.min(this.TransferSize,n-s),v.info("DFU","upload","block number "+i,"bytes to read "+c),t.next=20,at(this,$,c,i++);case 20:(u=t.sent).byteLength>0&&(l=new Uint8Array(u.buffer),a.set(l,s),s+=u.byteLength),o&&o(s/n);case 23:if(s<n){t.next=16;break}case 24:return t.next=26,lt(this);case 26:return t.abrupt("return",a);case 29:return t.prev=29,t.t0=t.catch(1),t.next=33,lt(this);case 33:throw new ot("UPLOAD failed at address "+r+" of length "+n+" --\x3e "+t.t0);case 34:case"end":return t.stop()}}),t,this,[[1,29]])})));return function(e,r,n){return t.apply(this,arguments)}}(),this.download=function(){var t=y(e().mark((function t(r,n,o){var i,a,s,u,c,l,h;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v.info("DFU","download","address "+Number(r).toString(16)),t.prev=1,i=0,a=n.byteLength,s=r,o&&o(0);case 6:if(!(i<a)){t.next=27;break}return u=a-i,c=Math.min(u,this.TransferSize),v.info("DFU","download step, at address "+Number(r).toString(16)),l=0,h=void 0,t.next=14,dt(this,s);case 14:return t.next=16,st(this,G,n.slice(i,i+c),2);case 16:return l=t.sent,t.next=19,ft(this,(function(t){return t==J||t==Z}));case 19:if(h=t.sent,s+=c,h.status==X){t.next=23;break}throw"state=".concat(h.state,", status=").concat(h.status);case 23:i+=l,o&&o(i/a),t.next=6;break;case 27:t.next=32;break;case 29:throw t.prev=29,t.t0=t.catch(1),new ot("DOWNLOAD failed at address "+Number(r).toString(16)+" --\x3e "+t.t0);case 32:case"end":return t.stop()}}),t,this,[[1,29]])})));return function(e,r,n){return t.apply(this,arguments)}}(),this.leave=function(){var t=y(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","leave","address "+Number(r).toString(16)),t.prev=1,t.next=4,dt(this,r);case 4:return t.next=6,st(this,G,new ArrayBuffer,2);case 6:return t.next=8,ft(this,(function(t){return t==tt}));case 8:t.next=13;break;case 10:throw t.prev=10,t.t0=t.catch(1),new ot("LEAVE failed at address "+Number(r).toString(16)+" --\x3e "+t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),this.eraseSegment=function(){var t=y(e().mark((function t(r){var n,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","eraseSegment","address "+Number(r).toString(16)),t.prev=1,t.next=4,ut(this);case 4:if(t.sent==Z){t.next=8;break}return t.next=8,lt(this);case 8:return n=new ArrayBuffer(5),(o=new DataView(n)).setUint8(0,nt),o.setUint32(1,r,!0),t.next=14,st(this,G,n,0);case 14:return t.next=16,ct(this);case 16:if((i=t.sent).state==Q){t.next=19;break}throw"wrong DFU state: "+i.state;case 19:return t.next=21,ft(this,(function(t){return t!=Q}));case 21:if((i=t.sent).status==X){t.next=24;break}throw"wrong DFU status: "+i.status;case 24:t.next=29;break;case 26:throw t.prev=26,t.t0=t.catch(1),new ot("ERASE SEGMENT failed at address "+r+" --\x3e "+t.t0);case 29:case"end":return t.stop()}}),t,this,[[1,26]])})));return function(e){return t.apply(this,arguments)}}(),this.TransferSize=n,this.device=r;var o,i=g(r.configurations);try{for(i.s();!(o=i.n()).done;){var a,s=o.value,u=g(s.interfaces);try{for(u.s();!(a=u.n()).done;){var c,l=a.value,h=g(l.alternates);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(254==f.interfaceClass&&1==f.interfaceSubclass&&(1==f.interfaceProtocol||2==f.interfaceProtocol))return this.settings={configuration:s,interface:l,alternate:f},this}}catch(t){h.e(t)}finally{h.f()}}}catch(t){u.e(t)}finally{u.f()}}}catch(t){i.e(t)}finally{i.f()}return this.settings={configuration:{configurationValue:1},interface:{interfaceNumber:0},alternate:{alternateSetting:0}},this}return b(t,null,[{key:"Parse",value:function(t){new DataView(t);var e=new TextDecoder("utf-8").decode(new Uint8Array(t.slice(z.Signature.Offset,z.Signature.Offset+z.Signature.Size)));if("DfuSe"!=e)throw new ot("Parsed file is not a DFU file (invalid signature)");var r=t.slice(V.Offset);if("Target"!=(e=new TextDecoder("utf-8").decode(new Uint8Array(r.slice(V.TargetPrefix.Signature.Offset,V.TargetPrefix.Signature.Size)))))throw new ot("Corrupted DFU file (invalid target signature)");for(var n=[],o=new DataView(r,V.TargetPrefix.NbElements.Offset,V.TargetPrefix.NbElements.Offset+V.TargetPrefix.NbElements.Size).getUint32(0,!0),i=r.slice(V.Element.Offset),a=0;a<o;a++){var s=new DataView(i,V.Element.Address.Offset,V.Element.Address.Offset+V.Element.Address.Size).getUint32(0,!0),u=new DataView(i,V.Element.Size.Offset,V.Element.Address.Offset+V.Element.Size.Size).getUint32(0,!0),c=i.slice(V.Element.Data.Offset,V.Element.Data.Offset+u);i=i.slice(V.Element.Data.Offset+u),n.push({address:s,size:u,data:c})}return n}}]),t}();function gt(t){return new TextDecoder("utf-8").decode(t.subarray(0,t.indexOf(0)))}function _t(t){var e=new TextEncoder("utf-8").encode(t),r=new Uint8Array(e.length+1);return r.set(e,0),r.set([0],e.length),r}function Dt(t){for(var e=new Uint8Array(t.length/2),r=0;r<e.length;r++)e[r]=parseInt(t.substr(2*r,2),16);return e}function yt(t){for(var e=atob(t),r="",n=0;n<e.length;n++){var o=e.charCodeAt(n).toString(16);r+=2===o.length?o:"0"+o}return r.toUpperCase()}function wt(t){return btoa(t.match(/\w{2}/g).map((function(t){return String.fromCharCode(parseInt(t,16))})).join(""))}function bt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Et(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Et(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ft(t,e,r){return e&&Ct(t.prototype,e),r&&Ct(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){return At=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},At(t,e)}function xt(t){var e=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(t){return!1}}();return function(){var r,n=Ot(t);if(e){var o=Ot(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return St(this,r)}}function St(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}var Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&At(t,e)}(r,t);var e=xt(r);function r(){kt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"StorageError"].concat(n))}return Ft(r)}(p);function Pt(t){return new DataView(t.buffer,t.byteOffset).getUint16(0,!0)}function Rt(t){var e={size:0,name:"unknown",content:"unknown"};return e.size=Pt(t),e.name=gt(t.subarray(2)),e.content=t.subarray(2+e.name.length+1,e.size),e}var Bt=function(t){function e(t){kt(this,e),this.records=t}return Ft(e,[{key:Symbol.iterator,value:function(){var t=this.records;return{next:function(){var e=Pt(t);if(0===e)return{done:!0};var r=Rt(t);return t=t.subarray(e),{value:r,done:!1}}}}}]),e}();const jt=Ft((function t(e){kt(this,t),this.availableSize=function(){var t,e=0,r=bt(new Bt(this.data));try{for(r.s();!(t=r.n()).done;){e+=t.value.size}}catch(t){r.e(t)}finally{r.f()}return this.totalSize()-e},this.totalSize=function(){return this.data.byteLength-2},this.recordsWithExtension=function(t){var e,r=[],n=bt(new Bt(this.data));try{for(n.s();!(e=n.n()).done;){var o=e.value;o.name.endsWith(t)&&r.push(o.name)}}catch(t){n.e(t)}finally{n.f()}return r},this.size=function(t){var e,r=bt(new Bt(this.data));try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.name===t)return n.size}}catch(t){r.e(t)}finally{r.f()}},this.content=function(t){var e,r=bt(new Bt(this.data));try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.name===t)return n.content}}catch(t){r.e(t)}finally{r.f()}},this.setContent=function(t,e){var r,n=0,o=0,i=bt(new Bt(this.data));try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.name===t){o=a.size;break}n+=a.size}}catch(t){i.e(t)}finally{i.f()}var s=this.data.slice(n+o),u=n,c=function(t,e){if(void 0!==e){var r=t.length+1+e.byteLength+2,n=new Uint8Array(r);return new DataView(n.buffer,n.byteOffset).setUint16(0,r,!0),n.set(_t(t),2),n.set(e,2+t.length+1),n}}(t,e);if(void 0!==c){if(Rt(c).size>this.availableSize()+o)throw new Tt("The storage on calculator is full");this.data.set(c,n),u+=c.length,s=s.slice(0,this.data.length-(n+c.length))}this.data.set(s,u),this.data.fill(0,u+s.length)},this.data=e}));function It(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Lt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Nt(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Nt(i,n,o,a,s,"next",t)}function s(t){Nt(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ht(t,e,r){return e&&Ut(t.prototype,e),r&&Ut(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gt(t,e)}function Gt(t,e){return Gt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gt(t,e)}function $t(t){var e=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(t){return!1}}();return function(){var r,n=Wt(t);if(e){var o=Wt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qt(this,r)}}function qt(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}var Yt=r(3786),Kt=2048,Xt=Dt("F00DC0DE"),Zt=Dt("FEEDC0DE"),Qt=Dt("BADBEEEF"),Jt=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"CalculatorMemoryCorruption"].concat(n))}return Ht(r)}(p),te=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"BusyCalculatorError"].concat(n))}return Ht(r)}(p),ee=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"WebUSBError"].concat(n))}return Ht(r)}(p),re=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"USBConnectionError"].concat(n))}return Ht(r)}(p),ne=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"ForbiddenMemoryAccessError"].concat(n))}return Ht(r)}(p),oe=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DeviceDetectionError"].concat(n))}return Ht(r)}(p),ie=function(t){Vt(r,t);var e=$t(r);function r(t){var n;zt(this,r);for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this,"BulkError"].concat(i))).errors=t,n}return Ht(r)}(p),ae={N0100:{name:"N0100",ElectronicSignatureAddress:536836624,RAMAddressStart:536870912,RAMAddressEnd:537133056},N0110:{name:"N0110",ElectronicSignatureAddress:535853584,RAMAddressStart:536870912,RAMAddressEnd:537133056},N0120:{name:"N0120",ElectronicSignatureAddress:535947264,RAMAddressStart:603979776,RAMAddressEnd:604307456},N0120Prototype:{displayed_name:"N0120",ElectronicSignatureAddress:535947264,name:"N0120_PORTUGAL_PROTOTYPE_20210930",RAMAddressStart:603979776,RAMAddressEnd:604307456}},se=Dt("BADD0BEE");function ue(t){for(var e="",r=0;r<t.byteLength;r++)e+=t[r].toString(16).padStart(2,"0").toUpperCase();return e}function ce(t,e){if(t.length<e.length)return!1;for(var r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0}function le(t,e){return!(t.length<e.length)&&ce(t.subarray(t.length-e.length),e)}function he(t,e){if(!(t>=134217728&&t+e<=135266304||t>=2415919104&&t+e<=2424307712))throw new ne("Access to address: "+t+" (length "+e+") is out of flash range")}function fe(t,e,r){if(e<t.RAMAddressStart||e+r>=t.RAMAddressEnd)throw new ne("Access to address: "+e+" (length "+r+") is out of RAM range")}function pe(t){if(v.info("Calculator","parseSlotInfo","header info "+t),!ce(t,Qt)||!le(t,Qt))return null;var e=new DataView(t.buffer,t.byteOffset);return{kernelHeaderAddress:e.getUint32(4,!0),userlandHeaderAddress:e.getUint32(8,!0)}}function de(t,e){if(v.info("Calculator","parseFirmwareHeader","header "+t),!ce(t,Xt))return e;e.version=gt(t.subarray(4)),e.patch=gt(t.subarray(12));var r=t.subarray(20);if(ce(r,Xt))return e;var n=new DataView(t.buffer,t.byteOffset);return e.storageAddress=n.getUint32(20,!0),ce(r=t.subarray(24),Xt)||(e.storageSize=n.getUint32(24,!0)),e}function me(t,e){if(v.info("Calculator","parseUserlandHeader","header "+t),!ce(t,Zt))return e;e.userlandVersion=gt(t.subarray(4));var r=new DataView(t.buffer,t.byteOffset),n=12;return e.storageAddress=r.getUint32(n,!0),n+=4,e.storageSize=r.getUint32(n,!0),n+=4,e.externalAppsFlashStart=r.getUint32(n,!0),n+=4,e.externalAppsFlashEnd=r.getUint32(n,!0),n+=4,e.externalAppsRamStart=r.getUint32(n,!0),n+=4,e.externalAppsRamEnd=r.getUint32(n,!0),e}function ve(){return(ve=Mt(e().mark((function t(r,n,o){var i,a,s,u,c,l,h,f;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("Calculator","uploadHeader","address "+Number(n[0].address).toString(16)),i={version:"0.0.0",patch:"0000000",userlandVersion:"unknown",externalAppsFlashStart:"unknown",externalAppsFlashEnd:"unknown",externalAppsRamStart:"unknown",externalAppsRamEnd:"unknown",storageAddress:"unknown",storageSize:4096},t.prev=2,a=n[0].address+Ee.Header0.Offset,s=Ee.Header0.Size,he(a,s),t.next=8,r.upload(a,s);case 8:if(!ce(u=t.sent,Xt)||!le(u,Xt)){t.next=13;break}return t.abrupt("return",de(u,i));case 13:return a=n[0].address+Ee.Header1.Offset,s=Ee.Header1.Size,he(a,s),t.next=18,r.upload(a,s);case 18:if(!ce(u=t.sent,Xt)||!le(u,Xt)){t.next=23;break}return t.abrupt("return",de(u,i));case 23:return a=o.RAMAddressStart,s=Ee.Header2.SlotInfoSize,fe(o,a,s),t.prev=26,t.next=29,r.upload(a,s);case 29:if(c=t.sent,null!=(l=pe(c))){t.next=33;break}throw new Jt("The slot info was corrupted");case 33:return a=l.kernelHeaderAddress,s=Ee.Header2.KernelHeaderSize,he(a,s),t.next=38,r.upload(a,s);case 38:return h=t.sent,i=de(h,i),a=l.userlandHeaderAddress,s=Ee.Header2.UserlandHeaderSize,he(a,s),t.next=45,r.upload(a,s);case 45:return f=t.sent,i=me(f,i),t.abrupt("return",i);case 50:return t.prev=50,t.t0=t.catch(26),t.abrupt("return",de(u,i));case 53:t.next=59;break;case 55:throw t.prev=55,t.t1=t.catch(2),t.t1.message="Upload header failed --\x3e "+t.t1.message,t.t1;case 59:case"end":return t.stop()}}),t,null,[[2,55],[26,50]])})))).apply(this,arguments)}function ge(){return ge=Mt(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(16!=(o=r.device.serialNumber).length){t.next=3;break}return t.abrupt("return",o);case 3:return t.next=5,r.upload(n.ElectronicSignatureAddress-1,13);case 5:return i=t.sent,t.abrupt("return",wt(ue(i.subarray(1,13))));case 7:case"end":return t.stop()}}),t)}))),ge.apply(this,arguments)}function _e(t,e){return De.apply(this,arguments)}function De(){return De=Mt(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v.info("Calculator","calculatorGetStorage","address "+Number(n.firmware.storageAddress).toString(16)),"unknown"!==n.firmware.storageAddress){t.next=3;break}throw new Jt("The Storage address could not be found in header");case 3:t.prev=3,fe(n.model,n.firmware.storageAddress,n.firmware.storageSize+2*se.length),t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(3),new Jt("Calculator Get Storage failed --\x3e "+t.t0);case 10:if(!1===r.storage){t.next=12;break}return t.abrupt("return",r.storage);case 12:return t.prev=12,t.next=15,r.dfu.upload(n.firmware.storageAddress,n.firmware.storageSize+2*se.length);case 15:if(!ce(o=t.sent,se)||!le(o,se)){t.next=22;break}return i=o.subarray(se.length,n.firmware.storageSize+se.length),r.storage=new jt(i),t.abrupt("return",r.storage);case 22:throw new Jt("Memory is corrupted: could not find storage tags");case 23:t.next=29;break;case 25:throw t.prev=25,t.t1=t.catch(12),t.t1.message="CalculationGetStorage failed --\x3e "+t.t1.message,t.t1;case 29:case"end":return t.stop()}}),t,null,[[3,7],[12,25]])}))),De.apply(this,arguments)}function ye(t,e,r){return we.apply(this,arguments)}function we(){return we=Mt(e().mark((function t(r,n,o){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v.info("Calculator","calculatorSetStorage","address "+Number(n.firmware.storageAddress).toString(16)),t.prev=1,fe(n.model,n.firmware.storageAddress+se.length,o.data),t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(1),new Jt("Calculator Set Storage failed --\x3e "+t.t0);case 8:return t.prev=8,t.next=11,r.dfu.download(n.firmware.storageAddress+se.length,o.data);case 11:t.next=17;break;case 13:throw t.prev=13,t.t1=t.catch(8),t.t1.message="CalculationSetStorage failed --\x3e "+t.t1.message,t.t1;case 17:case"end":return t.stop()}}),t,null,[[1,5],[8,13]])}))),we.apply(this,arguments)}function be(t){var e=_t(t),r=new Uint8Array(e.length+1);return r[0]=1,r.set(e,1),r}var Ee=function(){function t(e,r){zt(this,t),this.dfu=new vt(e,r),this.running=!1,this.storage=!1,this.infos=!1}return Ht(t,[{key:"process",value:function(t){var e,r=this;return v.info("Calculator","process"),new Yt((function(n,o){if(r.running)return o(new te("Calculator is already processing another request"));r.running=!0,r.dfu.open().then((function(){return t(r)})).then((function(t){if(e=t,r.dfu.device.opened)return r.dfu.close()})).then((function(){return r.running=!1,n(e)})).catch((function(t){return r.running=!1,o(t)}))}))}},{key:"reconnectAndProcess",value:function(e,r){var n=this;return new Yt((function(o,i){return v.info("Calculator","reconnect"),null==navigator.usb?i(new ee("Web usb unvailable")):t.StallUntilConnect(n.dfu.device.serialNumber,e).then((function(t){return t.process(r)})).then((function(t){o(t)})).catch((function(t){i(t)}))}))}},{key:"extractInfos",value:function(){var t=this;return v.info("Calculator","extractInfos"),new Yt((function(e,r){var n,o,i;return!1!==t.infos?e(t):t.dfu.getMemoryLayout().then((function(e){return n=e,o=function(t,e){if("NumWorks Calculator"==t.productName&&2==t.deviceVersionMinor)return"EAAbABVROTUxNDM4"==t.serialNumber?ae.N0120Prototype:ae.N0120;var r=e[e.length-1].lastAddress;return r>135135232&&r<2415919104?ae.N0100:ae.N0110}(t.dfu.device,n),function(t,e,r){return ve.apply(this,arguments)}(t.dfu,n,o)})).then((function(e){return i=e,function(t,e){return ge.apply(this,arguments)}(t.dfu,o)})).then((function(r){return t.infos={serialNumber:yt(r),displayedSerialNumber:r,model:o,memoryLayout:n,firmware:i},e(t)})).catch((function(t){t.message="extractInfos failed --\x3e "+t.message,r(t)}))}))}},{key:"uploadFlash",value:function(t,e,r){var n=this;return v.info("Calculator","uploadFlash","address "+Number(t).toString(16),"length "+Number(e).toString(16)),new Yt((function(o,i){try{he(t,e)}catch(t){t.message="uploadFlash failed --\x3e "+t.message,i(t)}n.dfu.upload(t,e,r).then((function(t){o(t)})).catch((function(t){t.message="uploadFlash failed --\x3e "+t.message,i(t)}))}))}},{key:"downloadFlash",value:function(t,r,n,o,i){var a=this;return v.info("Calculator","downloadFlash","address "+Number(t).toString(16)),new Yt((function(s,u){var c=function(){var t=Mt(e().mark((function t(r,n,o,i,a){var s,u,c,l,h,f,p,d,m,v,g,_,D;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=0,u=0,c=-1,l=-1,h=-1,f=-1,p=0;case 7:if(!(p<n.length)){t.next=33;break}if(!(c<0)){t.next=14;break}if(!(o>n[p].lastAddress)){t.next=13;break}return t.abrupt("continue",30);case 13:c=p;case 14:d=0;case 15:if(!(d<n[p].nbPage)){t.next=30;break}if(!(l<0)){t.next=22;break}if(o!=n[p].address+d*n[p].pageSize){t.next=21;break}l=d,t.next=22;break;case 21:return t.abrupt("continue",27);case 22:if(!((s+=n[p].pageSize)>=i.byteLength)){t.next=27;break}return h=p,f=d,t.abrupt("break",33);case 27:d++,t.next=15;break;case 30:p++,t.next=7;break;case 33:m=c;case 34:if(!(m<=h)){t.next=51;break}v=m==c?l:0,g=m==h?f+1:n[m].nbPage,_=v;case 38:if(!(_<g)){t.next=48;break}return D=n[m].address+_*n[m].pageSize,t.next=42,r.eraseSegment(D);case 42:u+=n[m].pageSize,a(u/s),D+=n[m].pageSize;case 45:_++,t.next=38;break;case 48:m++,t.next=34;break;case 51:case"end":return t.stop()}}),t)})));return function(e,r,n,o,i){return t.apply(this,arguments)}}();try{he(t,r.byteLength)}catch(t){t.message="downloadFlash failed --\x3e "+t.message,u(t)}c(a.dfu,n.memoryLayout,t,r,(function(t){return o(t)})).then((function(){s(a.dfu.download(t,r,(function(t){return i(t)})))})).catch((function(t){t.message="downloadFlash failed --\x3e "+t.message,u(t)}))}))}},{key:"reset",value:function(t){var e=this;return v.info("Calculator","reset"),new Yt((function(r,n){try{he(t.memoryLayout[0].address,0)}catch(t){t.message="reset failed --\x3e "+t.message,n(t)}return e.dfu.leave(134217728).then((function(){r(!0)})).catch((function(t){t.message="reset failed --\x3e "+t.message,n(t)}))}))}},{key:"getAvailableSpaceInfo",value:function(){var t=this;return v.info("Calculator","getAvailableSpaceInfo"),new Yt((function(e,r){var n={availableSize:!1,totalSize:!1};t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(t){n.availableSize=t.availableSize(),n.totalSize=t.totalSize(),e(n)})).catch((function(t){t.message="getAvailableSpaceInfo failed --\x3e "+t.message,r(t)}))}))}},{key:"getScripts",value:function(){var t=this;return v.info("Calculator","getScripts"),new Yt((function(e,r){t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(t){return t.recordsWithExtension(".py").map((function(e,r){return{name:e,size:t.size(e),content:gt(t.content(e).subarray(1))}}))})).then((function(t){e(t)})).catch((function(t){t.message="getScripts failed --\x3e "+t.message,r(t)}))}))}},{key:"removeScripts",value:function(){var t=this;return v.info("Calculator","removeScripts"),new Yt((function(e,r){t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(e){e.recordsWithExtension(".py").map((function(t,r){e.setContent(t)}));return ye(t,t.infos,e)})).then((function(){e(!0)})).catch((function(t){t.message="removeScripts failed --\x3e "+t.message,r(t)}))}))}},{key:"getSizeForRecord",value:function(t){var e=this;return v.info("Calculator","getSizeForRecord","name "+t),new Yt((function(r,n){var o;e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(e){o=e.size(t),r(o)})).catch((function(t){t.message="getSizeForRecord failed --\x3e "+t.message,n(t)}))}))}},{key:"setContentForRecord",value:function(t,e){var r=this;return v.info("Calculator","setContentForRecord","name "+t),new Yt((function(n,o){r.extractInfos().then((function(t){return _e(r,t.infos)})).then((function(n){try{n.setContent(t,e)}catch(t){o(t)}return ye(r,r.infos,n)})).then((function(){n(!0)})).catch((function(t){t.message="setContentForRecord failed --\x3e "+t.message,o(t)}))}))}},{key:"setContentForScript",value:function(t,e){var r=this;return v.info("Calculator","setContentForScript","name "+t),new Yt((function(n,o){r.setContentForRecord(t,be(e)).then((function(){n(!0)})).catch((function(t){t.message="setContentForScript failed --\x3e "+t.message,o(t)}))}))}},{key:"setRecords",value:function(t){var e=this;return v.info("Calculator","setRecords",t),new Yt((function(r,n){e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(e){try{t.forEach((function(t,r){e.setContent(t.name,t.content)}))}catch(t){n(t)}return e})).then((function(t){return ye(e,e.infos,t)})).then((function(){r(!0)})).catch((function(t){t.message="setRecords failed --\x3e "+t.message,n(t)}))}))}},{key:"setScripts",value:function(t){var e=this;return v.info("Calculator","setScripts",t),new Yt((function(r,n){var o=[];t.forEach((function(t,e){o[e]={name:t.name,content:be(t.content)}})),e.setRecords(o).then((function(){r(!0)})).catch((function(t){t.message="setScripts failed --\x3e "+t.message,n(t)}))}))}},{key:"removeRecord",value:function(t){var e=this;return v.info("Calculator","removeRecord","name "+t),new Yt((function(r,n){e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(r){return r.setContent(t),ye(e,e.infos,r)})).then((function(){r(!0)})).catch((function(t){t.memory="removeRecord failed --\x3e "+t.message,n(t)}))}))}}],[{key:"DisplayableFirmwarePatch",value:function(t){return"badbabe"==t?"unofficial":t}},{key:"CheckFirmware",value:function(t,e){for(var r=0;r<e.byteLength;r++)if(t[r]!=e[r])throw new Jt("The uploaded firmware differs from the reference at byte "+r);return!0}},{key:"StallUntilConnect",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return v.info("Calculator","StallUntilConnect"),new Yt((function(o,i){return n>60?i(new oe("Device detection timed out")):navigator.usb.getDevices().then((function(a){var s,u=It(a);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(c.serialNumber===e)return r(1),o(new t(c,Kt))}}catch(t){u.e(t)}finally{u.f()}return r((n-1)/n),setTimeout((function(){return t.StallUntilConnect(e,r,n+1).then((function(t){o(t)})).catch((function(t){i(t)}))}),1e3)})).catch((function(t){i(t)}))}))}}]),t}();Ee.Header0={Offset:428,Size:24},Ee.Header1={Offset:452,Size:32},Ee.Header2={SlotInfoSize:16,KernelHeaderSize:24,UserlandHeaderSize:40},Ee.Product={Numworks:"numworks",ST:"ST"};var Ce=function(){function t(){zt(this,t),this.calculators=[]}return Ht(t,[{key:"singleConnectAndExtractInfos",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return 1==this.calculators.length&&null!=this.calculators[0].info?this.calculators[0]:this.connectAndProcess((function(t){return t.extractInfos()}),!1,[Ee.Product.Numworks],t).then((function(t){return t[0]}))}},{key:"connectAndProcess",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ee.Product.Numworks],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];v.info("CalculatorBulk","connectAndProcess");var i=[];return new Yt((function(a,s){r.connect(n,e,o).then((function(e){return r.connected()?Yt.map(e,(function(e){return e.process(t).catch((function(t){i.push({serialNumber:e.infos.serialNumber,error:t})}))})).then((function(t){if(i.length>0){if(1==e.length)throw i[0].error;throw new ie(i)}return a(t)})):s(new re("No usb connection found"))})).catch((function(t){s(t)}))}))}},{key:"connected",value:function(){return this.calculators.length>0}},{key:"connect",value:function(e,r,n){var o=this;return new Yt((function(i,a){t.Connect(e,n).then((function(t){o.calculators=r||0==t.length?t:[t[0]],i(o.calculators)})).catch((function(t){t.memory="connect failed --\x3e "+t.message,a(t)}))}))}}],[{key:"Connect",value:function(t,e){v.info("CalculatorBulk","connect",t);var r=[],n=t.map((function(t){return t==Ee.Product.Numworks?41617:57105})),o=[];return n.forEach((function(t){return o.push({vendorId:1155,productId:t})})),new Yt((function(t,i){if(null==navigator.usb)return i(new ee("Web usb unvailable"));e?(v.info("CalculatorBulk","connect","request device"),navigator.usb.requestDevice({filters:o}).then((function(e){return r.push(new Ee(e,Kt)),t(r)})).catch((function(t){i(new re("Usb device selection failure: "+t))}))):(v.info("Calculator","connect","get device"),navigator.usb.getDevices().then((function(e){var o,i=It(e);try{for(i.s();!(o=i.n()).done;){var a=o.value;1155===a.vendorId&&n.includes(a.productId)&&r.push(new Ee(a,Kt))}}catch(t){i.e(t)}finally{i.f()}return t(r)})).catch((function(t){i(new re("Usb device failed: "+t))})))}))}}]),t}();r(382);var Fe=r(5405),ke=r(5477),Ae=r(3825),xe=r.n(Ae);function Se(t){return new Promise(((e,n)=>{let o={locateFile:function(t,e){return r(3835)},preRun:function(){o.FS.writeFile("input.dat",t.input)},onAbort:n,arguments:t.arguments.concat(["input.dat","output.dat"]),postRun:function(){e(o.FS.readFile(t.output||"output.dat"))}};xe()(o)}))}function Oe(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Te(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pe(t,e){return Math.round(255/((1<<e)-1)*t)}var Re=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.rgba8888Data=e}var r,n,o,i,a;return r=t,n=[{key:"toPNG",value:function(){if("function"==typeof ImageData){var e=new ImageData(new Uint8ClampedArray(this.rgba8888Data.buffer),t.Width,t.Height),r=document.createElement("canvas");return r.width=t.Width,r.height=t.Height,r.getContext("2d").putImageData(e,0,0),r.toDataURL()}console.error("ImageData is unavailable")}},{key:"toNWI",value:function(){var t=function(t){for(var e=t.length/4,r=new Uint8Array(2*e),n=0;n<e;n++){var o=t[4*n]>>3<<11|t[4*n+1]>>2<<5|t[4*n+2]>>3;r[2*n]=255&o,r[2*n+1]=o>>8&255}return r}(this.rgba8888Data),e=Fe.compressBlock(t,new Uint8Array(0),0,t.length,Fe.makeBuffer(65536)),r=new Uint8Array(e);return Fe.compressBlock(t,r,0,t.length,Fe.makeBuffer(65536)),r}},{key:"toIconO",value:(i=e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se({arguments:["--input-target","binary","--output-target","elf32-littlearm","--rename-section",".data=.rodata.eadk_app_icon","--redefine-sym","_binary_input_dat_start=eadk_app_icon","--strip-symbol","_binary_input_dat_end","--strip-symbol","_binary_input_dat_size"],input:this.toNWI()});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})),a=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){Oe(o,r,n,a,s,"next",t)}function s(t){Oe(o,r,n,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})}],o=[{key:"fromPNG",value:function(e){var r=ke.y.sync.read(e);if(r.width!=t.Width)throw"Icon has an invalid width";if(r.height!=t.Height)throw"Icon has an invalid height";return new t(r.data)}},{key:"fromNWI",value:function(e){var r=new Uint8Array(t.Width*t.Height*2);Fe.decompressBlock(e,r,0,e.length,0);var n=function(t){for(var e=t.length/2,r=new Uint8Array(4*e),n=0;n<e;n++){var o=t[2*n+1]<<8|t[2*n],i=o>>11&31,a=o>>5&63,s=31&o;r[4*n]=Pe(i,5),r[4*n+1]=Pe(a,6),r[4*n+2]=Pe(s,5),r[4*n+3]=255}return r}(r);return new t(n)}}],n&&Te(r.prototype,n),o&&Te(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();Re.Width=55,Re.Height=56;const Be=Re;var je=r(7481),Ie=r.n(je);function Le(t){return new Promise(((e,n)=>{let o={locateFile:function(t,e){return r(7573)},preRun:function(){for(const[e,r]of Object.entries(t.inputs))o.FS.writeFile(e,r)},printErr:function(t){o.errorLog||="",o.errorLog=o.errorLog.concat(t).concat("\n")},onAbort:n,arguments:t.arguments.concat(["--output","output.elf"]),postRun:function(){o.errorLog?n(o.errorLog):e(o.FS.readFile("output.elf"))}};Ie()(o)}))}function Ne(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Me(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ne(i,n,o,a,s,"next",t)}function s(t){Ne(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ue(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function He(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var ze=0;function Ve(t){return"__private_"+ze+++"_"+t}var Ge=r(7475),$e=r(8006),qe=Ve("getSectionNamed"),We=Ve("refreshSizeAndNeedOfExternalData"),Ye=Ve("externalObject"),Ke=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.defineProperty(this,Ye,{value:Je}),Object.defineProperty(this,We,{value:Qe}),Object.defineProperty(this,qe,{value:Xe}),this.nwaData=e,this.size=void 0,this.name=void 0,this.icon=void 0,this.needsExternalData=void 0}var r,n,o,i,a;return r=t,n=[{key:"loadIcon",value:function(){var t=this;return He(this,qe)[qe](".rodata.eadk_app_icon").then((function(e){return t.icon=Be.fromNWI(e).toPNG()}))}},{key:"loadName",value:function(){var t=this;return He(this,qe)[qe](".rodata.eadk_app_name").then((function(e){return t.name=gt(e)}))}},{key:"load",value:function(){this.loadIcon(),this.loadName(),He(this,We)[We]()}},{key:"setExternalData",value:function(t){this.externalData=t,He(this,We)[We]()}},{key:"flatElf",value:(a=Me(e().mark((function t(r){var n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n={arguments:["--script","linker.ld","--gc-sections","--allow-multiple-definition","eadk.o","app.nwa"],inputs:{"linker.ld":Ge(r),"app.nwa":this.nwaData,"eadk.o":new Uint8Array($e.data)}},!this.externalData){t.next=7;break}return o="extra-data.o",n.arguments.push(o),t.next=6,He(this,Ye)[Ye]();case 6:n.inputs[o]=t.sent;case 7:return t.next=9,Le(n);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"flatBin",value:(i=Me(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Se,t.t1=["--output-target","binary"],t.next=4,this.flatElf(r);case 4:return t.t2=t.sent,t.t3={arguments:t.t1,input:t.t2},t.next=8,(0,t.t0)(t.t3);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}],n&&Ue(r.prototype,n),o&&Ue(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();function Xe(t){return Ze.apply(this,arguments)}function Ze(){return(Ze=Me(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se({arguments:["--output-target","binary","--only-section",r],input:this.nwaData});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Qe(){var t=this;this.flatBin({flashStart:2415919104,flashLength:8388608,ramStart:536870912,ramLength:262144}).then((function(e){var r=e.byteLength+(Ke.AppSectorSize-e.byteLength%Ke.AppSectorSize);t.size=r,t.needsExternalData=!1})).catch((function(e){if(!e.includes("_eadk_external_data"))throw e;t.size=void 0,t.needsExternalData=!0}))}function Je(){return Se({arguments:["--input-target","binary","--output-target","elf32-littlearm","--rename-section",".data=.rodata.eadk_external_data,alloc,load,readonly","--redefine-sym","_binary_input_dat_start=_eadk_external_data_start","--redefine-sym","_binary_input_dat_size=_eadk_external_data_size","--strip-symbol","_binary_input_dat_end"],input:this.externalData})}Ke.AppSectorSize=65536;const tr=Ke;function er(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function rr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){er(i,n,o,a,s,"next",t)}function s(t){er(i,n,o,a,s,"throw",t)}a(void 0)}))}}function nr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return or(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return or(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function or(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ir(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ar(t,e,r){return e&&ir(t.prototype,e),r&&ir(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ur(t,e){return ur=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ur(t,e)}function cr(t){var e=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(t){return!1}}();return function(){var r,n=hr(t);if(e){var o=hr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lr(this,r)}}function lr(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hr(t){return hr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hr(t)}var fr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ur(t,e)}(r,t);var e=cr(r);function r(){sr(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"CalculatorMemoryOverflow"].concat(n))}return ar(r)}(p),pr=function(){function t(){sr(this,t),this.apps=[]}var r,n;return ar(t,[{key:"push",value:function(t){this.apps.push(t)}},{key:"isReadyToUpload",value:function(){var t,e=nr(this.apps);try{for(e.s();!(t=e.n()).done;){if(t.value.needsExternalData)return!1}}catch(t){e.e(t)}finally{e.f()}return this.apps.length>0}},{key:"upload",value:(n=rr(e().mark((function t(r,n){var o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=r.infos.firmware,i={flashStart:o.externalAppsFlashStart,flashLength:o.externalAppsFlashEnd-o.externalAppsFlashStart,ramStart:o.externalAppsRamStart,ramLength:o.externalAppsRamEnd-o.externalAppsRamStart},t.next=4,this.flatBin(i);case 4:a=t.sent,r.process((function(t){return t.downloadFlash(i.flashStart,a,r.infos,(function(t){n(.2*t)}),(function(t){n(.2+.8*t)})).then((function(){return r.dfu.leave(i.flashStart)}))}));case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"concatenateU8A",value:function(t,e){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(t,0),r.set(e,t.byteLength),r}},{key:"flatBin",value:(r=rr(e().mark((function t(r){var n,o,i,a,s,u,c,l,h,f,p;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new Uint8Array(0),o=r.flashStart+r.flashLength,i=r.flashStart,a=nr(this.apps),t.prev=4,a.s();case 6:if((s=a.n()).done){t.next=19;break}if(u=s.value,!(i>=o)){t.next=10;break}throw new fr("External app sector would be overflown");case 10:return t.next=12,u.flatBin({flashStart:i,flashLength:o-i,ramStart:r.ramStart,ramLength:r.ramLength});case 12:c=t.sent,n=this.concatenateU8A(n,c),i+=c.byteLength,(l=c.byteLength%tr.AppSectorSize)>0&&(h=tr.AppSectorSize-l,(f=new Uint8Array(h)).fill(255),n=this.concatenateU8A(n,f),i+=h);case 17:t.next=6;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(4),a.e(t.t0);case 24:return t.prev=24,a.f(),t.finish(24);case 27:return i<o&&((p=new Uint8Array(tr.AppSectorSize)).fill(255),n=this.concatenateU8A(n,p)),t.abrupt("return",n);case 29:case"end":return t.stop()}}),t,this,[[4,21,24,27]])}))),function(t){return r.apply(this,arguments)})},{key:"totalSize",value:function(){var t,e=0,r=nr(this.apps);try{for(r.s();!(t=r.n()).done;){e+=t.value.size||0}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"removeAppAtIndex",value:function(t){this.apps.splice(t,1)}}]),t}();const dr=pr,mr=r.p+"eadk/eadk.h";var vr=r(2081);function gr(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function _r(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gr(i,n,o,a,s,"next",t)}function s(t){gr(i,n,o,a,s,"throw",t)}a(void 0)}))}}var Dr=r(1017),yr=Dr.dirname,wr=(Dr.resolve,r(7147)),br=r(7461).Command,Er=r(6002);function Cr(t){var r=new br;function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=wr.readFileSync(t),n=new tr(r);if(e.externalData){var o=wr.readFileSync(e.externalData);n.setExternalData(o)}return n}function o(){return o=_r(e().mark((function t(r,o){var i,a,s,u,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n(r,o),(a=new dr).push(i),s=new Ce,t.next=6,s.singleConnectAndExtractInfos(!0);case 6:return u=t.sent,(c=new Er.SingleBar({stopOnComplete:!0,format:"Upload [{bar}] {percentage}% | ETA: {eta}s"})).start(1,0),t.next=11,a.upload(u,(function(t){c.update(t)}));case 11:case"end":return t.stop()}}),t)}))),o.apply(this,arguments)}function i(){return(i=_r(e().mark((function t(r,o,i){var a,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n(r,i),t.next=3,a.flatElf(i);case 3:s=t.sent,wr.writeFileSync(o,s);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(){return(a=_r(e().mark((function t(r,o,i){var a,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n(r,i),t.next=3,a.flatBin(i);case 3:s=t.sent,wr.writeFileSync(o,s);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=_r(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=wr.readFileSync(r),i=Be.fromPNG(o),t.t0=wr,t.t1=n,t.next=6,i.toIconO();case 6:t.t2=t.sent,t.t0.writeFileSync.call(t.t0,t.t1,t.t2);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}r.name("nwlink").description("Command-line tool to interact with a NumWorks calculator").version(require("../package.json").version),r.command("install-nwa").description("Install a NWA app").argument("<input.nwa>","Input NWA file").option("-d, --external-data <file>","External data file").action((function(t,e){return o.apply(this,arguments)})),r.command("nwa-elf").description("Link a NWA app").argument("<input.nwa>","Input NWA file").argument("<output.elf>","Output ELF file").option("-d, --external-data <file>","External data file").option("-fs, --flash-start <flashStart>","Flash memory start address","0x90000000").option("-fl, --flash-length <flashLength>","Flash memory length","8M").option("-rs, --ram-start <flashStart>","RAM start address","0x20000000").option("-rl, --ram-length <flashLength>","RAM length","256K").action((function(t,e,r){return i.apply(this,arguments)})),r.command("nwa-bin").description("Link a NWA app and convert to binary format").argument("<input.nwa>","Input NWA file").argument("<output.bin>","Output BIN file").option("-d, --external-data <file>","External data file").option("-fs, --flash-start <flashStart>","Flash memory start address","0x90000000").option("-fl, --flash-length <flashLength>","Flash memory length","8M").option("-rs, --ram-start <flashStart>","RAM start address","0x20000000").option("-rl, --ram-length <flashLength>","RAM length","256K").action((function(t,e,r){return a.apply(this,arguments)})),r.command("nwa-name").description("Print the name of a NWA app").argument("<input.nwa>","Input NWA file").action((function(t){n(t).loadName().then((function(t){return console.log(t)}))})),r.command("png-nwi").description("Convert a PNG file to a NWI image (LZ4-compressed RGB565)").argument("<file.png>","Input PNG file").argument("<file.nwi>","Output NWI file").action((function(t,e){var r=wr.readFileSync(t),n=Be.fromPNG(r);wr.writeFileSync(e,n.toNWI())})),r.command("png-icon-o").description("Convert a PNG file to an ELF icon object (NWI data in a .rodata.eadk_app_icon ELF section)").argument("<file.png>","Input PNG file").argument("<file.o>","Output ELF object file").action((function(t,e){return s.apply(this,arguments)})),r.command("eadk-cflags").description("Print EADK CFLAGS").action((function(){var t=["-mthumb","-mfloat-abi=hard","-mcpu=cortex-m7","-mfpu=fpv5-sp-d16","-I"+yr(mr)];console.log(t.join(" "))})),r.command("view-eadk-h").description("Open eadk.h in $VISUAL or $EDITOR").action((function(){var t=process.env.VISUAL||process.env.EDITOR;t?(0,vr.execSync)("".concat(t," ").concat(mr),{stdio:"inherit"}):console.error("Please define $VISUAL or $EDITOR")})),r.parseAsync(t).catch((function(t){console.error(t.message||t),process.exit(1)}))}global.navigator={usb:o.webusb}})(),module.exports=n.default})();
|
|
1
|
+
(()=>{var t={7481:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||__filename,function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c,l,h,f=Object.assign({},i),p=[],d="./this.program",m=(t,e)=>{throw e},v="object"==typeof window,g="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,D="";_?(D=g?r(1017).dirname(D)+"/":__dirname+"/",h=()=>{l||(c=r(7147),l=r(1017))},a=function(t,e){return h(),t=l.normalize(t),c.readFileSync(t,e?void 0:"utf8")},u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{h(),t=l.normalize(t),c.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof xt))throw t})),process.on("unhandledRejection",(function(t){throw t})),m=(t,e)=>{if($())throw process.exitCode=t,e;var r;(r=e)instanceof xt||b("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}):(v||g)&&(g?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),n&&(D=n),D=0!==D.indexOf("blob:")?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},g&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,f),f=null,i.arguments&&(p=i.arguments),i.thisProgram&&(d=i.thisProgram),i.quit&&(m=i.quit),i.wasmBinary&&(y=i.wasmBinary);var E,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&et("no native wasm support detected");var F,k=!1;function A(t,e){t||et(e)}var x,S,O,T,P,R,B="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&B)return B.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[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 I(t,e){return t?j(O,t,e):""}function L(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function N(t,e,r){return L(t,O,e,r)}function M(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function U(t){x=t,i.HEAP8=S=new Int8Array(t),i.HEAP16=T=new Int16Array(t),i.HEAP32=P=new Int32Array(t),i.HEAPU8=O=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=R=new Uint32Array(t),i.HEAPF32=new Float32Array(t),i.HEAPF64=new Float64Array(t)}i.INITIAL_MEMORY;var H=[],z=[],V=[],G=[];function $(){return C}var q,W,Y,K,X=0,Z=null,Q=null;function J(t){X++,i.monitorRunDependencies&&i.monitorRunDependencies(X)}function tt(t){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==Z&&(clearInterval(Z),Z=null),Q)){var e=Q;Q=null,e()}}function et(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),k=!0,F=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function rt(t){return t.startsWith("data:application/octet-stream;base64,")}function nt(t){try{if(t==q&&y)return new Uint8Array(y);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){et(t)}}function ot(t){for(;t.length>0;)t.shift()(i)}rt(q="ld.wasm")||(W=q,q=i.locateFile?i.locateFile(W,D):D+W);var it={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=it.isAbs(t),r="/"===t.substr(-1);return(t=it.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=it.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=it.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments,0);return it.normalize(t.join("/"))},join2:(t,e)=>it.normalize(t+"/"+e)},at={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:ht.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=it.isAbs(n)}return(e?"/":"")+(t=it.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=at.resolve(t).substr(1),e=at.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(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("/")}},st={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){st.ttys[t]={input:[],output:[],ops:e},ht.registerDevice(t,st.stream_ops)},stream_ops:{open:function(t){var e=st.ttys[t.node.rdev];if(!e)throw new ht.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new ht.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new ht.ErrnoError(29)}if(void 0===s&&0===i)throw new ht.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new ht.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new ht.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if(_){var r=Buffer.alloc(256),n=0;try{n=c.readSync(process.stdin.fd,r,0,256,-1)}catch(t){if(!t.toString().includes("EOF"))throw t;n=0}e=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;t.input=Et(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(w(j(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(w(j(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(b(j(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(b(j(t.output,0)),t.output=[])}}};function ut(t){et()}var ct,lt={ops_table:null,mount:function(t){return lt.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(ht.isBlkdev(r)||ht.isFIFO(r))throw new ht.ErrnoError(63);lt.ops_table||(lt.ops_table={dir:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr,lookup:lt.node_ops.lookup,mknod:lt.node_ops.mknod,rename:lt.node_ops.rename,unlink:lt.node_ops.unlink,rmdir:lt.node_ops.rmdir,readdir:lt.node_ops.readdir,symlink:lt.node_ops.symlink},stream:{llseek:lt.stream_ops.llseek}},file:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr},stream:{llseek:lt.stream_ops.llseek,read:lt.stream_ops.read,write:lt.stream_ops.write,allocate:lt.stream_ops.allocate,mmap:lt.stream_ops.mmap,msync:lt.stream_ops.msync}},link:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr,readlink:lt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:lt.node_ops.getattr,setattr:lt.node_ops.setattr},stream:ht.chrdev_stream_ops}});var o=ht.createNode(t,e,r,n);return ht.isDir(o.mode)?(o.node_ops=lt.ops_table.dir.node,o.stream_ops=lt.ops_table.dir.stream,o.contents={}):ht.isFile(o.mode)?(o.node_ops=lt.ops_table.file.node,o.stream_ops=lt.ops_table.file.stream,o.usedBytes=0,o.contents=null):ht.isLink(o.mode)?(o.node_ops=lt.ops_table.link.node,o.stream_ops=lt.ops_table.link.stream):ht.isChrdev(o.mode)&&(o.node_ops=lt.ops_table.chrdev.node,o.stream_ops=lt.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=ht.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,ht.isDir(t.mode)?e.size=4096:ht.isFile(t.mode)?e.size=t.usedBytes:ht.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&<.resizeFileStorage(t,e.size)},lookup:function(t,e){throw ht.genericErrors[44]},mknod:function(t,e,r,n){return lt.createNode(t,e,r,n)},rename:function(t,e,r){if(ht.isDir(t.mode)){var n;try{n=ht.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new ht.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=ht.lookupNode(t,e);for(var n in r.contents)throw new ht.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=lt.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!ht.isLink(t.mode))throw new ht.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===S.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(lt.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&ht.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new ht.ErrnoError(28);return n},allocate:function(t,e,r){lt.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o){if(!ht.isFile(t.node.mode))throw new ht.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==x){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),a=!0,!(i=ut()))throw new ht.ErrnoError(48);S.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,e,r,n,o){if(!ht.isFile(t.node.mode))throw new ht.ErrnoError(43);return 2&o||lt.stream_ops.write(t,e,0,n,r,!1),0}}},ht={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,e={})=>{if(!(t=at.resolve(ht.cwd(),t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ht.ErrnoError(32);for(var r=it.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=ht.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&e.parent)break;if(n=ht.lookupNode(n,r[i]),o=it.join2(o,r[i]),ht.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;ht.isLink(n.mode);){var u=ht.readlink(o);if(o=at.resolve(it.dirname(o),u),n=ht.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new ht.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var e;;){if(ht.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:(t,e)=>{for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%ht.nameTable.length},hashAddNode:t=>{var e=ht.hashName(t.parent.id,t.name);t.name_next=ht.nameTable[e],ht.nameTable[e]=t},hashRemoveNode:t=>{var e=ht.hashName(t.parent.id,t.name);if(ht.nameTable[e]===t)ht.nameTable[e]=t.name_next;else for(var r=ht.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:(t,e)=>{var r=ht.mayLookup(t);if(r)throw new ht.ErrnoError(r,t);for(var n=ht.hashName(t.id,e),o=ht.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return ht.lookup(t,e)},createNode:(t,e,r,n)=>{var o=new ht.FSNode(t,e,r,n);return ht.hashAddNode(o),o},destroyNode:t=>{ht.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var e=ht.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>ht.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var e=ht.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:(t,e)=>{try{return ht.lookupNode(t,e),20}catch(t){}return ht.nodePermissions(t,"wx")},mayDelete:(t,e,r)=>{var n;try{n=ht.lookupNode(t,e)}catch(t){return t.errno}var o=ht.nodePermissions(t,"wx");if(o)return o;if(r){if(!ht.isDir(n.mode))return 54;if(ht.isRoot(n)||ht.getPath(n)===ht.cwd())return 10}else if(ht.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?ht.isLink(t.mode)?32:ht.isDir(t.mode)&&("r"!==ht.flagsToPermissionString(e)||512&e)?31:ht.nodePermissions(t,ht.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,e=ht.MAX_OPEN_FDS)=>{for(var r=t;r<=e;r++)if(!ht.streams[r])return r;throw new ht.ErrnoError(33)},getStream:t=>ht.streams[t],createStream:(t,e,r)=>{ht.FSStream||(ht.FSStream=function(){this.shared={}},ht.FSStream.prototype={},Object.defineProperties(ht.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},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(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new ht.FSStream,t);var n=ht.nextfd(e,r);return t.fd=n,ht.streams[n]=t,t},closeStream:t=>{ht.streams[t]=null},chrdev_stream_ops:{open:t=>{var e=ht.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new ht.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice:(t,e)=>{ht.devices[t]={stream_ops:e}},getDevice:t=>ht.devices[t],getMounts:t=>{for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:(t,e)=>{"function"==typeof t&&(e=t,t=!1),ht.syncFSRequests++,ht.syncFSRequests>1&&b("warning: "+ht.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=ht.getMounts(ht.root.mount),n=0;function o(t){return ht.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:(t,e,r)=>{var n,o="/"===r,i=!r;if(o&&ht.root)throw new ht.ErrnoError(10);if(!o&&!i){var a=ht.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,ht.isMountpoint(n))throw new ht.ErrnoError(10);if(!ht.isDir(n.mode))throw new ht.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?ht.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var e=ht.lookupPath(t,{follow_mount:!1});if(!ht.isMountpoint(e.node))throw new ht.ErrnoError(28);var r=e.node,n=r.mounted,o=ht.getMounts(n);Object.keys(ht.nameTable).forEach((t=>{for(var e=ht.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&&ht.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod:(t,e,r)=>{var n=ht.lookupPath(t,{parent:!0}).node,o=it.basename(t);if(!o||"."===o||".."===o)throw new ht.ErrnoError(28);var i=ht.mayCreate(n,o);if(i)throw new ht.ErrnoError(i);if(!n.node_ops.mknod)throw new ht.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ht.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ht.mknod(t,e,0)),mkdirTree:(t,e)=>{for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{ht.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>(void 0===r&&(r=e,e=438),e|=8192,ht.mknod(t,e,r)),symlink:(t,e)=>{if(!at.resolve(t))throw new ht.ErrnoError(44);var r=ht.lookupPath(e,{parent:!0}).node;if(!r)throw new ht.ErrnoError(44);var n=it.basename(e),o=ht.mayCreate(r,n);if(o)throw new ht.ErrnoError(o);if(!r.node_ops.symlink)throw new ht.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:(t,e)=>{var r,n,o=it.dirname(t),i=it.dirname(e),a=it.basename(t),s=it.basename(e);if(r=ht.lookupPath(t,{parent:!0}).node,n=ht.lookupPath(e,{parent:!0}).node,!r||!n)throw new ht.ErrnoError(44);if(r.mount!==n.mount)throw new ht.ErrnoError(75);var u,c=ht.lookupNode(r,a),l=at.relative(t,i);if("."!==l.charAt(0))throw new ht.ErrnoError(28);if("."!==(l=at.relative(e,o)).charAt(0))throw new ht.ErrnoError(55);try{u=ht.lookupNode(n,s)}catch(t){}if(c!==u){var h=ht.isDir(c.mode),f=ht.mayDelete(r,a,h);if(f)throw new ht.ErrnoError(f);if(f=u?ht.mayDelete(n,s,h):ht.mayCreate(n,s))throw new ht.ErrnoError(f);if(!r.node_ops.rename)throw new ht.ErrnoError(63);if(ht.isMountpoint(c)||u&&ht.isMountpoint(u))throw new ht.ErrnoError(10);if(n!==r&&(f=ht.nodePermissions(r,"w")))throw new ht.ErrnoError(f);ht.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{ht.hashAddNode(c)}}},rmdir:t=>{var e=ht.lookupPath(t,{parent:!0}).node,r=it.basename(t),n=ht.lookupNode(e,r),o=ht.mayDelete(e,r,!0);if(o)throw new ht.ErrnoError(o);if(!e.node_ops.rmdir)throw new ht.ErrnoError(63);if(ht.isMountpoint(n))throw new ht.ErrnoError(10);e.node_ops.rmdir(e,r),ht.destroyNode(n)},readdir:t=>{var e=ht.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new ht.ErrnoError(54);return e.node_ops.readdir(e)},unlink:t=>{var e=ht.lookupPath(t,{parent:!0}).node;if(!e)throw new ht.ErrnoError(44);var r=it.basename(t),n=ht.lookupNode(e,r),o=ht.mayDelete(e,r,!1);if(o)throw new ht.ErrnoError(o);if(!e.node_ops.unlink)throw new ht.ErrnoError(63);if(ht.isMountpoint(n))throw new ht.ErrnoError(10);e.node_ops.unlink(e,r),ht.destroyNode(n)},readlink:t=>{var e=ht.lookupPath(t).node;if(!e)throw new ht.ErrnoError(44);if(!e.node_ops.readlink)throw new ht.ErrnoError(28);return at.resolve(ht.getPath(e.parent),e.node_ops.readlink(e))},stat:(t,e)=>{var r=ht.lookupPath(t,{follow:!e}).node;if(!r)throw new ht.ErrnoError(44);if(!r.node_ops.getattr)throw new ht.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>ht.stat(t,!0),chmod:(t,e,r)=>{var n;if(!(n="string"==typeof t?ht.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,e)=>{ht.chmod(t,e,!0)},fchmod:(t,e)=>{var r=ht.getStream(t);if(!r)throw new ht.ErrnoError(8);ht.chmod(r.node,e)},chown:(t,e,r,n)=>{var o;if(!(o="string"==typeof t?ht.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,e,r)=>{ht.chown(t,e,r,!0)},fchown:(t,e,r)=>{var n=ht.getStream(t);if(!n)throw new ht.ErrnoError(8);ht.chown(n.node,e,r)},truncate:(t,e)=>{if(e<0)throw new ht.ErrnoError(28);var r;if(!(r="string"==typeof t?ht.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new ht.ErrnoError(63);if(ht.isDir(r.mode))throw new ht.ErrnoError(31);if(!ht.isFile(r.mode))throw new ht.ErrnoError(28);var n=ht.nodePermissions(r,"w");if(n)throw new ht.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:(t,e)=>{var r=ht.getStream(t);if(!r)throw new ht.ErrnoError(8);if(0==(2097155&r.flags))throw new ht.ErrnoError(28);ht.truncate(r.node,e)},utime:(t,e,r)=>{var n=ht.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:(t,e,r)=>{if(""===t)throw new ht.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?ht.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=it.normalize(t);try{n=ht.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new ht.ErrnoError(20)}else n=ht.mknod(t,r,0),o=!0;if(!n)throw new ht.ErrnoError(44);if(ht.isChrdev(n.mode)&&(e&=-513),65536&e&&!ht.isDir(n.mode))throw new ht.ErrnoError(54);if(!o){var a=ht.mayOpen(n,e);if(a)throw new ht.ErrnoError(a)}512&e&&!o&&ht.truncate(n,0),e&=-131713;var s=ht.createStream({node:n,path:ht.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&e||(ht.readFiles||(ht.readFiles={}),t in ht.readFiles||(ht.readFiles[t]=1)),s},close:t=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{ht.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,e,r)=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new ht.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new ht.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:(t,e,r,n,o)=>{if(n<0||o<0)throw new ht.ErrnoError(28);if(ht.isClosed(t))throw new ht.ErrnoError(8);if(1==(2097155&t.flags))throw new ht.ErrnoError(8);if(ht.isDir(t.node.mode))throw new ht.ErrnoError(31);if(!t.stream_ops.read)throw new ht.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new ht.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:(t,e,r,n,o,i)=>{if(n<0||o<0)throw new ht.ErrnoError(28);if(ht.isClosed(t))throw new ht.ErrnoError(8);if(0==(2097155&t.flags))throw new ht.ErrnoError(8);if(ht.isDir(t.node.mode))throw new ht.ErrnoError(31);if(!t.stream_ops.write)throw new ht.ErrnoError(28);t.seekable&&1024&t.flags&&ht.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new ht.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);return a||(t.position+=s),s},allocate:(t,e,r)=>{if(ht.isClosed(t))throw new ht.ErrnoError(8);if(e<0||r<=0)throw new ht.ErrnoError(28);if(0==(2097155&t.flags))throw new ht.ErrnoError(8);if(!ht.isFile(t.node.mode)&&!ht.isDir(t.node.mode))throw new ht.ErrnoError(43);if(!t.stream_ops.allocate)throw new ht.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:(t,e,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new ht.ErrnoError(2);if(1==(2097155&t.flags))throw new ht.ErrnoError(2);if(!t.stream_ops.mmap)throw new ht.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl:(t,e,r)=>{if(!t.stream_ops.ioctl)throw new ht.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:(t,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=ht.open(t,e.flags),o=ht.stat(t).size,i=new Uint8Array(o);return ht.read(n,i,0,o,0),"utf8"===e.encoding?r=j(i,0):"binary"===e.encoding&&(r=i),ht.close(n),r},writeFile:(t,e,r={})=>{r.flags=r.flags||577;var n=ht.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(M(e)+1),i=L(e,o,0,o.length);ht.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ht.write(n,e,0,e.byteLength,void 0,r.canOwn)}ht.close(n)},cwd:()=>ht.currentPath,chdir:t=>{var e=ht.lookupPath(t,{follow:!0});if(null===e.node)throw new ht.ErrnoError(44);if(!ht.isDir(e.node.mode))throw new ht.ErrnoError(54);var r=ht.nodePermissions(e.node,"x");if(r)throw new ht.ErrnoError(r);ht.currentPath=e.path},createDefaultDirectories:()=>{ht.mkdir("/tmp"),ht.mkdir("/home"),ht.mkdir("/home/web_user")},createDefaultDevices:()=>{ht.mkdir("/dev"),ht.registerDevice(ht.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),ht.mkdev("/dev/null",ht.makedev(1,3)),st.register(ht.makedev(5,0),st.default_tty_ops),st.register(ht.makedev(6,0),st.default_tty1_ops),ht.mkdev("/dev/tty",ht.makedev(5,0)),ht.mkdev("/dev/tty1",ht.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}if(_)try{var e=r(6113);return function(){return e.randomBytes(1)[0]}}catch(t){}return function(){et("randomDevice")}}();ht.createDevice("/dev","random",t),ht.createDevice("/dev","urandom",t),ht.mkdir("/dev/shm"),ht.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ht.mkdir("/proc");var t=ht.mkdir("/proc/self");ht.mkdir("/proc/self/fd"),ht.mount({mount:()=>{var e=ht.createNode(t,"fd",16895,73);return e.node_ops={lookup:(t,e)=>{var r=+e,n=ht.getStream(r);if(!n)throw new ht.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{i.stdin?ht.createDevice("/dev","stdin",i.stdin):ht.symlink("/dev/tty","/dev/stdin"),i.stdout?ht.createDevice("/dev","stdout",null,i.stdout):ht.symlink("/dev/tty","/dev/stdout"),i.stderr?ht.createDevice("/dev","stderr",null,i.stderr):ht.symlink("/dev/tty1","/dev/stderr"),ht.open("/dev/stdin",0),ht.open("/dev/stdout",1),ht.open("/dev/stderr",1)},ensureErrnoError:()=>{ht.ErrnoError||(ht.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},ht.ErrnoError.prototype=new Error,ht.ErrnoError.prototype.constructor=ht.ErrnoError,[44].forEach((t=>{ht.genericErrors[t]=new ht.ErrnoError(t),ht.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{ht.ensureErrnoError(),ht.nameTable=new Array(4096),ht.mount(lt,{},"/"),ht.createDefaultDirectories(),ht.createDefaultDevices(),ht.createSpecialDirectories(),ht.filesystems={MEMFS:lt}},init:(t,e,r)=>{ht.init.initialized=!0,ht.ensureErrnoError(),i.stdin=t||i.stdin,i.stdout=e||i.stdout,i.stderr=r||i.stderr,ht.createStandardStreams()},quit:()=>{ht.init.initialized=!1;for(var t=0;t<ht.streams.length;t++){var e=ht.streams[t];e&&ht.close(e)}},getMode:(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:(t,e)=>{var r=ht.analyzePath(t,e);return r.exists?r.object:null},analyzePath:(t,e)=>{try{t=(n=ht.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ht.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=it.basename(t),n=ht.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:(t,e,r,n)=>{t="string"==typeof t?t:ht.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=it.join2(t,i);try{ht.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,e,r,n,o)=>{var i=it.join2("string"==typeof t?t:ht.getPath(t),e),a=ht.getMode(n,o);return ht.create(i,a)},createDataFile:(t,e,r,n,o,i)=>{var a=e;t&&(t="string"==typeof t?t:ht.getPath(t),a=e?it.join2(t,e):t);var s=ht.getMode(n,o),u=ht.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,h=r.length;l<h;++l)c[l]=r.charCodeAt(l);r=c}ht.chmod(u,146|s);var f=ht.open(u,577);ht.write(f,r,0,r.length,0,i),ht.close(f),ht.chmod(u,s)}return u},createDevice:(t,e,r,n)=>{var o=it.join2("string"==typeof t?t:ht.getPath(t),e),i=ht.getMode(!!r,!!n);ht.createDevice.major||(ht.createDevice.major=64);var a=ht.makedev(ht.createDevice.major++,0);return ht.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new ht.ErrnoError(29)}if(void 0===u&&0===a)throw new ht.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,e,r,o,i)=>{for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new ht.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),ht.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=Et(a(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new ht.ErrnoError(29)}},createLazyFile:(t,e,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+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",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Et(o.responseText||"",!0)})(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,w("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(!g)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=ht.createFile(t,e,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 l(t,e,r,n,o){var i=t.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++)e[r+s]=i[o+s];else for(s=0;s<a;s++)e[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((t=>{var e=u.stream_ops[t];c[t]=function(){return ht.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(t,e,r,n,o)=>(ht.forceLoadFile(u),l(t,e,r,n,o)),c.mmap=(t,e,r,n,o)=>{ht.forceLoadFile(u);var i=ut();if(!i)throw new ht.ErrnoError(48);return l(t,S,i,e,r),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(t,e,r,n,o,i,a,u,c,l)=>{var h=e?at.resolve(it.join2(t,e)):t;function f(r){function s(r){l&&l(),u||ht.createDataFile(t,e,r,n,o,c),i&&i(),tt()}Browser.handledByPreloadPlugin(r,h,s,(()=>{a&&a(),tt()}))||s(r)}J(),"string"==typeof r?function(t,e,r,n){var o=n?"":"al "+t;s(t,(function(r){A(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(r)),o&&tt()}),(function(e){if(!r)throw'Loading data file "'+t+'" failed.';r()})),o&&J()}(r,(t=>f(t)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=ht.indexedDB();try{var o=n.open(ht.DB_NAME(),ht.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(ht.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ht.DB_STORE_NAME],"readwrite"),i=n.objectStore(ht.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((t=>{var e=i.put(ht.analyzePath(t).object.contents,t);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=ht.indexedDB();try{var o=n.open(ht.DB_NAME(),ht.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([ht.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(ht.DB_STORE_NAME),s=0,u=0,c=t.length;function l(){0==u?e():r()}t.forEach((t=>{var e=a.get(t);e.onsuccess=()=>{ht.analyzePath(t).exists&&ht.unlink(t),ht.createDataFile(it.dirname(t),it.basename(t),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=r},o.onerror=r}},ft={DEFAULT_POLLMASK:5,calculateAt:function(t,e,r){if(it.isAbs(e))return e;var n;if(-100===t)n=ht.cwd();else{var o=ht.getStream(t);if(!o)throw new ht.ErrnoError(8);n=o.path}if(0==e.length){if(!r)throw new ht.ErrnoError(44);return n}return it.join2(n,e)},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&it.normalize(e)!==it.normalize(ht.getPath(t.node)))return-54;throw t}return P[r>>2]=n.dev,P[r+4>>2]=0,P[r+8>>2]=n.ino,P[r+12>>2]=n.mode,P[r+16>>2]=n.nlink,P[r+20>>2]=n.uid,P[r+24>>2]=n.gid,P[r+28>>2]=n.rdev,P[r+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)],P[r+40>>2]=K[0],P[r+44>>2]=K[1],P[r+48>>2]=4096,P[r+52>>2]=n.blocks,P[r+56>>2]=n.atime.getTime()/1e3|0,P[r+60>>2]=0,P[r+64>>2]=n.mtime.getTime()/1e3|0,P[r+68>>2]=0,P[r+72>>2]=n.ctime.getTime()/1e3|0,P[r+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)],P[r+80>>2]=K[0],P[r+84>>2]=K[1],0},doMsync:function(t,e,r,n,o){var i=O.slice(t,t+r);ht.msync(e,i,o,r,n)},varargs:void 0,get:function(){return ft.varargs+=4,P[ft.varargs-4>>2]},getStr:function(t){return I(t)},getStreamFromFD:function(t){var e=ht.getStream(t);if(!e)throw new ht.ErrnoError(8);return e}},pt={BUCKET_BUFFER_SIZE:8192,mount:function(t){return ht.createNode(null,"/",16895,0)},createPipe:function(){var t={buckets:[],refcnt:2};t.buckets.push({buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var e=pt.nextname(),r=pt.nextname(),n=ht.createNode(pt.root,e,4096,0),o=ht.createNode(pt.root,r,4096,0);n.pipe=t,o.pipe=t;var i=ht.createStream({path:e,node:n,flags:0,seekable:!1,stream_ops:pt.stream_ops});n.stream=i;var a=ht.createStream({path:r,node:o,flags:1,seekable:!1,stream_ops:pt.stream_ops});return o.stream=a,{readable_fd:i.fd,writable_fd:a.fd}},stream_ops:{poll:function(t){var e=t.node.pipe;if(1==(2097155&t.flags))return 260;if(e.buckets.length>0)for(var r=0;r<e.buckets.length;r++){var n=e.buckets[r];if(n.offset-n.roffset>0)return 65}return 0},ioctl:function(t,e,r){return 28},fsync:function(t){return 28},read:function(t,e,r,n,o){for(var i=t.node.pipe,a=0,s=0;s<i.buckets.length;s++){var u=i.buckets[s];a+=u.offset-u.roffset}A(e instanceof ArrayBuffer||ArrayBuffer.isView(e));var c=e.subarray(r,r+n);if(n<=0)return 0;if(0==a)throw new ht.ErrnoError(6);var l=Math.min(a,n),h=l,f=0;for(s=0;s<i.buckets.length;s++){var p=i.buckets[s],d=p.offset-p.roffset;if(l<=d){var m=p.buffer.subarray(p.roffset,p.offset);l<d?(m=m.subarray(0,l),p.roffset+=l):f++,c.set(m);break}m=p.buffer.subarray(p.roffset,p.offset),c.set(m),c=c.subarray(m.byteLength),l-=m.byteLength,f++}return f&&f==i.buckets.length&&(f--,i.buckets[f].offset=0,i.buckets[f].roffset=0),i.buckets.splice(0,f),h},write:function(t,e,r,n,o){var i=t.node.pipe;A(e instanceof ArrayBuffer||ArrayBuffer.isView(e));var a=e.subarray(r,r+n),s=a.byteLength;if(s<=0)return 0;var u=null;0==i.buckets.length?(u={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(u)):u=i.buckets[i.buckets.length-1],A(u.offset<=pt.BUCKET_BUFFER_SIZE);var c=pt.BUCKET_BUFFER_SIZE-u.offset;if(c>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;c>0&&(u.buffer.set(a.subarray(0,c),u.offset),u.offset+=c,a=a.subarray(c,a.byteLength));for(var l=a.byteLength/pt.BUCKET_BUFFER_SIZE|0,h=a.byteLength%pt.BUCKET_BUFFER_SIZE,f=0;f<l;f++){var p={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:pt.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(p),p.buffer.set(a.subarray(0,pt.BUCKET_BUFFER_SIZE)),a=a.subarray(pt.BUCKET_BUFFER_SIZE,a.byteLength)}return h>0&&(p={buffer:new Uint8Array(pt.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0},i.buckets.push(p),p.buffer.set(a)),s},close:function(t){var e=t.node.pipe;e.refcnt--,0===e.refcnt&&(e.buckets=null)}},nextname:function(){return pt.nextname.current||(pt.nextname.current=0),"pipe["+pt.nextname.current+++"]"}},dt="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function mt(t){try{return E.grow(t-x.byteLength+65535>>>16),U(E.buffer),1}catch(t){}}ct=_?()=>{var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:()=>performance.now();var vt={};function gt(){if(!gt.strings){var t={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",_:d||"./this.program"};for(var e in vt)void 0===vt[e]?delete t[e]:t[e]=vt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);gt.strings=r}return gt.strings}function _t(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=R[e>>2],s=R[e+4>>2];e+=8;var u=ht.read(t,S,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function Dt(t,e){return e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN}var yt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=ht.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},wt=365,bt=146;function Et(t,e,r){var n=r>0?r:M(t)+1,o=new Array(n),i=L(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(yt.prototype,{read:{get:function(){return(this.mode&wt)===wt},set:function(t){t?this.mode|=wt:this.mode&=-366}},write:{get:function(){return(this.mode&bt)===bt},set:function(t){t?this.mode|=bt:this.mode&=-147}},isFolder:{get:function(){return ht.isDir(this.mode)}},isDevice:{get:function(){return ht.isChrdev(this.mode)}}}),ht.FSNode=yt,ht.staticInit();var Ct,Ft={a:function(t,e,r,n){et("Assertion failed: "+I(t)+", at: "+[e?I(e):"unknown filename",r,n?I(n):"unknown function"])},G:function(t,e){try{return t=ft.getStr(t),ht.chmod(t,e),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},F:function(t){try{var e=ft.getStreamFromFD(t);return ht.createStream(e,0).fd}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},H:function(t,e,r,n){try{if(e=ft.getStr(e),e=ft.calculateAt(t,e),-8&r)return-28;var o=ht.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&&ht.nodePermissions(o,i)?-2:0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},e:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){case 0:return(o=ft.get())<0?-28:ht.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ft.get();return n.flags|=o,0;case 5:return o=ft.get(),T[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,P[kt()>>2]=i,-1}}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}var i},z:function(t,e){try{var r=ft.getStreamFromFD(t);return ft.doStat(ht.stat,r.path,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},v:function(t,e){try{if(0===e)return-28;var r=ht.cwd(),n=M(r)+1;return e<n?-68:(N(r,t,e),n)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},m:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);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=ft.get();return P[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ft.get(),ht.ioctl(n,e,o);default:et("bad ioctl syscall "+e)}}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},x:function(t,e){try{return t=ft.getStr(t),ft.doStat(ht.lstat,t,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},w:function(t,e,r,n){try{e=ft.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=ft.calculateAt(t,e,i),ft.doStat(o?ht.lstat:ht.stat,e,r)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},h:function(t,e,r,n){ft.varargs=n;try{e=ft.getStr(e),e=ft.calculateAt(t,e);var o=n?ft.get():0;return ht.open(e,r,o).fd}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},t:function(t){try{if(0==t)throw new ht.ErrnoError(21);var e=pt.createPipe();return P[t>>2]=e.readable_fd,P[t+4>>2]=e.writable_fd,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},s:function(t,e,r,n){try{if(e=ft.getStr(e),e=ft.calculateAt(t,e),n<=0)return-28;var o=ht.readlink(e),i=Math.min(n,M(o)),a=S[r+i];return N(o,r,n+1),S[r+i]=a,i}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},q:function(t){try{return t=ft.getStr(t),ht.rmdir(t),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},y:function(t,e){try{return t=ft.getStr(t),ft.doStat(ht.stat,t,e)}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},g:function(t,e,r){try{return e=ft.getStr(e),e=ft.calculateAt(t,e),0===r?ht.unlink(e):512===r?ht.rmdir(e):et("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return-t.errno}},C:function(t){},E:function(t,e){et(dt)},D:function(t,e){et(dt)},l:function(){return Date.now()},B:function(){return!0},b:function(){et("")},k:ct,A:function(t,e,r){O.copyWithin(t,e,e+r)},f:function(t){var e,r,n=O.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),mt(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},n:function(t,e){var r=0;return gt().forEach((function(n,o){var i=e+r;R[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)S[e++>>0]=t.charCodeAt(n);r||(S[e>>0]=0)}(n,i),r+=n.length+1})),0},r:function(t,e){var r=gt();R[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),R[e>>2]=n,0},d:function(t){Tt(t)},c:function(t){try{var e=ft.getStreamFromFD(t);return ht.close(e),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},u:function(t,e){try{var r=ft.getStreamFromFD(t),n=r.tty?2:ht.isDir(r.mode)?3:ht.isLink(r.mode)?7:4;return S[e>>0]=n,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},o:function(t,e,r,n,o,i){try{var a=Dt(n,o);if(isNaN(a))return 61;var s=_t(ft.getStreamFromFD(t),e,r,a);return P[i>>2]=s,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},j:function(t,e,r,n){try{var o=_t(ft.getStreamFromFD(t),e,r);return P[n>>2]=o,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},p:function(t,e,r,n,o){try{var i=Dt(e,r);if(isNaN(i))return 61;var a=ft.getStreamFromFD(t);return ht.llseek(a,i,n),K=[a.position>>>0,(Y=a.position,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[o>>2]=K[0],P[o+4>>2]=K[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},i:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=R[e>>2],s=R[e+4>>2];e+=8;var u=ht.write(t,S,a,s,n);if(u<0)return-1;o+=u}return o}(ft.getStreamFromFD(t),e,r);return R[n>>2]=o,0}catch(t){if(void 0===ht||!(t instanceof ht.ErrnoError))throw t;return t.errno}},I:function(t){Pt(t)}},kt=(function(){var t={a:Ft};function e(t,e){var r,n=t.exports;i.asm=n,U((E=i.asm.J).buffer),i.asm.N,r=i.asm.K,z.unshift(r),tt()}function r(t){e(t.instance)}function n(e){return(y||!v&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return nt(q)})):fetch(q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+q+"'";return t.arrayBuffer()})).catch((function(){return nt(q)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),et(t)}))}if(J(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){return b("Module.instantiateWasm callback failed with error: "+t),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||rt(q)||_||"function"!=typeof fetch?n(r):fetch(q,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.K).apply(null,arguments)},i.___errno_location=function(){return(kt=i.___errno_location=i.asm.L).apply(null,arguments)}),At=(i._main=function(){return(i._main=i.asm.M).apply(null,arguments)},i.stackAlloc=function(){return(At=i.stackAlloc=i.asm.O).apply(null,arguments)});function xt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function St(t){var e=i._main;(t=t||[]).unshift(d);var r=t.length,n=At(4*(r+1)),o=n>>2;t.forEach((t=>{P[o++]=function(t){var e=M(t)+1,r=At(e);return L(t,S,r,e),r}(t)})),P[o]=0;try{var a=e(r,n);return Tt(a),a}catch(t){return function(t){if(t instanceof xt||"unwind"==t)return F;m(1,t)}(t)}}function Ot(t){function r(){Ct||(Ct=!0,i.calledRun=!0,k||(i.noFSInit||ht.init.initialized||ht.init(),ht.ignorePermissions=!1,st.init(),pt.root=ht.mount(pt,{},null),ot(z),ot(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),Rt&&St(t),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),G.unshift(t);var t;ot(G)}()))}t=t||p,X>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),H.unshift(t);var t;ot(H)}(),X>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}function Tt(t,e){F=t,Pt(t)}function Pt(t){F=t,$()||(i.onExit&&i.onExit(t),k=!0),m(t,new xt(t))}if(i.FS=ht,Q=function t(){Ct||Ot(),Ct||(Q=t)},i.run=Ot,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var Rt=!0;return i.noInitialRun&&(Rt=!1),Ot(),t.ready});t.exports=o},3825:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||__filename,function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c,l,h,f=Object.assign({},i),p=[],d="./this.program",m=(t,e)=>{throw e},v="object"==typeof window,g="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,D="";_?(D=g?r(1017).dirname(D)+"/":__dirname+"/",h=()=>{l||(c=r(7147),l=r(1017))},a=function(t,e){return h(),t=l.normalize(t),c.readFileSync(t,e?void 0:"utf8")},u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{h(),t=l.normalize(t),c.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Et))throw t})),process.on("unhandledRejection",(function(t){throw t})),m=(t,e)=>{if(G())throw process.exitCode=t,e;var r;(r=e)instanceof Et||b("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}):(v||g)&&(g?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),n&&(D=n),D=0!==D.indexOf("blob:")?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},g&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,f),f=null,i.arguments&&(p=i.arguments),i.thisProgram&&(d=i.thisProgram),i.quit&&(m=i.quit),i.wasmBinary&&(y=i.wasmBinary);var E,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&tt("no native wasm support detected");var F,k,A,x,S,O,T,P=!1,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function B(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&R)return R.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[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(t,e){return t?B(x,t,e):""}function I(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function L(t,e,r){return I(t,x,e,r)}function N(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function M(t){k=t,i.HEAP8=A=new Int8Array(t),i.HEAP16=S=new Int16Array(t),i.HEAP32=O=new Int32Array(t),i.HEAPU8=x=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=T=new Uint32Array(t),i.HEAPF32=new Float32Array(t),i.HEAPF64=new Float64Array(t)}i.INITIAL_MEMORY;var U=[],H=[],z=[],V=[];function G(){return C}var $,q,W,Y,K=0,X=null,Z=null;function Q(t){K++,i.monitorRunDependencies&&i.monitorRunDependencies(K)}function J(t){if(K--,i.monitorRunDependencies&&i.monitorRunDependencies(K),0==K&&(null!==X&&(clearInterval(X),X=null),Z)){var e=Z;Z=null,e()}}function tt(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),P=!0,F=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function et(t){return t.startsWith("data:application/octet-stream;base64,")}function rt(t){try{if(t==$&&y)return new Uint8Array(y);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){tt(t)}}function nt(t){for(;t.length>0;)t.shift()(i)}et($="objcopy.wasm")||(q=$,$=i.locateFile?i.locateFile(q,D):D+q);var ot={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=ot.isAbs(t),r="/"===t.substr(-1);return(t=ot.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=ot.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=ot.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments,0);return ot.normalize(t.join("/"))},join2:(t,e)=>ot.normalize(t+"/"+e)},it={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:lt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=ot.isAbs(n)}return(e?"/":"")+(t=ot.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=it.resolve(t).substr(1),e=it.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(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("/")}},at={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){at.ttys[t]={input:[],output:[],ops:e},lt.registerDevice(t,at.stream_ops)},stream_ops:{open:function(t){var e=at.ttys[t.node.rdev];if(!e)throw new lt.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new lt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new lt.ErrnoError(29)}if(void 0===s&&0===i)throw new lt.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new lt.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new lt.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if(_){var r=Buffer.alloc(256),n=0;try{n=c.readSync(process.stdin.fd,r,0,256,-1)}catch(t){if(!t.toString().includes("EOF"))throw t;n=0}e=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;t.input=_t(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(w(B(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(w(B(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(b(B(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(b(B(t.output,0)),t.output=[])}}};function st(t){tt()}var ut={ops_table:null,mount:function(t){return ut.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(lt.isBlkdev(r)||lt.isFIFO(r))throw new lt.ErrnoError(63);ut.ops_table||(ut.ops_table={dir:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,lookup:ut.node_ops.lookup,mknod:ut.node_ops.mknod,rename:ut.node_ops.rename,unlink:ut.node_ops.unlink,rmdir:ut.node_ops.rmdir,readdir:ut.node_ops.readdir,symlink:ut.node_ops.symlink},stream:{llseek:ut.stream_ops.llseek}},file:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:{llseek:ut.stream_ops.llseek,read:ut.stream_ops.read,write:ut.stream_ops.write,allocate:ut.stream_ops.allocate,mmap:ut.stream_ops.mmap,msync:ut.stream_ops.msync}},link:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,readlink:ut.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:lt.chrdev_stream_ops}});var o=lt.createNode(t,e,r,n);return lt.isDir(o.mode)?(o.node_ops=ut.ops_table.dir.node,o.stream_ops=ut.ops_table.dir.stream,o.contents={}):lt.isFile(o.mode)?(o.node_ops=ut.ops_table.file.node,o.stream_ops=ut.ops_table.file.stream,o.usedBytes=0,o.contents=null):lt.isLink(o.mode)?(o.node_ops=ut.ops_table.link.node,o.stream_ops=ut.ops_table.link.stream):lt.isChrdev(o.mode)&&(o.node_ops=ut.ops_table.chrdev.node,o.stream_ops=ut.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o,t.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=lt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,lt.isDir(t.mode)?e.size=4096:lt.isFile(t.mode)?e.size=t.usedBytes:lt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ut.resizeFileStorage(t,e.size)},lookup:function(t,e){throw lt.genericErrors[44]},mknod:function(t,e,r,n){return ut.createNode(t,e,r,n)},rename:function(t,e,r){if(lt.isDir(t.mode)){var n;try{n=lt.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new lt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=lt.lookupNode(t,e);for(var n in r.contents)throw new lt.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=ut.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!lt.isLink(t.mode))throw new lt.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===A.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(ut.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&<.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new lt.ErrnoError(28);return n},allocate:function(t,e,r){ut.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o){if(!lt.isFile(t.node.mode))throw new lt.ErrnoError(43);var i,a,s=t.node.contents;if(2&o||s.buffer!==k){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),a=!0,!(i=st()))throw new lt.ErrnoError(48);A.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(t,e,r,n,o){if(!lt.isFile(t.node.mode))throw new lt.ErrnoError(43);return 2&o||ut.stream_ops.write(t,e,0,n,r,!1),0}}};function ct(t,e,r,n){var o=n?"":"al "+t;s(t,(function(r){var n;n='Loading data file "'+t+'" failed (no arrayBuffer).',r||tt(n),e(new Uint8Array(r)),o&&J()}),(function(e){if(!r)throw'Loading data file "'+t+'" failed.';r()})),o&&Q()}var lt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,e={})=>{if(!(t=it.resolve(lt.cwd(),t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new lt.ErrnoError(32);for(var r=ot.normalizeArray(t.split("/").filter((t=>!!t)),!1),n=lt.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&e.parent)break;if(n=lt.lookupNode(n,r[i]),o=ot.join2(o,r[i]),lt.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;lt.isLink(n.mode);){var u=lt.readlink(o);if(o=it.resolve(ot.dirname(o),u),n=lt.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new lt.ErrnoError(32)}}return{path:o,node:n}},getPath:t=>{for(var e;;){if(lt.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:(t,e)=>{for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%lt.nameTable.length},hashAddNode:t=>{var e=lt.hashName(t.parent.id,t.name);t.name_next=lt.nameTable[e],lt.nameTable[e]=t},hashRemoveNode:t=>{var e=lt.hashName(t.parent.id,t.name);if(lt.nameTable[e]===t)lt.nameTable[e]=t.name_next;else for(var r=lt.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:(t,e)=>{var r=lt.mayLookup(t);if(r)throw new lt.ErrnoError(r,t);for(var n=lt.hashName(t.id,e),o=lt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return lt.lookup(t,e)},createNode:(t,e,r,n)=>{var o=new lt.FSNode(t,e,r,n);return lt.hashAddNode(o),o},destroyNode:t=>{lt.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var e=lt.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>lt.ignorePermissions||(!e.includes("r")||292&t.mode)&&(!e.includes("w")||146&t.mode)&&(!e.includes("x")||73&t.mode)?0:2,mayLookup:t=>{var e=lt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:(t,e)=>{try{return lt.lookupNode(t,e),20}catch(t){}return lt.nodePermissions(t,"wx")},mayDelete:(t,e,r)=>{var n;try{n=lt.lookupNode(t,e)}catch(t){return t.errno}var o=lt.nodePermissions(t,"wx");if(o)return o;if(r){if(!lt.isDir(n.mode))return 54;if(lt.isRoot(n)||lt.getPath(n)===lt.cwd())return 10}else if(lt.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?lt.isLink(t.mode)?32:lt.isDir(t.mode)&&("r"!==lt.flagsToPermissionString(e)||512&e)?31:lt.nodePermissions(t,lt.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,e=lt.MAX_OPEN_FDS)=>{for(var r=t;r<=e;r++)if(!lt.streams[r])return r;throw new lt.ErrnoError(33)},getStream:t=>lt.streams[t],createStream:(t,e,r)=>{lt.FSStream||(lt.FSStream=function(){this.shared={}},lt.FSStream.prototype={},Object.defineProperties(lt.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},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(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new lt.FSStream,t);var n=lt.nextfd(e,r);return t.fd=n,lt.streams[n]=t,t},closeStream:t=>{lt.streams[t]=null},chrdev_stream_ops:{open:t=>{var e=lt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new lt.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice:(t,e)=>{lt.devices[t]={stream_ops:e}},getDevice:t=>lt.devices[t],getMounts:t=>{for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:(t,e)=>{"function"==typeof t&&(e=t,t=!1),lt.syncFSRequests++,lt.syncFSRequests>1&&b("warning: "+lt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=lt.getMounts(lt.root.mount),n=0;function o(t){return lt.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:(t,e,r)=>{var n,o="/"===r,i=!r;if(o&<.root)throw new lt.ErrnoError(10);if(!o&&!i){var a=lt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,lt.isMountpoint(n))throw new lt.ErrnoError(10);if(!lt.isDir(n.mode))throw new lt.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?lt.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var e=lt.lookupPath(t,{follow_mount:!1});if(!lt.isMountpoint(e.node))throw new lt.ErrnoError(28);var r=e.node,n=r.mounted,o=lt.getMounts(n);Object.keys(lt.nameTable).forEach((t=>{for(var e=lt.nameTable[t];e;){var r=e.name_next;o.includes(e.mount)&<.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod:(t,e,r)=>{var n=lt.lookupPath(t,{parent:!0}).node,o=ot.basename(t);if(!o||"."===o||".."===o)throw new lt.ErrnoError(28);var i=lt.mayCreate(n,o);if(i)throw new lt.ErrnoError(i);if(!n.node_ops.mknod)throw new lt.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,lt.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,lt.mknod(t,e,0)),mkdirTree:(t,e)=>{for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{lt.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>(void 0===r&&(r=e,e=438),e|=8192,lt.mknod(t,e,r)),symlink:(t,e)=>{if(!it.resolve(t))throw new lt.ErrnoError(44);var r=lt.lookupPath(e,{parent:!0}).node;if(!r)throw new lt.ErrnoError(44);var n=ot.basename(e),o=lt.mayCreate(r,n);if(o)throw new lt.ErrnoError(o);if(!r.node_ops.symlink)throw new lt.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:(t,e)=>{var r,n,o=ot.dirname(t),i=ot.dirname(e),a=ot.basename(t),s=ot.basename(e);if(r=lt.lookupPath(t,{parent:!0}).node,n=lt.lookupPath(e,{parent:!0}).node,!r||!n)throw new lt.ErrnoError(44);if(r.mount!==n.mount)throw new lt.ErrnoError(75);var u,c=lt.lookupNode(r,a),l=it.relative(t,i);if("."!==l.charAt(0))throw new lt.ErrnoError(28);if("."!==(l=it.relative(e,o)).charAt(0))throw new lt.ErrnoError(55);try{u=lt.lookupNode(n,s)}catch(t){}if(c!==u){var h=lt.isDir(c.mode),f=lt.mayDelete(r,a,h);if(f)throw new lt.ErrnoError(f);if(f=u?lt.mayDelete(n,s,h):lt.mayCreate(n,s))throw new lt.ErrnoError(f);if(!r.node_ops.rename)throw new lt.ErrnoError(63);if(lt.isMountpoint(c)||u&<.isMountpoint(u))throw new lt.ErrnoError(10);if(n!==r&&(f=lt.nodePermissions(r,"w")))throw new lt.ErrnoError(f);lt.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{lt.hashAddNode(c)}}},rmdir:t=>{var e=lt.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=lt.lookupNode(e,r),o=lt.mayDelete(e,r,!0);if(o)throw new lt.ErrnoError(o);if(!e.node_ops.rmdir)throw new lt.ErrnoError(63);if(lt.isMountpoint(n))throw new lt.ErrnoError(10);e.node_ops.rmdir(e,r),lt.destroyNode(n)},readdir:t=>{var e=lt.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new lt.ErrnoError(54);return e.node_ops.readdir(e)},unlink:t=>{var e=lt.lookupPath(t,{parent:!0}).node;if(!e)throw new lt.ErrnoError(44);var r=ot.basename(t),n=lt.lookupNode(e,r),o=lt.mayDelete(e,r,!1);if(o)throw new lt.ErrnoError(o);if(!e.node_ops.unlink)throw new lt.ErrnoError(63);if(lt.isMountpoint(n))throw new lt.ErrnoError(10);e.node_ops.unlink(e,r),lt.destroyNode(n)},readlink:t=>{var e=lt.lookupPath(t).node;if(!e)throw new lt.ErrnoError(44);if(!e.node_ops.readlink)throw new lt.ErrnoError(28);return it.resolve(lt.getPath(e.parent),e.node_ops.readlink(e))},stat:(t,e)=>{var r=lt.lookupPath(t,{follow:!e}).node;if(!r)throw new lt.ErrnoError(44);if(!r.node_ops.getattr)throw new lt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>lt.stat(t,!0),chmod:(t,e,r)=>{var n;if(!(n="string"==typeof t?lt.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,e)=>{lt.chmod(t,e,!0)},fchmod:(t,e)=>{var r=lt.getStream(t);if(!r)throw new lt.ErrnoError(8);lt.chmod(r.node,e)},chown:(t,e,r,n)=>{var o;if(!(o="string"==typeof t?lt.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(t,e,r)=>{lt.chown(t,e,r,!0)},fchown:(t,e,r)=>{var n=lt.getStream(t);if(!n)throw new lt.ErrnoError(8);lt.chown(n.node,e,r)},truncate:(t,e)=>{if(e<0)throw new lt.ErrnoError(28);var r;if(!(r="string"==typeof t?lt.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new lt.ErrnoError(63);if(lt.isDir(r.mode))throw new lt.ErrnoError(31);if(!lt.isFile(r.mode))throw new lt.ErrnoError(28);var n=lt.nodePermissions(r,"w");if(n)throw new lt.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:(t,e)=>{var r=lt.getStream(t);if(!r)throw new lt.ErrnoError(8);if(0==(2097155&r.flags))throw new lt.ErrnoError(28);lt.truncate(r.node,e)},utime:(t,e,r)=>{var n=lt.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:(t,e,r)=>{if(""===t)throw new lt.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?lt.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=ot.normalize(t);try{n=lt.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var o=!1;if(64&e)if(n){if(128&e)throw new lt.ErrnoError(20)}else n=lt.mknod(t,r,0),o=!0;if(!n)throw new lt.ErrnoError(44);if(lt.isChrdev(n.mode)&&(e&=-513),65536&e&&!lt.isDir(n.mode))throw new lt.ErrnoError(54);if(!o){var a=lt.mayOpen(n,e);if(a)throw new lt.ErrnoError(a)}512&e&&!o&<.truncate(n,0),e&=-131713;var s=lt.createStream({node:n,path:lt.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&e||(lt.readFiles||(lt.readFiles={}),t in lt.readFiles||(lt.readFiles[t]=1)),s},close:t=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{lt.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,e,r)=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new lt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new lt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:(t,e,r,n,o)=>{if(n<0||o<0)throw new lt.ErrnoError(28);if(lt.isClosed(t))throw new lt.ErrnoError(8);if(1==(2097155&t.flags))throw new lt.ErrnoError(8);if(lt.isDir(t.node.mode))throw new lt.ErrnoError(31);if(!t.stream_ops.read)throw new lt.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new lt.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:(t,e,r,n,o,i)=>{if(n<0||o<0)throw new lt.ErrnoError(28);if(lt.isClosed(t))throw new lt.ErrnoError(8);if(0==(2097155&t.flags))throw new lt.ErrnoError(8);if(lt.isDir(t.node.mode))throw new lt.ErrnoError(31);if(!t.stream_ops.write)throw new lt.ErrnoError(28);t.seekable&&1024&t.flags&<.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new lt.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);return a||(t.position+=s),s},allocate:(t,e,r)=>{if(lt.isClosed(t))throw new lt.ErrnoError(8);if(e<0||r<=0)throw new lt.ErrnoError(28);if(0==(2097155&t.flags))throw new lt.ErrnoError(8);if(!lt.isFile(t.node.mode)&&!lt.isDir(t.node.mode))throw new lt.ErrnoError(43);if(!t.stream_ops.allocate)throw new lt.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:(t,e,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&t.flags))throw new lt.ErrnoError(2);if(1==(2097155&t.flags))throw new lt.ErrnoError(2);if(!t.stream_ops.mmap)throw new lt.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o)},msync:(t,e,r,n,o)=>t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0,munmap:t=>0,ioctl:(t,e,r)=>{if(!t.stream_ops.ioctl)throw new lt.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:(t,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=lt.open(t,e.flags),o=lt.stat(t).size,i=new Uint8Array(o);return lt.read(n,i,0,o,0),"utf8"===e.encoding?r=B(i,0):"binary"===e.encoding&&(r=i),lt.close(n),r},writeFile:(t,e,r={})=>{r.flags=r.flags||577;var n=lt.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(N(e)+1),i=I(e,o,0,o.length);lt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");lt.write(n,e,0,e.byteLength,void 0,r.canOwn)}lt.close(n)},cwd:()=>lt.currentPath,chdir:t=>{var e=lt.lookupPath(t,{follow:!0});if(null===e.node)throw new lt.ErrnoError(44);if(!lt.isDir(e.node.mode))throw new lt.ErrnoError(54);var r=lt.nodePermissions(e.node,"x");if(r)throw new lt.ErrnoError(r);lt.currentPath=e.path},createDefaultDirectories:()=>{lt.mkdir("/tmp"),lt.mkdir("/home"),lt.mkdir("/home/web_user")},createDefaultDevices:()=>{lt.mkdir("/dev"),lt.registerDevice(lt.makedev(1,3),{read:()=>0,write:(t,e,r,n,o)=>n}),lt.mkdev("/dev/null",lt.makedev(1,3)),at.register(lt.makedev(5,0),at.default_tty_ops),at.register(lt.makedev(6,0),at.default_tty1_ops),lt.mkdev("/dev/tty",lt.makedev(5,0)),lt.mkdev("/dev/tty1",lt.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}if(_)try{var e=r(6113);return function(){return e.randomBytes(1)[0]}}catch(t){}return function(){tt("randomDevice")}}();lt.createDevice("/dev","random",t),lt.createDevice("/dev","urandom",t),lt.mkdir("/dev/shm"),lt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{lt.mkdir("/proc");var t=lt.mkdir("/proc/self");lt.mkdir("/proc/self/fd"),lt.mount({mount:()=>{var e=lt.createNode(t,"fd",16895,73);return e.node_ops={lookup:(t,e)=>{var r=+e,n=lt.getStream(r);if(!n)throw new lt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{i.stdin?lt.createDevice("/dev","stdin",i.stdin):lt.symlink("/dev/tty","/dev/stdin"),i.stdout?lt.createDevice("/dev","stdout",null,i.stdout):lt.symlink("/dev/tty","/dev/stdout"),i.stderr?lt.createDevice("/dev","stderr",null,i.stderr):lt.symlink("/dev/tty1","/dev/stderr"),lt.open("/dev/stdin",0),lt.open("/dev/stdout",1),lt.open("/dev/stderr",1)},ensureErrnoError:()=>{lt.ErrnoError||(lt.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},lt.ErrnoError.prototype=new Error,lt.ErrnoError.prototype.constructor=lt.ErrnoError,[44].forEach((t=>{lt.genericErrors[t]=new lt.ErrnoError(t),lt.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{lt.ensureErrnoError(),lt.nameTable=new Array(4096),lt.mount(ut,{},"/"),lt.createDefaultDirectories(),lt.createDefaultDevices(),lt.createSpecialDirectories(),lt.filesystems={MEMFS:ut}},init:(t,e,r)=>{lt.init.initialized=!0,lt.ensureErrnoError(),i.stdin=t||i.stdin,i.stdout=e||i.stdout,i.stderr=r||i.stderr,lt.createStandardStreams()},quit:()=>{lt.init.initialized=!1;for(var t=0;t<lt.streams.length;t++){var e=lt.streams[t];e&<.close(e)}},getMode:(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:(t,e)=>{var r=lt.analyzePath(t,e);return r.exists?r.object:null},analyzePath:(t,e)=>{try{t=(n=lt.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=lt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ot.basename(t),n=lt.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:(t,e,r,n)=>{t="string"==typeof t?t:lt.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ot.join2(t,i);try{lt.mkdir(a)}catch(t){}t=a}}return a},createFile:(t,e,r,n,o)=>{var i=ot.join2("string"==typeof t?t:lt.getPath(t),e),a=lt.getMode(n,o);return lt.create(i,a)},createDataFile:(t,e,r,n,o,i)=>{var a=e;t&&(t="string"==typeof t?t:lt.getPath(t),a=e?ot.join2(t,e):t);var s=lt.getMode(n,o),u=lt.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,h=r.length;l<h;++l)c[l]=r.charCodeAt(l);r=c}lt.chmod(u,146|s);var f=lt.open(u,577);lt.write(f,r,0,r.length,0,i),lt.close(f),lt.chmod(u,s)}return u},createDevice:(t,e,r,n)=>{var o=ot.join2("string"==typeof t?t:lt.getPath(t),e),i=lt.getMode(!!r,!!n);lt.createDevice.major||(lt.createDevice.major=64);var a=lt.makedev(lt.createDevice.major++,0);return lt.registerDevice(a,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new lt.ErrnoError(29)}if(void 0===u&&0===a)throw new lt.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:(t,e,r,o,i)=>{for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new lt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),lt.mkdev(o,i,a)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=_t(a(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new lt.ErrnoError(29)}},createLazyFile:(t,e,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((t=>{var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+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",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):_t(o.responseText||"",!0)})(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,w("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(!g)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=lt.createFile(t,e,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 l(t,e,r,n,o){var i=t.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++)e[r+s]=i[o+s];else for(s=0;s<a;s++)e[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((t=>{var e=u.stream_ops[t];c[t]=function(){return lt.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(t,e,r,n,o)=>(lt.forceLoadFile(u),l(t,e,r,n,o)),c.mmap=(t,e,r,n,o)=>{lt.forceLoadFile(u);var i=st();if(!i)throw new lt.ErrnoError(48);return l(t,A,i,e,r),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(t,e,r,n,o,i,a,s,u,c)=>{var l=e?it.resolve(ot.join2(t,e)):t;function h(r){function h(r){c&&c(),s||lt.createDataFile(t,e,r,n,o,u),i&&i(),J()}Browser.handledByPreloadPlugin(r,l,h,(()=>{a&&a(),J()}))||h(r)}Q(),"string"==typeof r?ct(r,(t=>h(t)),a):h(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=lt.indexedDB();try{var o=n.open(lt.DB_NAME(),lt.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(lt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([lt.DB_STORE_NAME],"readwrite"),i=n.objectStore(lt.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((t=>{var e=i.put(lt.analyzePath(t).object.contents,t);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(t,e,r)=>{e=e||(()=>{}),r=r||(()=>{});var n=lt.indexedDB();try{var o=n.open(lt.DB_NAME(),lt.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([lt.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(lt.DB_STORE_NAME),s=0,u=0,c=t.length;function l(){0==u?e():r()}t.forEach((t=>{var e=a.get(t);e.onsuccess=()=>{lt.analyzePath(t).exists&<.unlink(t),lt.createDataFile(ot.dirname(t),ot.basename(t),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=r},o.onerror=r}},ht={DEFAULT_POLLMASK:5,calculateAt:function(t,e,r){if(ot.isAbs(e))return e;var n;if(-100===t)n=lt.cwd();else{var o=lt.getStream(t);if(!o)throw new lt.ErrnoError(8);n=o.path}if(0==e.length){if(!r)throw new lt.ErrnoError(44);return n}return ot.join2(n,e)},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&ot.normalize(e)!==ot.normalize(lt.getPath(t.node)))return-54;throw t}return O[r>>2]=n.dev,O[r+4>>2]=0,O[r+8>>2]=n.ino,O[r+12>>2]=n.mode,O[r+16>>2]=n.nlink,O[r+20>>2]=n.uid,O[r+24>>2]=n.gid,O[r+28>>2]=n.rdev,O[r+32>>2]=0,Y=[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)],O[r+40>>2]=Y[0],O[r+44>>2]=Y[1],O[r+48>>2]=4096,O[r+52>>2]=n.blocks,O[r+56>>2]=n.atime.getTime()/1e3|0,O[r+60>>2]=0,O[r+64>>2]=n.mtime.getTime()/1e3|0,O[r+68>>2]=0,O[r+72>>2]=n.ctime.getTime()/1e3|0,O[r+76>>2]=0,Y=[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)],O[r+80>>2]=Y[0],O[r+84>>2]=Y[1],0},doMsync:function(t,e,r,n,o){var i=x.slice(t,t+r);lt.msync(e,i,o,r,n)},varargs:void 0,get:function(){return ht.varargs+=4,O[ht.varargs-4>>2]},getStr:function(t){return j(t)},getStreamFromFD:function(t){var e=lt.getStream(t);if(!e)throw new lt.ErrnoError(8);return e}};function ft(t){try{return E.grow(t-k.byteLength+65535>>>16),M(E.buffer),1}catch(t){}}var pt={};function dt(){if(!dt.strings){var t={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",_:d||"./this.program"};for(var e in pt)void 0===pt[e]?delete t[e]:t[e]=pt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);dt.strings=r}return dt.strings}var mt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=lt.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},vt=365,gt=146;function _t(t,e,r){var n=r>0?r:N(t)+1,o=new Array(n),i=I(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(mt.prototype,{read:{get:function(){return(this.mode&vt)===vt},set:function(t){t?this.mode|=vt:this.mode&=-366}},write:{get:function(){return(this.mode>)===gt},set:function(t){t?this.mode|=gt:this.mode&=-147}},isFolder:{get:function(){return lt.isDir(this.mode)}},isDevice:{get:function(){return lt.isChrdev(this.mode)}}}),lt.FSNode=mt,lt.staticInit();var Dt,yt={b:function(t,e,r,n){tt("Assertion failed: "+j(t)+", at: "+[e?j(e):"unknown filename",r,n?j(n):"unknown function"])},k:function(t,e){try{return t=ht.getStr(t),lt.chmod(t,e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},D:function(t){try{var e=ht.getStreamFromFD(t);return lt.createStream(e,0).fd}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},E:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e),-8&r)return-28;var o=lt.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&<.nodePermissions(o,i)?-2:0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},B:function(t,e){try{return lt.fchmod(t,e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},d:function(t,e,r){ht.varargs=r;try{var n=ht.getStreamFromFD(t);switch(e){case 0:return(o=ht.get())<0?-28:lt.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ht.get();return n.flags|=o,0;case 5:return o=ht.get(),S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,O[wt()>>2]=i,-1}}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}var i},z:function(t,e){try{var r=ht.getStreamFromFD(t);return ht.doStat(lt.stat,r.path,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},v:function(t,e){try{if(0===e)return-28;var r=lt.cwd(),n=N(r)+1;return e<n?-68:(L(r,t,e),n)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},l:function(t,e,r){ht.varargs=r;try{var n=ht.getStreamFromFD(t);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=ht.get();return O[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ht.get(),lt.ioctl(n,e,o);default:tt("bad ioctl syscall "+e)}}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},x:function(t,e){try{return t=ht.getStr(t),ht.doStat(lt.lstat,t,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},u:function(t,e,r){try{return e=ht.getStr(e),e=ht.calculateAt(t,e),"/"===(e=ot.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),lt.mkdir(e,r,0),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},w:function(t,e,r,n){try{e=ht.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=ht.calculateAt(t,e,i),ht.doStat(o?lt.lstat:lt.stat,e,r)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},i:function(t,e,r,n){ht.varargs=n;try{e=ht.getStr(e),e=ht.calculateAt(t,e);var o=n?ht.get():0;return lt.open(e,r,o).fd}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},t:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e),n<=0)return-28;var o=lt.readlink(e),i=Math.min(n,N(o)),a=A[r+i];return L(o,r,n+1),A[r+i]=a,i}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},s:function(t){try{return t=ht.getStr(t),lt.rmdir(t),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},y:function(t,e){try{return t=ht.getStr(t),ht.doStat(lt.stat,t,e)}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},r:function(t,e,r){try{return e=ht.getStr(e),e=ht.calculateAt(t,e),0===r?lt.unlink(e):512===r?lt.rmdir(e):tt("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},q:function(t,e,r,n){try{if(e=ht.getStr(e),e=ht.calculateAt(t,e,!0),r){var o=O[r>>2],i=O[r+4>>2];a=1e3*o+i/1e6,s=1e3*(o=O[(r+=8)>>2])+(i=O[r+4>>2])/1e6}else var a=Date.now(),s=a;return lt.utime(e,a,s),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return-t.errno}},j:function(){return Date.now()},C:function(){return!0},a:function(){tt("")},A:function(t,e,r){x.copyWithin(t,e,e+r)},e:function(t){var e,r,n=x.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ft(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},m:function(t,e){var r=0;return dt().forEach((function(n,o){var i=e+r;T[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)A[e++>>0]=t.charCodeAt(n);r||(A[e>>0]=0)}(n,i),r+=n.length+1})),0},o:function(t,e){var r=dt();T[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),T[e>>2]=n,0},f:function(t){kt(t)},c:function(t){try{var e=ht.getStreamFromFD(t);return lt.close(e),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},p:function(t,e){try{var r=ht.getStreamFromFD(t),n=r.tty?2:lt.isDir(r.mode)?3:lt.isLink(r.mode)?7:4;return A[e>>0]=n,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},h:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=T[e>>2],s=T[e+4>>2];e+=8;var u=lt.read(t,A,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(ht.getStreamFromFD(t),e,r);return O[n>>2]=o,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},n:function(t,e,r,n,o){try{var i=(u=r)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=ht.getStreamFromFD(t);return lt.llseek(a,i,n),Y=[a.position>>>0,(W=a.position,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],O[o>>2]=Y[0],O[o+4>>2]=Y[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}var s,u},g:function(t,e,r,n){try{var o=function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=T[e>>2],s=T[e+4>>2];e+=8;var u=lt.write(t,A,a,s,n);if(u<0)return-1;o+=u}return o}(ht.getStreamFromFD(t),e,r);return T[n>>2]=o,0}catch(t){if(void 0===lt||!(t instanceof lt.ErrnoError))throw t;return t.errno}},F:function(t){At(t)}},wt=(function(){var t={a:yt};function e(t,e){var r,n=t.exports;i.asm=n,M((E=i.asm.G).buffer),i.asm.K,r=i.asm.H,H.unshift(r),J()}function r(t){e(t.instance)}function n(e){return(y||!v&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return rt($)})):fetch($,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+$+"'";return t.arrayBuffer()})).catch((function(){return rt($)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),tt(t)}))}if(Q(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){return b("Module.instantiateWasm callback failed with error: "+t),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||et($)||_||"function"!=typeof fetch?n(r):fetch($,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.H).apply(null,arguments)},i._main=function(){return(i._main=i.asm.I).apply(null,arguments)},i.___errno_location=function(){return(wt=i.___errno_location=i.asm.J).apply(null,arguments)}),bt=i.stackAlloc=function(){return(bt=i.stackAlloc=i.asm.L).apply(null,arguments)};function Et(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Ct(t){var e=i._main;(t=t||[]).unshift(d);var r=t.length,n=bt(4*(r+1)),o=n>>2;t.forEach((t=>{O[o++]=function(t){var e=N(t)+1,r=bt(e);return I(t,A,r,e),r}(t)})),O[o]=0;try{var a=e(r,n);return kt(a),a}catch(t){return function(t){if(t instanceof Et||"unwind"==t)return F;m(1,t)}(t)}}function Ft(t){function r(){Dt||(Dt=!0,i.calledRun=!0,P||(i.noFSInit||lt.init.initialized||lt.init(),lt.ignorePermissions=!1,at.init(),nt(H),nt(z),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),xt&&Ct(t),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),V.unshift(t);var t;nt(V)}()))}t=t||p,K>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),U.unshift(t);var t;nt(U)}(),K>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}function kt(t,e){F=t,At(t)}function At(t){F=t,G()||(i.onExit&&i.onExit(t),P=!0),m(t,new Et(t))}if(i.FS=lt,Z=function t(){Dt||Ft(),Dt||(Z=t)},i.run=Ft,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var xt=!0;return i.noInitialRun&&(xt=!1),Ft(),t.ready});t.exports=o},7757:(t,e,r)=>{t.exports=r(5666)},4277:t=>{"use strict";t.exports=({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}},382:(t,e,r)=>{if("undefined"!=typeof SHARED_CONFIG)r.p=SHARED_CONFIG.url_base.cdn+"/";else{var n=r(1017).resolve;r.p=n(__dirname)+"/"}},9846:t=>{"use strict";t.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},4601:(t,e,r)=>{"use strict";var n;try{throw new Error}catch(t){n=t}var o=r(679),i=r(7824);function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new i(16),this._normalQueue=new i(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=o}function s(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},a.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout((function(){t(e)}),0);else try{this._schedule((function(){t(e)}))}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},a.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},a.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},a.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,t.exports.firstLineError=n},3635:t=>{"use strict";t.exports=function(t,e,r,n){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(i),l=new t(e);l._propagateFrom(this,1);var h=this._target();if(l._setBoundTo(c),c instanceof t){var f={promiseRejectionQueued:!1,promise:l,target:h,bindingPromise:c};h._then(e,a,void 0,l,f),c._then(s,u,void 0,l,f),l._setOnCancel(c)}else l._resolveCallback(h);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},3786:(t,e,r)=>{"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var o=r(7502)();o.noConflict=function(){try{Promise===o&&(Promise=n)}catch(t){}return o},t.exports=o},2293:(t,e,r)=>{"use strict";var n=Object.create;if(n){var o=n(null),i=n(null);o[" size"]=i[" size"]=0}t.exports=function(t){var e,n,a=r(5942),s=a.canEvaluate,u=a.isIdentifier,c=function(t){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,t))(f)},l=function(t){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",t))},h=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!u(t))return null;if(n=e(t),r[t]=n,r[" size"]++,r[" size"]>512){for(var o=Object.keys(r),i=0;i<256;++i)delete r[o[i]];r[" size"]=o.length-256}}return n};function f(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var o="Object "+a.classString(e)+" has no method '"+a.toString(r)+"'";throw new t.TypeError(o)}return n}function p(t){return f(t,this.pop()).apply(t,this)}function d(t){return t[this]}function m(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return h(t,c,o)},n=function(t){return h(t,l,i)},t.prototype.call=function(t){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),o=1;o<r;++o)n[o-1]=arguments[o];if(s){var i=e(t);if(null!==i)return this._then(i,void 0,void 0,n,void 0)}return n.push(t),this._then(p,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=m;else if(s){var r=n(t);e=null!==r?r:d}else e=d;return this._then(e,void 0,void 0,t,void 0)}}},1735:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i=r(5942),a=i.tryCatch,s=i.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},9976:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(5942),n=r(9571).keys,o=e.tryCatch,i=e.errorObj;return function(r,a,s){return function(u){var c=s._boundValue();t:for(var l=0;l<r.length;++l){var h=r[l];if(h===Error||null!=h&&h.prototype instanceof Error){if(u instanceof h)return o(a).call(c,u)}else if("function"==typeof h){var f=o(h).call(c,u);if(f===i)return f;if(f)return o(a).call(c,u)}else if(e.isObject(u)){for(var p=n(h),d=0;d<p.length;++d){var m=p[d];if(h[m]!=u[m])continue t}return o(a).call(c,u)}}return t}}}},5910:t=>{"use strict";t.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function o(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},461:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i,a,s,u,c=t._async,l=r(7621).Warning,h=r(5942),f=r(9571),p=h.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,m=/\((?:timers\.js):\d+:\d+\)/,v=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,_=null,D=!1,y=!(0==h.env("BLUEBIRD_DEBUG")||!h.env("BLUEBIRD_DEBUG")&&"development"!==h.env("NODE_ENV")),w=!(0==h.env("BLUEBIRD_WARNINGS")||!y&&!h.env("BLUEBIRD_WARNINGS")),b=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!y&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}u=function(t){e.push(t),setTimeout(r,1)},f.defineProperty(t,"_unhandledRejectionCheck",{value:r}),f.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),u(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){W("rejectionHandled",i,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),W("unhandledRejection",a,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return V(t,e,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=h.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();i=h.contextBind(r,e)};var C=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!et.longStackTraces&&K()){var r=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,o=t.prototype._dereferenceTrace;et.longStackTraces=!0,C=function(){if(c.haveItemsQueued()&&!et.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=r,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=o,e.deactivateLongStackTraces(),et.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=H,t.prototype._dereferenceTrace=z,e.activateLongStackTraces()}},t.hasLongStackTraces=function(){return et.longStackTraces&&K()};var F={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},k=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return f.defineProperty(n,"promise",{value:r.promise}),f.defineProperty(n,"reason",{value:r.reason}),t(F[e],n)}}if("function"==typeof Event){e=new Event("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,f.defineProperty(n,"promise",{value:r.promise}),f.defineProperty(n,"reason",{value:r.reason}),t(F[e],n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(F[e],n)}}catch(t){}return function(){return!1}}(),A=h.isNode?function(){return process.emit.apply(process,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function x(t,e){return{promise:e}}var S={promiseCreated:x,promiseFulfilled:x,promiseRejected:x,promiseResolved:x,promiseCancelled:x,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:x},O=function(t){var e=!1;try{e=A.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var r=!1;try{r=k(t,S[t].apply(null,arguments))}catch(t){c.throwLater(t),r=!0}return r||e};function T(){return!1}function P(t,e,r){var n=this;try{t(e,r,(function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+h.toString(t));n._attachCancellationCallback(t)}))}catch(t){return t}}function R(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function B(){return this._onCancelField}function j(t){this._onCancelField=t}function I(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&C()),"warnings"in e){var r=e.warnings;et.warnings=!!r,E=et.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!et.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=I,t.prototype._propagateFrom=L,t.prototype._onCancel=B,t.prototype._setOnCancel=j,t.prototype._attachCancellationCallback=R,t.prototype._execute=P,N=L,et.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!et.monitoring?(et.monitoring=!0,t.prototype._fireEvent=O):!e.monitoring&&et.monitoring&&(et.monitoring=!1,t.prototype._fireEvent=T)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var i=et.asyncHooks,a=!!e.asyncHooks;i!==a&&(et.asyncHooks=a,a?n():o())}return t},t.prototype._fireEvent=T,t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(t){},t.prototype._attachCancellationCallback=function(t){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var N=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function M(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new J(this._peekContext())}function H(t,e){if(p(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=$(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function V(e,r,n){if(et.warnings){var o,i=new l(e);if(r)n._attachExtraTrace(i);else if(et.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(i);else{var a=$(i);i.stack=a.message+"\n"+a.stack.join("\n")}O("warning",i)||q(i,"",!0)}}function G(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],o=" (No stack trace)"===n||g.test(n),i=o&&X(n);o&&!i&&(D&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function $(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||g.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:G(e)}}function q(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var o=t.stack;n=e+_(o,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function W(t,e,r,n){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){c.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||o||q(r,"Unhandled rejection "):O(t,n)}function Y(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():h.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){var e=41;if(t.length<e)return t;return t.substr(0,e-3)+"..."}(e)+">, no stack trace)"}function K(){return"function"==typeof tt}var X=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match(Z);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function J(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);tt(this,J),e>32&&this.uncycle()}h.inherits(J,Error),e.CapturedTrace=J,J.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,o=this;void 0!==o;++n)e.push(o),o=o._parent;for(n=(t=this._length=n)-1;n>=0;--n){var i=e[n].stack;void 0===r[i]&&(r[i]=n)}for(n=0;n<t;++n){var a=r[e[n].stack];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var u=s._length+1,c=n-2;c>=0;--c)e[c]._length=u,u++;return}}}},J.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=$(t),r=e.message,n=[e.stack],o=this;void 0!==o;)n.push(G(o.stack.split("\n"))),o=o._parent;!function(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],o=e.length-1,i=e[o],a=-1,s=n.length-1;s>=0;--s)if(n[s]===i){a=s;break}for(s=a;s>=0;--s){var u=n[s];if(e[o]!==u)break;e.pop(),o--}e=n}}(n),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(n),h.notEnumerableProp(t,"stack",function(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var tt=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():Y(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=t,_=e;var r=Error.captureStackTrace;return X=function(t){return d.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,o=new Error;if("string"==typeof o.stack&&o.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,_=e,D=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return!("stack"in o)&&n&&"number"==typeof Error.stackTraceLimit?(g=t,_=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}):(_=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Y(e):e.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},h.isNode&&process.stderr.isTTY?s=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var et={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return b&&t.longStackTraces(),{asyncHooks:function(){return et.asyncHooks},longStackTraces:function(){return et.longStackTraces},warnings:function(){return et.warnings},cancellation:function(){return et.cancellation},monitoring:function(){return et.monitoring},propagateFromFunction:function(){return N},boundValueFunction:function(){return M},checkForgottenReturns:function(t,e,r,n,o){if(void 0===t&&null!==e&&E){if(void 0!==o&&o._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=G(s),c=u.length-1;c>=0;--c){var l=u[c];if(!m.test(l)){var h=l.match(v);h&&(i="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(u.length>0){var f=u[0];for(c=0;c<s.length;++c)if(s[c]===f){c>0&&(a="\n"+s[c-1]);break}}}var p="a promise was created in a "+r+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(p,!0,e)}},setBounds:function(t,e){if(K()){for(var r,n,o=(t.stack||"").split("\n"),i=(e.stack||"").split("\n"),a=-1,s=-1,u=0;u<o.length;++u){if(c=Q(o[u])){r=c.fileName,a=c.line;break}}for(u=0;u<i.length;++u){var c;if(c=Q(i[u])){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(X=function(t){if(d.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}},warn:V,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),V(r)},CapturedTrace:J,fireDomEvent:k,fireGlobalEvent:A}}},5632:t=>{"use strict";t.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var o=function(){return n};return this.caught(r,o)}}},6574:t=>{"use strict";t.exports=function(t,e){var r=t.reduce,n=t.all;function o(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(o,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(o,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},7621:(t,e,r)=>{"use strict";var n,o,i=r(9571),a=i.freeze,s=r(5942),u=s.inherits,c=s.notEnumerableProp;function l(t,e){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var h=l("Warning","warning"),f=l("CancellationError","cancellation error"),p=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{n=TypeError,o=RangeError}catch(t){n=l("TypeError","type error"),o=l("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<m.length;++v)"function"==typeof Array.prototype[m[v]]&&(d.prototype[m[v]]=Array.prototype[m[v]]);i.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;function _(t){if(!(this instanceof _))return new _(t);c(this,"name","OperationalError"),c(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(c(this,"message",t.message),c(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",o=n.split("\n"),i=0;i<o.length;++i)o[i]=t+o[i];e+=(n=o.join("\n"))+"\n"}return g--,e},u(_,Error);var D=Error.__BluebirdErrorTypes__;D||(D=a({CancellationError:f,TimeoutError:p,OperationalError:_,RejectionError:_,AggregateError:d}),i.defineProperty(Error,"__BluebirdErrorTypes__",{value:D,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:o,CancellationError:D.CancellationError,OperationalError:D.OperationalError,TimeoutError:D.TimeoutError,AggregateError:D.AggregateError,Warning:h}},9571:t=>{var e=function(){"use strict";return void 0===this}();if(e)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:e,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var r={}.hasOwnProperty,n={}.toString,o={}.constructor.prototype,i=function(t){var e=[];for(var n in t)r.call(t,n)&&e.push(n);return e};t.exports={isArray:function(t){try{return"[object Array]"===n.call(t)}catch(t){return!1}},keys:i,names:i,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:e,propertyIsWritable:function(){return!0}}}},6777:t=>{"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,o){return r(t,n,o,e)}}},7707:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=t.CancellationError,a=o.errorObj,s=r(9976)(n);function u(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function c(t){this.finallyHandler=t}function l(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function h(){return p.call(this,this.promise._target()._settledValue())}function f(t){if(!l(this,t))return a.e=t,a}function p(r){var o=this.promise,s=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?s.call(o._boundValue()):s.call(o._boundValue(),r);if(u===n)return u;if(void 0!==u){o._setReturnedNonUndefined();var p=e(u,o);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new i("late cancellation observer");return o._attachExtraTrace(d),a.e=d,a}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(h,f,void 0,this,void 0)}}}return o.isRejected()?(l(this),a.e=r,a):(l(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){l(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,p);var n,i=new Array(r-1),a=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!o.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+o.classString(u)));i[a++]=u}i.length=a;var c=arguments[n];return this._passThrough(s(i,c,this),1,void 0,p)},u}},687:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(7621).TypeError,u=r(5942),c=u.errorObj,l=u.tryCatch,h=[];function f(e,r,o,i){if(a.cancellation()){var s=new t(n),u=this._finallyPromise=new t(n);this._promise=s.lastly((function(){return u})),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new t(n))._captureStackTrace()}this._stack=i,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(f,i),f.prototype._isResolved=function(){return null===this._promise},f.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},f.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=l(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=l(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},f.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=l(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},f.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=l(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},f.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},f.prototype.promise=function(){return this._promise},f.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},f.prototype._continue=function(e){var r=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var i=o(n,this._promise);if(i instanceof t||(i=function(e,r,n){for(var i=0;i<r.length;++i){n._pushContext();var a=l(r[i])(e);if(n._popContext(),a===c){n._pushContext();var s=t.reject(c.e);return n._popContext(),s}var u=o(a,n);if(u instanceof t)return u}return null}(i,this._yieldHandlers,this._promise),null!==i)){var a=(i=i._target())._bitField;0==(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!=(33554432&a)?t._async.invoke(this._promiseFulfilled,this,i._value()):0!=(16777216&a)?t._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=f,o=(new Error).stack;return function(){var e=t.apply(this,arguments),i=new n(void 0,void 0,r,o),a=i.promise();return i._generator=e,i._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new s("expecting a function but got "+u.classString(t));h.push(t)},t.spawn=function(r){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new f(r,this),o=n.promise();return n._run(t.spawn),o}}},7717:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a,s=r(5942),u=s.canEvaluate,c=s.tryCatch,l=s.errorObj;if(u){for(var h=function(t){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,t))},f=function(t){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,t))},p=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var o=r.join(" = ")+" = null;",a="var promise;\n"+r.map((function(t){return" \n promise = "+t+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "})).join("\n"),s=r.join(", "),u="Holder$"+e,h="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";return h=h.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,o).replace(/\[CancellationCode\]/g,a),new Function("tryCatch","errorObj","Promise","async",h)(c,l,t,i)},d=[],m=[],v=[],g=0;g<8;++g)d.push(p(g+1)),m.push(h(g+1)),v.push(f(g+1));a=function(t){this._reject(t)}}t.join=function(){var r,i=arguments.length-1;if(i>0&&"function"==typeof arguments[i]&&(r=arguments[i],i<=8&&u)){(b=new t(o))._captureStackTrace();for(var c=d[i-1],l=new c(r),h=m,f=0;f<i;++f){var p=n(arguments[f],b);if(p instanceof t){var g=(p=p._target())._bitField;0==(50397184&g)?(p._then(h[f],a,void 0,b,l),v[f](p,l),l.asyncNeeded=!1):0!=(33554432&g)?h[f].call(b,p._value(),l):0!=(16777216&g)?b._reject(p._reason()):b._cancel()}else h[f].call(b,p,l)}if(!b._isFateSealed()){if(l.asyncNeeded){var _=t._getContext();l.fn=s.contextBind(_,l.fn)}b._setAsyncGuaranteed(),b._setOnCancel(l)}return b}for(var D=arguments.length,y=new Array(D),w=0;w<D;++w)y[w]=arguments[w];r&&y.pop();var b=new e(y).promise();return void 0!==r?b.spread(r):b}}},6343:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=s.tryCatch,c=s.errorObj,l=t._async;function h(e,r,n,o){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=o===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],l.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var u=0;u<e.length;++u){var c=e[u];c instanceof t&&c.suppressUnhandledRejections()}}function f(e,r,o,i){if("function"!=typeof r)return n("expecting a function but got "+s.classString(r));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(o)));if("number"!=typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(o.concurrency)));a=o.concurrency}return new h(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,i).promise()}s.inherits(h,e),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(e,r){var n=this._values,i=this.length(),s=this._preservedValues,l=this._limit;if(r<0){if(n[r=-1*r-1]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var h=this._promise,f=this._callback,p=h._boundValue();h._pushContext();var d=u(f).call(p,e,r,i),m=h._popContext();if(a.checkForgottenReturns(d,m,null!==s?"Promise.filter":"Promise.map",h),d===c)return this._reject(d.e),!0;var v=o(d,this._promise);if(v instanceof t){var g=(v=v._target())._bitField;if(0==(50397184&g))return l>=1&&this._inFlight++,n[r]=v,v._proxy(this,-1*(r+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}return++this._totalResolved>=i&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},h.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),o=0,i=0;i<r;++i)t[i]&&(n[o++]=e[i]);n.length=o,this._resolve(n)},h.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return f(this,t,e,null)},t.map=function(t,e,r,n){return f(t,e,r,n)}}},6926:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a=r(5942),s=a.tryCatch;t.method=function(r){if("function"!=typeof r)throw new t.TypeError("expecting a function but got "+a.classString(r));return function(){var n=new t(e);n._captureStackTrace(),n._pushContext();var o=s(r).apply(this,arguments),a=n._popContext();return i.checkForgottenReturns(o,a,"Promise.method",n),n._resolveFromSyncValue(o),n}},t.attempt=t.try=function(r){if("function"!=typeof r)return o("expecting a function but got "+a.classString(r));var n,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];n=a.isArray(c)?s(r).apply(l,c):s(r).call(l,c)}else n=s(r)();var h=u._popContext();return i.checkForgottenReturns(n,h,"Promise.try",u),u._resolveFromSyncValue(n),u},t.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},1776:(t,e,r)=>{"use strict";var n=r(5942),o=n.maybeWrapAsError,i=r(7621).OperationalError,a=r(9571);var s=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}(t)){(e=new i(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=a.keys(t),o=0;o<r.length;++o){var u=r[o];s.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(r,n){if(null!==t){if(r){var i=u(o(r));t._attachExtraTrace(i),t._reject(i)}else if(e){for(var a=arguments.length,s=new Array(Math.max(a-1,0)),c=1;c<a;++c)s[c-1]=arguments[c];t._fulfill(s)}else t._fulfill(n);t=null}}}},1941:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(5942),n=t._async,o=e.tryCatch,i=e.errorObj;function a(t,r){if(!e.isArray(t))return s.call(this,t,r);var a=o(r).apply(this._boundValue(),[null].concat(t));a===i&&n.throwLater(a.e)}function s(t,e){var r=this._boundValue(),a=void 0===t?o(e).call(r,null):o(e).call(r,null,t);a===i&&n.throwLater(a.e)}function u(t,e){if(!t){var r=new Error(t+"");r.cause=t,t=r}var a=o(e).call(this._boundValue(),t);a===i&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var r=s;void 0!==e&&Object(e).spread&&(r=a),this._then(r,u,void 0,this,t)}return this}}},7502:(t,e,r)=>{"use strict";t.exports=function(){var e=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new P.PromiseInspection(this._target())},o=function(t){return P.reject(new g(t))};function i(){}var a={},s=r(5942);s.setReflectHandler(n);var u=function(){var t=process.domain;return void 0===t?null:t},c=function(){return{domain:u(),async:null}},l=s.isNode&&s.nodeSupportsAsyncResource?r(852).AsyncResource:null,h=function(){return{domain:u(),async:new l("Bluebird::Promise")}},f=s.isNode?c:function(){return null};s.notEnumerableProp(P,"_getContext",f);var p=r(9571),d=r(4601),m=new d;p.defineProperty(P,"_async",{value:m});var v=r(7621),g=P.TypeError=v.TypeError;P.RangeError=v.RangeError;var _=P.CancellationError=v.CancellationError;P.TimeoutError=v.TimeoutError,P.OperationalError=v.OperationalError,P.RejectionError=v.OperationalError,P.AggregateError=v.AggregateError;var D=function(){},y={},w={},b=r(1778)(P,D),E=r(1640)(P,D,b,o,i),C=r(5910)(P),F=C.create,k=r(461)(P,C,(function(){f=h,s.notEnumerableProp(P,"_getContext",h)}),(function(){f=c,s.notEnumerableProp(P,"_getContext",c)})),A=(k.CapturedTrace,r(7707)(P,b,w)),x=r(9976)(w),S=r(1776),O=s.errorObj,T=s.tryCatch;function P(t){t!==D&&function(t,e){if(null==t||t.constructor!==P)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new g("expecting a function but got "+s.classString(e))}(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function R(t){this.promise._resolveCallback(t)}function B(t){this.promise._rejectCallback(t,!1)}function j(t){var e=new P(D);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return P.prototype.toString=function(){return"[object Promise]"},P.prototype.caught=P.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var a=arguments[r];if(!s.isObject(a))return o("Catch statement predicate: expecting an object but got "+s.classString(a));n[i++]=a}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new g("The last argument to .catch() must be a function, got "+s.toString(t));return this.then(void 0,x(n,t,this))}return this.then(void 0,t)},P.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},P.prototype.then=function(t,e){if(k.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+s.classString(t);arguments.length>1&&(r+=", "+s.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},P.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},P.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+s.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},P.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},P.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},P.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},P.getNewLibraryCopy=t.exports,P.is=function(t){return t instanceof P},P.fromNode=P.fromCallback=function(t){var e=new P(D);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=T(t)(S(e,r));return n===O&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},P.all=function(t){return new E(t).promise()},P.cast=function(t){var e=b(t);return e instanceof P||((e=new P(D))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},P.resolve=P.fulfilled=P.cast,P.reject=P.rejected=function(t){var e=new P(D);return e._captureStackTrace(),e._rejectCallback(t,!0),e},P.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+s.classString(t));return m.setScheduler(t)},P.prototype._then=function(t,e,r,n,o){var i=void 0!==o,a=i?o:new P(D),u=this._target(),c=u._bitField;i||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=f();if(0!=(50397184&c)){var h,p,d=u._settlePromiseCtx;0!=(33554432&c)?(p=u._rejectionHandler0,h=t):0!=(16777216&c)?(p=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(d=u._settlePromiseLateCancellationObserver,p=new _("late cancellation observer"),u._attachExtraTrace(p),h=e),m.invoke(d,u,{handler:s.contextBind(l,h),promise:a,receiver:n,value:p})}else u._addCallbacks(t,e,a,n,l);return a},P.prototype._length=function(){return 65535&this._bitField},P.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},P.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},P.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},P.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},P.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},P.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},P.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},P.prototype._isFinal=function(){return(4194304&this._bitField)>0},P.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},P.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},P.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},P.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},P.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},P.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},P.prototype._promiseAt=function(t){return this[4*t-4+2]},P.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},P.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},P.prototype._boundValue=function(){},P.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,o=t._receiverAt(0);void 0===o&&(o=a),this._addCallbacks(e,r,n,o,null)},P.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=a),this._addCallbacks(r,n,o,i,null)},P.prototype._addCallbacks=function(t,e,r,n,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=s.contextBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=s.contextBind(o,e));else{var a=4*i-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=s.contextBind(o,t)),"function"==typeof e&&(this[a+1]=s.contextBind(o,e))}return this._setLength(i+1),i},P.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},P.prototype._resolveCallback=function(t,r){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(e(),!1);var n=b(t,this);if(!(n instanceof P))return this._fulfill(t);r&&this._propagateFrom(n,2);var o=n._target();if(o!==this){var i=o._bitField;if(0==(50397184&i)){var a=this._length();a>0&&o._migrateCallback0(this);for(var s=1;s<a;++s)o._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&i))this._fulfill(o._value());else if(0!=(16777216&i))this._reject(o._reason());else{var u=new _("late cancellation observer");o._attachExtraTrace(u),this._reject(u)}}else this._reject(e())}},P.prototype._rejectCallback=function(t,e,r){var n=s.ensureErrorObject(t),o=n===t;if(!o&&!r&&k.warnings()){var i="a promise was rejected with a non-error: "+s.classString(t);this._warn(i,!0)}this._attachExtraTrace(n,!!e&&o),this._reject(t)},P.prototype._resolveFromExecutor=function(t){if(t!==D){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,(function(t){e._resolveCallback(t)}),(function(t){e._rejectCallback(t,r)}));r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},P.prototype._settlePromiseFromHandler=function(t,e,r,n){var o=n._bitField;if(0==(65536&o)){var i;n._pushContext(),e===y?r&&"number"==typeof r.length?i=T(t).apply(this._boundValue(),r):(i=O).e=new g("cannot .spread() a non-array: "+s.classString(r)):i=T(t).call(e,r);var a=n._popContext();0==(65536&(o=n._bitField))&&(i===w?n._reject(r):i===O?n._rejectCallback(i.e,!1):(k.checkForgottenReturns(i,a,"",n,this),n._resolveCallback(i)))}},P.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},P.prototype._followee=function(){return this._rejectionHandler0},P.prototype._setFollowee=function(t){this._rejectionHandler0=t},P.prototype._settlePromise=function(t,e,r,o){var a=t instanceof P,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=t,T(e).call(r,o)===O&&t._reject(O.e)):e===n?t._fulfill(n.call(r)):r instanceof i?r._promiseCancelled(t):a||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof i?r._isResolved()||(0!=(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(u&&t._setAsyncGuaranteed(),0!=(33554432&s)?t._fulfill(o):t._reject(o))},P.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,o=t.value;"function"==typeof e?r instanceof P?this._settlePromiseFromHandler(e,n,o,r):e.call(n,o,r):r instanceof P&&r._reject(o)},P.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},P.prototype._settlePromise0=function(t,e,r){var n=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,o,e)},P.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},P.prototype._fulfill=function(t){var r=this._bitField;if(!((117506048&r)>>>16)){if(t===this){var n=e();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&r)>0&&(0!=(134217728&r)?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},P.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return m.fatalError(t,s.isNode);(65535&e)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},P.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},P.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,e)}},P.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},P.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&p.defineProperty(P.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),P.defer=P.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new P(D),resolve:R,reject:B}},s.notEnumerableProp(P,"_makeSelfResolutionError",e),r(6926)(P,D,b,o,k),r(3635)(P,D,b,k),r(1735)(P,E,o,k),r(5632)(P),r(1958)(P),r(7717)(P,E,b,D,m),P.Promise=P,P.version="3.7.2",r(2293)(P),r(687)(P,o,D,b,i,k),r(6343)(P,E,o,b,D,k),r(1941)(P),r(9346)(P,D),r(5733)(P,E,b,o),r(4648)(P,D,b,o),r(3609)(P,E,o,b,D,k),r(8615)(P,E,k),r(4488)(P,E,o),r(8418)(P,D,k),r(4525)(P,o,b,F,D,k),r(9846)(P),r(6574)(P,D),r(6777)(P,D),s.toFastProperties(P),s.toFastProperties(P.prototype),j({a:1}),j({b:2}),j({c:3}),j(1),j((function(){})),j(void 0),j(!1),j(new P(D)),k.setBounds(d.firstLineError,s.lastLineError),P}},1640:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i){var a=r(5942);a.isArray;function s(r){var n=this._promise=new t(e);r instanceof t&&(n._propagateFrom(r,3),r.suppressUnhandledRejections()),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,i){var s=n(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,i);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===i?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var c=o("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var o=this._promise,i=!1,a=null,s=0;s<r;++s){var u=n(e[s],o);a=u instanceof t?(u=u._target())._bitField:null,i?null!==a&&u.suppressUnhandledRejections():null!==a?0==(50397184&a)?(u._proxy(this,s),this._values[s]=u):i=0!=(33554432&a)?this._promiseFulfilled(u._value(),s):0!=(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(u,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},9346:(t,e,r)=>{"use strict";t.exports=function(t,e){var n={},o=r(5942),i=r(1776),a=o.withAppended,s=o.maybeWrapAsError,u=o.canEvaluate,c=r(7621).TypeError,l={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),f=function(t){return o.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!h.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function m(t,e,r){var n=o.getDataPropertyOrDefault(t,e+r,l);return!!n&&d(n)}function v(t,e,r,n){for(var i=o.inheritedDataKeys(t),a=[],s=0;s<i.length;++s){var u=i[s],l=t[u],h=n===f||f(u);"function"!=typeof l||d(l)||m(t,u,e)||!n(u,l,t,h)||a.push(u,l)}return function(t,e,r){for(var n=0;n<t.length;n+=2){var o=t[n];if(r.test(o))for(var i=o.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===i)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(a,e,r),a}var g;g=function(r,u,c,l,h,f){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(l)-1),d=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(n=t+1;n<=3;++n)e.push(n);return e}(p),m="string"==typeof r||u===n;function v(t){var e,r=(e=t,o.filledRange(e,"_arg","")).join(", "),n=t>0?", ":"";return(m?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",r).replace(", ",n)}var g="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",_="'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, "+f+"); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+v(d[e]);return t+=" \n default: \n var args = new Array(len + 1); \n var i = 0; \n for (var i = 0; i < len; ++i) { \n args[i] = arguments[i]; \n } \n args[i] = nodeback; \n [CodeForCall] \n break; \n ".replace("[CodeForCall]",m?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",g);return _=_.replace("Parameters",function(t){return o.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",_)(t,l,u,a,s,i,o.tryCatch,o.errorObj,o.notEnumerableProp,e)};var _=u?g:function(r,u,c,l,h,f){var p=function(){return this}(),d=r;function m(){var o=u;u===n&&(o=this);var c=new t(e);c._captureStackTrace();var l="string"==typeof d&&this!==p?this[d]:r,h=i(c,f);try{l.apply(o,a(arguments,h))}catch(t){c._rejectCallback(s(t),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof d&&(r=l),o.notEnumerableProp(m,"__isPromisified__",!0),m};function D(t,e,r,i,a){for(var s=new RegExp(e.replace(/([$])/,"\\$")+"$"),u=v(t,e,s,r),c=0,l=u.length;c<l;c+=2){var h=u[c],f=u[c+1],p=h+e;if(i===_)t[p]=_(h,n,h,f,e,a);else{var d=i(f,(function(){return _(h,n,h,f,e,a)}));o.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return o.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new c("expecting a function but got "+o.classString(t));if(d(t))return t;var r=function(t,e,r){return _(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return o.copyDescriptors(t,r,p),r},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var i=e.filter;"function"!=typeof i&&(i=f);var a=e.promisifier;if("function"!=typeof a&&(a=_),!o.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=o.inheritedDataKeys(t),u=0;u<s.length;++u){var l=t[s[u]];"constructor"!==s[u]&&o.isClass(l)&&(D(l.prototype,n,i,a,r),D(l,n,i,a,r))}return D(t,n,i,a,r)}}},5733:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i,a=r(5942),s=a.isObject,u=r(9571);"function"==typeof Map&&(i=Map);var c=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var o=new Array(2*n.size);return n.forEach(r,o),o}}();function l(t){var e,r=!1;if(void 0!==i&&t instanceof i)e=c(t),r=!0;else{var n=u.keys(t),o=n.length;e=new Array(2*o);for(var a=0;a<o;++a){var s=n[a];e[a]=t[s],e[a+o]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function h(e){var r,i=n(e);return s(i)?(r=i instanceof t?i._then(t.props,void 0,void 0,void 0,void 0):new l(i).promise(),i instanceof t&&r._propagateFrom(i,2),r):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(l,e),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new i,r=t.length/2|0,n=0;n<r;++n){var o=t[r+n],a=t[n];e.set(o,a)}return e}(this._values);else{r={};for(var n=this.length(),o=0,a=this.length();o<a;++o)r[this._values[o+n]]=this._values[o]}return this._resolve(r),!0}return!1},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return h(this)},t.props=function(t){return h(t)}}},7824:t=>{"use strict";function e(t){this._capacity=t,this._length=0,this._front=0}e.prototype._willBeOverCapacity=function(t){return this._capacity<t},e.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},e.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var o=this._front+n-3;this._checkCapacity(n);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=r,this._length=n},e.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},e.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,o){for(var i=0;i<o;++i)r[i+n]=t[i+e],t[i+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=e},4648:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o){var i=r(5942);function a(r,s){var u,c=n(r);if(c instanceof t)return(u=c).then((function(t){return a(t,u)}));if(null===(r=i.asArray(r)))return o("expecting an array or an iterable object but got "+i.classString(r));var l=new t(e);void 0!==s&&l._propagateFrom(s,3);for(var h=l._fulfill,f=l._reject,p=0,d=r.length;p<d;++p){var m=r[p];(void 0!==m||p in r)&&t.cast(m)._then(h,f,void 0,l,null)}return l}t.race=function(t){return a(t,void 0)},t.prototype.race=function(){return a(this,void 0)}}},3609:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=s.tryCatch;function c(e,r,n,o){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=o===i?Array(this._length):0===o?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function l(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function h(t,e,r,o){return"function"!=typeof e?n("expecting a function but got "+s.classString(e)):new c(t,e,r,o).promise()}function f(e){this.accum=e,this.array._gotAccum(e);var r=o(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(p,void 0,void 0,this,void 0)):p.call(this,r)}function p(e){var r,n=this.array,o=n._promise,i=u(n._fn);o._pushContext(),(r=void 0!==n._eachValues?i.call(o._boundValue(),e,this.index,this.length):i.call(o._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var s=o._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",o),r}s.inherits(c,e),c.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},c.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var r,n;this._values=e;var o=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var i=n;i<o;++i){var a=e[i];a instanceof t&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<o;++n){var s={accum:null,value:e[n],index:n,length:o,array:this};r=r._then(f,void 0,void 0,s,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(l,l,void 0,r,this)},t.prototype.reduce=function(t,e){return h(this,t,e,null)},t.reduce=function(t,e,r,n){return h(t,e,r,n)}}},679:(t,e,r)=>{"use strict";var n,o=r(5942),i=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,s=process.nextTick;n=o.isRecentNode?function(t){a.call(global,t)}:function(t){s.call(process,t)}}else if("function"==typeof i&&"function"==typeof i.resolve){var u=i.resolve();n=function(t){u.then(t)}}else n="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){t.classList.toggle("foo"),r=!1})).observe(n,e);return function(o){var i=new MutationObserver((function(){i.disconnect(),o()}));i.observe(t,e),r||(r=!0,n.classList.toggle("foo"))}}();t.exports=n},8615:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=t.PromiseInspection;function i(t){this.constructor$(t)}r(5942).inherits(i,e),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},t.allSettled=function(t){return new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},4488:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=r(7621).RangeError,a=r(7621).AggregateError,s=o.isArray,u={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(t),o=r.promise();return r.setHowMany(e),r.init(),o}o.inherits(c,e),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new i(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return l(t,e)},t.prototype.some=function(t){return l(this,t)},t._SomePromiseArray=c}},1958:t=>{"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},1778:(t,e,r)=>{"use strict";t.exports=function(t,e){var n=r(5942),o=n.errorObj,i=n.isObject;var a={}.hasOwnProperty;return function(r,s){if(i(r)){if(r instanceof t)return r;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return o.e=t,o}}(r);if(u===o){s&&s._pushContext();var c=t.reject(u.e);return s&&s._popContext(),c}if("function"==typeof u){if(function(t){try{return a.call(t,"_promise0")}catch(t){return!1}}(r)){c=new t(e);return r._then(c._fulfill,c._reject,void 0,c,null),c}return function(r,i,a){var s=new t(e),u=s;a&&a._pushContext();s._captureStackTrace(),a&&a._popContext();var c=!0,l=n.tryCatch(i).call(r,h,f);c=!1,s&&l===o&&(s._rejectCallback(l.e,!0,!0),s=null);function h(t){s&&(s._resolveCallback(t),s=null)}function f(t){s&&(s._rejectCallback(t,c,!0),s=null)}return u}(r,u,s)}}return r}}},8418:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var o=r(5942),i=t.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return u(+this).thenReturn(t)},u=t.delay=function(r,o){var i,u;return void 0!==o?(i=t.resolve(o)._then(s,null,null,r,void 0),n.cancellation()&&o instanceof t&&i._setOnCancel(o)):(i=new t(e),u=setTimeout((function(){i._fulfill()}),+r),n.cancellation()&&i._setOnCancel(new a(u)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};t.prototype.delay=function(t){return u(t,this)};function c(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var r,s;t=+t;var u=new a(setTimeout((function(){r.isPending()&&function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new i("operation timed out"):new i(e),o.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,s)}),t));return n.cancellation()?(s=this.then(),(r=s._then(c,l,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,l,void 0,u,void 0),r}}},4525:(t,e,r)=>{"use strict";t.exports=function(t,e,n,o,i,a){var s=r(5942),u=r(7621).TypeError,c=r(5942).inherits,l=s.errorObj,h=s.tryCatch,f={};function p(t){setTimeout((function(){throw t}),0)}function d(e,r){var o=0,a=e.length,s=new t(i);return function i(){if(o>=a)return s._fulfill();var u=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[o++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(i,p,null,null,null)}i()}(),s}function m(t,e,r){this._data=t,this._promise=e,this._context=r}function v(t,e,r){this.constructor$(t,e,r)}function g(t){return m.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function _(t){this.length=t,this.promise=null,this[t-1]=null}m.prototype.data=function(){return this._data},m.prototype.promise=function(){return this._promise},m.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():f},m.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==f?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},m.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(v,m),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},_.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var r=arguments.length;if(r<2)return e("you must pass at least 2 arguments to Promise.using");var o,i=arguments[r-1];if("function"!=typeof i)return e("expecting a function but got "+s.classString(i));var u=!0;2===r&&Array.isArray(arguments[0])?(r=(o=arguments[0]).length,u=!1):(o=arguments,r--);for(var c=new _(r),f=0;f<r;++f){var p=o[f];if(m.isDisposer(p)){var v=p;(p=p.promise())._setDisposable(v)}else{var D=n(p);D instanceof t&&(p=D._then(g,null,null,{resources:c,index:f},void 0))}c[f]=p}var y=new Array(c.length);for(f=0;f<y.length;++f)y[f]=t.resolve(c[f]).reflect();var w=t.all(y).then((function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return l.e=r.error(),l;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}b._pushContext(),i=h(i);var n=u?i.apply(void 0,t):i(t),o=b._popContext();return a.checkForgottenReturns(n,o,"Promise.using",b),n})),b=w.lastly((function(){var e=new t.PromiseInspection(w);return d(c,e)}));return c.promise=b,b._setOnCancel(c),b},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,o());throw new u}}},5942:function(t,e,r){"use strict";var n=r(9571),o="undefined"==typeof navigator,i={e:{}},a,s="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function u(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return i.e=t,i}}function c(t){return a=t,u}var l=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function f(t){return"function"==typeof t||"object"==typeof t&&null!==t}function p(t){return h(t)?new Error(F(t)):t}function d(t,e){var r,n=t.length,o=new Array(n+1);for(r=0;r<n;++r)o[r]=t[r];return o[r]=e,o}function m(t,e,r){if(!n.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var o=Object.getOwnPropertyDescriptor(t,e);return null!=o?null==o.get&&null==o.set?o.value:r:void 0}function v(t,e,r){if(h(t))return t;var o={value:r,configurable:!0,enumerable:!1,writable:!0};return n.defineProperty(t,e,o),t}function g(t){throw t}var _=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(n.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var o=[],i=Object.create(null);null!=t&&!e(t);){var a;try{a=r(t)}catch(t){return o}for(var s=0;s<a.length;++s){var u=a[s];if(!i[u]){i[u]=!0;var c=Object.getOwnPropertyDescriptor(t,u);null!=c&&null==c.get&&null==c.set&&o.push(u)}}t=n.getPrototypeOf(t)}return o}}var o={}.hasOwnProperty;return function(r){if(e(r))return[];var n=[];t:for(var i in r)if(o.call(r,i))n.push(i);else{for(var a=0;a<t.length;++a)if(o.call(t[a],i))continue t;n.push(i)}return n}}(),D=/this\s*\.\s*\S+\s*=/;function y(t){try{if("function"==typeof t){var e=n.names(t.prototype),r=n.isES5&&e.length>1,o=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=D.test(t+"")&&n.names(t).length>0;if(r||o||i)return!0}return!1}catch(t){return!1}}function w(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var b=/^[a-z$_][a-z$_0-9]*$/i;function E(t){return b.test(t)}function C(t,e,r){for(var n=new Array(t),o=0;o<t;++o)n[o]=e+o+r;return n}function F(t){try{return t+""}catch(t){return"[no string representation]"}}function k(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function A(t){try{v(t,"isOperational",!0)}catch(t){}}function x(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function S(t){return k(t)&&n.propertyIsWritable(t,"stack")}var O="stack"in new Error?function(t){return S(t)?t:new Error(F(t))}:function(t){if(S(t))return t;try{throw new Error(F(t))}catch(t){return t}};function T(t){return{}.toString.call(t)}function P(t,e,r){for(var o=n.names(t),i=0;i<o.length;++i){var a=o[i];if(r(a))try{n.defineProperty(e,a,n.getDescriptor(t,a))}catch(t){}}}var R=function(t){return n.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var B="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};R=function(t){return n.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?B(t):null}}var j="undefined"!=typeof process&&"[object process]"===T(process).toLowerCase(),I="undefined"!=typeof process&&void 0!==process.env,L;function N(t){return I?process.env[t]:void 0}function M(){if("function"==typeof Promise)try{if("[object Promise]"===T(new Promise((function(){}))))return Promise}catch(t){}}function U(t,e){if(null===t||"function"!=typeof e||e===L)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){for(var t=arguments.length+2,e=new Array(t),o=2;o<t;++o)e[o]=arguments[o-2];return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return e}var H={setReflectHandler:function(t){L=t},isClass:y,isIdentifier:E,inheritedDataKeys:_,getDataPropertyOrDefault:m,thrower:g,isArray:n.isArray,asArray:R,notEnumerableProp:v,isPrimitive:h,isObject:f,isError:k,canEvaluate:o,errorObj:i,tryCatch:c,inherits:l,withAppended:d,maybeWrapAsError:p,toFastProperties:w,filledRange:C,toString:F,canAttachTrace:S,ensureErrorObject:O,originatesFromRejection:x,markAsOriginatingFromRejection:A,classString:T,copyDescriptors:P,isNode:j,hasEnvVariables:I,env:N,global:s,getNativePromise:M,contextBind:U},z;H.isRecentNode=H.isNode&&(process.versions&&process.versions.node?z=process.versions.node.split(".").map(Number):process.version&&(z=process.version.split(".").map(Number)),0===z[0]&&z[1]>10||z[0]>0),H.nodeSupportsAsyncResource=H.isNode&&function(){var t=!1;try{t="function"==typeof r(852).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),H.isNode&&H.toFastProperties(process);try{throw new Error}catch(t){H.lastLineError=t}t.exports=H},6002:(t,e,r)=>{const n=r(8672),o=r(7056),i=r(8035),a=r(2138),s=r(5566),u=r(6835),c=r(1145);t.exports={Bar:n,SingleBar:n,MultiBar:o,Presets:i,Format:{Formatter:a,BarFormat:u,ValueFormat:s,TimeFormat:c}}},4958:t=>{t.exports=class{constructor(t,e,r){this.etaBufferLength=t||100,this.valueBuffer=[r],this.timeBuffer=[e],this.eta="0"}update(t,e,r){this.valueBuffer.push(e),this.timeBuffer.push(t),this.calculate(r-e)}getTime(){return this.eta}calculate(t){const e=this.valueBuffer.length,r=Math.min(this.etaBufferLength,e),n=(this.valueBuffer[e-1]-this.valueBuffer[e-r])/(this.timeBuffer[e-1]-this.timeBuffer[e-r]);this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);const o=Math.ceil(t/n/1e3);isNaN(o)?this.eta="NULL":isFinite(o)?this.eta=o>1e7?"INF":o<0?0:o:this.eta="INF"}}},6835:t=>{t.exports=function(t,e){const r=Math.round(t*e.barsize),n=e.barsize-r;return e.barCompleteString.substr(0,r)+e.barGlue+e.barIncompleteString.substr(0,n)}},1145:t=>{t.exports=function(t,e,r){function n(t){return r?r*Math.round(t/r):t}function o(t){return(e.autopaddingChar+t).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}},5566:t=>{t.exports=function(t,e,r){if(!0!==e.autopadding)return t;return"percentage"===r?(n=t,o=3,(e.autopaddingChar+n).slice(-o)):t;var n,o}},2138:(t,e,r)=>{const n=r(4223),o=r(5566),i=r(6835),a=r(1145);t.exports=function(t,e,r){let s=t.format;const u=t.formatTime||a,c=t.formatValue||o,l=t.formatBar||i,h=Math.floor(100*e.progress)+"",f=e.stopTime||Date.now(),p=Math.round((f-e.startTime)/1e3),d=Object.assign({},r,{bar:l(e.progress,t),percentage:c(h,t,"percentage"),total:c(e.total,t,"total"),value:c(e.value,t,"value"),eta:c(e.eta,t,"eta"),eta_formatted:u(e.eta,t,5),duration:c(p,t,"duration"),duration_formatted:u(p,t,1)});s=s.replace(/\{(\w+)\}/g,(function(t,e){return void 0!==d[e]?d[e]:t}));const m=Math.max(0,e.maxWidth-n(s)-2),v=Math.floor(m/2);switch(t.align){case"right":s=m>0?" ".repeat(m)+s:s;break;case"center":s=v>0?" ".repeat(v)+s:s}return s}},9251:(t,e,r)=>{const n=r(4958),o=r(3603),i=r(2138),a=r(2361);t.exports=class extends a{constructor(t){super(),this.options=t,this.terminal=this.options.terminal?this.options.terminal:new o(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new n(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter="function"==typeof this.options.format?this.options.format:i}render(t=!1){const e={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();const r=this.formatter(this.options,e,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=r)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(r),this.terminal.clearRight(),this.lastDrawnString=r,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,e,r){this.value=e||0,this.total=void 0!==t&&t>=0?t:100,this.startValue=e||0,this.payload=r||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new n(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,e)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,e={}){"number"==typeof t&&(this.value=t,this.eta.update(Date.now(),t,this.total));const r=("object"==typeof t?t:e)||{};this.emit("update",this.total,this.value);for(const t in r)this.payload[t]=r[t];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,e={}){"object"==typeof t?this.update(this.value+1,t):this.update(this.value+t,e)}getTotal(){return this.total}setTotal(t){void 0!==t&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}},7056:(t,e,r)=>{const n=r(3603),o=r(9251),i=r(8020),a=r(2361);t.exports=class extends a{constructor(t,e){super(),this.bars=[],this.options=i.parse(t,e),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new n(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,e,r,n={}){const i=new o(Object.assign({},this.options,n));return this.bars.push(i),!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,e,r),this.emit("start")),i}remove(t){const e=this.bars.indexOf(t);return!(e<0)&&(this.bars.splice(e,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find((t=>t.isActive))&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}},8020:t=>{function e(t,e){return null==t?e:t}t.exports={parse:function(t,r){const n={},o=Object.assign({},r,t);return n.throttleTime=1e3/e(o.fps,10),n.stream=e(o.stream,process.stderr),n.terminal=e(o.terminal,null),n.clearOnComplete=e(o.clearOnComplete,!1),n.stopOnComplete=e(o.stopOnComplete,!1),n.barsize=e(o.barsize,40),n.align=e(o.align,"left"),n.hideCursor=e(o.hideCursor,!1),n.linewrap=e(o.linewrap,!1),n.barCompleteString=new Array(n.barsize+1).join(o.barCompleteChar||"="),n.barIncompleteString=new Array(n.barsize+1).join(o.barIncompleteChar||"-"),n.barGlue=e(o.barGlue,""),n.format=e(o.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=e(o.formatTime,null),n.formatValue=e(o.formatValue,null),n.formatBar=e(o.formatBar,null),n.etaBufferLength=e(o.etaBuffer,10),n.etaAsynchronousUpdate=e(o.etaAsynchronousUpdate,!1),n.progressCalculationRelative=e(o.progressCalculationRelative,!1),n.synchronousUpdate=e(o.synchronousUpdate,!0),n.noTTYOutput=e(o.noTTYOutput,!1),n.notTTYSchedule=e(o.notTTYSchedule,2e3),n.emptyOnZero=e(o.emptyOnZero,!1),n.forceRedraw=e(o.forceRedraw,!1),n.autopadding=e(o.autopadding,!1),n.autopaddingChar=n.autopadding?e(o.autopaddingChar," "):"",n.gracefulExit=e(o.gracefulExit,!1),n}}},8672:(t,e,r)=>{const n=r(9251),o=r(8020);t.exports=class extends n{constructor(t,e){super(o.parse(t,e)),this.timer=null,this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,e){this.timer&&(super.update(t,e),this.options.synchronousUpdate&&this.lastRedraw+2*this.options.throttleTime<Date.now()&&this.render())}start(t,e,r){!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),super.start(t,e,r),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}},3603:(t,e,r)=>{const n=r(4521);t.exports=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("7")}cursorRestore(){this.stream.isTTY&&this.stream.write("8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("[?25h"):this.stream.write("[?25l"))}cursorTo(t=null,e=null){this.stream.isTTY&&n.cursorTo(this.stream,t,e)}cursorRelative(t=null,e=null){this.stream.isTTY&&(this.dy=this.dy+e,n.moveCursor(this.stream,t,e))}cursorRelativeReset(){this.stream.isTTY&&(n.moveCursor(this.stream,0,-this.dy),n.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&n.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&n.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&n.clearScreenDown(this.stream)}newline(){this.stream.write("\n"),this.dy++}write(t,e=!1){!0===this.linewrap&&!1===e?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("[?7h"):this.stream.write("[?7l"))}isTTY(){return!0===this.stream.isTTY}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}}},8035:(t,e,r)=>{const n=r(1953),o=r(6787),i=r(1090),a=r(135);t.exports={legacy:n,shades_classic:o,shades_grey:i,rect:a}},1953:t=>{t.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}},135:t=>{t.exports={format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}},6787:t=>{t.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}},1090:t=>{t.exports={format:" [90m{bar}[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"}},809:t=>{"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},9397:(t,e)=>{!function(t){var e=/\S/,r=/\"/g,n=/\n/g,o=/\r/g,i=/\\/g,a=/\u2028/,s=/\u2029/;function u(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function c(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function l(t,e,r){if(e.charAt(r)!=t.charAt(0))return!1;for(var n=1,o=t.length;n<o;n++)if(e.charAt(r+n)!=t.charAt(n))return!1;return!0}t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(r,n){var o=r.length,i=0,a=null,s=null,h="",f=[],p=!1,d=0,m=0,v="{{",g="}}";function _(){h.length>0&&(f.push({tag:"_t",text:new String(h)}),h="")}function D(r,n){if(_(),r&&function(){for(var r=!0,n=m;n<f.length;n++)if(!(r=t.tags[f[n].tag]<t.tags._v||"_t"==f[n].tag&&null===f[n].text.match(e)))return!1;return r}())for(var o,i=m;i<f.length;i++)f[i].text&&((o=f[i+1])&&">"==o.tag&&(o.indent=f[i].text.toString()),f.splice(i,1));else n||f.push({tag:"\n"});p=!1,m=f.length}function y(t,e){var r="="+g,n=t.indexOf(r,e),o=c(t.substring(t.indexOf("=",e)+1,n)).split(" ");return v=o[0],g=o[o.length-1],n+r.length-1}for(n&&(n=n.split(" "),v=n[0],g=n[1]),d=0;d<o;d++)0==i?l(v,r,d)?(--d,_(),i=1):"\n"==r.charAt(d)?D(p):h+=r.charAt(d):1==i?(d+=v.length-1,"="==(a=(s=t.tags[r.charAt(d+1)])?r.charAt(d+1):"_v")?(d=y(r,d),i=0):(s&&d++,i=2),p=d):l(g,r,d)?(f.push({tag:a,n:c(h),otag:v,ctag:g,i:"/"==a?p-v.length:d+g.length}),h="",d+=g.length-1,i=0,"{"==a&&("}}"==g?d++:u(f[f.length-1]))):h+=r.charAt(d);return D(p,!0),f};var h={_t:!0,"\n":!0,$:!0,"/":!0};function f(e,r,n,o){var i,a=[],s=null,u=null;for(i=n[n.length-1];e.length>0;){if(u=e.shift(),i&&"<"==i.tag&&!(u.tag in h))throw new Error("Illegal content in < super tag.");if(t.tags[u.tag]<=t.tags.$||p(u,o))n.push(u),u.nodes=f(e,u.tag,n,o);else{if("/"==u.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+u.n);if(s=n.pop(),u.n!=s.n&&!d(u.n,s.n,o))throw new Error("Nesting error: "+s.n+" vs. "+u.n);return s.end=u.i,a}"\n"==u.tag&&(u.last=0==e.length||"\n"==e[0].tag)}a.push(u)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return a}function p(t,e){for(var r=0,n=e.length;r<n;r++)if(e[r].o==t.n)return t.tag="#",!0}function d(t,e,r){for(var n=0,o=r.length;n<o;n++)if(r[n].c==t&&r[n].o==e)return!0}function m(t){var e=[];for(var r in t.partials)e.push('"'+g(r)+'":{name:"'+g(t.partials[r].name)+'", '+m(t.partials[r])+"}");return"partials: {"+e.join(",")+"}, subs: "+function(t){var e=[];for(var r in t)e.push('"'+g(r)+'": function(c,p,t,i) {'+t[r]+"}");return"{ "+e.join(",")+" }"}(t.subs)}t.stringify=function(e,r,n){return"{code: function (c,p,i) { "+t.wrapMain(e.code)+" },"+m(e)+"}"};var v=0;function g(t){return t.replace(i,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(o,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function _(t){return~t.indexOf(".")?"d":"f"}function D(t,e){var r="<"+(e.prefix||"")+t.n+v++;return e.partials[r]={name:t.n,partials:{}},e.code+='t.b(t.rp("'+g(r)+'",c,p,"'+(t.indent||"")+'"));',r}function y(t,e){e.code+="t.b(t.t(t."+_(t.n)+'("'+g(t.n)+'",c,p,0)));'}function w(t){return"t.b("+t+");"}t.generate=function(e,r,n){v=0;var o={code:"",subs:{},partials:{}};return t.walk(e,o),n.asString?this.stringify(o,r,n):this.makeTemplate(o,r,n)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,e,r){var n=this.makePartials(t);return n.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(n,e,this,r)},t.makePartials=function(t){var e,r={subs:{},partials:t.partials,name:t.name};for(e in r.partials)r.partials[e]=this.makePartials(r.partials[e]);for(e in t.subs)r.subs[e]=new Function("c","p","t","i",t.subs[e]);return r},t.codegen={"#":function(e,r){r.code+="if(t.s(t."+_(e.n)+'("'+g(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(e.nodes,r),r.code+="});c.pop();}"},"^":function(e,r){r.code+="if(!t.s(t."+_(e.n)+'("'+g(e.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(e.nodes,r),r.code+="};"},">":D,"<":function(e,r){var n={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,n);var o=r.partials[D(e,r)];o.subs=n.subs,o.partials=n.partials},$:function(e,r){var n={subs:{},code:"",partials:r.partials,prefix:e.n};t.walk(e.nodes,n),r.subs[e.n]=n.code,r.inPartial||(r.code+='t.sub("'+g(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=w('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+_(t.n)+'("'+g(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=w('"'+g(t.text)+'"')},"{":y,"&":y},t.walk=function(e,r){for(var n,o=0,i=e.length;o<i;o++)(n=t.codegen[e[o].tag])&&n(e[o],r);return r},t.parse=function(t,e,r){return f(t,0,[],(r=r||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,r){r=r||{};var n=t.cacheKey(e,r),o=this.cache[n];if(o){var i=o.partials;for(var a in i)delete i[a].instance;return o}return o=this.generate(this.parse(this.scan(e,r.delimiters),e,r),e,r),this.cache[n]=o}}(e)},5485:(t,e,r)=>{var n=r(9397);n.Template=r(2882).Template,n.template=n.Template,t.exports=n},2882:(t,e)=>{!function(t){function e(t,e,r){var n;return e&&"object"==typeof e&&(void 0!==e[t]?n=e[t]:r&&e.get&&"function"==typeof e.get&&(n=e.get(t))),n}t.Template=function(t,e,r,n){t=t||{},this.r=t.code||this.r,this.c=r,this.options=n||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,r){return""},v:function(t){return t=u(t),s.test(t)?t.replace(r,"&").replace(n,"<").replace(o,">").replace(i,"'").replace(a,"""):t},t:u,render:function(t,e,r){return this.ri([t],e||{},r)},ri:function(t,e,r){return this.r(t,e,r)},ep:function(t,e){var r=this.partials[t],n=e[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[t].base=n,r.subs){for(key in e.stackText||(e.stackText={}),r.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);n=function(t,e,r,n,o,i){function a(){}function s(){}var u;a.prototype=t,s.prototype=t.subs;var c=new a;for(u in c.subs=new s,c.subsText={},c.buf="",n=n||{},c.stackSubs=n,c.subsText=i,e)n[u]||(n[u]=e[u]);for(u in n)c.subs[u]=n[u];for(u in o=o||{},c.stackPartials=o,r)o[u]||(o[u]=r[u]);for(u in o)c.partials[u]=o[u];return c}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=n,n},rp:function(t,e,r,n){var o=this.ep(t,r);return o?o.ri(e,r,n):""},rs:function(t,e,r){var n=t[t.length-1];if(c(n))for(var o=0;o<n.length;o++)t.push(n[o]),r(t,e,this),t.pop();else r(t,e,this)},s:function(t,e,r,n,o,i,a){var s;return(!c(t)||0!==t.length)&&("function"==typeof t&&(t=this.ms(t,e,r,n,o,i,a)),s=!!t,!n&&s&&e&&e.push("object"==typeof t?t:e[e.length-1]),s)},d:function(t,r,n,o){var i,a=t.split("."),s=this.f(a[0],r,n,o),u=this.options.modelGet,l=null;if("."===t&&c(r[r.length-2]))s=r[r.length-1];else for(var h=1;h<a.length;h++)void 0!==(i=e(a[h],s,u))?(l=s,s=i):s="";return!(o&&!s)&&(o||"function"!=typeof s||(r.push(l),s=this.mv(s,r,n),r.pop()),s)},f:function(t,r,n,o){for(var i=!1,a=!1,s=this.options.modelGet,u=r.length-1;u>=0;u--)if(void 0!==(i=e(t,r[u],s))){a=!0;break}return a?(o||"function"!=typeof i||(i=this.mv(i,r,n)),i):!o&&""},ls:function(t,e,r,n,o){var i=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(u(t.call(e,n)),e,r)),this.options.delimiters=i,!1},ct:function(t,e,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,r)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,r,n,o,i,a){var s,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,r,s.substring(o,i),a)):c},mv:function(t,e,r){var n=e[e.length-1],o=t.call(n);return"function"==typeof o?this.ct(u(o.call(n)),n,r):o},sub:function(t,e,r,n){var o=this.subs[t];o&&(this.activeSub=t,o(e,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,o=/>/g,i=/\'/g,a=/\"/g,s=/[&<>\"\']/;function u(t){return String(null==t?"":t)}var c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},1903:t=>{"use strict";const e=t=>!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141));t.exports=e,t.exports.default=e},5405:(t,e,r)=>{var n=r(8887),o=r(6325),i=65536,a=15,s=f(5<<20),u=function(){try{return new Uint32Array(i)}catch(r){for(var t=new Array(i),e=0;e<i;e++)t[e]=0;return t}}(),c=407708164,l=2147483648,h={4:65536,5:262144,6:1048576,7:4194304};function f(t){try{return new Uint8Array(t)}catch(n){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e}}function p(t,e,r){if(void 0!==typeof t.buffer){if(Uint8Array.prototype.slice)return t.slice(e,r);var n=t.length;e=(e|=0)<0?Math.max(n+e,0):Math.min(e,n),r=(r=void 0===r?n:0|r)<0?Math.max(n+r,0):Math.min(r,n);for(var o=new Uint8Array(r-e),i=e,a=0;i<r;)o[a++]=t[i++];return o}return t.slice(e,r)}e.compressBound=function(t){return t+t/255+16|0},e.decompressBound=function(t){var e=0;if(o.readU32(t,e)!==c)throw new Error("invalid magic number");e+=4;var r=t[e++];if(64!=(192&r))throw new Error("incompatible descriptor version "+(192&r));var n=0!=(16&r),i=0!=(8&r),a=t[e++]>>4&7;if(void 0===h[a])throw new Error("invalid block size "+a);var s=h[a];if(i)return o.readU64(t,e);e++;for(var u=0;;){var f=o.readU32(t,e);if(e+=4,u+=f&l?f&=2147483647:s,0===f)return u;n&&(e+=4),e+=f}},e.makeBuffer=f,e.decompressBlock=function(t,e,r,n,o){var i,a,s,u,c;for(s=r+n;r<s;){var l=t[r++],h=l>>4;if(h>0){if(15===h)for(;h+=t[r],255===t[r++];);for(u=r+h;r<u;)e[o++]=t[r++]}if(r>=s)break;if(i=15&l,a=t[r++]|t[r++]<<8,15===i)for(;i+=t[r],255===t[r++];);for(u=(c=o-a)+(i+=4);c<u;)e[o++]=0|e[c++]}return o},e.compressBlock=function(t,e,r,n,i){var s,u,c,l,h,f,p,d;if(f=0,p=n+r,u=r,n>=13)for(var m=67;r+4<p-5;){var v=o.readU32(t,r),g=o.hashU32(v)>>>0;if(s=i[g=(g>>16^g)>>>0&65535]-1,i[g]=r+1,s<0||r-s>>>16>0||o.readU32(t,s)!==v)r+=m++>>6;else{for(m=67,h=r-u,l=r-s,s+=4,c=r+=4;r<p-5&&t[r]===t[s];)r++,s++;var _=(c=r-c)<15?c:15;if(h>=a){for(e[f++]=240+_,d=h-a;d>=255;d-=255)e[f++]=255;e[f++]=d}else e[f++]=(h<<4)+_;for(var D=0;D<h;D++)e[f++]=t[u+D];if(e[f++]=l,e[f++]=l>>8,c>=15){for(d=c-15;d>=255;d-=255)e[f++]=255;e[f++]=d}u=r}}if(0===u)return 0;if((h=p-u)>=a){for(e[f++]=240,d=h-a;d>=255;d-=255)e[f++]=255;e[f++]=d}else e[f++]=h<<4;for(r=u;r<p;)e[f++]=t[r++];return f},e.decompressFrame=function(t,r){var n,i,a,s,u=0,f=0;if(o.readU32(t,u)!==c)throw new Error("invalid magic number");if(u+=4,64!=(192&(s=t[u++])))throw new Error("incompatible descriptor version");n=0!=(16&s),i=0!=(4&s),a=0!=(8&s);var p=t[u++]>>4&7;if(void 0===h[p])throw new Error("invalid block size");for(a&&(u+=8),u++;;){var d;if(d=o.readU32(t,u),u+=4,0===d)break;if(n&&(u+=4),0!=(d&l)){d&=2147483647;for(var m=0;m<d;m++)r[f++]=t[u++]}else f=e.decompressBlock(t,r,u,d,f),u+=d}return i&&(u+=4),f},e.compressFrame=function(t,r){var a=0;o.writeU32(r,a,c),a+=4,r[a++]=64,r[a++]=112,r[a]=n.hash(0,r,4,a-4)>>8,a++;var l=h[7],f=t.length,p=0;for(!function(t){for(var e=0;e<i;e++)u[e]=0}();f>0;){var d,m=f>l?l:f;if((d=e.compressBlock(t,s,p,m,u))>m||0===d){o.writeU32(r,a,2147483648|m),a+=4;for(var v=p+m;p<v;)r[a++]=t[p++];f-=m}else{o.writeU32(r,a,d),a+=4;for(var g=0;g<d;)r[a++]=s[g++];p+=m,f-=m}}return o.writeU32(r,a,0),a+=4},e.decompress=function(t,r){var n,o;return void 0===r&&(r=e.decompressBound(t)),n=e.makeBuffer(r),(o=e.decompressFrame(t,n))!==r&&(n=p(n,0,o)),n},e.compress=function(t,r){var n,o;return void 0===r&&(r=e.compressBound(t.length)),n=e.makeBuffer(r),(o=e.compressFrame(t,n))!==r&&(n=p(n,0,o)),n}},6325:(t,e)=>{e.hashU32=function(t){return-1252372727^(t=(t=(t=(t=-949894596^(t=(t|=0)+2127912214+(t<<12)|0)^t>>>19)+374761393+(t<<5)|0)+-744332180^t<<9)+-42973499+(t<<3)|0)^t>>>16|0},e.readU64=function(t,e){var r=0;return r|=t[e++]<<0,r|=t[e++]<<8,r|=t[e++]<<16,r|=t[e++]<<24,r|=t[e++]<<32,r|=t[e++]<<40,r|=t[e++]<<48,r|=t[e++]<<56},e.readU32=function(t,e){var r=0;return r|=t[e++]<<0,r|=t[e++]<<8,r|=t[e++]<<16,r|=t[e++]<<24},e.writeU32=function(t,e,r){t[e++]=r>>0&255,t[e++]=r>>8&255,t[e++]=r>>16&255,t[e++]=r>>24&255},e.imul=function(t,e){var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16)|0}},8887:(t,e,r)=>{var n=r(6325),o=2654435761,i=2246822519,a=3266489917,s=374761393;function u(t,e){return(t|=0)>>>(32-(e|=0)|0)|t<<e|0}function c(t,e,r){return t|=0,e|=0,r|=0,0|n.imul(t>>>(32-e|0)|t<<e,r)}function l(t,e){return(t|=0)>>>(e|=0)^t|0}function h(t,e,r,o,i){return c(n.imul(e,r)+t,o,i)}function f(t,e,r){return c(t+n.imul(e[r],s),11,o)}function p(t,e,r){return h(t,n.readU32(e,r),a,17,668265263)}function d(t,e,r){return[h(t[0],n.readU32(e,r+0),i,13,o),h(t[1],n.readU32(e,r+4),i,13,o),h(t[2],n.readU32(e,r+8),i,13,o),h(t[3],n.readU32(e,r+12),i,13,o)]}e.hash=function(t,e,r,c){var h,m;if(m=c,c>=16){for(h=[t+o+i,t+i,t,t-o];c>=16;)h=d(h,e,r),r+=16,c-=16;h=u(h[0],1)+u(h[1],7)+u(h[2],12)+u(h[3],18)+m}else h=t+s+c>>>0;for(;c>=4;)h=p(h,e,r),r+=4,c-=4;for(;c>0;)h=f(h,e,r),r++,c--;return(h=l(n.imul(l(n.imul(l(h,15),i),13),a),16))>>>0}},7475:(t,e,r)=>{var n=r(5485);t.exports=function(){var t=new n.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b("MEMORY {"),n.b("\n"+r),n.b(" FLASH (rx) : ORIGIN = "),n.b(n.v(n.f("flashStart",t,e,0))),n.b(", LENGTH = "),n.b(n.v(n.f("flashLength",t,e,0))),n.b("\n"+r),n.b(" RAM (rwx) : ORIGIN = "),n.b(n.v(n.f("ramStart",t,e,0))),n.b(", LENGTH = "),n.b(n.v(n.f("ramLength",t,e,0))),n.b("\n"+r),n.b("}"),n.b("\n"),n.b("\n"+r),n.b("ENTRY(_start);"),n.b("\n"),n.b("\n"+r),n.b("SECTIONS {"),n.b("\n"+r),n.b(" .eadk_app_info ORIGIN(FLASH) : {"),n.b("\n"+r),n.b(" LONG(0xDEC0BEBA);"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_api_level))"),n.b("\n"+r),n.b(" LONG(ADDR(.rodata.eadk_app_name) - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(SIZEOF(.rodata.eadk_app_icon));"),n.b("\n"+r),n.b(" LONG(ADDR(.rodata.eadk_app_icon) - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(_start - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(_eadk_app_end - ORIGIN(FLASH));"),n.b("\n"+r),n.b(" LONG(0xDEC0BEBA);"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .text : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" *(.text)"),n.b("\n"+r),n.b(" *(.text.*)"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata.eadk_app_name : {"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_app_name))"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata.eadk_app_icon : {"),n.b("\n"+r),n.b(" KEEP(*(.rodata.eadk_app_icon))"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .rodata : {"),n.b("\n"+r),n.b(" *(.rodata)"),n.b("\n"+r),n.b(" *(.rodata.*)"),n.b("\n"+r),n.b(" _eadk_app_end = .;"),n.b("\n"+r),n.b(" } >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .data : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" _data_section_start_flash = LOADADDR(.data);"),n.b("\n"+r),n.b(" _data_section_start_ram = .;"),n.b("\n"+r),n.b(" *(.data)"),n.b("\n"+r),n.b(" *(.data.*)"),n.b("\n"+r),n.b(" _data_section_end_ram = .;"),n.b("\n"+r),n.b(" } >RAM AT >FLASH"),n.b("\n"),n.b("\n"+r),n.b(" .bss : {"),n.b("\n"+r),n.b(" . = ALIGN(4);"),n.b("\n"+r),n.b(" _bss_section_start_ram = .;"),n.b("\n"+r),n.b(" *(.bss)"),n.b("\n"+r),n.b(" *(.bss.*)"),n.b("\n"+r),n.b(" _bss_section_end_ram = .;"),n.b("\n"+r),n.b(" } >RAM"),n.b("\n"),n.b("\n"+r),n.b(" .heap : {"),n.b("\n"+r),n.b(" _heap_start = .;"),n.b("\n"+r),n.b(" . = (ORIGIN(RAM) + LENGTH(RAM));"),n.b("\n"+r),n.b(" _heap_end = .;"),n.b("\n"+r),n.b(" } >RAM"),n.b("\n"+r),n.b("}"),n.b("\n"),n.b("\n"+r),n.b('ASSERT(SIZEOF(.eadk_app_info) == 32, "Missing api level. Please define a .rodata.eadk_api_level section.");'),n.b("\n"+r),n.b('ASSERT(SIZEOF(.rodata.eadk_app_name) > 0, "Missing app name. Please define a .rodata.eadk_app_name section.");'),n.b("\n"+r),n.b('ASSERT(SIZEOF(.rodata.eadk_app_icon) > 0, "Missing app icon. Please define a .rodata.eadk_app_icon section.");'),n.b("\n"),n.fl()},partials:{},subs:{}},'MEMORY {\n FLASH (rx) : ORIGIN = {{ flashStart }}, LENGTH = {{ flashLength }}\n RAM (rwx) : ORIGIN = {{ ramStart }}, LENGTH = {{ ramLength }}\n}\n\nENTRY(_start);\n\nSECTIONS {\n .eadk_app_info ORIGIN(FLASH) : {\n LONG(0xDEC0BEBA);\n KEEP(*(.rodata.eadk_api_level))\n LONG(ADDR(.rodata.eadk_app_name) - ORIGIN(FLASH));\n LONG(SIZEOF(.rodata.eadk_app_icon));\n LONG(ADDR(.rodata.eadk_app_icon) - ORIGIN(FLASH));\n LONG(_start - ORIGIN(FLASH));\n LONG(_eadk_app_end - ORIGIN(FLASH));\n LONG(0xDEC0BEBA);\n } >FLASH\n\n .text : {\n . = ALIGN(4);\n *(.text)\n *(.text.*)\n } >FLASH\n\n .rodata.eadk_app_name : {\n KEEP(*(.rodata.eadk_app_name))\n } >FLASH\n\n .rodata.eadk_app_icon : {\n KEEP(*(.rodata.eadk_app_icon))\n } >FLASH\n\n .rodata : {\n *(.rodata)\n *(.rodata.*)\n _eadk_app_end = .;\n } >FLASH\n\n .data : {\n . = ALIGN(4);\n _data_section_start_flash = LOADADDR(.data);\n _data_section_start_ram = .;\n *(.data)\n *(.data.*)\n _data_section_end_ram = .;\n } >RAM AT >FLASH\n\n .bss : {\n . = ALIGN(4);\n _bss_section_start_ram = .;\n *(.bss)\n *(.bss.*)\n _bss_section_end_ram = .;\n } >RAM\n\n .heap : {\n _heap_start = .;\n . = (ORIGIN(RAM) + LENGTH(RAM));\n _heap_end = .;\n } >RAM\n}\n\nASSERT(SIZEOF(.eadk_app_info) == 32, "Missing api level. Please define a .rodata.eadk_api_level section.");\nASSERT(SIZEOF(.rodata.eadk_app_name) > 0, "Missing app name. Please define a .rodata.eadk_app_name section.");\nASSERT(SIZEOF(.rodata.eadk_app_icon) > 0, "Missing app icon. Please define a .rodata.eadk_app_icon section.");\n',n);return t.render.apply(t,arguments)}},9983:(t,e,r)=>{"use strict";let n=r(7084),o=[function(){},function(t,e,r,n){if(n===e.length)throw new Error("Ran out of data");let o=e[n];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=255},function(t,e,r,n){if(n+1>=e.length)throw new Error("Ran out of data");let o=e[n];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=e[n+1]},function(t,e,r,n){if(n+2>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=255},function(t,e,r,n){if(n+3>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=e[n+3]}],i=[function(){},function(t,e,r,n){let o=e[0];t[r]=o,t[r+1]=o,t[r+2]=o,t[r+3]=n},function(t,e,r){let n=e[0];t[r]=n,t[r+1]=n,t[r+2]=n,t[r+3]=e[1]},function(t,e,r,n){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=n},function(t,e,r){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3]}];function a(t,e,r,n,i,a){let s=t.width,u=t.height,c=t.index;for(let t=0;t<u;t++)for(let u=0;u<s;u++){let s=r(u,t,c);o[n](e,i,s,a),a+=n}return a}function s(t,e,r,n,o,a){let s=t.width,u=t.height,c=t.index;for(let t=0;t<u;t++){for(let u=0;u<s;u++){let s=o.get(n),l=r(u,t,c);i[n](e,s,l,a)}o.resetAfterLine()}}e.dataToBitMap=function(t,e){let r,o,i=e.width,u=e.height,c=e.depth,l=e.bpp,h=e.interlace;8!==c&&(r=function(t,e){let r=[],n=0;function o(){if(n===t.length)throw new Error("Ran out of data");let o,i,a,s,u,c,l,h,f=t[n];switch(n++,e){default:throw new Error("unrecognised depth");case 16:l=t[n],n++,r.push((f<<8)+l);break;case 4:l=15&f,h=f>>4,r.push(h,l);break;case 2:u=3&f,c=f>>2&3,l=f>>4&3,h=f>>6&3,r.push(h,l,c,u);break;case 1:o=1&f,i=f>>1&1,a=f>>2&1,s=f>>3&1,u=f>>4&1,c=f>>5&1,l=f>>6&1,h=f>>7&1,r.push(h,l,c,u,s,a,i,o)}}return{get:function(t){for(;r.length<t;)o();let e=r.slice(0,t);return r=r.slice(t),e},resetAfterLine:function(){r.length=0},end:function(){if(n!==t.length)throw new Error("extra data found")}}}(t,c)),o=c<=8?Buffer.alloc(i*u*4):new Uint16Array(i*u*4);let f,p,d=Math.pow(2,c)-1,m=0;if(h)f=n.getImagePasses(i,u),p=n.getInterlaceIterator(i,u);else{let t=0;p=function(){let e=t;return t+=4,e},f=[{width:i,height:u}]}for(let e=0;e<f.length;e++)8===c?m=a(f[e],o,p,l,t,m):s(f[e],o,p,l,r,d);if(8===c){if(m!==t.length)throw new Error("extra data found")}else r.end();return o}},9027:(t,e,r)=>{"use strict";let n=r(3482);t.exports=function(t,e,r,o){let i=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(o.colorType);if(o.colorType===o.inputColorType){let e=function(){let t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256!==new Int16Array(t)[0]}();if(8===o.bitDepth||16===o.bitDepth&&e)return t}let a=16!==o.bitDepth?t:new Uint16Array(t.buffer),s=255,u=n.COLORTYPE_TO_BPP_MAP[o.inputColorType];4!==u||o.inputHasAlpha||(u=3);let c=n.COLORTYPE_TO_BPP_MAP[o.colorType];16===o.bitDepth&&(s=65535,c*=2);let l=Buffer.alloc(e*r*c),h=0,f=0,p=o.bgColor||{};function d(){let t,e,r,u=s;switch(o.inputColorType){case n.COLORTYPE_COLOR_ALPHA:u=a[h+3],t=a[h],e=a[h+1],r=a[h+2];break;case n.COLORTYPE_COLOR:t=a[h],e=a[h+1],r=a[h+2];break;case n.COLORTYPE_ALPHA:u=a[h+1],t=a[h],e=t,r=t;break;case n.COLORTYPE_GRAYSCALE:t=a[h],e=t,r=t;break;default:throw new Error("input color type:"+o.inputColorType+" is not supported at present")}return o.inputHasAlpha&&(i||(u/=s,t=Math.min(Math.max(Math.round((1-u)*p.red+u*t),0),s),e=Math.min(Math.max(Math.round((1-u)*p.green+u*e),0),s),r=Math.min(Math.max(Math.round((1-u)*p.blue+u*r),0),s))),{red:t,green:e,blue:r,alpha:u}}void 0===p.red&&(p.red=s),void 0===p.green&&(p.green=s),void 0===p.blue&&(p.blue=s);for(let t=0;t<r;t++)for(let t=0;t<e;t++){let t=d();switch(o.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===o.bitDepth?(l[f]=t.red,l[f+1]=t.green,l[f+2]=t.blue,i&&(l[f+3]=t.alpha)):(l.writeUInt16BE(t.red,f),l.writeUInt16BE(t.green,f+2),l.writeUInt16BE(t.blue,f+4),i&&l.writeUInt16BE(t.alpha,f+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;8===o.bitDepth?(l[f]=e,i&&(l[f+1]=t.alpha)):(l.writeUInt16BE(e,f),i&&l.writeUInt16BE(t.alpha,f+2));break}default:throw new Error("unrecognised color Type "+o.colorType)}h+=u,f+=c}return l}},8442:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=t.exports=function(){o.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n.inherits(i,o),i.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},i.prototype.write=function(t,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let r;return r=Buffer.isBuffer(t)?t:Buffer.from(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},i.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},i.prototype._processRead=function(t){this._reads.shift();let e=0,r=0,n=Buffer.alloc(t.length);for(;e<t.length;){let o=this._buffers[r++],i=Math.min(o.length,t.length-e);o.copy(n,e,0,i),e+=i,i!==o.length&&(this._buffers[--r]=o.slice(i))}r>0&&this._buffers.splice(0,r),this._buffered-=t.length,t.func.call(this,n)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else{if(!(this._buffered>=t.length))break;this._processRead(t)}}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}},3482:t=>{"use strict";t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},3500:t=>{"use strict";let e=[];!function(){for(let t=0;t<256;t++){let r=t;for(let t=0;t<8;t++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}}();let r=t.exports=function(){this._crc=-1};r.prototype.write=function(t){for(let r=0;r<t.length;r++)this._crc=e[255&(this._crc^t[r])]^this._crc>>>8;return!0},r.prototype.crc32=function(){return-1^this._crc},r.crc32=function(t){let r=-1;for(let n=0;n<t.length;n++)r=e[255&(r^t[n])]^r>>>8;return-1^r}},8876:(t,e,r)=>{"use strict";let n=r(6744);let o={0:function(t,e,r,n,o){for(let i=0;i<r;i++)n[o+i]=t[e+i]},1:function(t,e,r,n,o,i){for(let a=0;a<r;a++){let r=a>=i?t[e+a-i]:0,s=t[e+a]-r;n[o+a]=s}},2:function(t,e,r,n,o){for(let i=0;i<r;i++){let a=e>0?t[e+i-r]:0,s=t[e+i]-a;n[o+i]=s}},3:function(t,e,r,n,o,i){for(let a=0;a<r;a++){let s=a>=i?t[e+a-i]:0,u=e>0?t[e+a-r]:0,c=t[e+a]-(s+u>>1);n[o+a]=c}},4:function(t,e,r,o,i,a){for(let s=0;s<r;s++){let u=s>=a?t[e+s-a]:0,c=e>0?t[e+s-r]:0,l=e>0&&s>=a?t[e+s-(r+a)]:0,h=t[e+s]-n(u,c,l);o[i+s]=h}}},i={0:function(t,e,r){let n=0,o=e+r;for(let r=e;r<o;r++)n+=Math.abs(t[r]);return n},1:function(t,e,r,n){let o=0;for(let i=0;i<r;i++){let r=i>=n?t[e+i-n]:0,a=t[e+i]-r;o+=Math.abs(a)}return o},2:function(t,e,r){let n=0,o=e+r;for(let i=e;i<o;i++){let o=e>0?t[i-r]:0,a=t[i]-o;n+=Math.abs(a)}return n},3:function(t,e,r,n){let o=0;for(let i=0;i<r;i++){let a=i>=n?t[e+i-n]:0,s=e>0?t[e+i-r]:0,u=t[e+i]-(a+s>>1);o+=Math.abs(u)}return o},4:function(t,e,r,o){let i=0;for(let a=0;a<r;a++){let s=a>=o?t[e+a-o]:0,u=e>0?t[e+a-r]:0,c=e>0&&a>=o?t[e+a-(r+o)]:0,l=t[e+a]-n(s,u,c);i+=Math.abs(l)}return i}};t.exports=function(t,e,r,n,a){let s;if("filterType"in n&&-1!==n.filterType){if("number"!=typeof n.filterType)throw new Error("unrecognised filter types");s=[n.filterType]}else s=[0,1,2,3,4];16===n.bitDepth&&(a*=2);let u=e*a,c=0,l=0,h=Buffer.alloc((u+1)*r),f=s[0];for(let e=0;e<r;e++){if(s.length>1){let e=1/0;for(let r=0;r<s.length;r++){let n=i[s[r]](t,l,u,a);n<e&&(f=s[r],e=n)}}h[c]=f,c++,o[f](t,l,u,h,c,a),c+=u,l+=u}return h}},4603:(t,e,r)=>{"use strict";let n=r(3837),o=r(8442),i=r(2769),a=t.exports=function(t){o.call(this);let e=[],r=this;this._filter=new i(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){r.emit("complete",Buffer.concat(e))}}),this._filter.start()};n.inherits(a,o)},8692:(t,e,r)=>{"use strict";let n=r(33),o=r(2769);e.process=function(t,e){let r=[],i=new n(t);return new o(e,{read:i.read.bind(i),write:function(t){r.push(t)},complete:function(){}}).start(),i.process(),Buffer.concat(r)}},2769:(t,e,r)=>{"use strict";let n=r(7084),o=r(6744);function i(t,e,r){let n=t*e;return 8!==r&&(n=Math.ceil(n/(8/r))),n}let a=t.exports=function(t,e){let r=t.width,o=t.height,a=t.interlace,s=t.bpp,u=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],a){let t=n.getImagePasses(r,o);for(let e=0;e<t.length;e++)this._images.push({byteWidth:i(t[e].width,s,u),height:t[e].height,lineIndex:0})}else this._images.push({byteWidth:i(r,s,u),height:o,lineIndex:0});this._xComparison=8===u?s:16===u?2*s:1};a.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},a.prototype._unFilterType1=function(t,e,r){let n=this._xComparison,o=n-1;for(let i=0;i<r;i++){let r=t[1+i],a=i>o?e[i-n]:0;e[i]=r+a}},a.prototype._unFilterType2=function(t,e,r){let n=this._lastLine;for(let o=0;o<r;o++){let r=t[1+o],i=n?n[o]:0;e[o]=r+i}},a.prototype._unFilterType3=function(t,e,r){let n=this._xComparison,o=n-1,i=this._lastLine;for(let a=0;a<r;a++){let r=t[1+a],s=i?i[a]:0,u=a>o?e[a-n]:0,c=Math.floor((u+s)/2);e[a]=r+c}},a.prototype._unFilterType4=function(t,e,r){let n=this._xComparison,i=n-1,a=this._lastLine;for(let s=0;s<r;s++){let r=t[1+s],u=a?a[s]:0,c=s>i?e[s-n]:0,l=s>i&&a?a[s-n]:0,h=o(c,u,l);e[s]=r+h}},a.prototype._reverseFilterLine=function(t){let e,r=t[0],n=this._images[this._imageIndex],o=n.byteWidth;if(0===r)e=t.slice(1,o+1);else switch(e=Buffer.alloc(o),r){case 1:this._unFilterType1(t,e,o);break;case 2:this._unFilterType2(t,e,o);break;case 3:this._unFilterType3(t,e,o);break;case 4:this._unFilterType4(t,e,o);break;default:throw new Error("Unrecognised filter type - "+r)}this.write(e),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=e,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},8417:t=>{"use strict";t.exports=function(t,e,r=!1){let n=e.depth,o=e.width,i=e.height,a=e.colorType,s=e.transColor,u=e.palette,c=t;return 3===a?function(t,e,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=o[t[i]];if(!r)throw new Error("index "+t[i]+" not in palette");for(let t=0;t<4;t++)e[i+t]=r[t];i+=4}}(t,c,o,i,u):(s&&function(t,e,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=!1;if(1===o.length?o[0]===t[i]&&(r=!0):o[0]===t[i]&&o[1]===t[i+1]&&o[2]===t[i+2]&&(r=!0),r)for(let t=0;t<4;t++)e[i+t]=0;i+=4}}(t,c,o,i,s),8===n||r||(16===n&&(c=Buffer.alloc(o*i*4)),function(t,e,r,n,o){let i=Math.pow(2,o)-1,a=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++){for(let r=0;r<4;r++)e[a+r]=Math.floor(255*t[a+r]/i+.5);a+=4}}(t,c,o,i,n))),c}},7084:(t,e)=>{"use strict";let r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];e.getImagePasses=function(t,e){let n=[],o=t%8,i=e%8,a=(t-o)/8,s=(e-i)/8;for(let t=0;t<r.length;t++){let e=r[t],u=a*e.x.length,c=s*e.y.length;for(let t=0;t<e.x.length&&e.x[t]<o;t++)u++;for(let t=0;t<e.y.length&&e.y[t]<i;t++)c++;u>0&&c>0&&n.push({width:u,height:c,index:t})}return n},e.getInterlaceIterator=function(t){return function(e,n,o){let i=e%r[o].x.length,a=(e-i)/r[o].x.length*8+r[o].x[i],s=n%r[o].y.length;return 4*a+((n-s)/r[o].y.length*8+r[o].y[s])*t*4}}},6838:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=r(3482),a=r(9432),s=t.exports=function(t){o.call(this);let e=t||{};this._packer=new a(e),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,o),s.prototype.pack=function(t,e,r,n){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,r)),n&&this.emit("data",this._packer.packGAMA(n));let o=this._packer.filterData(t,e,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}},8360:(t,e,r)=>{"use strict";let n=!0,o=r(9796);o.deflateSync||(n=!1);let i=r(3482),a=r(9432);t.exports=function(t,e){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r=new a(e||{}),s=[];s.push(Buffer.from(i.PNG_SIGNATURE)),s.push(r.packIHDR(t.width,t.height)),t.gamma&&s.push(r.packGAMA(t.gamma));let u=r.filterData(t.data,t.width,t.height),c=o.deflateSync(u,r.getDeflateOptions());if(u=null,!c||!c.length)throw new Error("bad png - invalid compressed data response");return s.push(r.packIDAT(c)),s.push(r.packIEND()),Buffer.concat(s)}},9432:(t,e,r)=>{"use strict";let n=r(3482),o=r(3500),i=r(9027),a=r(8876),s=r(9796),u=t.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||s.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:n.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.colorType))throw new Error("option color type:"+t.colorType+" is not supported at present");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw new Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};u.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},u.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},u.prototype.filterData=function(t,e,r){let o=i(t,e,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return a(o,e,r,this._options,s)},u.prototype._packChunk=function(t,e){let r=e?e.length:0,n=Buffer.alloc(r+12);return n.writeUInt32BE(r,0),n.writeUInt32BE(t,4),e&&e.copy(n,8),n.writeInt32BE(o.crc32(n.slice(4,n.length-4)),n.length-4),n},u.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,e)},u.prototype.packIHDR=function(t,e){let r=Buffer.alloc(13);return r.writeUInt32BE(t,0),r.writeUInt32BE(e,4),r[8]=this._options.bitDepth,r[9]=this._options.colorType,r[10]=0,r[11]=0,r[12]=0,this._packChunk(n.TYPE_IHDR,r)},u.prototype.packIDAT=function(t){return this._packChunk(n.TYPE_IDAT,t)},u.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}},6744:t=>{"use strict";t.exports=function(t,e,r){let n=t+e-r,o=Math.abs(n-t),i=Math.abs(n-e),a=Math.abs(n-r);return o<=i&&o<=a?t:i<=a?e:r}},7900:(t,e,r)=>{"use strict";let n=r(3837),o=r(9796),i=r(8442),a=r(4603),s=r(8550),u=r(9983),c=r(8417),l=t.exports=function(t){i.call(this),this._parser=new s(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};n.inherits(l,i),l.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",(function(){}))),this.errord=!0},l.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=o.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,e=Math.max(t,o.Z_MIN_CHUNK);this._inflate=o.createInflate({chunkSize:e});let r=t,n=this.emit.bind(this,"error");this._inflate.on("error",(function(t){r&&n(t)})),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){r&&(t.length>r&&(t=t.slice(0,r)),r-=t.length,i(t))})),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},l.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new a(this._bitmapInfo)},l.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},l.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},l.prototype._simpleTransparency=function(){this._metaData.alpha=!0},l.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},l.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},l.prototype._complete=function(t){if(this.errord)return;let e;try{let r=u.dataToBitMap(t,this._bitmapInfo);e=c(r,this._bitmapInfo,this._options.skipRescale),r=null}catch(t){return void this._handleError(t)}this.emit("parsed",e)}},2416:(t,e,r)=>{"use strict";let n=!0,o=r(9796),i=r(9653);o.deflateSync||(n=!1);let a=r(33),s=r(8692),u=r(8550),c=r(9983),l=r(8417);t.exports=function(t,e){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r,h,f;let p=[];let d=new a(t),m=new u(e,{read:d.read.bind(d),error:function(t){r=t},metadata:function(t){h=t},gamma:function(t){f=t},palette:function(t){h.palette=t},transColor:function(t){h.transColor=t},inflateData:function(t){p.push(t)},simpleTransparency:function(){h.alpha=!0}});if(m.start(),d.process(),r)throw r;let v,g=Buffer.concat(p);if(p.length=0,h.interlace)v=o.inflateSync(g);else{let t=(1+(h.width*h.bpp*h.depth+7>>3))*h.height;v=i(g,{chunkSize:t,maxLength:t})}if(g=null,!v||!v.length)throw new Error("bad png - invalid inflate data response");let _=s.process(v,h);g=null;let D=c.dataToBitMap(_,h);_=null;let y=l(D,h,e.skipRescale);return h.data=y,h.gamma=f||0,h}},8550:(t,e,r)=>{"use strict";let n=r(3482),o=r(3500),i=t.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};i.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(t){let e=n.PNG_SIGNATURE;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),r=t.readUInt32BE(4),i="";for(let e=4;e<8;e++)i+=String.fromCharCode(t[e]);let a=Boolean(32&t[4]);if(this._hasIHDR||r===n.TYPE_IHDR){if(this._crc=new o,this._crc.write(Buffer.from(i)),this._chunks[r])return this._chunks[r](e);a?this.read(e+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+i))}else this.error(new Error("Expected IHDR on beggining"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==e?this.error(new Error("Crc error - "+e+" - "+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),r=t.readUInt32BE(4),o=t[8],i=t[9],a=t[10],s=t[11],u=t[12];if(8!==o&&4!==o&&2!==o&&1!==o&&16!==o)return void this.error(new Error("Unsupported bit depth "+o));if(!(i in n.COLORTYPE_TO_BPP_MAP))return void this.error(new Error("Unsupported color type"));if(0!==a)return void this.error(new Error("Unsupported compression method"));if(0!==s)return void this.error(new Error("Unsupported filter method"));if(0!==u&&1!==u)return void this.error(new Error("Unsupported interlace method"));this._colorType=i;let c=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:o,interlace:Boolean(u),palette:Boolean(i&n.COLORTYPE_PALETTE),color:Boolean(i&n.COLORTYPE_COLOR),alpha:Boolean(i&n.COLORTYPE_ALPHA),bpp:c,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let r=0;r<e;r++)this._palette.push([t[3*r],t[3*r+1],t[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===n.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===n.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===n.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/n.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},i.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(e);let r=t-e.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},i.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},i.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},6117:(t,e,r)=>{"use strict";let n=r(2416),o=r(8360);e.read=function(t,e){return n(t,e||{})},e.write=function(t,e){return o(t,e)}},5477:(t,e,r)=>{"use strict";let n=r(3837),o=r(2781),i=r(7900),a=r(6838),s=r(6117),u=e.y=function(t){o.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(t){this.data=t,this.emit("parsed",t)}.bind(this)),this._packer=new a(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n.inherits(u,o),u.sync=s,u.prototype.pack=function(){return this.data&&this.data.length?(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u.prototype.parse=function(t,e){if(e){let t,r;t=function(t){this.removeListener("error",r),this.data=t,e(null,this)}.bind(this),r=function(r){this.removeListener("parsed",t),e(r,null)}.bind(this),this.once("parsed",t),this.once("error",r)}return this.end(t),this},u.prototype.write=function(t){return this._parser.write(t),!0},u.prototype.end=function(t){this._parser.end(t)},u.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},u.prototype._gamma=function(t){this.gamma=t},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u.bitblt=function(t,e,r,n,o,i,a,s){if(n|=0,o|=0,i|=0,a|=0,s|=0,(r|=0)>t.width||n>t.height||r+o>t.width||n+i>t.height)throw new Error("bitblt reading outside image");if(a>e.width||s>e.height||a+o>e.width||s+i>e.height)throw new Error("bitblt writing outside image");for(let u=0;u<i;u++)t.data.copy(e.data,(s+u)*e.width+a<<2,(n+u)*t.width+r<<2,(n+u)*t.width+r+o<<2)},u.prototype.bitblt=function(t,e,r,n,o,i,a){return u.bitblt(this,t,e,r,n,o,i,a),this},u.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let r=0;r<t.width;r++){let n=t.width*e+r<<2;for(let e=0;e<3;e++){let r=t.data[n+e]/255;r=Math.pow(r,1/2.2/t.gamma),t.data[n+e]=Math.round(255*r)}}t.gamma=0}},u.prototype.adjustGamma=function(){u.adjustGamma(this)}},9653:(t,e,r)=>{"use strict";let n=r(9491).ok,o=r(9796),i=r(3837),a=r(4300).kMaxLength;function s(t){if(!(this instanceof s))return new s(t);t&&t.chunkSize<o.Z_MIN_CHUNK&&(t.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function u(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function c(t,e){return function(t,e){if("string"==typeof e&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let r=t._finishFlushFlag;return null==r&&(r=o.Z_FINISH),t._processChunk(e,r)}(new s(e),t)}s.prototype._processChunk=function(t,e,r){if("function"==typeof r)return o.Inflate._processChunk.call(this,t,e,r);let i,s,c=this,l=t&&t.length,h=this._chunkSize-this._offset,f=this._maxLength,p=0,d=[],m=0;function v(t,e){if(c._hadError)return;let r=h-e;if(n(r>=0,"have should not go down"),r>0){let t=c._buffer.slice(c._offset,c._offset+r);if(c._offset+=r,t.length>f&&(t=t.slice(0,f)),d.push(t),m+=t.length,f-=t.length,0===f)return!1}return(0===e||c._offset>=c._chunkSize)&&(h=c._chunkSize,c._offset=0,c._buffer=Buffer.allocUnsafe(c._chunkSize)),0===e&&(p+=l-t,l=t,!0)}this.on("error",(function(t){i=t})),n(this._handle,"zlib binding closed");do{s=this._handle.writeSync(e,t,p,l,this._buffer,this._offset,h),s=s||this._writeState}while(!this._hadError&&v(s[0],s[1]));if(this._hadError)throw i;if(m>=a)throw u(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+a.toString(16)+" bytes");let g=Buffer.concat(d,m);return u(this),g},i.inherits(s,o.Inflate),t.exports=e=c,e.Inflate=s,e.createInflate=function(t){return new s(t)},e.inflateSync=c},33:t=>{"use strict";let e=t.exports=function(t){this._buffer=t,this._reads=[]};e.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},e.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=t.length||t.allowLess))break;{this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}},5666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=F(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",m={};function v(){}function g(){}function _(){}var D={};u(D,i,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(S([])));w&&w!==r&&n.call(w,i)&&(D=w);var b=_.prototype=v.prototype=Object.create(D);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function F(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=_,u(b,"constructor",_),u(_,"constructor",g),g.displayName=u(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(C.prototype),u(C.prototype,a,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new C(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),u(b,s,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},4223:(t,e,r)=>{"use strict";const n=r(6003),o=r(1903),i=r(809),a=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=n(t)).length)return 0;t=t.replace(i()," ");let e=0;for(let r=0;r<t.length;r++){const n=t.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,e+=o(n)?2:1))}return e};t.exports=a,t.exports.default=a},6003:(t,e,r)=>{"use strict";const n=r(4277);t.exports=t=>"string"==typeof t?t.replace(n(),""):t},8006:t=>{"use strict";t.exports={type:"Buffer",data:[127,69,76,70,1,1,1,0,0,0,0,0,0,0,0,0,1,0,40,0,1,0,0,0,0,0,0,0,0,0,0,0,136,13,0,0,0,0,0,5,52,0,0,0,0,0,40,0,45,0,44,0,6,73,10,104,16,68,8,96,5,73,136,66,33,191,12,34,4,75,26,96,79,240,255,50,16,70,112,71,0,0,0,0,0,0,0,0,0,0,0,0,0,32,112,71,1,32,112,71,79,240,255,48,112,71,0,32,112,71,0,32,112,71,79,240,255,48,112,71,79,246,255,115,19,181,8,70,0,147,5,73,0,35,20,70,9,104,26,70,255,247,254,255,32,70,2,176,16,189,0,191,0,0,0,0,11,74,12,75,12,73,155,26,1,59,9,210,11,74,0,33,11,75,155,26,1,59,8,210,0,33,8,70,255,247,254,191,17,248,1,11,2,248,1,11,238,231,2,248,1,27,241,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,223,112,71,16,181,1,223,4,70,224,178,16,189,16,181,45,223,4,70,32,70,16,189,130,176,2,171,3,233,3,0,19,223,2,176,112,71,130,176,2,171,3,233,3,0,20,223,2,176,112,71,130,176,2,171,3,233,3,0,18,223,2,176,112,71,16,181,21,223,4,70,224,178,16,189,0,34,0,35,19,181,108,70,205,233,0,35,34,223,32,96,97,96,212,233,0,1,2,176,16,189,0,34,0,35,19,181,108,70,205,233,0,35,33,223,32,96,97,96,212,233,0,1,2,176,16,189,16,181,23,223,4,70,160,178,16,189,50,223,112,71,49,223,112,71,0,34,0,35,19,181,108,70,205,233,0,35,48,223,32,96,97,96,212,233,0,1,2,176,16,189,119,180,13,77,1,145,41,104,189,248,24,96,17,240,1,15,10,76,8,209,121,70,137,13,137,5,1,245,128,49,48,49,33,96,1,33,41,96,33,104,6,150,12,104,1,153,164,70,3,176,112,188,96,71,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,0,71,67,67,58,32,40,71,78,85,32,65,114,109,32,69,109,98,101,100,100,101,100,32,84,111,111,108,99,104,97,105,110,32,49,48,46,51,45,50,48,50,49,46,49,48,41,32,49,48,46,51,46,49,32,50,48,50,49,48,56,50,52,32,40,114,101,108,101,97,115,101,41,0,65,51,0,0,0,97,101,97,98,105,0,1,41,0,0,0,5,55,69,45,77,0,6,13,7,77,9,2,10,8,18,4,20,1,21,1,23,3,24,1,25,1,26,1,27,1,28,1,30,4,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,39,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,4,0,0,0,28,0,0,0,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,4,0,0,0,32,0,0,0,0,0,0,0,0,0,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,4,0,0,0,48,0,0,0,0,0,0,0,0,0,12,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,35,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,4,0,0,0,56,0,0,0,0,0,0,0,0,0,27,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,39,0,7,0,0,0,1,0,0,0,10,0,0,0,18,0,23,0,22,0,0,0,1,0,0,0,14,0,0,0,18,0,17,0,45,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,51,0,0,0,1,0,0,0,14,0,0,0,18,0,18,0,250,0,0,0,0,0,0,0,4,0,0,0,17,0,33,0,82,0,0,0,1,0,0,0,4,0,0,0,18,0,4,0,89,0,0,0,1,0,0,0,26,0,0,0,18,0,22,0,118,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,142,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,152,0,0,0,1,0,0,0,4,0,0,0,18,0,5,0,160,0,0,0,1,0,0,0,6,0,0,0,18,0,6,0,166,0,0,0,1,0,0,0,64,0,0,0,18,0,27,0,191,0,0,0,1,0,0,0,40,0,0,0,18,0,2,0,197,0,0,0,1,0,0,0,4,0,0,0,18,0,25,0,216,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,228,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,249,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,18,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,37,1,0,0,1,0,0,0,68,0,0,0,18,0,12,0,44,1,0,0,1,0,0,0,4,0,0,0,18,0,8,0,51,1,0,0,1,0,0,0,10,0,0,0,18,0,16,0,63,1,0,0,1,0,0,0,14,0,0,0,18,0,19,0,86,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,108,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,113,1,0,0,1,0,0,0,4,0,0,0,18,0,24,0,132,1,0,0,0,0,0,0,4,0,0,0,17,0,31,0,151,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,174,1,0,0,1,0,0,0,26,0,0,0,18,0,21,0,193,1,0,0,1,0,0,0,36,0,0,0,18,0,10,0,200,1,0,0,0,0,0,0,0,0,0,0,16,0,0,0,226,1,0,0,1,0,0,0,26,0,0,0,18,0,26,0,245,1,0,0,1,0,0,0,4,0,0,0,18,0,7,0,251,1,0,0,1,0,0,0,10,0,0,0,18,0,20,0,24,2,0,0,1,0,0,0,4,0,0,0,18,0,14,0,54,2,0,0,1,0,0,0,10,0,0,0,18,0,15,0,80,2,0,0,1,0,0,0,6,0,0,0,18,0,9,0,0,36,116,0,36,100,0,101,97,100,107,95,101,118,101,110,116,95,103,101,116,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,0,101,114,114,110,111,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,95,117,110,105,102,111,114,109,0,95,102,115,116,97,116,0,95,90,50,51,101,97,100,107,95,107,101,121,98,111,97,114,100,95,112,111,112,95,115,116,97,116,101,118,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,114,97,109,0,95,104,101,97,112,95,101,110,100,0,95,105,115,97,116,116,121,0,95,111,112,101,110,0,101,97,100,107,95,100,105,115,112,108,97,121,95,100,114,97,119,95,115,116,114,105,110,103,0,95,115,98,114,107,0,101,97,100,107,95,116,105,109,105,110,103,95,109,115,108,101,101,112,0,95,104,101,97,112,95,115,116,97,114,116,0,95,98,115,115,95,115,101,99,116,105,111,110,95,101,110,100,95,114,97,109,0,95,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,105,122,101,0,95,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,116,97,114,116,0,95,108,115,101,101,107,0,101,97,100,107,95,114,97,110,100,111,109,0,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,108,108,95,114,101,99,116,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,101,110,100,95,114,97,109,0,109,97,105,110,0,101,97,100,107,95,116,105,109,105,110,103,95,117,115,108,101,101,112,0,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,0,95,98,115,115,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,114,97,109,0,101,97,100,107,95,107,101,121,98,111,97,114,100,95,115,99,97,110,0,95,119,114,105,116,101,0,95,100,97,116,97,95,115,101,99,116,105,111,110,95,115,116,97,114,116,95,102,108,97,115,104,0,101,97,100,107,95,116,105,109,105,110,103,95,109,105,108,108,105,115,0,95,114,101,97,100,0,101,97,100,107,95,100,105,115,112,108,97,121,95,119,97,105,116,95,102,111,114,95,118,98,108,97,110,107,0,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,115,101,116,95,98,114,105,103,104,116,110,101,115,115,0,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,98,114,105,103,104,116,110,101,115,115,0,95,99,108,111,115,101,0,0,28,0,0,0,2,2,0,0,32,0,0,0,2,46,0,0,36,0,0,0,2,40,0,0,20,0,0,0,10,49,0,0,32,0,0,0,2,1,0,0,28,0,0,0,30,61,0,0,48,0,0,0,2,45,0,0,52,0,0,0,2,60,0,0,56,0,0,0,2,67,0,0,60,0,0,0,2,64,0,0,64,0,0,0,2,53,0,0,56,0,0,0,2,3,0,0,60,0,0,0,2,4,0,0,0,0,0,0,2,55,0,0,0,0,0,0,2,54,0,0,0,0,0,0,2,52,0,0,0,46,115,121,109,116,97,98,0,46,115,116,114,116,97,98,0,46,115,104,115,116,114,116,97,98,0,46,116,101,120,116,0,46,114,101,108,46,116,101,120,116,46,95,115,98,114,107,0,46,116,101,120,116,46,95,102,115,116,97,116,0,46,116,101,120,116,46,95,105,115,97,116,116,121,0,46,116,101,120,116,46,95,111,112,101,110,0,46,116,101,120,116,46,95,114,101,97,100,0,46,116,101,120,116,46,95,108,115,101,101,107,0,46,116,101,120,116,46,95,99,108,111,115,101,0,46,114,101,108,46,116,101,120,116,46,95,119,114,105,116,101,0,46,114,101,108,46,116,101,120,116,46,95,115,116,97,114,116,0,46,116,101,120,116,46,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,115,101,116,95,98,114,105,103,104,116,110,101,115,115,0,46,116,101,120,116,46,101,97,100,107,95,98,97,99,107,108,105,103,104,116,95,98,114,105,103,104,116,110,101,115,115,0,46,116,101,120,116,46,101,97,100,107,95,114,97,110,100,111,109,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,115,104,95,114,101,99,116,95,117,110,105,102,111,114,109,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,112,117,108,108,95,114,101,99,116,0,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,119,97,105,116,95,102,111,114,95,118,98,108,97,110,107,0,46,116,101,120,116,46,101,97,100,107,95,107,101,121,98,111,97,114,100,95,115,99,97,110,0,46,116,101,120,116,46,95,90,50,51,101,97,100,107,95,107,101,121,98,111,97,114,100,95,112,111,112,95,115,116,97,116,101,118,0,46,116,101,120,116,46,101,97,100,107,95,101,118,101,110,116,95,103,101,116,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,117,115,108,101,101,112,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,109,115,108,101,101,112,0,46,116,101,120,116,46,101,97,100,107,95,116,105,109,105,110,103,95,109,105,108,108,105,115,0,46,114,101,108,46,116,101,120,116,46,101,97,100,107,95,100,105,115,112,108,97,121,95,100,114,97,119,95,115,116,114,105,110,103,0,46,114,111,100,97,116,97,46,108,111,99,97,116,105,111,110,46,48,0,46,100,97,116,97,0,46,114,101,108,46,100,97,116,97,46,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,0,46,114,101,108,46,100,97,116,97,46,101,97,100,107,95,101,120,116,101,114,110,97,108,95,100,97,116,97,95,115,105,122,101,0,46,114,101,108,46,100,97,116,97,46,104,101,97,112,95,101,110,100,46,49,0,46,98,115,115,0,46,98,115,115,46,95,90,71,86,90,76,50,53,116,114,97,109,112,111,108,105,110,101,70,117,110,99,116,105,111,110,65,100,100,114,101,115,115,105,69,54,111,114,105,103,105,110,0,46,98,115,115,46,95,90,90,76,50,53,116,114,97,109,112,111,108,105,110,101,70,117,110,99,116,105,111,110,65,100,100,114,101,115,115,105,69,54,111,114,105,103,105,110,0,46,99,111,109,109,101,110,116,0,46,65,82,77,46,97,116,116,114,105,98,117,116,101,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,37,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,52,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,33,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,232,9,0,0,24,0,0,0,42,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,49,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,92,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,62,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,96,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,76,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,100,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,106,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,100,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,110,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,113,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,114,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,130,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,120,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,126,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,0,10,0,0,16,0,0,0,42,0,0,0,10,0,0,0,4,0,0,0,8,0,0,0,147,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,156,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,143,0,0,0,9,0,0,0,64,0,0,0,0,0,0,0,16,10,0,0,48,0,0,0,42,0,0,0,12,0,0,0,4,0,0,0,8,0,0,0,160,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,224,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,196,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,228,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,228,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,238,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,246,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,248,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,19,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,6,1,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,56,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,20,1,0,0,14,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,85,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,34,1,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,120,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,44,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,145,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,70,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,180,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,96,1,0,0,10,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,201,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,106,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,226,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,110,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,251,1,0,0,1,0,0,0,6,0,0,0,0,0,0,0,114,1,0,0,26,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,24,2,0,0,1,0,0,0,6,0,0,0,0,0,0,0,140,1,0,0,64,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,20,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,64,10,0,0,16,0,0,0,42,0,0,0,27,0,0,0,4,0,0,0,8,0,0,0,55,2,0,0,1,0,0,0,2,0,0,0,0,0,0,0,204,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,74,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,208,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,84,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,208,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,80,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,80,10,0,0,8,0,0,0,42,0,0,0,31,0,0,0,4,0,0,0,8,0,0,0,113,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,212,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,109,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,88,10,0,0,8,0,0,0,42,0,0,0,33,0,0,0,4,0,0,0,8,0,0,0,147,2,0,0,1,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,143,2,0,0,9,0,0,0,64,0,0,0,0,0,0,0,96,10,0,0,8,0,0,0,42,0,0,0,35,0,0,0,4,0,0,0,8,0,0,0,164,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,169,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,217,2,0,0,8,0,0,0,3,0,0,0,0,0,0,0,220,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,7,3,0,0,1,0,0,0,48,0,0,0,0,0,0,0,220,1,0,0,222,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,16,3,0,0,3,0,0,112,0,0,0,0,0,0,0,0,186,2,0,0,52,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,240,2,0,0,160,4,0,0,43,0,0,0,38,0,0,0,4,0,0,0,16,0,0,0,9,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,87,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,17,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,104,10,0,0,32,3,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]}},7573:(t,e,r)=>{"use strict";t.exports=r.p+"toolchain/ld.wasm"},3835:(t,e,r)=>{"use strict";t.exports=r.p+"toolchain/objcopy.wasm"},9491:t=>{"use strict";t.exports=require("assert")},852:t=>{"use strict";t.exports=require("async_hooks")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},7461:(t,e,r)=>{const{Argument:n}=r(8998),{Command:o}=r(5282),{CommanderError:i,InvalidArgumentError:a}=r(8056),{Help:s}=r(8917),{Option:u}=r(5790);(e=t.exports=new o).program=e,e.Argument=n,e.Command=o,e.CommanderError=i,e.Help=s,e.InvalidArgumentError=a,e.InvalidOptionArgumentError=a,e.Option=u},8998:(t,e,r)=>{const{InvalidArgumentError:n}=r(8056);e.Argument=class{constructor(t,e){switch(this.description=e||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?e.concat(t):[t]}default(t,e){return this.defaultValue=t,this.defaultValueDescription=e,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,e)=>{if(!this.argChoices.includes(t))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,e):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},e.humanReadableArgName=function(t){const e=t.name()+(!0===t.variadic?"...":"");return t.required?"<"+e+">":"["+e+"]"}},5282:(t,e,r)=>{const n=r(2361).EventEmitter,o=r(2081),i=r(1017),a=r(7147),s=r(7282),{Argument:u,humanReadableArgName:c}=r(8998),{CommanderError:l}=r(8056),{Help:h}=r(8917),{Option:f,splitOptionFlags:p,DualOptions:d}=r(5790),{suggestSimilar:m}=r(1812);class v extends n{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>s.stdout.write(t),writeErr:t=>s.stderr.write(t),getOutHelpWidth:()=>s.stdout.isTTY?s.stdout.columns:void 0,getErrHelpWidth:()=>s.stderr.isTTY?s.stderr.columns:void 0,outputError:(t,e)=>e(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._hasHelpOption=t._hasHelpOption,this._helpFlags=t._helpFlags,this._helpDescription=t._helpDescription,this._helpShortFlag=t._helpShortFlag,this._helpLongFlag=t._helpLongFlag,this._helpCommandName=t._helpCommandName,this._helpCommandnameAndArgs=t._helpCommandnameAndArgs,this._helpCommandDescription=t._helpCommandDescription,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}command(t,e,r){let n=e,o=r;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const[,i,a]=t.match(/([^ ]+) *(.*)/),s=this.createCommand(i);return n&&(s.description(n),s._executableHandler=!0),o.isDefault&&(this._defaultCommandName=s._name),s._hidden=!(!o.noHelp&&!o.hidden),s._executableFile=o.executableFile||null,a&&s.arguments(a),this.commands.push(s),s.parent=this,s.copyInheritedSettings(this),n?this:s}createCommand(t){return new v(t)}createHelp(){return Object.assign(new h,this.configureHelp())}configureHelp(t){return void 0===t?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return void 0===t?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return"string"!=typeof t&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,e){if(!t._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(e=e||{}).isDefault&&(this._defaultCommandName=t._name),(e.noHelp||e.hidden)&&(t._hidden=!0),this.commands.push(t),t.parent=this,this}createArgument(t,e){return new u(t,e)}argument(t,e,r,n){const o=this.createArgument(t,e);return"function"==typeof r?o.default(n).argParser(r):o.default(r),this.addArgument(o),this}arguments(t){return t.split(/ +/).forEach((t=>{this.argument(t)})),this}addArgument(t){const e=this._args.slice(-1)[0];if(e&&e.variadic)throw new Error(`only the last argument can be variadic '${e.name()}'`);if(t.required&&void 0!==t.defaultValue&&void 0===t.parseArg)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this._args.push(t),this}addHelpCommand(t,e){return!1===t?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof t&&(this._helpCommandName=t.split(" ")[0],this._helpCommandnameAndArgs=t),this._helpCommandDescription=e||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(t,e){const r=["preAction","postAction"];if(!r.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(e):this._lifeCycleHooks[t]=[e],this}exitOverride(t){return this._exitCallback=t||(t=>{if("commander.executeSubCommandAsync"!==t.code)throw t}),this}_exit(t,e,r){this._exitCallback&&this._exitCallback(new l(t,e,r)),s.exit(t)}action(t){return this._actionHandler=e=>{const r=this._args.length,n=e.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),t.apply(this,n)},this}createOption(t,e){return new f(t,e)}addOption(t){const e=t.name(),r=t.attributeName();if(t.negate){const e=t.long.replace(/^--no-/,"--");this._findOption(e)||this.setOptionValueWithSource(r,void 0===t.defaultValue||t.defaultValue,"default")}else void 0!==t.defaultValue&&this.setOptionValueWithSource(r,t.defaultValue,"default");this.options.push(t);const n=(e,n,o)=>{null==e&&void 0!==t.presetArg&&(e=t.presetArg);const i=this.getOptionValue(r);if(null!==e&&t.parseArg)try{e=t.parseArg(e,i)}catch(t){if("commander.invalidArgument"===t.code){const e=`${n} ${t.message}`;this.error(e,{exitCode:t.exitCode,code:t.code})}throw t}else null!==e&&t.variadic&&(e=t._concatValue(e,i));null==e&&(e=!t.negate&&(!(!t.isBoolean()&&!t.optional)||"")),this.setOptionValueWithSource(r,e,o)};return this.on("option:"+e,(e=>{const r=`error: option '${t.flags}' argument '${e}' is invalid.`;n(e,r,"cli")})),t.envVar&&this.on("optionEnv:"+e,(e=>{const r=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;n(e,r,"env")})),this}_optionEx(t,e,r,n,o){if("object"==typeof e&&e instanceof f)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(e,r);if(i.makeOptionMandatory(!!t.mandatory),"function"==typeof n)i.default(o).argParser(n);else if(n instanceof RegExp){const t=n;n=(e,r)=>{const n=t.exec(e);return n?n[0]:r},i.default(o).argParser(n)}else i.default(n);return this.addOption(i)}option(t,e,r,n){return this._optionEx({},t,e,r,n)}requiredOption(t,e,r,n){return this._optionEx({mandatory:!0},t,e,r,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){if(this._passThroughOptions=!!t,this.parent&&t&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(t=!0){if(this._storeOptionsAsProperties=!!t,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,e){return this._storeOptionsAsProperties?this[t]=e:this._optionValues[t]=e,this}setOptionValueWithSource(t,e,r){return this.setOptionValue(t,e),this._optionValueSources[t]=r,this}getOptionValueSource(t){return this._optionValueSources[t]}_prepareUserArgs(t,e){if(void 0!==t&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");let r;switch(e=e||{},void 0===t&&(t=s.argv,s.versions&&s.versions.electron&&(e.from="electron")),this.rawArgs=t.slice(),e.from){case void 0:case"node":this._scriptPath=t[1],r=t.slice(2);break;case"electron":s.defaultApp?(this._scriptPath=t[1],r=t.slice(2)):r=t.slice(1);break;case"user":r=t.slice(0);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(t,e){const r=this._prepareUserArgs(t,e);return this._parseCommand([],r),this}async parseAsync(t,e){const r=this._prepareUserArgs(t,e);return await this._parseCommand([],r),this}_executeSubCommand(t,e){e=e.slice();let r=!1;const n=[".js",".ts",".tsx",".mjs",".cjs"];function u(t,e){const r=i.resolve(t,e);if(a.existsSync(r))return r;if(n.includes(i.extname(e)))return;const o=n.find((t=>a.existsSync(`${r}${t}`)));return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let c,h=t._executableFile||`${this._name}-${t._name}`,f=this._executableDir||"";if(this._scriptPath){let t;try{t=a.realpathSync(this._scriptPath)}catch(e){t=this._scriptPath}f=i.resolve(i.dirname(t),f)}if(f){let e=u(f,h);if(!e&&!t._executableFile&&this._scriptPath){const r=i.basename(this._scriptPath,i.extname(this._scriptPath));r!==this._name&&(e=u(f,`${r}-${t._name}`))}h=e||h}if(r=n.includes(i.extname(h)),"win32"!==s.platform?r?(e.unshift(h),e=_(s.execArgv).concat(e),c=o.spawn(s.argv[0],e,{stdio:"inherit"})):c=o.spawn(h,e,{stdio:"inherit"}):(e.unshift(h),e=_(s.execArgv).concat(e),c=o.spawn(s.execPath,e,{stdio:"inherit"})),!c.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((t=>{s.on(t,(()=>{!1===c.killed&&null===c.exitCode&&c.kill(t)}))}))}const p=this._exitCallback;p?c.on("close",(()=>{p(new l(s.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):c.on("close",s.exit.bind(s)),c.on("error",(e=>{if("ENOENT"===e.code){const e=f?`searched for local subcommand relative to directory '${f}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",r=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e}`;throw new Error(r)}if("EACCES"===e.code)throw new Error(`'${h}' not executable`);if(p){const t=new l(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,p(t)}else s.exit(1)})),this.runningCommand=c}_dispatchSubcommand(t,e,r){const n=this._findCommand(t);if(n||this.help({error:!0}),!n._executableHandler)return n._parseCommand(e,r);this._executeSubCommand(n,e.concat(r))}_checkNumberOfArguments(){this._args.forEach(((t,e)=>{t.required&&null==this.args[e]&&this.missingArgument(t.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const t=(t,e,r)=>{let n=e;if(null!==e&&t.parseArg)try{n=t.parseArg(e,r)}catch(r){if("commander.invalidArgument"===r.code){const n=`error: command-argument value '${e}' is invalid for argument '${t.name()}'. ${r.message}`;this.error(n,{exitCode:r.exitCode,code:r.code})}throw r}return n};this._checkNumberOfArguments();const e=[];this._args.forEach(((r,n)=>{let o=r.defaultValue;r.variadic?n<this.args.length?(o=this.args.slice(n),r.parseArg&&(o=o.reduce(((e,n)=>t(r,n,e)),r.defaultValue))):void 0===o&&(o=[]):n<this.args.length&&(o=this.args[n],r.parseArg&&(o=t(r,o,r.defaultValue))),e[n]=o})),this.processedArgs=e}_chainOrCall(t,e){return t&&t.then&&"function"==typeof t.then?t.then((()=>e())):e()}_chainOrCallHooks(t,e){let r=t;const n=[];return D(this).reverse().filter((t=>void 0!==t._lifeCycleHooks[e])).forEach((t=>{t._lifeCycleHooks[e].forEach((e=>{n.push({hookedCommand:t,callback:e})}))})),"postAction"===e&&n.reverse(),n.forEach((t=>{r=this._chainOrCall(r,(()=>t.callback(t.hookedCommand,this)))})),r}_parseCommand(t,e){const r=this.parseOptions(e);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(r.operands),e=r.unknown,this.args=t.concat(e),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),e);if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName)return 1===t.length&&this.help(),this._dispatchSubcommand(t[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return g(this,e),this._dispatchSubcommand(this._defaultCommandName,t,e);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),g(this,r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let r;return n(),this._processArguments(),r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs))),this.parent&&(r=this._chainOrCall(r,(()=>{this.parent.emit(o,t,e)}))),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,t,e);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,e);this.listenerCount("command:*")?this.emit("command:*",t,e):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find((e=>e._name===t||e._aliases.includes(t)))}_findOption(t){return this.options.find((e=>e.is(t)))}_checkForMissingMandatoryOptions(){for(let t=this;t;t=t.parent)t.options.forEach((e=>{e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)}))}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const e=t.attributeName();return void 0!==this.getOptionValue(e)&&"default"!==this.getOptionValueSource(e)}));t.filter((t=>t.conflictsWith.length>0)).forEach((e=>{const r=t.find((t=>e.conflictsWith.includes(t.attributeName())));r&&this._conflictingOption(e,r)}))}_checkForConflictingOptions(){for(let t=this;t;t=t.parent)t._checkForConflictingLocalOptions()}parseOptions(t){const e=[],r=[];let n=e;const o=t.slice();function i(t){return t.length>1&&"-"===t[0]}let a=null;for(;o.length;){const t=o.shift();if("--"===t){n===r&&n.push(t),n.push(...o);break}if(!a||i(t)){if(a=null,i(t)){const e=this._findOption(t);if(e){if(e.required){const t=o.shift();void 0===t&&this.optionMissingArgument(e),this.emit(`option:${e.name()}`,t)}else if(e.optional){let t=null;o.length>0&&!i(o[0])&&(t=o.shift()),this.emit(`option:${e.name()}`,t)}else this.emit(`option:${e.name()}`);a=e.variadic?e:null;continue}}if(t.length>2&&"-"===t[0]&&"-"!==t[1]){const e=this._findOption(`-${t[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,t.slice(2)):(this.emit(`option:${e.name()}`),o.unshift(`-${t.slice(2)}`));continue}}if(/^--[^=]+=/.test(t)){const e=t.indexOf("="),r=this._findOption(t.slice(0,e));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,t.slice(e+1));continue}}if(i(t)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&0===e.length&&0===r.length){if(this._findCommand(t)){e.push(t),o.length>0&&r.push(...o);break}if(t===this._helpCommandName&&this._hasImplicitHelpCommand()){e.push(t),o.length>0&&e.push(...o);break}if(this._defaultCommandName){r.push(t),o.length>0&&r.push(...o);break}}if(this._passThroughOptions){n.push(t),o.length>0&&n.push(...o);break}n.push(t)}else this.emit(`option:${a.name()}`,t)}return{operands:e,unknown:r}}opts(){if(this._storeOptionsAsProperties){const t={},e=this.options.length;for(let r=0;r<e;r++){const e=this.options[r].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return D(this).reduce(((t,e)=>Object.assign(t,e.opts())),{})}error(t,e){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const r=e||{},n=r.exitCode||1,o=r.code||"commander.error";this._exit(n,o,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in s.env){const e=t.attributeName();(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,s.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}}))}_parseOptionsImplied(){const t=new d(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((r=>void 0!==r.implied&&e(r.attributeName())&&t.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((t=>{Object.keys(t.implied).filter((t=>!e(t))).forEach((e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")}))}))}missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){const e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){const r=t=>{const e=t.attributeName(),r=this.getOptionValue(e),n=this.options.find((t=>t.negate&&e===t.attributeName())),o=this.options.find((t=>!t.negate&&e===t.attributeName()));return n&&(void 0===n.presetArg&&!1===r||void 0!==n.presetArg&&r===n.presetArg)?n:o||t},n=t=>{const e=r(t),n=e.attributeName();return"env"===this.getOptionValueSource(n)?`environment variable '${e.envVar}'`:`option '${e.flags}'`},o=`error: ${n(t)} cannot be used with ${n(e)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{const t=n.createHelp().visibleOptions(n).filter((t=>t.long)).map((t=>t.long));r=r.concat(t),n=n.parent}while(n&&!n._enablePositionalOptions);e=m(t,r)}const r=`error: unknown option '${t}'${e}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const e=this._args.length,r=1===e?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${e} argument${r} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((t=>{r.push(t.name()),t.alias()&&r.push(t.alias())})),e=m(t,r)}const r=`error: unknown command '${t}'${e}`;this.error(r,{code:"commander.unknownCommand"})}version(t,e,r){if(void 0===t)return this._version;this._version=t,e=e||"-V, --version",r=r||"output the version number";const n=this.createOption(e,r);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`),this._exit(0,"commander.version",t)})),this}description(t,e){return void 0===t&&void 0===e?this._description:(this._description=t,e&&(this._argsDescription=e),this)}summary(t){return void 0===t?this._summary:(this._summary=t,this)}alias(t){if(void 0===t)return this._aliases[0];let e=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(e=this.commands[this.commands.length-1]),t===e._name)throw new Error("Command alias can't be the same as its name");return e._aliases.push(t),this}aliases(t){return void 0===t?this._aliases:(t.forEach((t=>this.alias(t))),this)}usage(t){if(void 0===t){if(this._usage)return this._usage;const t=this._args.map((t=>c(t)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=t,this}name(t){return void 0===t?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=i.basename(t,i.extname(t)),this}executableDir(t){return void 0===t?this._executableDir:(this._executableDir=t,this)}helpInformation(t){const e=this.createHelp();return void 0===e.helpWidth&&(e.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),e.formatHelp(this,e)}_getHelpContext(t){const e={error:!!(t=t||{}).error};let r;return r=e.error?t=>this._outputConfiguration.writeErr(t):t=>this._outputConfiguration.writeOut(t),e.write=t.write||r,e.command=this,e}outputHelp(t){let e;"function"==typeof t&&(e=t,t=void 0);const r=this._getHelpContext(t);D(this).reverse().forEach((t=>t.emit("beforeAllHelp",r))),this.emit("beforeHelp",r);let n=this.helpInformation(r);if(e&&(n=e(n),"string"!=typeof n&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(n),this.emit(this._helpLongFlag),this.emit("afterHelp",r),D(this).forEach((t=>t.emit("afterAllHelp",r)))}helpOption(t,e){if("boolean"==typeof t)return this._hasHelpOption=t,this;this._helpFlags=t||this._helpFlags,this._helpDescription=e||this._helpDescription;const r=p(this._helpFlags);return this._helpShortFlag=r.shortFlag,this._helpLongFlag=r.longFlag,this}help(t){this.outputHelp(t);let e=s.exitCode||0;0===e&&t&&"function"!=typeof t&&t.error&&(e=1),this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){const r=["beforeAll","before","after","afterAll"];if(!r.includes(t))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`);const n=`${t}Help`;return this.on(n,(t=>{let r;r="function"==typeof e?e({error:t.error,command:t.command}):e,r&&t.write(`${r}\n`)})),this}}function g(t,e){t._hasHelpOption&&e.find((e=>e===t._helpLongFlag||e===t._helpShortFlag))&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function _(t){return t.map((t=>{if(!t.startsWith("--inspect"))return t;let e,r,n="127.0.0.1",o="9229";return null!==(r=t.match(/^(--inspect(-brk)?)$/))?e=r[1]:null!==(r=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(e=r[1],/^\d+$/.test(r[3])?o=r[3]:n=r[3]):null!==(r=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(e=r[1],n=r[3],o=r[4]),e&&"0"!==o?`${e}=${n}:${parseInt(o)+1}`:t}))}function D(t){const e=[];for(let r=t;r;r=r.parent)e.push(r);return e}e.Command=v},8056:(t,e)=>{class r extends Error{constructor(t,e,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=e,this.exitCode=t,this.nestedError=void 0}}e.CommanderError=r,e.InvalidArgumentError=class extends r{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},8917:(t,e,r)=>{const{humanReadableArgName:n}=r(8998);e.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(t){const e=t.commands.filter((t=>!t._hidden));if(t._hasImplicitHelpCommand()){const[,r,n]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=t.createCommand(r).helpOption(!1);o.description(t._helpCommandDescription),n&&o.arguments(n),e.push(o)}return this.sortSubcommands&&e.sort(((t,e)=>t.name().localeCompare(e.name()))),e}visibleOptions(t){const e=t.options.filter((t=>!t.hidden)),r=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag),n=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(r||n){let o;o=r?n?t.createOption(t._helpFlags,t._helpDescription):t.createOption(t._helpShortFlag,t._helpDescription):t.createOption(t._helpLongFlag,t._helpDescription),e.push(o)}if(this.sortOptions){const t=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");e.sort(((e,r)=>t(e).localeCompare(t(r))))}return e}visibleArguments(t){return t._argsDescription&&t._args.forEach((e=>{e.description=e.description||t._argsDescription[e.name()]||""})),t._args.find((t=>t.description))?t._args:[]}subcommandTerm(t){const e=t._args.map((t=>n(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(e?" "+e:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,e){return e.visibleCommands(t).reduce(((t,r)=>Math.max(t,e.subcommandTerm(r).length)),0)}longestOptionTermLength(t,e){return e.visibleOptions(t).reduce(((t,r)=>Math.max(t,e.optionTerm(r).length)),0)}longestArgumentTermLength(t,e){return e.visibleArguments(t).reduce(((t,r)=>Math.max(t,e.argumentTerm(r).length)),0)}commandUsage(t){let e=t._name;t._aliases[0]&&(e=e+"|"+t._aliases[0]);let r="";for(let e=t.parent;e;e=e.parent)r=e.name()+" "+r;return r+e+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const e=[];if(t.argChoices&&e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`),void 0!==t.defaultValue){(t.required||t.optional||t.isBoolean()&&"boolean"==typeof t.defaultValue)&&e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}return void 0!==t.presetArg&&t.optional&&e.push(`preset: ${JSON.stringify(t.presetArg)}`),void 0!==t.envVar&&e.push(`env: ${t.envVar}`),e.length>0?`${t.description} (${e.join(", ")})`:t.description}argumentDescription(t){const e=[];if(t.argChoices&&e.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`),void 0!==t.defaultValue&&e.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),e.length>0){const r=`(${e.join(", ")})`;return t.description?`${t.description} ${r}`:r}return t.description}formatHelp(t,e){const r=e.padWidth(t,e),n=e.helpWidth||80;function o(t,o){if(o){const i=`${t.padEnd(r+2)}${o}`;return e.wrap(i,n-2,r+2)}return t}function i(t){return t.join("\n").replace(/^/gm," ".repeat(2))}let a=[`Usage: ${e.commandUsage(t)}`,""];const s=e.commandDescription(t);s.length>0&&(a=a.concat([s,""]));const u=e.visibleArguments(t).map((t=>o(e.argumentTerm(t),e.argumentDescription(t))));u.length>0&&(a=a.concat(["Arguments:",i(u),""]));const c=e.visibleOptions(t).map((t=>o(e.optionTerm(t),e.optionDescription(t))));c.length>0&&(a=a.concat(["Options:",i(c),""]));const l=e.visibleCommands(t).map((t=>o(e.subcommandTerm(t),e.subcommandDescription(t))));return l.length>0&&(a=a.concat(["Commands:",i(l),""])),a.join("\n")}padWidth(t,e){return Math.max(e.longestOptionTermLength(t,e),e.longestSubcommandTermLength(t,e),e.longestArgumentTermLength(t,e))}wrap(t,e,r,n=40){if(t.match(/[\n]\s+/))return t;const o=e-r;if(o<n)return t;const i=t.slice(0,r),a=t.slice(r),s=" ".repeat(r),u=new RegExp(".{1,"+(o-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return i+(a.match(u)||[]).map(((t,e)=>("\n"===t.slice(-1)&&(t=t.slice(0,t.length-1)),(e>0?s:"")+t.trimRight()))).join("\n")}}},5790:(t,e,r)=>{const{InvalidArgumentError:n}=r(8056);function o(t){let e,r;const n=t.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),r=n.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}e.Option=class{constructor(t,e){this.flags=t,this.description=e||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;const r=o(t);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(t,e){return this.defaultValue=t,this.defaultValueDescription=e,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){return this.implied=Object.assign(this.implied||{},t),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?e.concat(t):[t]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,e)=>{if(!this.argChoices.includes(t))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,e):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((t,e)=>t+e[0].toUpperCase()+e.slice(1)))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},e.splitOptionFlags=o,e.DualOptions=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach((t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)})),this.negativeOptions.forEach(((t,e)=>{this.positiveOptions.has(e)&&this.dualOptions.add(e)}))}valueFromOption(t,e){const r=e.attributeName();if(!this.dualOptions.has(r))return!0;const n=this.negativeOptions.get(r).presetArg,o=void 0!==n&&n;return e.negate===(o===t)}}},1812:(t,e)=>{e.suggestSimilar=function(t,e){if(!e||0===e.length)return"";e=Array.from(new Set(e));const r=t.startsWith("--");r&&(t=t.slice(2),e=e.map((t=>t.slice(2))));let n=[],o=3;return e.forEach((e=>{if(e.length<=1)return;const r=function(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);const r=[];for(let e=0;e<=t.length;e++)r[e]=[e];for(let t=0;t<=e.length;t++)r[0][t]=t;for(let n=1;n<=e.length;n++)for(let o=1;o<=t.length;o++){let i=1;i=t[o-1]===e[n-1]?0:1,r[o][n]=Math.min(r[o-1][n]+1,r[o][n-1]+1,r[o-1][n-1]+i),o>1&&n>1&&t[o-1]===e[n-2]&&t[o-2]===e[n-1]&&(r[o][n]=Math.min(r[o][n],r[o-2][n-2]+1))}return r[t.length][e.length]}(t,e),i=Math.max(t.length,e.length);(i-r)/i>.4&&(r<o?(o=r,n=[e]):r===o&&n.push(e))})),n.sort(((t,e)=>t.localeCompare(e))),r&&(n=n.map((t=>`--${t}`))),n.length>1?`\n(Did you mean one of ${n.join(", ")}?)`:1===n.length?`\n(Did you mean ${n[0]}?)`:""}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.p="";var n={};(()=>{"use strict";r.d(n,{default:()=>Cr});var t=r(7757),e=r.n(t);const o=require("usb");function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e="function"==typeof Map?new Map:void 0;return u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,f(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},u(t)}function c(t,e,r){return c=l()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&h(o,r.prototype),o},c.apply(null,arguments)}function l(){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(t){return!1}}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}const p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(p,t);var e,r,n,o,u,c=(e=p,r=l(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return s(this,t)});function p(t){var e;a(this,p);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(e=c.call.apply(c,[this].concat(n))).name=t,e}return n=p,o&&i(n.prototype,o),u&&i(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(u(Error));function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"append",value:function(e){for(var r="",n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];o.forEach((function(t){r+=t+","})),t.Content+=+new Date+","+e+","+r+"\n"}},{key:"info",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["info"].concat(r))}},{key:"warn",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["warn"].concat(r))}},{key:"error",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.append.apply(t,["error"].concat(r))}}],(r=null)&&d(e.prototype,r),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();m.Content="";const v=m;function g(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function D(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,s,"next",t)}function s(t){D(i,n,o,a,s,"throw",t)}a(void 0)}))}}function w(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e,r){return e&&w(t.prototype,e),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}function F(t,e){return F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},F(t,e)}function k(t){var e=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(t){return!1}}();return function(){var r,n=x(t);if(e){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return A(this,r)}}function A(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}var S=6,O=8,T=10,P=2,R=3,B=4,j=1033;function I(t){return{bLength:t.getUint8(0),bDescriptorType:t.getUint8(1),bInterfaceNumber:t.getUint8(2),bAlternateSetting:t.getUint8(3),bNumEndpoints:t.getUint8(4),bInterfaceClass:t.getUint8(5),bInterfaceSubClass:t.getUint8(6),bInterfaceProtocol:t.getUint8(7),iInterface:t.getUint8(8),endpoints:[]}}function L(t){var e=function(t){for(var e,r=t,n=[];r.byteLength>2;){var o=r.getUint8(0),i=r.getUint8(1),a=new DataView(r.buffer.slice(0,o));if(i==B)e=I(a),n.push(e);else{var s={bLength:o,bDescriptorType:i,data:a};e?e.endpoints.push(s):n.push(s)}r=new DataView(r.buffer.slice(o))}return n}(new DataView(t.buffer.slice(9)));return{bLength:t.getUint8(0),bDescriptorType:t.getUint8(1),wTotalLength:t.getUint16(2,!0),bNumInterfaces:t.getUint8(4),bConfigurationValue:t.getUint8(5),iConfiguration:t.getUint8(6),bmAttributes:t.getUint8(7),bMaxPower:t.getUint8(8),interfaces:e}}function N(t){return v.info("DFU","getConfiguration"),new Promise((function(e,r){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:O,value:0,index:0},1).then((function(t){"ok"==t.status?e(t.data.getInt8(0)):r(new Error("Wrong getConfiguration status: "+t.status))})).catch((function(t){r(new Error("Get configuration failed --\x3e "+t))}))}))}function M(t){return v.info("DFU","getInterface"),new Promise((function(e,r){t.device.controlTransferIn({requestType:"standard",recipient:"interface",request:T,value:0,index:t.settings.interface.interfaceNumber},1).then((function(t){"ok"==t.status?e(t.data.getInt8(0)):r(new Error("Wrong getInterface status: "+t.status))})).catch((function(t){r(new Error("Get interface failed --\x3e "+t))}))}))}function U(t,e){return v.info("DFU","getConfigurationDescriptor","index "+e),new Promise((function(r,n){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|P<<8,index:0},4).then((function(o){if("ok"==o.status){var i=o.data.getUint16(2,!0);t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|P<<8,index:0},i).then((function(t){"ok"==t.status?r(L(t.data)):n(new Error("Wrong getConfigurationDescriptor status: "+t.status))})).catch((function(t){n(t)}))}else n(new Error("Wrong getConfigurationDescriptor status: "+o.status))})).catch((function(t){n(new Error("Get configuration descriptor failed --\x3e "+t))}))}))}function H(t,e){return v.info("DFU","getStringDescriptor","index "+e),new Promise((function(r,n){t.device.controlTransferIn({requestType:"standard",recipient:"device",request:S,value:e|R<<8,index:j},255).then((function(t){"ok"==t.status?(t.data.getInt8(1)!=R&&n(new Error("Wrong descriptor type: "+t.data.getInt8(1))),r(new TextDecoder("utf-16").decode(new Uint16Array(t.data.buffer,2)))):n(new Error("Wrong getStringDescriptor status: "+t.status))})).catch((function(t){n(new Error("Get string descriptor failed --\x3e "+t))}))}))}var z={Offset:0,Size:11,Signature:{Offset:0,Size:5}},V={Offset:11,TargetPrefix:{Offset:0,Size:274,Signature:{Offset:0,Size:6},NbElements:{Offset:270,Size:4}},Element:{Offset:274,Address:{Offset:0,Size:4},Size:{Offset:4,Size:4},Data:{Offset:8}}},G=1,$=2,q=3,W=4,Y=5,K=6,X=0,Z=2,Q=4,J=5,tt=7,et=10,rt=33,nt=65,ot=function(t){C(r,t);var e=k(r);function r(){E(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DFUError"].concat(n))}return b(r)}(p),it=function(t){C(r,t);var e=k(r);function r(){E(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DFUInterfaceError"].concat(n))}return b(r)}(p);function at(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return v.info("DFU","requestIn","bRequest: "+e,"data: "+r,"wValue: "+n),new Promise((function(o,i){t.device.controlTransferIn({requestType:"class",recipient:"interface",request:e,value:n,index:t.settings.interface.interfaceNumber},r).then((function(t){"ok"==t.status?o(t.data):i(new Error("Wrong requestIn status: "+t.status))})).catch((function(t){i(new Error("ControlTransferIn failed --\x3e "+t))}))}))}function st(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return v.info("DFU","requestOut","bRequest: "+e,"data: "+r,"wValue: "+n),new Promise((function(o,i){t.device.controlTransferOut({requestType:"class",recipient:"interface",request:e,value:n,index:t.settings.interface.interfaceNumber},r).then((function(t){"ok"==t.status?o(t.bytesWritten):i(new Error("Wrong requestOut status: "+t.status))})).catch((function(t){i(new Error("ControlTransferOut failed --\x3e "+t))}))}))}function ut(t){return v.info("DFU","getState"),new Promise((function(e,r){at(t,Y,1).then((function(t){e(t.getUint8(0))})).catch((function(t){r(new Error("Get state failed --\x3e "+t))}))}))}function ct(t){return v.info("DFU","getStatus"),new Promise((function(e,r){at(t,q,6).then((function(t){e({status:t.getUint8(0),pollTimeout:16777215&t.getUint32(1,!0),state:t.getUint8(4)})})).catch((function(t){r(new Error("Get status failed --\x3e "+t))}))}))}function lt(t){return ht.apply(this,arguments)}function ht(){return ht=y(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","abortToIdle"),t.prev=1,t.next=4,st(r,K);case 4:return t.next=6,ut(r);case 6:if((n=t.sent)!=et){t.next=13;break}return t.next=10,st(r,W);case 10:return t.next=12,ut(r);case 12:n=t.sent;case 13:if(n==Z){t.next=15;break}throw new Error("State is "+n.state+"instead of DFU IDLE (2).");case 15:t.next=20;break;case 17:throw t.prev=17,t.t0=t.catch(1),new Error("Abort to idle failed --\x3e "+t.t0);case 20:case"end":return t.stop()}}),t,null,[[1,17]])}))),ht.apply(this,arguments)}function ft(t,e){return pt.apply(this,arguments)}function pt(){return pt=y(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(t){return new Promise((function(e,r){setTimeout(e,t)}))},v.info("DFU","pollUntil",n),t.prev=2,t.next=5,ct(r);case 5:i=t.sent;case 6:if(n(i.state)||i.state==et){t.next=14;break}return t.next=9,o(i.pollTimeout);case 9:return t.next=11,ct(r);case 11:i=t.sent,t.next=6;break;case 14:return t.abrupt("return",i);case 17:throw t.prev=17,t.t0=t.catch(2),new Error("Poll until failed --\x3e "+t.t0);case 20:case"end":return t.stop()}}),t,null,[[2,17]])}))),pt.apply(this,arguments)}function dt(t,e){return mt.apply(this,arguments)}function mt(){return mt=y(e().mark((function t(r,n){var o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","setAddress",Number(n).toString(16)),o=new ArrayBuffer(5),(i=new DataView(o)).setUint8(0,rt),i.setUint32(1,n,!0),t.prev=5,t.next=8,st(r,G,o,0);case 8:return t.next=10,ft(r,(function(t){return t!=Q}));case 10:if((a=t.sent).status==X){t.next=13;break}throw"Status is "+a.status+" instead of Status OK (0).";case 13:t.next=18;break;case 15:throw t.prev=15,t.t0=t.catch(5),"Set address to "+n+" failed --\x3e "+t.t0;case 18:case"end":return t.stop()}}),t,null,[[5,15]])}))),mt.apply(this,arguments)}const vt=function(){function t(r,n){E(this,t),this.open=y(e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","open"),t.prev=1,t.next=4,this.device.open();case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new ot("OPEN failed --\x3e "+t.t0);case 9:if(r=this.settings.configuration.configurationValue,null!=this.device.configuration&&this.device.configuration.configurationValue==r){t.next=19;break}return t.prev=11,t.next=14,this.device.selectConfiguration(r);case 14:t.next=19;break;case 16:throw t.prev=16,t.t1=t.catch(11),new ot("OPEN failed: could not select configuration --\x3e "+t.t1);case 19:if(n=this.settings.interface.interfaceNumber,this.device.configuration.interfaces[n].claimed){t.next=29;break}return t.prev=21,t.next=24,this.device.claimInterface(n);case 24:t.next=29;break;case 26:throw t.prev=26,t.t2=t.catch(21),new it("OPEN failed: could not claim interface --\x3e "+t.t2);case 29:if(o=this.settings.alternate.alternateSetting,null!=this.device.configuration.interfaces[n].alternate&&this.device.configuration.interfaces[n].alternate==o){t.next=39;break}return t.prev=31,t.next=34,this.device.selectAlternateInterface(n,o);case 34:t.next=39;break;case 36:throw t.prev=36,t.t3=t.catch(31),new ot("OPEN failed: could not select alternate interface --\x3e "+t.t3);case 39:case"end":return t.stop()}}),t,this,[[1,6],[11,16],[21,26],[31,36]])}))),this.close=y(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","close"),t.prev=1,t.next=4,this.device.close();case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new ot("CLOSE failed --\x3e "+t.t0);case 9:case"end":return t.stop()}}),t,this,[[1,6]])}))),this.getMemoryLayout=y(e().mark((function t(){var r,n=this;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","getMemoryLayout"),t.prev=1,t.delegateYield(e().mark((function t(){var r,o,i,a,s,u,c,l,h;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N(n);case 2:return r=t.sent,t.next=5,U(n,r-1);case 5:return o=t.sent,t.next=8,M(n);case 8:return i=t.sent,a=o.interfaces[i].iInterface,t.next=12,H(n,a);case 12:for(s=t.sent,u=s.split("/"),c=[],l=function(t){var e=parseInt(u[t]),r=u[t+1].split(","),n=/(\d+)\*(\d+)([K|M])g/;r.forEach((function(t){var r=t.match(n),o=parseInt(r[1]),i=parseInt(r[2]),a=r[3];"K"==a?i*=1024:"M"==a&&(i*=1048576);var s=o*i,u={address:e,lastAddress:e+s-1,size:s,nbPage:o,pageSize:i};c.push(u),e+=s}))},h=1;h<u.length;h+=2)l(h);return t.abrupt("return",{v:c});case 18:case"end":return t.stop()}}),t)}))(),"t0",3);case 3:if("object"!=typeof(r=t.t0)){t.next=6;break}return t.abrupt("return",r.v);case 6:t.next=11;break;case 8:throw t.prev=8,t.t1=t.catch(1),new ot("GET MEMORY LAYOUT failed --\x3e "+t.t1);case 11:case"end":return t.stop()}}),t,null,[[1,8]])}))),this.upload=function(){var t=y(e().mark((function t(r,n,o){var i,a,s,u,c,l;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","upload","address "+Number(r).toString(16),"Length "+Number(n).toString(16)),t.prev=1,t.next=4,ut(this);case 4:if(t.sent==Z){t.next=8;break}return t.next=8,lt(this);case 8:return t.next=10,dt(this,r);case 10:return t.next=12,lt(this);case 12:i=2,a=new Uint8Array(n),s=0,o&&o(0);case 16:return c=Math.min(this.TransferSize,n-s),v.info("DFU","upload","block number "+i,"bytes to read "+c),t.next=20,at(this,$,c,i++);case 20:(u=t.sent).byteLength>0&&(l=new Uint8Array(u.buffer),a.set(l,s),s+=u.byteLength),o&&o(s/n);case 23:if(s<n){t.next=16;break}case 24:return t.next=26,lt(this);case 26:return t.abrupt("return",a);case 29:return t.prev=29,t.t0=t.catch(1),t.next=33,lt(this);case 33:throw new ot("UPLOAD failed at address "+r+" of length "+n+" --\x3e "+t.t0);case 34:case"end":return t.stop()}}),t,this,[[1,29]])})));return function(e,r,n){return t.apply(this,arguments)}}(),this.download=function(){var t=y(e().mark((function t(r,n,o){var i,a,s,u,c,l,h;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v.info("DFU","download","address "+Number(r).toString(16)),t.prev=1,i=0,a=n.byteLength,s=r,o&&o(0);case 6:if(!(i<a)){t.next=27;break}return u=a-i,c=Math.min(u,this.TransferSize),v.info("DFU","download step, at address "+Number(r).toString(16)),l=0,h=void 0,t.next=14,dt(this,s);case 14:return t.next=16,st(this,G,n.slice(i,i+c),2);case 16:return l=t.sent,t.next=19,ft(this,(function(t){return t==J||t==Z}));case 19:if(h=t.sent,s+=c,h.status==X){t.next=23;break}throw"state=".concat(h.state,", status=").concat(h.status);case 23:i+=l,o&&o(i/a),t.next=6;break;case 27:t.next=32;break;case 29:throw t.prev=29,t.t0=t.catch(1),new ot("DOWNLOAD failed at address "+Number(r).toString(16)+" --\x3e "+t.t0);case 32:case"end":return t.stop()}}),t,this,[[1,29]])})));return function(e,r,n){return t.apply(this,arguments)}}(),this.leave=function(){var t=y(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","leave","address "+Number(r).toString(16)),t.prev=1,t.next=4,dt(this,r);case 4:return t.next=6,st(this,G,new ArrayBuffer,2);case 6:return t.next=8,ft(this,(function(t){return t==tt}));case 8:t.next=13;break;case 10:throw t.prev=10,t.t0=t.catch(1),new ot("LEAVE failed at address "+Number(r).toString(16)+" --\x3e "+t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),this.eraseSegment=function(){var t=y(e().mark((function t(r){var n,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("DFU","eraseSegment","address "+Number(r).toString(16)),t.prev=1,t.next=4,ut(this);case 4:if(t.sent==Z){t.next=8;break}return t.next=8,lt(this);case 8:return n=new ArrayBuffer(5),(o=new DataView(n)).setUint8(0,nt),o.setUint32(1,r,!0),t.next=14,st(this,G,n,0);case 14:return t.next=16,ct(this);case 16:if((i=t.sent).state==Q){t.next=19;break}throw"wrong DFU state: "+i.state;case 19:return t.next=21,ft(this,(function(t){return t!=Q}));case 21:if((i=t.sent).status==X){t.next=24;break}throw"wrong DFU status: "+i.status;case 24:t.next=29;break;case 26:throw t.prev=26,t.t0=t.catch(1),new ot("ERASE SEGMENT failed at address "+r+" --\x3e "+t.t0);case 29:case"end":return t.stop()}}),t,this,[[1,26]])})));return function(e){return t.apply(this,arguments)}}(),this.TransferSize=n,this.device=r;var o,i=g(r.configurations);try{for(i.s();!(o=i.n()).done;){var a,s=o.value,u=g(s.interfaces);try{for(u.s();!(a=u.n()).done;){var c,l=a.value,h=g(l.alternates);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(254==f.interfaceClass&&1==f.interfaceSubclass&&(1==f.interfaceProtocol||2==f.interfaceProtocol))return this.settings={configuration:s,interface:l,alternate:f},this}}catch(t){h.e(t)}finally{h.f()}}}catch(t){u.e(t)}finally{u.f()}}}catch(t){i.e(t)}finally{i.f()}return this.settings={configuration:{configurationValue:1},interface:{interfaceNumber:0},alternate:{alternateSetting:0}},this}return b(t,null,[{key:"Parse",value:function(t){new DataView(t);var e=new TextDecoder("utf-8").decode(new Uint8Array(t.slice(z.Signature.Offset,z.Signature.Offset+z.Signature.Size)));if("DfuSe"!=e)throw new ot("Parsed file is not a DFU file (invalid signature)");var r=t.slice(V.Offset);if("Target"!=(e=new TextDecoder("utf-8").decode(new Uint8Array(r.slice(V.TargetPrefix.Signature.Offset,V.TargetPrefix.Signature.Size)))))throw new ot("Corrupted DFU file (invalid target signature)");for(var n=[],o=new DataView(r,V.TargetPrefix.NbElements.Offset,V.TargetPrefix.NbElements.Offset+V.TargetPrefix.NbElements.Size).getUint32(0,!0),i=r.slice(V.Element.Offset),a=0;a<o;a++){var s=new DataView(i,V.Element.Address.Offset,V.Element.Address.Offset+V.Element.Address.Size).getUint32(0,!0),u=new DataView(i,V.Element.Size.Offset,V.Element.Address.Offset+V.Element.Size.Size).getUint32(0,!0),c=i.slice(V.Element.Data.Offset,V.Element.Data.Offset+u);i=i.slice(V.Element.Data.Offset+u),n.push({address:s,size:u,data:c})}return n}}]),t}();function gt(t){return new TextDecoder("utf-8").decode(t.subarray(0,t.indexOf(0)))}function _t(t){var e=new TextEncoder("utf-8").encode(t),r=new Uint8Array(e.length+1);return r.set(e,0),r.set([0],e.length),r}function Dt(t){for(var e=new Uint8Array(t.length/2),r=0;r<e.length;r++)e[r]=parseInt(t.substr(2*r,2),16);return e}function yt(t){for(var e=atob(t),r="",n=0;n<e.length;n++){var o=e.charCodeAt(n).toString(16);r+=2===o.length?o:"0"+o}return r.toUpperCase()}function wt(t){return btoa(t.match(/\w{2}/g).map((function(t){return String.fromCharCode(parseInt(t,16))})).join(""))}function bt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Et(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Et(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ft(t,e,r){return e&&Ct(t.prototype,e),r&&Ct(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){return At=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},At(t,e)}function xt(t){var e=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(t){return!1}}();return function(){var r,n=Ot(t);if(e){var o=Ot(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return St(this,r)}}function St(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}var Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&At(t,e)}(r,t);var e=xt(r);function r(){kt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"StorageError"].concat(n))}return Ft(r)}(p);function Pt(t){return new DataView(t.buffer,t.byteOffset).getUint16(0,!0)}function Rt(t){var e={size:0,name:"unknown",content:"unknown"};return e.size=Pt(t),e.name=gt(t.subarray(2)),e.content=t.subarray(2+e.name.length+1,e.size),e}var Bt=function(t){function e(t){kt(this,e),this.records=t}return Ft(e,[{key:Symbol.iterator,value:function(){var t=this.records;return{next:function(){var e=Pt(t);if(0===e)return{done:!0};var r=Rt(t);return t=t.subarray(e),{value:r,done:!1}}}}}]),e}();const jt=Ft((function t(e){kt(this,t),this.availableSize=function(){var t,e=0,r=bt(new Bt(this.data));try{for(r.s();!(t=r.n()).done;){e+=t.value.size}}catch(t){r.e(t)}finally{r.f()}return this.totalSize()-e},this.totalSize=function(){return this.data.byteLength-2},this.recordsWithExtension=function(t){var e,r=[],n=bt(new Bt(this.data));try{for(n.s();!(e=n.n()).done;){var o=e.value;o.name.endsWith(t)&&r.push(o.name)}}catch(t){n.e(t)}finally{n.f()}return r},this.size=function(t){var e,r=bt(new Bt(this.data));try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.name===t)return n.size}}catch(t){r.e(t)}finally{r.f()}},this.content=function(t){var e,r=bt(new Bt(this.data));try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.name===t)return n.content}}catch(t){r.e(t)}finally{r.f()}},this.setContent=function(t,e){var r,n=0,o=0,i=bt(new Bt(this.data));try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.name===t){o=a.size;break}n+=a.size}}catch(t){i.e(t)}finally{i.f()}var s=this.data.slice(n+o),u=n,c=function(t,e){if(void 0!==e){var r=t.length+1+e.byteLength+2,n=new Uint8Array(r);return new DataView(n.buffer,n.byteOffset).setUint16(0,r,!0),n.set(_t(t),2),n.set(e,2+t.length+1),n}}(t,e);if(void 0!==c){if(Rt(c).size>this.availableSize()+o)throw new Tt("The storage on calculator is full");this.data.set(c,n),u+=c.length,s=s.slice(0,this.data.length-(n+c.length))}this.data.set(s,u),this.data.fill(0,u+s.length)},this.data=e}));function It(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Lt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Nt(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Nt(i,n,o,a,s,"next",t)}function s(t){Nt(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ht(t,e,r){return e&&Ut(t.prototype,e),r&&Ut(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gt(t,e)}function Gt(t,e){return Gt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gt(t,e)}function $t(t){var e=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(t){return!1}}();return function(){var r,n=Wt(t);if(e){var o=Wt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qt(this,r)}}function qt(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}var Yt=r(3786),Kt=2048,Xt=Dt("F00DC0DE"),Zt=Dt("FEEDC0DE"),Qt=Dt("BADBEEEF"),Jt=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"CalculatorMemoryCorruption"].concat(n))}return Ht(r)}(p),te=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"BusyCalculatorError"].concat(n))}return Ht(r)}(p),ee=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"WebUSBError"].concat(n))}return Ht(r)}(p),re=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"USBConnectionError"].concat(n))}return Ht(r)}(p),ne=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"ForbiddenMemoryAccessError"].concat(n))}return Ht(r)}(p),oe=function(t){Vt(r,t);var e=$t(r);function r(){zt(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"DeviceDetectionError"].concat(n))}return Ht(r)}(p),ie=function(t){Vt(r,t);var e=$t(r);function r(t){var n;zt(this,r);for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this,"BulkError"].concat(i))).errors=t,n}return Ht(r)}(p),ae={N0100:{name:"N0100",ElectronicSignatureAddress:536836624,RAMAddressStart:536870912,RAMAddressEnd:537133056},N0110:{name:"N0110",ElectronicSignatureAddress:535853584,RAMAddressStart:536870912,RAMAddressEnd:537133056},N0120:{name:"N0120",ElectronicSignatureAddress:535947264,RAMAddressStart:603979776,RAMAddressEnd:604307456},N0120Prototype:{displayed_name:"N0120",ElectronicSignatureAddress:535947264,name:"N0120_PORTUGAL_PROTOTYPE_20210930",RAMAddressStart:603979776,RAMAddressEnd:604307456}},se=Dt("BADD0BEE");function ue(t){for(var e="",r=0;r<t.byteLength;r++)e+=t[r].toString(16).padStart(2,"0").toUpperCase();return e}function ce(t,e){if(t.length<e.length)return!1;for(var r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0}function le(t,e){return!(t.length<e.length)&&ce(t.subarray(t.length-e.length),e)}function he(t,e){if(!(t>=134217728&&t+e<=135266304||t>=2415919104&&t+e<=2424307712))throw new ne("Access to address: "+t+" (length "+e+") is out of flash range")}function fe(t,e,r){if(e<t.RAMAddressStart||e+r>=t.RAMAddressEnd)throw new ne("Access to address: "+e+" (length "+r+") is out of RAM range")}function pe(t){if(v.info("Calculator","parseSlotInfo","header info "+t),!ce(t,Qt)||!le(t,Qt))return null;var e=new DataView(t.buffer,t.byteOffset);return{kernelHeaderAddress:e.getUint32(4,!0),userlandHeaderAddress:e.getUint32(8,!0)}}function de(t,e){if(v.info("Calculator","parseFirmwareHeader","header "+t),!ce(t,Xt))return e;e.version=gt(t.subarray(4)),e.patch=gt(t.subarray(12));var r=t.subarray(20);if(ce(r,Xt))return e;var n=new DataView(t.buffer,t.byteOffset);return e.storageAddress=n.getUint32(20,!0),ce(r=t.subarray(24),Xt)||(e.storageSize=n.getUint32(24,!0)),e}function me(t,e){if(v.info("Calculator","parseUserlandHeader","header "+t),!ce(t,Zt))return e;e.userlandVersion=gt(t.subarray(4));var r=new DataView(t.buffer,t.byteOffset),n=12;return e.storageAddress=r.getUint32(n,!0),n+=4,e.storageSize=r.getUint32(n,!0),n+=4,e.externalAppsFlashStart=r.getUint32(n,!0),n+=4,e.externalAppsFlashEnd=r.getUint32(n,!0),n+=4,e.externalAppsRamStart=r.getUint32(n,!0),n+=4,e.externalAppsRamEnd=r.getUint32(n,!0),e}function ve(){return(ve=Mt(e().mark((function t(r,n,o){var i,a,s,u,c,l,h,f;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v.info("Calculator","uploadHeader","address "+Number(n[0].address).toString(16)),i={version:"0.0.0",patch:"0000000",userlandVersion:"unknown",externalAppsFlashStart:"unknown",externalAppsFlashEnd:"unknown",externalAppsRamStart:"unknown",externalAppsRamEnd:"unknown",storageAddress:"unknown",storageSize:4096},t.prev=2,a=n[0].address+Ee.Header0.Offset,s=Ee.Header0.Size,he(a,s),t.next=8,r.upload(a,s);case 8:if(!ce(u=t.sent,Xt)||!le(u,Xt)){t.next=13;break}return t.abrupt("return",de(u,i));case 13:return a=n[0].address+Ee.Header1.Offset,s=Ee.Header1.Size,he(a,s),t.next=18,r.upload(a,s);case 18:if(!ce(u=t.sent,Xt)||!le(u,Xt)){t.next=23;break}return t.abrupt("return",de(u,i));case 23:return a=o.RAMAddressStart,s=Ee.Header2.SlotInfoSize,fe(o,a,s),t.prev=26,t.next=29,r.upload(a,s);case 29:if(c=t.sent,null!=(l=pe(c))){t.next=33;break}throw new Jt("The slot info was corrupted");case 33:return a=l.kernelHeaderAddress,s=Ee.Header2.KernelHeaderSize,he(a,s),t.next=38,r.upload(a,s);case 38:return h=t.sent,i=de(h,i),a=l.userlandHeaderAddress,s=Ee.Header2.UserlandHeaderSize,he(a,s),t.next=45,r.upload(a,s);case 45:return f=t.sent,i=me(f,i),t.abrupt("return",i);case 50:return t.prev=50,t.t0=t.catch(26),t.abrupt("return",de(u,i));case 53:t.next=59;break;case 55:throw t.prev=55,t.t1=t.catch(2),t.t1.message="Upload header failed --\x3e "+t.t1.message,t.t1;case 59:case"end":return t.stop()}}),t,null,[[2,55],[26,50]])})))).apply(this,arguments)}function ge(){return ge=Mt(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(16!=(o=r.device.serialNumber).length){t.next=3;break}return t.abrupt("return",o);case 3:return t.next=5,r.upload(n.ElectronicSignatureAddress-1,13);case 5:return i=t.sent,t.abrupt("return",wt(ue(i.subarray(1,13))));case 7:case"end":return t.stop()}}),t)}))),ge.apply(this,arguments)}function _e(t,e){return De.apply(this,arguments)}function De(){return De=Mt(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v.info("Calculator","calculatorGetStorage","address "+Number(n.firmware.storageAddress).toString(16)),"unknown"!==n.firmware.storageAddress){t.next=3;break}throw new Jt("The Storage address could not be found in header");case 3:t.prev=3,fe(n.model,n.firmware.storageAddress,n.firmware.storageSize+2*se.length),t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(3),new Jt("Calculator Get Storage failed --\x3e "+t.t0);case 10:if(!1===r.storage){t.next=12;break}return t.abrupt("return",r.storage);case 12:return t.prev=12,t.next=15,r.dfu.upload(n.firmware.storageAddress,n.firmware.storageSize+2*se.length);case 15:if(!ce(o=t.sent,se)||!le(o,se)){t.next=22;break}return i=o.subarray(se.length,n.firmware.storageSize+se.length),r.storage=new jt(i),t.abrupt("return",r.storage);case 22:throw new Jt("Memory is corrupted: could not find storage tags");case 23:t.next=29;break;case 25:throw t.prev=25,t.t1=t.catch(12),t.t1.message="CalculationGetStorage failed --\x3e "+t.t1.message,t.t1;case 29:case"end":return t.stop()}}),t,null,[[3,7],[12,25]])}))),De.apply(this,arguments)}function ye(t,e,r){return we.apply(this,arguments)}function we(){return we=Mt(e().mark((function t(r,n,o){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v.info("Calculator","calculatorSetStorage","address "+Number(n.firmware.storageAddress).toString(16)),t.prev=1,fe(n.model,n.firmware.storageAddress+se.length,o.data),t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(1),new Jt("Calculator Set Storage failed --\x3e "+t.t0);case 8:return t.prev=8,t.next=11,r.dfu.download(n.firmware.storageAddress+se.length,o.data);case 11:t.next=17;break;case 13:throw t.prev=13,t.t1=t.catch(8),t.t1.message="CalculationSetStorage failed --\x3e "+t.t1.message,t.t1;case 17:case"end":return t.stop()}}),t,null,[[1,5],[8,13]])}))),we.apply(this,arguments)}function be(t){var e=_t(t),r=new Uint8Array(e.length+1);return r[0]=1,r.set(e,1),r}var Ee=function(){function t(e,r){zt(this,t),this.dfu=new vt(e,r),this.running=!1,this.storage=!1,this.infos=!1}return Ht(t,[{key:"process",value:function(t){var e,r=this;return v.info("Calculator","process"),new Yt((function(n,o){if(r.running)return o(new te("Calculator is already processing another request"));r.running=!0,r.dfu.open().then((function(){return t(r)})).then((function(t){if(e=t,r.dfu.device.opened)return r.dfu.close()})).then((function(){return r.running=!1,n(e)})).catch((function(t){return r.running=!1,o(t)}))}))}},{key:"reconnectAndProcess",value:function(e,r){var n=this;return new Yt((function(o,i){return v.info("Calculator","reconnect"),null==navigator.usb?i(new ee("Web usb unvailable")):t.StallUntilConnect(n.dfu.device.serialNumber,e).then((function(t){return t.process(r)})).then((function(t){o(t)})).catch((function(t){i(t)}))}))}},{key:"extractInfos",value:function(){var t=this;return v.info("Calculator","extractInfos"),new Yt((function(e,r){var n,o,i;return!1!==t.infos?e(t):t.dfu.getMemoryLayout().then((function(e){return n=e,o=function(t,e){if("NumWorks Calculator"==t.productName&&2==t.deviceVersionMinor)return"EAAbABVROTUxNDM4"==t.serialNumber?ae.N0120Prototype:ae.N0120;var r=e[e.length-1].lastAddress;return r>135135232&&r<2415919104?ae.N0100:ae.N0110}(t.dfu.device,n),function(t,e,r){return ve.apply(this,arguments)}(t.dfu,n,o)})).then((function(e){return i=e,function(t,e){return ge.apply(this,arguments)}(t.dfu,o)})).then((function(r){return t.infos={serialNumber:yt(r),displayedSerialNumber:r,model:o,memoryLayout:n,firmware:i},e(t)})).catch((function(t){t.message="extractInfos failed --\x3e "+t.message,r(t)}))}))}},{key:"uploadFlash",value:function(t,e,r){var n=this;return v.info("Calculator","uploadFlash","address "+Number(t).toString(16),"length "+Number(e).toString(16)),new Yt((function(o,i){try{he(t,e)}catch(t){t.message="uploadFlash failed --\x3e "+t.message,i(t)}n.dfu.upload(t,e,r).then((function(t){o(t)})).catch((function(t){t.message="uploadFlash failed --\x3e "+t.message,i(t)}))}))}},{key:"downloadFlash",value:function(t,r,n,o,i){var a=this;return v.info("Calculator","downloadFlash","address "+Number(t).toString(16)),new Yt((function(s,u){var c=function(){var t=Mt(e().mark((function t(r,n,o,i,a){var s,u,c,l,h,f,p,d,m,v,g,_,D;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=0,u=0,c=-1,l=-1,h=-1,f=-1,p=0;case 7:if(!(p<n.length)){t.next=33;break}if(!(c<0)){t.next=14;break}if(!(o>n[p].lastAddress)){t.next=13;break}return t.abrupt("continue",30);case 13:c=p;case 14:d=0;case 15:if(!(d<n[p].nbPage)){t.next=30;break}if(!(l<0)){t.next=22;break}if(o!=n[p].address+d*n[p].pageSize){t.next=21;break}l=d,t.next=22;break;case 21:return t.abrupt("continue",27);case 22:if(!((s+=n[p].pageSize)>=i.byteLength)){t.next=27;break}return h=p,f=d,t.abrupt("break",33);case 27:d++,t.next=15;break;case 30:p++,t.next=7;break;case 33:m=c;case 34:if(!(m<=h)){t.next=51;break}v=m==c?l:0,g=m==h?f+1:n[m].nbPage,_=v;case 38:if(!(_<g)){t.next=48;break}return D=n[m].address+_*n[m].pageSize,t.next=42,r.eraseSegment(D);case 42:u+=n[m].pageSize,a(u/s),D+=n[m].pageSize;case 45:_++,t.next=38;break;case 48:m++,t.next=34;break;case 51:case"end":return t.stop()}}),t)})));return function(e,r,n,o,i){return t.apply(this,arguments)}}();try{he(t,r.byteLength)}catch(t){t.message="downloadFlash failed --\x3e "+t.message,u(t)}c(a.dfu,n.memoryLayout,t,r,(function(t){return o(t)})).then((function(){s(a.dfu.download(t,r,(function(t){return i(t)})))})).catch((function(t){t.message="downloadFlash failed --\x3e "+t.message,u(t)}))}))}},{key:"reset",value:function(t){var e=this;return v.info("Calculator","reset"),new Yt((function(r,n){try{he(t.memoryLayout[0].address,0)}catch(t){t.message="reset failed --\x3e "+t.message,n(t)}return e.dfu.leave(134217728).then((function(){r(!0)})).catch((function(t){t.message="reset failed --\x3e "+t.message,n(t)}))}))}},{key:"getAvailableSpaceInfo",value:function(){var t=this;return v.info("Calculator","getAvailableSpaceInfo"),new Yt((function(e,r){var n={availableSize:!1,totalSize:!1};t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(t){n.availableSize=t.availableSize(),n.totalSize=t.totalSize(),e(n)})).catch((function(t){t.message="getAvailableSpaceInfo failed --\x3e "+t.message,r(t)}))}))}},{key:"getScripts",value:function(){var t=this;return v.info("Calculator","getScripts"),new Yt((function(e,r){t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(t){return t.recordsWithExtension(".py").map((function(e,r){return{name:e,size:t.size(e),content:gt(t.content(e).subarray(1))}}))})).then((function(t){e(t)})).catch((function(t){t.message="getScripts failed --\x3e "+t.message,r(t)}))}))}},{key:"removeScripts",value:function(){var t=this;return v.info("Calculator","removeScripts"),new Yt((function(e,r){t.extractInfos().then((function(e){return _e(t,e.infos)})).then((function(e){e.recordsWithExtension(".py").map((function(t,r){e.setContent(t)}));return ye(t,t.infos,e)})).then((function(){e(!0)})).catch((function(t){t.message="removeScripts failed --\x3e "+t.message,r(t)}))}))}},{key:"getSizeForRecord",value:function(t){var e=this;return v.info("Calculator","getSizeForRecord","name "+t),new Yt((function(r,n){var o;e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(e){o=e.size(t),r(o)})).catch((function(t){t.message="getSizeForRecord failed --\x3e "+t.message,n(t)}))}))}},{key:"setContentForRecord",value:function(t,e){var r=this;return v.info("Calculator","setContentForRecord","name "+t),new Yt((function(n,o){r.extractInfos().then((function(t){return _e(r,t.infos)})).then((function(n){try{n.setContent(t,e)}catch(t){o(t)}return ye(r,r.infos,n)})).then((function(){n(!0)})).catch((function(t){t.message="setContentForRecord failed --\x3e "+t.message,o(t)}))}))}},{key:"setContentForScript",value:function(t,e){var r=this;return v.info("Calculator","setContentForScript","name "+t),new Yt((function(n,o){r.setContentForRecord(t,be(e)).then((function(){n(!0)})).catch((function(t){t.message="setContentForScript failed --\x3e "+t.message,o(t)}))}))}},{key:"setRecords",value:function(t){var e=this;return v.info("Calculator","setRecords",t),new Yt((function(r,n){e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(e){try{t.forEach((function(t,r){e.setContent(t.name,t.content)}))}catch(t){n(t)}return e})).then((function(t){return ye(e,e.infos,t)})).then((function(){r(!0)})).catch((function(t){t.message="setRecords failed --\x3e "+t.message,n(t)}))}))}},{key:"setScripts",value:function(t){var e=this;return v.info("Calculator","setScripts",t),new Yt((function(r,n){var o=[];t.forEach((function(t,e){o[e]={name:t.name,content:be(t.content)}})),e.setRecords(o).then((function(){r(!0)})).catch((function(t){t.message="setScripts failed --\x3e "+t.message,n(t)}))}))}},{key:"removeRecord",value:function(t){var e=this;return v.info("Calculator","removeRecord","name "+t),new Yt((function(r,n){e.extractInfos().then((function(t){return _e(e,t.infos)})).then((function(r){return r.setContent(t),ye(e,e.infos,r)})).then((function(){r(!0)})).catch((function(t){t.memory="removeRecord failed --\x3e "+t.message,n(t)}))}))}}],[{key:"DisplayableFirmwarePatch",value:function(t){return"badbabe"==t?"unofficial":t}},{key:"CheckFirmware",value:function(t,e){for(var r=0;r<e.byteLength;r++)if(t[r]!=e[r])throw new Jt("The uploaded firmware differs from the reference at byte "+r);return!0}},{key:"StallUntilConnect",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return v.info("Calculator","StallUntilConnect"),new Yt((function(o,i){return n>60?i(new oe("Device detection timed out")):navigator.usb.getDevices().then((function(a){var s,u=It(a);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(c.serialNumber===e)return r(1),o(new t(c,Kt))}}catch(t){u.e(t)}finally{u.f()}return r((n-1)/n),setTimeout((function(){return t.StallUntilConnect(e,r,n+1).then((function(t){o(t)})).catch((function(t){i(t)}))}),1e3)})).catch((function(t){i(t)}))}))}}]),t}();Ee.Header0={Offset:428,Size:24},Ee.Header1={Offset:452,Size:32},Ee.Header2={SlotInfoSize:16,KernelHeaderSize:24,UserlandHeaderSize:40},Ee.Product={Numworks:"numworks",ST:"ST"};var Ce=function(){function t(){zt(this,t),this.calculators=[]}return Ht(t,[{key:"singleConnectAndExtractInfos",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return 1==this.calculators.length&&null!=this.calculators[0].info?this.calculators[0]:this.connectAndProcess((function(t){return t.extractInfos()}),!1,[Ee.Product.Numworks],t).then((function(t){return t[0]}))}},{key:"connectAndProcess",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ee.Product.Numworks],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];v.info("CalculatorBulk","connectAndProcess");var i=[];return new Yt((function(a,s){r.connect(n,e,o).then((function(e){return r.connected()?Yt.map(e,(function(e){return e.process(t).catch((function(t){i.push({serialNumber:e.infos.serialNumber,error:t})}))})).then((function(t){if(i.length>0){if(1==e.length)throw i[0].error;throw new ie(i)}return a(t)})):s(new re("No usb connection found"))})).catch((function(t){s(t)}))}))}},{key:"connected",value:function(){return this.calculators.length>0}},{key:"connect",value:function(e,r,n){var o=this;return new Yt((function(i,a){t.Connect(e,n).then((function(t){o.calculators=r||0==t.length?t:[t[0]],i(o.calculators)})).catch((function(t){t.memory="connect failed --\x3e "+t.message,a(t)}))}))}}],[{key:"Connect",value:function(t,e){v.info("CalculatorBulk","connect",t);var r=[],n=t.map((function(t){return t==Ee.Product.Numworks?41617:57105})),o=[];return n.forEach((function(t){return o.push({vendorId:1155,productId:t})})),new Yt((function(t,i){if(null==navigator.usb)return i(new ee("Web usb unvailable"));e?(v.info("CalculatorBulk","connect","request device"),navigator.usb.requestDevice({filters:o}).then((function(e){return r.push(new Ee(e,Kt)),t(r)})).catch((function(t){i(new re("Usb device selection failure: "+t))}))):(v.info("Calculator","connect","get device"),navigator.usb.getDevices().then((function(e){var o,i=It(e);try{for(i.s();!(o=i.n()).done;){var a=o.value;1155===a.vendorId&&n.includes(a.productId)&&r.push(new Ee(a,Kt))}}catch(t){i.e(t)}finally{i.f()}return t(r)})).catch((function(t){i(new re("Usb device failed: "+t))})))}))}}]),t}();r(382);var Fe=r(5405),ke=r(5477),Ae=r(3825),xe=r.n(Ae);function Se(t){return new Promise(((e,n)=>{let o={locateFile:function(t,e){return r(3835)},preRun:function(){o.FS.writeFile("input.dat",t.input)},onAbort:n,arguments:t.arguments.concat(["input.dat","output.dat"]),postRun:function(){e(o.FS.readFile(t.output||"output.dat"))}};xe()(o)}))}function Oe(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Te(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pe(t,e){return Math.round(255/((1<<e)-1)*t)}var Re=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.rgba8888Data=e}var r,n,o,i,a;return r=t,n=[{key:"toPNG",value:function(){if("function"==typeof ImageData){var e=new ImageData(new Uint8ClampedArray(this.rgba8888Data.buffer),t.Width,t.Height),r=document.createElement("canvas");return r.width=t.Width,r.height=t.Height,r.getContext("2d").putImageData(e,0,0),r.toDataURL()}console.error("ImageData is unavailable")}},{key:"toNWI",value:function(){var t=function(t){for(var e=t.length/4,r=new Uint8Array(2*e),n=0;n<e;n++){var o=t[4*n]>>3<<11|t[4*n+1]>>2<<5|t[4*n+2]>>3;r[2*n]=255&o,r[2*n+1]=o>>8&255}return r}(this.rgba8888Data),e=Fe.compressBlock(t,new Uint8Array(0),0,t.length,Fe.makeBuffer(65536)),r=new Uint8Array(e);return Fe.compressBlock(t,r,0,t.length,Fe.makeBuffer(65536)),r}},{key:"toIconO",value:(i=e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se({arguments:["--input-target","binary","--output-target","elf32-littlearm","--rename-section",".data=.rodata.eadk_app_icon","--redefine-sym","_binary_input_dat_start=eadk_app_icon","--strip-symbol","_binary_input_dat_end","--strip-symbol","_binary_input_dat_size"],input:this.toNWI()});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})),a=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){Oe(o,r,n,a,s,"next",t)}function s(t){Oe(o,r,n,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})}],o=[{key:"fromPNG",value:function(e){var r=ke.y.sync.read(e);if(r.width!=t.Width)throw"Icon has an invalid width";if(r.height!=t.Height)throw"Icon has an invalid height";return new t(r.data)}},{key:"fromNWI",value:function(e){var r=new Uint8Array(t.Width*t.Height*2);Fe.decompressBlock(e,r,0,e.length,0);var n=function(t){for(var e=t.length/2,r=new Uint8Array(4*e),n=0;n<e;n++){var o=t[2*n+1]<<8|t[2*n],i=o>>11&31,a=o>>5&63,s=31&o;r[4*n]=Pe(i,5),r[4*n+1]=Pe(a,6),r[4*n+2]=Pe(s,5),r[4*n+3]=255}return r}(r);return new t(n)}}],n&&Te(r.prototype,n),o&&Te(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();Re.Width=55,Re.Height=56;const Be=Re;var je=r(7481),Ie=r.n(je);function Le(t){return new Promise(((e,n)=>{let o={locateFile:function(t,e){return r(7573)},preRun:function(){for(const[e,r]of Object.entries(t.inputs))o.FS.writeFile(e,r)},printErr:function(t){o.errorLog||="",o.errorLog=o.errorLog.concat(t).concat("\n")},onAbort:n,arguments:t.arguments.concat(["--output","output.elf"]),postRun:function(){o.errorLog?n(o.errorLog):e(o.FS.readFile("output.elf"))}};Ie()(o)}))}function Ne(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Me(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ne(i,n,o,a,s,"next",t)}function s(t){Ne(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ue(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function He(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var ze=0;function Ve(t){return"__private_"+ze+++"_"+t}var Ge=r(7475),$e=r(8006),qe=Ve("getSectionNamed"),We=Ve("refreshSizeAndNeedOfExternalData"),Ye=Ve("externalObject"),Ke=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.defineProperty(this,Ye,{value:Je}),Object.defineProperty(this,We,{value:Qe}),Object.defineProperty(this,qe,{value:Xe}),this.nwaData=e,this.size=void 0,this.name=void 0,this.icon=void 0,this.needsExternalData=void 0}var r,n,o,i,a;return r=t,n=[{key:"loadIcon",value:function(){var t=this;return He(this,qe)[qe](".rodata.eadk_app_icon").then((function(e){return t.icon=Be.fromNWI(e).toPNG()}))}},{key:"loadName",value:function(){var t=this;return He(this,qe)[qe](".rodata.eadk_app_name").then((function(e){return t.name=gt(e)}))}},{key:"load",value:function(){this.loadIcon(),this.loadName(),He(this,We)[We]()}},{key:"setExternalData",value:function(t){this.externalData=t,He(this,We)[We]()}},{key:"flatElf",value:(a=Me(e().mark((function t(r){var n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n={arguments:["--script","linker.ld","--gc-sections","--allow-multiple-definition","eadk.o","app.nwa"],inputs:{"linker.ld":Ge(r),"app.nwa":this.nwaData,"eadk.o":new Uint8Array($e.data)}},!this.externalData){t.next=7;break}return o="extra-data.o",n.arguments.push(o),t.next=6,He(this,Ye)[Ye]();case 6:n.inputs[o]=t.sent;case 7:return t.next=9,Le(n);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"flatBin",value:(i=Me(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Se,t.t1=["--output-target","binary"],t.next=4,this.flatElf(r);case 4:return t.t2=t.sent,t.t3={arguments:t.t1,input:t.t2},t.next=8,(0,t.t0)(t.t3);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}],n&&Ue(r.prototype,n),o&&Ue(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();function Xe(t){return Ze.apply(this,arguments)}function Ze(){return(Ze=Me(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se({arguments:["--output-target","binary","--only-section",r],input:this.nwaData});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Qe(){var t=this;this.flatBin({flashStart:2415919104,flashLength:8388608,ramStart:536870912,ramLength:262144}).then((function(e){var r=e.byteLength+(Ke.AppSectorSize-e.byteLength%Ke.AppSectorSize);t.size=r,t.needsExternalData=!1})).catch((function(e){if(!e.includes("_eadk_external_data"))throw e;t.size=void 0,t.needsExternalData=!0}))}function Je(){return Se({arguments:["--input-target","binary","--output-target","elf32-littlearm","--rename-section",".data=.rodata.eadk_external_data,alloc,load,readonly,data,contents","--redefine-sym","_binary_input_dat_start=_eadk_external_data_start","--redefine-sym","_binary_input_dat_size=_eadk_external_data_size","--strip-symbol","_binary_input_dat_end"],input:this.externalData})}Ke.AppSectorSize=65536;const tr=Ke;function er(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function rr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){er(i,n,o,a,s,"next",t)}function s(t){er(i,n,o,a,s,"throw",t)}a(void 0)}))}}function nr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return or(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return or(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function or(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ir(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ar(t,e,r){return e&&ir(t.prototype,e),r&&ir(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ur(t,e){return ur=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ur(t,e)}function cr(t){var e=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(t){return!1}}();return function(){var r,n=hr(t);if(e){var o=hr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lr(this,r)}}function lr(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hr(t){return hr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hr(t)}var fr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ur(t,e)}(r,t);var e=cr(r);function r(){sr(this,r);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.call.apply(e,[this,"CalculatorMemoryOverflow"].concat(n))}return ar(r)}(p),pr=function(){function t(){sr(this,t),this.apps=[]}var r,n;return ar(t,[{key:"push",value:function(t){this.apps.push(t)}},{key:"isReadyToUpload",value:function(){var t,e=nr(this.apps);try{for(e.s();!(t=e.n()).done;){if(t.value.needsExternalData)return!1}}catch(t){e.e(t)}finally{e.f()}return this.apps.length>0}},{key:"upload",value:(n=rr(e().mark((function t(r,n){var o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=r.infos.firmware,i={flashStart:o.externalAppsFlashStart,flashLength:o.externalAppsFlashEnd-o.externalAppsFlashStart,ramStart:o.externalAppsRamStart,ramLength:o.externalAppsRamEnd-o.externalAppsRamStart},t.next=4,this.flatBin(i);case 4:a=t.sent,r.process((function(t){return t.downloadFlash(i.flashStart,a,r.infos,(function(t){n(.2*t)}),(function(t){n(.2+.8*t)})).then((function(){return r.dfu.leave(i.flashStart)}))}));case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"concatenateU8A",value:function(t,e){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(t,0),r.set(e,t.byteLength),r}},{key:"flatBin",value:(r=rr(e().mark((function t(r){var n,o,i,a,s,u,c,l,h,f,p;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new Uint8Array(0),o=r.flashStart+r.flashLength,i=r.flashStart,a=nr(this.apps),t.prev=4,a.s();case 6:if((s=a.n()).done){t.next=19;break}if(u=s.value,!(i>=o)){t.next=10;break}throw new fr("External app sector would be overflown");case 10:return t.next=12,u.flatBin({flashStart:i,flashLength:o-i,ramStart:r.ramStart,ramLength:r.ramLength});case 12:c=t.sent,n=this.concatenateU8A(n,c),i+=c.byteLength,(l=c.byteLength%tr.AppSectorSize)>0&&(h=tr.AppSectorSize-l,(f=new Uint8Array(h)).fill(255),n=this.concatenateU8A(n,f),i+=h);case 17:t.next=6;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(4),a.e(t.t0);case 24:return t.prev=24,a.f(),t.finish(24);case 27:return i<o&&((p=new Uint8Array(tr.AppSectorSize)).fill(255),n=this.concatenateU8A(n,p)),t.abrupt("return",n);case 29:case"end":return t.stop()}}),t,this,[[4,21,24,27]])}))),function(t){return r.apply(this,arguments)})},{key:"totalSize",value:function(){var t,e=0,r=nr(this.apps);try{for(r.s();!(t=r.n()).done;){e+=t.value.size||0}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"removeAppAtIndex",value:function(t){this.apps.splice(t,1)}}]),t}();const dr=pr,mr=r.p+"eadk/eadk.h";var vr=r(2081);function gr(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function _r(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gr(i,n,o,a,s,"next",t)}function s(t){gr(i,n,o,a,s,"throw",t)}a(void 0)}))}}var Dr=r(1017),yr=Dr.dirname,wr=(Dr.resolve,r(7147)),br=r(7461).Command,Er=r(6002);function Cr(t){var r=new br;function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=wr.readFileSync(t),n=new tr(r);if(e.externalData){var o=wr.readFileSync(e.externalData);n.setExternalData(o)}return n}function o(){return o=_r(e().mark((function t(r,o){var i,a,s,u,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n(r,o),(a=new dr).push(i),s=new Ce,t.next=6,s.singleConnectAndExtractInfos(!0);case 6:return u=t.sent,(c=new Er.SingleBar({stopOnComplete:!0,format:"Upload [{bar}] {percentage}% | ETA: {eta}s"})).start(1,0),t.next=11,a.upload(u,(function(t){c.update(t)}));case 11:case"end":return t.stop()}}),t)}))),o.apply(this,arguments)}function i(){return(i=_r(e().mark((function t(r,o,i){var a,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n(r,i),t.next=3,a.flatElf(i);case 3:s=t.sent,wr.writeFileSync(o,s);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(){return(a=_r(e().mark((function t(r,o,i){var a,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n(r,i),t.next=3,a.flatBin(i);case 3:s=t.sent,wr.writeFileSync(o,s);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=_r(e().mark((function t(r,n){var o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=wr.readFileSync(r),i=Be.fromPNG(o),t.t0=wr,t.t1=n,t.next=6,i.toIconO();case 6:t.t2=t.sent,t.t0.writeFileSync.call(t.t0,t.t1,t.t2);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}r.name("nwlink").description("Command-line tool to interact with a NumWorks calculator").version(require("../package.json").version),r.command("install-nwa").description("Install a NWA app").argument("<input.nwa>","Input NWA file").option("-d, --external-data <file>","External data file").action((function(t,e){return o.apply(this,arguments)})),r.command("nwa-elf").description("Link a NWA app").argument("<input.nwa>","Input NWA file").argument("<output.elf>","Output ELF file").option("-d, --external-data <file>","External data file").option("-fs, --flash-start <flashStart>","Flash memory start address","0x90000000").option("-fl, --flash-length <flashLength>","Flash memory length","8M").option("-rs, --ram-start <flashStart>","RAM start address","0x20000000").option("-rl, --ram-length <flashLength>","RAM length","256K").action((function(t,e,r){return i.apply(this,arguments)})),r.command("nwa-bin").description("Link a NWA app and convert to binary format").argument("<input.nwa>","Input NWA file").argument("<output.bin>","Output BIN file").option("-d, --external-data <file>","External data file").option("-fs, --flash-start <flashStart>","Flash memory start address","0x90000000").option("-fl, --flash-length <flashLength>","Flash memory length","8M").option("-rs, --ram-start <flashStart>","RAM start address","0x20000000").option("-rl, --ram-length <flashLength>","RAM length","256K").action((function(t,e,r){return a.apply(this,arguments)})),r.command("nwa-name").description("Print the name of a NWA app").argument("<input.nwa>","Input NWA file").action((function(t){n(t).loadName().then((function(t){return console.log(t)}))})),r.command("png-nwi").description("Convert a PNG file to a NWI image (LZ4-compressed RGB565)").argument("<file.png>","Input PNG file").argument("<file.nwi>","Output NWI file").action((function(t,e){var r=wr.readFileSync(t),n=Be.fromPNG(r);wr.writeFileSync(e,n.toNWI())})),r.command("png-icon-o").description("Convert a PNG file to an ELF icon object (NWI data in a .rodata.eadk_app_icon ELF section)").argument("<file.png>","Input PNG file").argument("<file.o>","Output ELF object file").action((function(t,e){return s.apply(this,arguments)})),r.command("eadk-cflags").description("Print EADK CFLAGS").action((function(){var t=["-mthumb","-mfloat-abi=hard","-mcpu=cortex-m7","-mfpu=fpv5-sp-d16","-I"+yr(mr)];console.log(t.join(" "))})),r.command("view-eadk-h").description("Open eadk.h in $VISUAL or $EDITOR").action((function(){var t=process.env.VISUAL||process.env.EDITOR;t?(0,vr.execSync)("".concat(t," ").concat(mr),{stdio:"inherit"}):console.error("Please define $VISUAL or $EDITOR")})),r.parseAsync(t).catch((function(t){console.error(t.message||t),process.exit(1)}))}global.navigator={usb:o.webusb}})(),module.exports=n.default})();
|