monocart-reporter 2.4.4 → 2.4.6

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.
@@ -1,36 +1,35 @@
1
- var zs=Object.create;var Le=Object.defineProperty;var Ys=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var Xs=Object.getPrototypeOf,Js=Object.prototype.hasOwnProperty;var g=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Zs=(r,e)=>{for(var t in e)Le(r,t,{get:e[t],enumerable:!0})},Er=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ks(e))!Js.call(r,i)&&i!==t&&Le(r,i,{get:()=>e[i],enumerable:!(n=Ys(e,i))||n.enumerable});return r};var F=(r,e,t)=>(t=r!=null?zs(Xs(r)):{},Er(e||!r||!r.__esModule?Le(t,"default",{value:r,enumerable:!0}):t,r)),Qs=r=>Er(Le({},"__esModule",{value:!0}),r);var Sr=g((xl,Or)=>{"use strict";var ea=/[|\\{}()[\]^$+*?.-]/g;Or.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(ea,"\\$&")}});var Mr=g((El,Ar)=>{"use strict";var ta=Sr(),ra=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",kr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(r=>new RegExp(`(?:\\((?:node:)?${r}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${r}(?:\\.js)?:\\d+:\\d+$)`));kr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var mt=class r{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=r.nodeInternals()),"cwd"in e||(e.cwd=ra),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,na(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...kr]}clean(e,t=0){t=" ".repeat(t),Array.isArray(e)||(e=e.split(`
2
- `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,i=null,s=[];return e.forEach(a=>{if(a=a.replace(/\\/g,"/"),this._internals.some(u=>u.test(a)))return;let o=/^\s*at /.test(a);n?a=a.trimEnd().replace(/^(\s+)at /,"$1"):(a=a.trim(),o&&(a=a.slice(3))),a=a.replace(`${this._cwd}/`,""),a&&(o?(i&&(s.push(i),i=null),s.push(a)):(n=!0,i=a))}),s.map(a=>`${t}${a}
3
- `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:s}=i;return Error.stackTraceLimit=n,this.clean(s)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:i}=Error;Error.prepareStackTrace=(o,u)=>this._wrapCallSite?u.map(this._wrapCallSite):u,e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:a}=s;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:i}),a}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};Cr(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let i;try{i=t.getTypeName()}catch{}i&&i!=="Object"&&i!=="[object Object]"&&(n.type=i);let s=t.getFunctionName();s&&(n.function=s);let a=t.getMethodName();return a&&s!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(ia);if(!t)return null;let n=t[1]==="new",i=t[2],s=t[3],a=t[4],o=Number(t[5]),u=Number(t[6]),l=t[7],c=t[8],f=t[9],b=t[10]==="native",_=t[11]===")",m,h={};if(c&&(h.line=Number(c)),f&&(h.column=Number(f)),_&&l){let v=0;for(let y=l.length-1;y>0;y--)if(l.charAt(y)===")")v++;else if(l.charAt(y)==="("&&l.charAt(y-1)===" "&&(v--,v===-1&&l.charAt(y-1)===" ")){let Y=l.slice(0,y-1);l=l.slice(y+1),i+=` (${Y}`;break}}if(i){let v=i.match(sa);v&&(i=v[1],m=v[2])}return Cr(h,l,this._cwd),n&&Object.defineProperty(h,"constructor",{value:!0,configurable:!0}),s&&(h.evalOrigin=s,h.evalLine=o,h.evalColumn=u,h.evalFile=a&&a.replace(/\\/g,"/")),b&&(h.native=!0),i&&(h.function=i),m&&i!==m&&(h.method=m),h}};function Cr(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function na(r){if(r.length===0)return[];let e=r.map(t=>ta(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var ia=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),sa=/^(.*?) \[as (.*?)\]$/;Ar.exports=mt});var Tr=g(Ie=>{Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;Ie.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e}});var Lr=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.isIdentifierChar=$r;me.isIdentifierName=la;me.isIdentifierStart=Nr;var bt="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Pr="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",aa=new RegExp("["+bt+"]"),oa=new RegExp("["+bt+Pr+"]");bt=Pr=null;var Rr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ua=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function gt(r,e){let t=65536;for(let n=0,i=e.length;n<i;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function Nr(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&aa.test(String.fromCharCode(r)):gt(r,Rr)}function $r(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&oa.test(String.fromCharCode(r)):gt(r,Rr)||gt(r,ua)}function la(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){let i=r.charCodeAt(++t);(i&64512)===56320&&(n=65536+((n&1023)<<10)+(i&1023))}if(e){if(e=!1,!Nr(n))return!1}else if(!$r(n))return!1}return!e}});var jr=g(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.isKeyword=pa;X.isReservedWord=Ir;X.isStrictBindOnlyReservedWord=Fr;X.isStrictBindReservedWord=da;X.isStrictReservedWord=Br;var vt={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ca=new Set(vt.keyword),fa=new Set(vt.strict),ha=new Set(vt.strictBind);function Ir(r,e){return e&&r==="await"||r==="enum"}function Br(r,e){return Ir(r,e)||fa.has(r)}function Fr(r){return ha.has(r)}function da(r,e){return Br(r,e)||Fr(r)}function pa(r){return ca.has(r)}});var Wr=g(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});Object.defineProperty(j,"isIdentifierChar",{enumerable:!0,get:function(){return _t.isIdentifierChar}});Object.defineProperty(j,"isIdentifierName",{enumerable:!0,get:function(){return _t.isIdentifierName}});Object.defineProperty(j,"isIdentifierStart",{enumerable:!0,get:function(){return _t.isIdentifierStart}});Object.defineProperty(j,"isKeyword",{enumerable:!0,get:function(){return ge.isKeyword}});Object.defineProperty(j,"isReservedWord",{enumerable:!0,get:function(){return ge.isReservedWord}});Object.defineProperty(j,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return ge.isStrictBindOnlyReservedWord}});Object.defineProperty(j,"isStrictBindReservedWord",{enumerable:!0,get:function(){return ge.isStrictBindReservedWord}});Object.defineProperty(j,"isStrictReservedWord",{enumerable:!0,get:function(){return ge.isStrictReservedWord}});var _t=Lr(),ge=jr()});var Dr=g((Al,qr)=>{"use strict";var ma=/[|\\{}()[\]^$+*?.]/g;qr.exports=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(ma,"\\$&")}});var Ur=g((Ml,Vr)=>{"use strict";Vr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var yt=g((Tl,Yr)=>{var J=Ur(),zr={};for(Be in J)J.hasOwnProperty(Be)&&(zr[J[Be]]=Be);var Be,d=Yr.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(A in d)if(d.hasOwnProperty(A)){if(!("channels"in d[A]))throw new Error("missing channels property: "+A);if(!("labels"in d[A]))throw new Error("missing channel labels property: "+A);if(d[A].labels.length!==d[A].channels)throw new Error("channel and label counts mismatch: "+A);Hr=d[A].channels,Gr=d[A].labels,delete d[A].channels,delete d[A].labels,Object.defineProperty(d[A],"channels",{value:Hr}),Object.defineProperty(d[A],"labels",{value:Gr})}var Hr,Gr,A;d.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),s=Math.max(e,t,n),a=s-i,o,u,l;return s===i?o=0:e===s?o=(t-n)/a:t===s?o=2+(n-e)/a:n===s&&(o=4+(e-t)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(i+s)/2,s===i?u=0:l<=.5?u=a/(s+i):u=a/(2-s-i),[o,u*100,l*100]};d.rgb.hsv=function(r){var e,t,n,i,s,a=r[0]/255,o=r[1]/255,u=r[2]/255,l=Math.max(a,o,u),c=l-Math.min(a,o,u),f=function(b){return(l-b)/6/c+1/2};return c===0?i=s=0:(s=c/l,e=f(a),t=f(o),n=f(u),a===l?i=n-t:o===l?i=1/3+e-n:u===l&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]};d.rgb.hwb=function(r){var e=r[0],t=r[1],n=r[2],i=d.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,s*100,n*100]};d.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i,s,a,o;return o=Math.min(1-e,1-t,1-n),i=(1-e-o)/(1-o)||0,s=(1-t-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,[i*100,s*100,a*100,o*100]};function ga(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}d.rgb.keyword=function(r){var e=zr[r];if(e)return e;var t=1/0,n;for(var i in J)if(J.hasOwnProperty(i)){var s=J[i],a=ga(r,s);a<t&&(t=a,n=i)}return n};d.keyword.rgb=function(r){return J[r]};d.rgb.xyz=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+t*.3576+n*.1805,s=e*.2126+t*.7152+n*.0722,a=e*.0193+t*.1192+n*.9505;return[i*100,s*100,a*100]};d.rgb.lab=function(r){var e=d.rgb.xyz(r),t=e[0],n=e[1],i=e[2],s,a,o;return t/=95.047,n/=100,i/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,a=500*(t-n),o=200*(n-i),[s,a,o]};d.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i,s,a,o,u;if(t===0)return u=n*255,[u,u,u];n<.5?s=n*(1+t):s=n+t-n*t,i=2*n-s,o=[0,0,0];for(var l=0;l<3;l++)a=e+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?u=i+(s-i)*6*a:2*a<1?u=s:3*a<2?u=i+(s-i)*(2/3-a)*6:u=i,o[l]=u*255;return o};d.hsl.hsv=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=t,s=Math.max(n,.01),a,o;return n*=2,t*=n<=1?n:2-n,i*=s<=1?s:2-s,o=(n+t)/2,a=n===0?2*i/(s+i):2*t/(n+t),[e,a*100,o*100]};d.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-t),o=255*n*(1-t*s),u=255*n*(1-t*(1-s));switch(n*=255,i){case 0:return[n,u,a];case 1:return[o,n,a];case 2:return[a,n,u];case 3:return[a,o,n];case 4:return[u,a,n];case 5:return[n,a,o]}};d.hsv.hsl=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),s,a,o;return o=(2-t)*n,s=(2-t)*i,a=t*i,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};d.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,s,a,o,u;i>1&&(t/=i,n/=i),s=Math.floor(6*e),a=1-n,o=6*e-s,s&1&&(o=1-o),u=t+o*(a-t);var l,c,f;switch(s){default:case 6:case 0:l=a,c=u,f=t;break;case 1:l=u,c=a,f=t;break;case 2:l=t,c=a,f=u;break;case 3:l=t,c=u,f=a;break;case 4:l=u,c=t,f=a;break;case 5:l=a,c=t,f=u;break}return[l*255,c*255,f*255]};d.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,s,a,o;return s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),[s*255,a*255,o*255]};d.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i,s,a;return i=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,a=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]};d.xyz.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return e/=95.047,t/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*t-16,s=500*(e-t),a=200*(t-n),[i,s,a]};d.lab.xyz=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;s=(e+16)/116,i=t/500+s,a=s-n/200;var o=Math.pow(s,3),u=Math.pow(i,3),l=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]};d.lab.lch=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return i=Math.atan2(n,t),s=i*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(t*t+n*n),[e,a,s]};d.lch.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return a=n/360*2*Math.PI,i=t*Math.cos(a),s=t*Math.sin(a),[e,i,s]};d.rgb.ansi16=function(r){var e=r[0],t=r[1],n=r[2],i=1 in arguments?arguments[1]:d.rgb.hsv(r)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};d.hsv.ansi16=function(r){return d.rgb.ansi16(d.hsv.rgb(r),r[2])};d.rgb.ansi256=function(r){var e=r[0],t=r[1],n=r[2];if(e===t&&t===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};d.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,i,s]};d.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,n=Math.floor(r/36)/5*255,i=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[n,i,s]};d.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};d.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(o){return o+o}).join(""));var n=parseInt(t,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]};d.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),a=i-s,o,u;return a<1?o=s/(1-a):o=0,a<=0?u=0:i===e?u=(t-n)/a%6:i===t?u=2+(n-e)/a:u=4+(e-t)/a+4,u/=6,u%=1,[u*360,a*100,o*100]};d.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1,i=0;return t<.5?n=2*e*t:n=2*e*(1-t),n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};d.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};d.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,a=s%1,o=1-a,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return u=(1-t)*n,[(t*i[0]+u)*255,(t*i[1]+u)*255,(t*i[2]+u)*255]};d.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};d.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,n=t*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};d.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};d.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1-t,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[r[0],i*100,s*100]};d.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};d.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};d.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};d.gray.hsl=d.gray.hsv=function(r){return[0,0,r[0]]};d.gray.hwb=function(r){return[0,100,r[0]]};d.gray.cmyk=function(r){return[0,0,0,r[0]]};d.gray.lab=function(r){return[r[0],0,0]};d.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};d.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]}});var Xr=g((Pl,Kr)=>{var Fe=yt();function ba(){for(var r={},e=Object.keys(Fe),t=e.length,n=0;n<t;n++)r[e[n]]={distance:-1,parent:null};return r}function va(r){var e=ba(),t=[r];for(e[r].distance=0;t.length;)for(var n=t.pop(),i=Object.keys(Fe[n]),s=i.length,a=0;a<s;a++){var o=i[a],u=e[o];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,t.unshift(o))}return e}function _a(r,e){return function(t){return e(r(t))}}function ya(r,e){for(var t=[e[r].parent,r],n=Fe[e[r].parent][r],i=e[r].parent;e[i].parent;)t.unshift(e[i].parent),n=_a(Fe[e[i].parent][i],n),i=e[i].parent;return n.conversion=t,n}Kr.exports=function(r){for(var e=va(r),t={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var a=n[s],o=e[a];o.parent!==null&&(t[a]=ya(a,e))}return t}});var Zr=g((Rl,Jr)=>{var wt=yt(),wa=Xr(),re={},xa=Object.keys(wt);function Ea(r){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Oa(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=r(t);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in r&&(e.conversion=r.conversion),e}xa.forEach(function(r){re[r]={},Object.defineProperty(re[r],"channels",{value:wt[r].channels}),Object.defineProperty(re[r],"labels",{value:wt[r].labels});var e=wa(r),t=Object.keys(e);t.forEach(function(n){var i=e[n];re[r][n]=Oa(i),re[r][n].raw=Ea(i)})});Jr.exports=re});var en=g((Nl,Qr)=>{"use strict";var ne=Zr(),je=(r,e)=>function(){return`\x1B[${r.apply(ne,arguments)+e}m`},We=(r,e)=>function(){let t=r.apply(ne,arguments);return`\x1B[${38+e};5;${t}m`},qe=(r,e)=>function(){let t=r.apply(ne,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function Sa(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let s=e[i];for(let a of Object.keys(s)){let o=s[a];e[a]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},s[a]=e[a],r.set(o[0],o[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:r,enumerable:!1})}let t=i=>i,n=(i,s,a)=>[i,s,a];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:je(t,0)},e.color.ansi256={ansi256:We(t,0)},e.color.ansi16m={rgb:qe(n,0)},e.bgColor.ansi={ansi:je(t,10)},e.bgColor.ansi256={ansi256:We(t,10)},e.bgColor.ansi16m={rgb:qe(n,10)};for(let i of Object.keys(ne)){if(typeof ne[i]!="object")continue;let s=ne[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=je(s.ansi16,0),e.bgColor.ansi[i]=je(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=We(s.ansi256,0),e.bgColor.ansi256[i]=We(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=qe(s.rgb,0),e.bgColor.ansi16m[i]=qe(s.rgb,10))}return e}Object.defineProperty(Qr,"exports",{enumerable:!0,get:Sa})});var rn=g(($l,tn)=>{"use strict";tn.exports=(r,e)=>{e=e||process.argv;let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var sn=g((Ll,nn)=>{"use strict";var Ca=require("os"),$=rn(),S=process.env,ie;$("no-color")||$("no-colors")||$("color=false")?ie=!1:($("color")||$("colors")||$("color=true")||$("color=always"))&&(ie=!0);"FORCE_COLOR"in S&&(ie=S.FORCE_COLOR.length===0||parseInt(S.FORCE_COLOR,10)!==0);function ka(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function Aa(r){if(ie===!1)return 0;if($("color=16m")||$("color=full")||$("color=truecolor"))return 3;if($("color=256"))return 2;if(r&&!r.isTTY&&ie!==!0)return 0;let e=ie?1:0;if(process.platform==="win32"){let t=Ca.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in S)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in S)||S.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in S)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(S.TEAMCITY_VERSION)?1:0;if(S.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in S){let t=parseInt((S.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(S.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(S.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(S.TERM)||"COLORTERM"in S?1:(S.TERM==="dumb",e)}function xt(r){let e=Aa(r);return ka(e)}nn.exports={supportsColor:xt,stdout:xt(process.stdout),stderr:xt(process.stderr)}});var cn=g((Il,ln)=>{"use strict";var Ma=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,an=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Ta=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Pa=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Ra=new Map([["n",`
4
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function un(r){return r[0]==="u"&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):Ra.get(r)||r}function Na(r,e){let t=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))t.push(Number(s));else if(i=s.match(Ta))t.push(i[2].replace(Pa,(a,o,u)=>o?un(o):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`);return t}function $a(r){an.lastIndex=0;let e=[],t;for(;(t=an.exec(r))!==null;){let n=t[1];if(t[2]){let i=Na(n,t[2]);e.push([n].concat(i))}else e.push([n])}return e}function on(r,e){let t={};for(let i of e)for(let s of i.styles)t[s[0]]=i.inverse?null:s.slice(1);let n=r;for(let i of Object.keys(t))if(Array.isArray(t[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);t[i].length>0?n=n[i].apply(n,t[i]):n=n[i]}return n}ln.exports=(r,e)=>{let t=[],n=[],i=[];if(e.replace(Ma,(s,a,o,u,l,c)=>{if(a)i.push(un(a));else if(u){let f=i.join("");i=[],n.push(t.length===0?f:on(r,t)(f)),t.push({inverse:o,styles:$a(u)})}else if(l){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(on(r,t)(i.join(""))),i=[],t.pop()}else i.push(c)}),n.push(i.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var mn=g((Bl,ve)=>{"use strict";var Ot=Dr(),E=en(),Et=sn().stdout,La=cn(),hn=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),dn=["ansi","ansi","ansi256","ansi16m"],pn=new Set(["gray"]),se=Object.create(null);function fn(r,e){e=e||{};let t=Et?Et.level:0;r.level=e.level===void 0?t:e.level,r.enabled="enabled"in e?e.enabled:r.level>0}function be(r){if(!this||!(this instanceof be)||this.template){let e={};return fn(e,r),e.template=function(){let t=[].slice.call(arguments);return Fa.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,be.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=be,e.template}fn(this,r)}hn&&(E.blue.open="\x1B[94m");for(let r of Object.keys(E))E[r].closeRe=new RegExp(Ot(E[r].close),"g"),se[r]={get(){let e=E[r];return De.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}};se.visible={get(){return De.call(this,this._styles||[],!0,"visible")}};E.color.closeRe=new RegExp(Ot(E.color.close),"g");for(let r of Object.keys(E.color.ansi))pn.has(r)||(se[r]={get(){let e=this.level;return function(){let n={open:E.color[dn[e]][r].apply(null,arguments),close:E.color.close,closeRe:E.color.closeRe};return De.call(this,this._styles?this._styles.concat(n):[n],this._empty,r)}}});E.bgColor.closeRe=new RegExp(Ot(E.bgColor.close),"g");for(let r of Object.keys(E.bgColor.ansi)){if(pn.has(r))continue;let e="bg"+r[0].toUpperCase()+r.slice(1);se[e]={get(){let t=this.level;return function(){let i={open:E.bgColor[dn[t]][r].apply(null,arguments),close:E.bgColor.close,closeRe:E.bgColor.closeRe};return De.call(this,this._styles?this._styles.concat(i):[i],this._empty,r)}}}}var Ia=Object.defineProperties(()=>{},se);function De(r,e,t){let n=function(){return Ba.apply(n,arguments)};n._styles=r,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||t==="gray"||t==="grey",n.__proto__=Ia,n}function Ba(){let r=arguments,e=r.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)t+=" "+r[i];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let n=E.dim.open;hn&&this.hasGrey&&(E.dim.open="");for(let i of this._styles.slice().reverse())t=i.open+t.replace(i.closeRe,i.open)+i.close,t=t.replace(/\r?\n/g,`${i.close}$&${i.open}`);return E.dim.open=n,t}function Fa(r,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(t[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return La(r,n.join(""))}Object.defineProperties(be.prototype,se);ve.exports=be();ve.exports.supportsColor=Et;ve.exports.default=ve.exports});var xn=g(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.default=Ha;_e.shouldHighlight=yn;var gn=Tr(),bn=Wr(),Ct=ja(mn(),!0);function vn(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(vn=function(n){return n?t:e})(r)}function ja(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=vn(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=i?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var Wa=new Set(["as","async","from","get","of","set"]);function qa(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.grey,invalid:r.white.bgRed.bold}}var Da=/\r\n|[\n\r\u2028\u2029]/,Va=/^[()[\]{}]$/,_n;{let r=/^[a-z][\w-]*$/i,e=function(t,n,i){if(t.type==="name"){if((0,bn.isKeyword)(t.value)||(0,bn.isStrictReservedWord)(t.value,!0)||Wa.has(t.value))return"keyword";if(r.test(t.value)&&(i[n-1]==="<"||i.slice(n-2,n)=="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&Va.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};_n=function*(t){let n;for(;n=gn.default.exec(t);){let i=gn.matchToToken(n);yield{type:e(i,n.index,t),value:i.value}}}}function Ua(r,e){let t="";for(let{type:n,value:i}of _n(e)){let s=r[n];s?t+=i.split(Da).map(a=>s(a)).join(`
5
- `):t+=i}return t}function yn(r){return Ct.default.level>0||r.forceColor}var St;function wn(r){if(r){var e;return(e=St)!=null||(St=new Ct.default.constructor({enabled:!0,level:1})),St}return Ct.default}_e.getChalk=r=>wn(r.forceColor);function Ha(r,e={}){if(r!==""&&yn(e)){let t=qa(wn(e.forceColor));return Ua(t,r)}else return r}});var On=g((jl,En)=>{"use strict";var Ga=/[|\\{}()[\]^$+*?.]/g;En.exports=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(Ga,"\\$&")}});var Cn=g((Wl,Sn)=>{"use strict";Sn.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var kt=g((ql,Tn)=>{var Z=Cn(),Mn={};for(Ve in Z)Z.hasOwnProperty(Ve)&&(Mn[Z[Ve]]=Ve);var Ve,p=Tn.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(M in p)if(p.hasOwnProperty(M)){if(!("channels"in p[M]))throw new Error("missing channels property: "+M);if(!("labels"in p[M]))throw new Error("missing channel labels property: "+M);if(p[M].labels.length!==p[M].channels)throw new Error("channel and label counts mismatch: "+M);kn=p[M].channels,An=p[M].labels,delete p[M].channels,delete p[M].labels,Object.defineProperty(p[M],"channels",{value:kn}),Object.defineProperty(p[M],"labels",{value:An})}var kn,An,M;p.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),s=Math.max(e,t,n),a=s-i,o,u,l;return s===i?o=0:e===s?o=(t-n)/a:t===s?o=2+(n-e)/a:n===s&&(o=4+(e-t)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(i+s)/2,s===i?u=0:l<=.5?u=a/(s+i):u=a/(2-s-i),[o,u*100,l*100]};p.rgb.hsv=function(r){var e,t,n,i,s,a=r[0]/255,o=r[1]/255,u=r[2]/255,l=Math.max(a,o,u),c=l-Math.min(a,o,u),f=function(b){return(l-b)/6/c+1/2};return c===0?i=s=0:(s=c/l,e=f(a),t=f(o),n=f(u),a===l?i=n-t:o===l?i=1/3+e-n:u===l&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]};p.rgb.hwb=function(r){var e=r[0],t=r[1],n=r[2],i=p.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,s*100,n*100]};p.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i,s,a,o;return o=Math.min(1-e,1-t,1-n),i=(1-e-o)/(1-o)||0,s=(1-t-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,[i*100,s*100,a*100,o*100]};function za(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}p.rgb.keyword=function(r){var e=Mn[r];if(e)return e;var t=1/0,n;for(var i in Z)if(Z.hasOwnProperty(i)){var s=Z[i],a=za(r,s);a<t&&(t=a,n=i)}return n};p.keyword.rgb=function(r){return Z[r]};p.rgb.xyz=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+t*.3576+n*.1805,s=e*.2126+t*.7152+n*.0722,a=e*.0193+t*.1192+n*.9505;return[i*100,s*100,a*100]};p.rgb.lab=function(r){var e=p.rgb.xyz(r),t=e[0],n=e[1],i=e[2],s,a,o;return t/=95.047,n/=100,i/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,a=500*(t-n),o=200*(n-i),[s,a,o]};p.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i,s,a,o,u;if(t===0)return u=n*255,[u,u,u];n<.5?s=n*(1+t):s=n+t-n*t,i=2*n-s,o=[0,0,0];for(var l=0;l<3;l++)a=e+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?u=i+(s-i)*6*a:2*a<1?u=s:3*a<2?u=i+(s-i)*(2/3-a)*6:u=i,o[l]=u*255;return o};p.hsl.hsv=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=t,s=Math.max(n,.01),a,o;return n*=2,t*=n<=1?n:2-n,i*=s<=1?s:2-s,o=(n+t)/2,a=n===0?2*i/(s+i):2*t/(n+t),[e,a*100,o*100]};p.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-t),o=255*n*(1-t*s),u=255*n*(1-t*(1-s));switch(n*=255,i){case 0:return[n,u,a];case 1:return[o,n,a];case 2:return[a,n,u];case 3:return[a,o,n];case 4:return[u,a,n];case 5:return[n,a,o]}};p.hsv.hsl=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),s,a,o;return o=(2-t)*n,s=(2-t)*i,a=t*i,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};p.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,s,a,o,u;i>1&&(t/=i,n/=i),s=Math.floor(6*e),a=1-n,o=6*e-s,s&1&&(o=1-o),u=t+o*(a-t);var l,c,f;switch(s){default:case 6:case 0:l=a,c=u,f=t;break;case 1:l=u,c=a,f=t;break;case 2:l=t,c=a,f=u;break;case 3:l=t,c=u,f=a;break;case 4:l=u,c=t,f=a;break;case 5:l=a,c=t,f=u;break}return[l*255,c*255,f*255]};p.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,s,a,o;return s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),[s*255,a*255,o*255]};p.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i,s,a;return i=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,a=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]};p.xyz.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return e/=95.047,t/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*t-16,s=500*(e-t),a=200*(t-n),[i,s,a]};p.lab.xyz=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;s=(e+16)/116,i=t/500+s,a=s-n/200;var o=Math.pow(s,3),u=Math.pow(i,3),l=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]};p.lab.lch=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return i=Math.atan2(n,t),s=i*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(t*t+n*n),[e,a,s]};p.lch.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return a=n/360*2*Math.PI,i=t*Math.cos(a),s=t*Math.sin(a),[e,i,s]};p.rgb.ansi16=function(r){var e=r[0],t=r[1],n=r[2],i=1 in arguments?arguments[1]:p.rgb.hsv(r)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};p.hsv.ansi16=function(r){return p.rgb.ansi16(p.hsv.rgb(r),r[2])};p.rgb.ansi256=function(r){var e=r[0],t=r[1],n=r[2];if(e===t&&t===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};p.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,i,s]};p.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,n=Math.floor(r/36)/5*255,i=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[n,i,s]};p.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};p.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(o){return o+o}).join(""));var n=parseInt(t,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]};p.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),a=i-s,o,u;return a<1?o=s/(1-a):o=0,a<=0?u=0:i===e?u=(t-n)/a%6:i===t?u=2+(n-e)/a:u=4+(e-t)/a+4,u/=6,u%=1,[u*360,a*100,o*100]};p.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1,i=0;return t<.5?n=2*e*t:n=2*e*(1-t),n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};p.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};p.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,a=s%1,o=1-a,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return u=(1-t)*n,[(t*i[0]+u)*255,(t*i[1]+u)*255,(t*i[2]+u)*255]};p.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};p.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,n=t*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};p.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};p.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1-t,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[r[0],i*100,s*100]};p.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};p.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};p.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};p.gray.hsl=p.gray.hsv=function(r){return[0,0,r[0]]};p.gray.hwb=function(r){return[0,100,r[0]]};p.gray.cmyk=function(r){return[0,0,0,r[0]]};p.gray.lab=function(r){return[r[0],0,0]};p.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};p.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]}});var Rn=g((Dl,Pn)=>{var Ue=kt();function Ya(){for(var r={},e=Object.keys(Ue),t=e.length,n=0;n<t;n++)r[e[n]]={distance:-1,parent:null};return r}function Ka(r){var e=Ya(),t=[r];for(e[r].distance=0;t.length;)for(var n=t.pop(),i=Object.keys(Ue[n]),s=i.length,a=0;a<s;a++){var o=i[a],u=e[o];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,t.unshift(o))}return e}function Xa(r,e){return function(t){return e(r(t))}}function Ja(r,e){for(var t=[e[r].parent,r],n=Ue[e[r].parent][r],i=e[r].parent;e[i].parent;)t.unshift(e[i].parent),n=Xa(Ue[e[i].parent][i],n),i=e[i].parent;return n.conversion=t,n}Pn.exports=function(r){for(var e=Ka(r),t={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var a=n[s],o=e[a];o.parent!==null&&(t[a]=Ja(a,e))}return t}});var $n=g((Vl,Nn)=>{var At=kt(),Za=Rn(),ae={},Qa=Object.keys(At);function eo(r){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function to(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=r(t);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in r&&(e.conversion=r.conversion),e}Qa.forEach(function(r){ae[r]={},Object.defineProperty(ae[r],"channels",{value:At[r].channels}),Object.defineProperty(ae[r],"labels",{value:At[r].labels});var e=Za(r),t=Object.keys(e);t.forEach(function(n){var i=e[n];ae[r][n]=to(i),ae[r][n].raw=eo(i)})});Nn.exports=ae});var In=g((Ul,Ln)=>{"use strict";var oe=$n(),He=(r,e)=>function(){return`\x1B[${r.apply(oe,arguments)+e}m`},Ge=(r,e)=>function(){let t=r.apply(oe,arguments);return`\x1B[${38+e};5;${t}m`},ze=(r,e)=>function(){let t=r.apply(oe,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function ro(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let s=e[i];for(let a of Object.keys(s)){let o=s[a];e[a]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},s[a]=e[a],r.set(o[0],o[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:r,enumerable:!1})}let t=i=>i,n=(i,s,a)=>[i,s,a];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:He(t,0)},e.color.ansi256={ansi256:Ge(t,0)},e.color.ansi16m={rgb:ze(n,0)},e.bgColor.ansi={ansi:He(t,10)},e.bgColor.ansi256={ansi256:Ge(t,10)},e.bgColor.ansi16m={rgb:ze(n,10)};for(let i of Object.keys(oe)){if(typeof oe[i]!="object")continue;let s=oe[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=He(s.ansi16,0),e.bgColor.ansi[i]=He(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=Ge(s.ansi256,0),e.bgColor.ansi256[i]=Ge(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=ze(s.rgb,0),e.bgColor.ansi16m[i]=ze(s.rgb,10))}return e}Object.defineProperty(Ln,"exports",{enumerable:!0,get:ro})});var Fn=g((Hl,Bn)=>{"use strict";Bn.exports=(r,e)=>{e=e||process.argv;let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Wn=g((Gl,jn)=>{"use strict";var no=require("os"),L=Fn(),C=process.env,ue;L("no-color")||L("no-colors")||L("color=false")?ue=!1:(L("color")||L("colors")||L("color=true")||L("color=always"))&&(ue=!0);"FORCE_COLOR"in C&&(ue=C.FORCE_COLOR.length===0||parseInt(C.FORCE_COLOR,10)!==0);function io(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function so(r){if(ue===!1)return 0;if(L("color=16m")||L("color=full")||L("color=truecolor"))return 3;if(L("color=256"))return 2;if(r&&!r.isTTY&&ue!==!0)return 0;let e=ue?1:0;if(process.platform==="win32"){let t=no.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in C)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in C)||C.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in C)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION)?1:0;if(C.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in C){let t=parseInt((C.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(C.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||"COLORTERM"in C?1:(C.TERM==="dumb",e)}function Mt(r){let e=so(r);return io(e)}jn.exports={supportsColor:Mt,stdout:Mt(process.stdout),stderr:Mt(process.stderr)}});var Hn=g((zl,Un)=>{"use strict";var ao=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,qn=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,oo=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,uo=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,lo=new Map([["n",`
6
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Vn(r){return r[0]==="u"&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):lo.get(r)||r}function co(r,e){let t=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))t.push(Number(s));else if(i=s.match(oo))t.push(i[2].replace(uo,(a,o,u)=>o?Vn(o):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`);return t}function fo(r){qn.lastIndex=0;let e=[],t;for(;(t=qn.exec(r))!==null;){let n=t[1];if(t[2]){let i=co(n,t[2]);e.push([n].concat(i))}else e.push([n])}return e}function Dn(r,e){let t={};for(let i of e)for(let s of i.styles)t[s[0]]=i.inverse?null:s.slice(1);let n=r;for(let i of Object.keys(t))if(Array.isArray(t[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);t[i].length>0?n=n[i].apply(n,t[i]):n=n[i]}return n}Un.exports=(r,e)=>{let t=[],n=[],i=[];if(e.replace(ao,(s,a,o,u,l,c)=>{if(a)i.push(Vn(a));else if(u){let f=i.join("");i=[],n.push(t.length===0?f:Dn(r,t)(f)),t.push({inverse:o,styles:fo(u)})}else if(l){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Dn(r,t)(i.join(""))),i=[],t.pop()}else i.push(c)}),n.push(i.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var Xn=g((Yl,we)=>{"use strict";var Pt=On(),O=In(),Tt=Wn().stdout,ho=Hn(),zn=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Yn=["ansi","ansi","ansi256","ansi16m"],Kn=new Set(["gray"]),le=Object.create(null);function Gn(r,e){e=e||{};let t=Tt?Tt.level:0;r.level=e.level===void 0?t:e.level,r.enabled="enabled"in e?e.enabled:r.level>0}function ye(r){if(!this||!(this instanceof ye)||this.template){let e={};return Gn(e,r),e.template=function(){let t=[].slice.call(arguments);return go.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,ye.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=ye,e.template}Gn(this,r)}zn&&(O.blue.open="\x1B[94m");for(let r of Object.keys(O))O[r].closeRe=new RegExp(Pt(O[r].close),"g"),le[r]={get(){let e=O[r];return Ye.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}};le.visible={get(){return Ye.call(this,this._styles||[],!0,"visible")}};O.color.closeRe=new RegExp(Pt(O.color.close),"g");for(let r of Object.keys(O.color.ansi))Kn.has(r)||(le[r]={get(){let e=this.level;return function(){let n={open:O.color[Yn[e]][r].apply(null,arguments),close:O.color.close,closeRe:O.color.closeRe};return Ye.call(this,this._styles?this._styles.concat(n):[n],this._empty,r)}}});O.bgColor.closeRe=new RegExp(Pt(O.bgColor.close),"g");for(let r of Object.keys(O.bgColor.ansi)){if(Kn.has(r))continue;let e="bg"+r[0].toUpperCase()+r.slice(1);le[e]={get(){let t=this.level;return function(){let i={open:O.bgColor[Yn[t]][r].apply(null,arguments),close:O.bgColor.close,closeRe:O.bgColor.closeRe};return Ye.call(this,this._styles?this._styles.concat(i):[i],this._empty,r)}}}}var po=Object.defineProperties(()=>{},le);function Ye(r,e,t){let n=function(){return mo.apply(n,arguments)};n._styles=r,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||t==="gray"||t==="grey",n.__proto__=po,n}function mo(){let r=arguments,e=r.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)t+=" "+r[i];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let n=O.dim.open;zn&&this.hasGrey&&(O.dim.open="");for(let i of this._styles.slice().reverse())t=i.open+t.replace(i.closeRe,i.open)+i.close,t=t.replace(/\r?\n/g,`${i.close}$&${i.open}`);return O.dim.open=n,t}function go(r,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(t[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return ho(r,n.join(""))}Object.defineProperties(ye.prototype,le);we.exports=ye();we.exports.supportsColor=Tt;we.exports.default=we.exports});var ni=g(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.codeFrameColumns=ri;Ke.default=wo;var Jn=xn(),Zn=bo(Xn(),!0);function ti(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(ti=function(n){return n?t:e})(r)}function bo(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=ti(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=i?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var Rt;function vo(r){if(r){var e;return(e=Rt)!=null||(Rt=new Zn.default.constructor({enabled:!0,level:1})),Rt}return Zn.default}var Qn=!1;function _o(r){return{gutter:r.grey,marker:r.red.bold,message:r.red.bold}}var ei=/\r\n|[\n\r\u2028\u2029]/;function yo(r,e,t){let n=Object.assign({column:0,line:-1},r.start),i=Object.assign({},n,r.end),{linesAbove:s=2,linesBelow:a=3}=t||{},o=n.line,u=n.column,l=i.line,c=i.column,f=Math.max(o-(s+1),0),b=Math.min(e.length,l+a);o===-1&&(f=0),l===-1&&(b=e.length);let _=l-o,m={};if(_)for(let h=0;h<=_;h++){let v=h+o;if(!u)m[v]=!0;else if(h===0){let y=e[v-1].length;m[v]=[u,y-u+1]}else if(h===_)m[v]=[0,c];else{let y=e[v-h].length;m[v]=[0,y]}}else u===c?u?m[o]=[u,0]:m[o]=!0:m[o]=[u,c-u];return{start:f,end:b,markerLines:m}}function ri(r,e,t={}){let n=(t.highlightCode||t.forceColor)&&(0,Jn.shouldHighlight)(t),i=vo(t.forceColor),s=_o(i),a=(h,v)=>n?h(v):v,o=r.split(ei),{start:u,end:l,markerLines:c}=yo(e,o,t),f=e.start&&typeof e.start.column=="number",b=String(l).length,m=(n?(0,Jn.default)(r,t):r).split(ei,l).slice(u,l).map((h,v)=>{let y=u+1+v,B=` ${` ${y}`.slice(-b)} |`,P=c[y],Ne=!c[y+1];if(P){let K="";if(Array.isArray(P)){let $e=h.slice(0,Math.max(P[0]-1,0)).replace(/[^\t]/g," "),pe=P[1]||1;K=[`
7
- `,a(s.gutter,B.replace(/\d/g," "))," ",$e,a(s.marker,"^").repeat(pe)].join(""),Ne&&t.message&&(K+=" "+a(s.message,t.message))}return[a(s.marker,">"),a(s.gutter,B),h.length>0?` ${h}`:"",K].join("")}else return` ${a(s.gutter,B)}${h.length>0?` ${h}`:""}`}).join(`
8
- `);return t.message&&!f&&(m=`${" ".repeat(b+1)}${t.message}
9
- ${m}`),n?i.reset(m):m}function wo(r,e,t,n={}){if(!Qn){Qn=!0;let s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{let a=new Error(s);a.name="DeprecationWarning",console.warn(new Error(s))}}return t=Math.max(t,0),ri(r,{start:{column:t,line:e}},n)}});var oi=g((Xl,ai)=>{"use strict";var{Duplex:xo}=require("stream");function ii(r){r.emit("close")}function Eo(){!this.destroyed&&this._writableState.finished&&this.destroy()}function si(r){this.removeListener("error",si),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function Oo(r,e){let t=!0,n=new xo({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(s,a){let o=!a&&n._readableState.objectMode?s.toString():s;n.push(o)||r.pause()}),r.once("error",function(s){n.destroyed||(t=!1,n.destroy(s))}),r.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(i,s){if(r.readyState===r.CLOSED){s(i),process.nextTick(ii,n);return}let a=!1;r.once("error",function(u){a=!0,s(u)}),r.once("close",function(){a||s(i),process.nextTick(ii,n)}),t&&r.terminate()},n._final=function(i){if(r.readyState===r.CONNECTING){r.once("open",function(){n._final(i)});return}r._socket!==null&&(r._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(r._socket.once("finish",function(){i()}),r.close()))},n._read=function(){r.isPaused&&r.resume()},n._write=function(i,s,a){if(r.readyState===r.CONNECTING){r.once("open",function(){n._write(i,s,a)});return}r.send(i,a)},n.on("end",Eo),n.on("error",si),n}ai.exports=Oo});var H=g((Jl,ui)=>{"use strict";ui.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var xe=g((Zl,Xe)=>{"use strict";var{EMPTY_BUFFER:So}=H(),Nt=Buffer[Symbol.species];function Co(r,e){if(r.length===0)return So;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),n=0;for(let i=0;i<r.length;i++){let s=r[i];t.set(s,n),n+=s.length}return n<e?new Nt(t.buffer,t.byteOffset,n):t}function li(r,e,t,n,i){for(let s=0;s<i;s++)t[n+s]=r[s]^e[s&3]}function ci(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function ko(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function $t(r){if($t.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new Nt(r):ArrayBuffer.isView(r)?e=new Nt(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),$t.readOnly=!1),e}Xe.exports={concat:Co,mask:li,toArrayBuffer:ko,toBuffer:$t,unmask:ci};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");Xe.exports.mask=function(e,t,n,i,s){s<48?li(e,t,n,i,s):r.mask(e,t,n,i,s)},Xe.exports.unmask=function(e,t){e.length<32?ci(e,t):r.unmask(e,t)}}catch{}});var di=g((Ql,hi)=>{"use strict";var fi=Symbol("kDone"),Lt=Symbol("kRun"),It=class{constructor(e){this[fi]=()=>{this.pending--,this[Lt]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Lt]()}[Lt](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[fi])}}};hi.exports=It});var Se=g((ec,bi)=>{"use strict";var Ee=require("zlib"),pi=xe(),Ao=di(),{kStatusCode:mi}=H(),Mo=Buffer[Symbol.species],To=Buffer.from([0,0,255,255]),Qe=Symbol("permessage-deflate"),q=Symbol("total-length"),Oe=Symbol("callback"),G=Symbol("buffers"),Ze=Symbol("error"),Je,Bt=class{constructor(e,t,n){if(this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!Je){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Je=new Ao(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Oe];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,n=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(n=>{let i=t[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);t[n]=i})}),e}decompress(e,t,n){Je.add(i=>{this._decompress(e,t,(s,a)=>{i(),n(s,a)})})}compress(e,t,n){Je.add(i=>{this._compress(e,t,(s,a)=>{i(),n(s,a)})})}_decompress(e,t,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?Ee.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Ee.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[Qe]=this,this._inflate[q]=0,this._inflate[G]=[],this._inflate.on("error",Ro),this._inflate.on("data",gi)}this._inflate[Oe]=n,this._inflate.write(e),t&&this._inflate.write(To),this._inflate.flush(()=>{let s=this._inflate[Ze];if(s){this._inflate.close(),this._inflate=null,n(s);return}let a=pi.concat(this._inflate[G],this._inflate[q]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[q]=0,this._inflate[G]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,a)})}_compress(e,t,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?Ee.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Ee.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[q]=0,this._deflate[G]=[],this._deflate.on("data",Po)}this._deflate[Oe]=n,this._deflate.write(e),this._deflate.flush(Ee.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=pi.concat(this._deflate[G],this._deflate[q]);t&&(s=new Mo(s.buffer,s.byteOffset,s.length-4)),this._deflate[Oe]=null,this._deflate[q]=0,this._deflate[G]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};bi.exports=Bt;function Po(r){this[G].push(r),this[q]+=r.length}function gi(r){if(this[q]+=r.length,this[Qe]._maxPayload<1||this[q]<=this[Qe]._maxPayload){this[G].push(r);return}this[Ze]=new RangeError("Max payload size exceeded"),this[Ze].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ze][mi]=1009,this.removeListener("data",gi),this.reset()}function Ro(r){this[Qe]._inflate=null,r[mi]=1007,this[Oe](r)}});var Ce=g((tc,et)=>{"use strict";var{isUtf8:vi}=require("buffer"),No=[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,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function $o(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function Ft(r){let e=r.length,t=0;for(;t<e;)if(!(r[t]&128))t++;else if((r[t]&224)===192){if(t+1===e||(r[t+1]&192)!==128||(r[t]&254)===192)return!1;t+=2}else if((r[t]&240)===224){if(t+2>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}et.exports={isValidStatusCode:$o,isValidUTF8:Ft,tokenChars:No};if(vi)et.exports.isValidUTF8=function(r){return r.length<24?Ft(r):vi(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");et.exports.isValidUTF8=function(e){return e.length<32?Ft(e):r(e)}}catch{}});var Vt=g((rc,Si)=>{"use strict";var{Writable:Lo}=require("stream"),_i=Se(),{BINARY_TYPES:Io,EMPTY_BUFFER:yi,kStatusCode:Bo,kWebSocket:Fo}=H(),{concat:jt,toArrayBuffer:jo,unmask:Wo}=xe(),{isValidStatusCode:qo,isValidUTF8:wi}=Ce(),tt=Buffer[Symbol.species],Do=Promise.resolve(),Wt=typeof queueMicrotask=="function"?queueMicrotask:Vo,R=0,xi=1,Ei=2,Oi=3,qt=4,rt=5,nt=6,Dt=class extends Lo{constructor(e={}){super(),this._allowSynchronousEvents=!!e.allowSynchronousEvents,this._binaryType=e.binaryType||Io[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Fo]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=R}_write(e,t,n){if(this._opcode===8&&this._state==R)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new tt(n.buffer,n.byteOffset+e,n.length-e),new tt(n.buffer,n.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=t.length-e;e>=n.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new tt(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case R:this.getInfo(e);break;case xi:this.getPayloadLength16(e);break;case Ei:this.getPayloadLength64(e);break;case Oi:this.getMask();break;case qt:this.getData(e);break;case rt:case nt:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(t[0]&64)===64;if(n&&!this._extensions[_i.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=xi:this._payloadLength===127?this._state=Ei:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Oi:this._state=qt}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=qt}getData(e){let t=yi;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Wo(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=rt,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[_i.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return t(i);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(a);return}this._fragments.push(s)}this.dataMessage(t),this._state===R&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=R;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=jt(n,t):this._binaryType==="arraybuffer"?i=jo(jt(n,t)):i=n,this._state===rt||this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=R):(this._state=nt,Wt(()=>{this.emit("message",i,!0),this._state=R,this.startLoop(e)}))}else{let i=jt(n,t);if(!this._skipUTF8Validation&&!wi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===rt||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=R):(this._state=nt,Wt(()=>{this.emit("message",i,!1),this._state=R,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,yi),this.end();else{let n=e.readUInt16BE(0);if(!qo(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let i=new tt(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!wi(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=R;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=R):(this._state=nt,Wt(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=R,this.startLoop(t)}))}createError(e,t,n,i,s){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=s,a[Bo]=i,a}};Si.exports=Dt;function Vo(r){Do.then(r).catch(Ho)}function Uo(r){throw r}function Ho(r){process.nextTick(Uo,r)}});var Ht=g((ic,Ai)=>{"use strict";var{Duplex:nc}=require("stream"),{randomFillSync:Go}=require("crypto"),Ci=Se(),{EMPTY_BUFFER:zo}=H(),{isValidStatusCode:Yo}=Ce(),{mask:ki,toBuffer:ce}=xe(),I=Symbol("kByteLength"),Ko=Buffer.alloc(4),Ut=class r{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,i=!1,s=2,a=!1;t.mask&&(n=t.maskBuffer||Ko,t.generateMask?t.generateMask(n):Go(n,0,4),a=(n[0]|n[1]|n[2]|n[3])===0,s=6);let o;typeof e=="string"?(!t.mask||a)&&t[I]!==void 0?o=t[I]:(e=Buffer.from(e),o=e.length):(o=e.length,i=t.mask&&t.readOnly&&!a);let u=o;o>=65536?(s+=8,u=127):o>125&&(s+=2,u=126);let l=Buffer.allocUnsafe(i?o+s:s);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=u,u===126?l.writeUInt16BE(o,2):u===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),t.mask?(l[1]|=128,l[s-4]=n[0],l[s-3]=n[1],l[s-2]=n[2],l[s-1]=n[3],a?[l,e]:i?(ki(e,n,l,s,o),[l]):(ki(e,n,e,0,o),[l,e])):[l,e]}close(e,t,n,i){let s;if(e===void 0)s=zo;else{if(typeof e!="number"||!Yo(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let o=Buffer.byteLength(t);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+o),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let a={[I]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,a,i]):this.sendFrame(r.frame(s,a),i)}ping(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=ce(e),i=e.length,s=ce.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[I]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(r.frame(e,a),n)}pong(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=ce(e),i=e.length,s=ce.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[I]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(r.frame(e,a),n)}send(e,t,n){let i=this._extensions[Ci.extensionName],s=t.binary?2:1,a=t.compress,o,u;if(typeof e=="string"?(o=Buffer.byteLength(e),u=!1):(e=ce(e),o=e.length,u=ce.readOnly),this._firstFragment?(this._firstFragment=!1,a&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=i._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),i){let l={[I]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,l,n]):this.dispatch(e,this._compress,l,n)}else this.sendFrame(r.frame(e,{[I]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:!1}),n)}dispatch(e,t,n,i){if(!t){this.sendFrame(r.frame(e,n),i);return}let s=this._extensions[Ci.extensionName];this._bufferedBytes+=n[I],this._deflating=!0,s.compress(e,n.fin,(a,o)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(u);for(let l=0;l<this._queue.length;l++){let c=this._queue[l],f=c[c.length-1];typeof f=="function"&&f(u)}return}this._bufferedBytes-=n[I],this._deflating=!1,n.readOnly=!1,this.sendFrame(r.frame(o,n),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][I],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][I],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Ai.exports=Ut});var Bi=g((sc,Ii)=>{"use strict";var{kForOnEventAttribute:ke,kListener:Gt}=H(),Mi=Symbol("kCode"),Ti=Symbol("kData"),Pi=Symbol("kError"),Ri=Symbol("kMessage"),Ni=Symbol("kReason"),fe=Symbol("kTarget"),$i=Symbol("kType"),Li=Symbol("kWasClean"),D=class{constructor(e){this[fe]=null,this[$i]=e}get target(){return this[fe]}get type(){return this[$i]}};Object.defineProperty(D.prototype,"target",{enumerable:!0});Object.defineProperty(D.prototype,"type",{enumerable:!0});var Q=class extends D{constructor(e,t={}){super(e),this[Mi]=t.code===void 0?0:t.code,this[Ni]=t.reason===void 0?"":t.reason,this[Li]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Mi]}get reason(){return this[Ni]}get wasClean(){return this[Li]}};Object.defineProperty(Q.prototype,"code",{enumerable:!0});Object.defineProperty(Q.prototype,"reason",{enumerable:!0});Object.defineProperty(Q.prototype,"wasClean",{enumerable:!0});var he=class extends D{constructor(e,t={}){super(e),this[Pi]=t.error===void 0?null:t.error,this[Ri]=t.message===void 0?"":t.message}get error(){return this[Pi]}get message(){return this[Ri]}};Object.defineProperty(he.prototype,"error",{enumerable:!0});Object.defineProperty(he.prototype,"message",{enumerable:!0});var Ae=class extends D{constructor(e,t={}){super(e),this[Ti]=t.data===void 0?null:t.data}get data(){return this[Ti]}};Object.defineProperty(Ae.prototype,"data",{enumerable:!0});var Xo={addEventListener(r,e,t={}){for(let i of this.listeners(r))if(!t[ke]&&i[Gt]===e&&!i[ke])return;let n;if(r==="message")n=function(s,a){let o=new Ae("message",{data:a?s:s.toString()});o[fe]=this,it(e,this,o)};else if(r==="close")n=function(s,a){let o=new Q("close",{code:s,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[fe]=this,it(e,this,o)};else if(r==="error")n=function(s){let a=new he("error",{error:s,message:s.message});a[fe]=this,it(e,this,a)};else if(r==="open")n=function(){let s=new D("open");s[fe]=this,it(e,this,s)};else return;n[ke]=!!t[ke],n[Gt]=e,t.once?this.once(r,n):this.on(r,n)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[Gt]===e&&!t[ke]){this.removeListener(r,t);break}}};Ii.exports={CloseEvent:Q,ErrorEvent:he,Event:D,EventTarget:Xo,MessageEvent:Ae};function it(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var zt=g((ac,Fi)=>{"use strict";var{tokenChars:Me}=Ce();function W(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Jo(r){let e=Object.create(null),t=Object.create(null),n=!1,i=!1,s=!1,a,o,u=-1,l=-1,c=-1,f=0;for(;f<r.length;f++)if(l=r.charCodeAt(f),a===void 0)if(c===-1&&Me[l]===1)u===-1&&(u=f);else if(f!==0&&(l===32||l===9))c===-1&&u!==-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let _=r.slice(u,c);l===44?(W(e,_,t),t=Object.create(null)):a=_,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(o===void 0)if(c===-1&&Me[l]===1)u===-1&&(u=f);else if(l===32||l===9)c===-1&&u!==-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f),W(t,r.slice(u,c),!0),l===44&&(W(e,a,t),t=Object.create(null),a=void 0),u=c=-1}else if(l===61&&u!==-1&&c===-1)o=r.slice(u,f),u=c=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(i){if(Me[l]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1?u=f:n||(n=!0),i=!1}else if(s)if(Me[l]===1)u===-1&&(u=f);else if(l===34&&u!==-1)s=!1,c=f;else if(l===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(l===34&&r.charCodeAt(f-1)===61)s=!0;else if(c===-1&&Me[l]===1)u===-1&&(u=f);else if(u!==-1&&(l===32||l===9))c===-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let _=r.slice(u,c);n&&(_=_.replace(/\\/g,""),n=!1),W(t,o,_),l===44&&(W(e,a,t),t=Object.create(null),a=void 0),o=void 0,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(u===-1||s||l===32||l===9)throw new SyntaxError("Unexpected end of input");c===-1&&(c=f);let b=r.slice(u,c);return a===void 0?W(e,b,t):(o===void 0?W(t,b,!0):n?W(t,o,b.replace(/\\/g,"")):W(t,o,b),W(e,a,t)),e}function Zo(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(a=>a===!0?i:`${i}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Fi.exports={format:Zo,parse:Jo}});var Zt=g((lc,Ki)=>{"use strict";var Qo=require("events"),eu=require("https"),tu=require("http"),qi=require("net"),ru=require("tls"),{randomBytes:nu,createHash:iu}=require("crypto"),{Duplex:oc,Readable:uc}=require("stream"),{URL:Yt}=require("url"),z=Se(),su=Vt(),au=Ht(),{BINARY_TYPES:ji,EMPTY_BUFFER:st,GUID:ou,kForOnEventAttribute:Kt,kListener:uu,kStatusCode:lu,kWebSocket:k,NOOP:Di}=H(),{EventTarget:{addEventListener:cu,removeEventListener:fu}}=Bi(),{format:hu,parse:du}=zt(),{toBuffer:pu}=xe(),mu=30*1e3,Vi=Symbol("kAborted"),Xt=[8,13],V=["CONNECTING","OPEN","CLOSING","CLOSED"],gu=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,x=class r extends Qo{constructor(e,t,n){super(),this._binaryType=ji[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=st,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(n=t,t=[]):t=[t]),Ui(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ji.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){let i=new su({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new au(e,this._extensions,n.generateMask),this._receiver=i,this._socket=e,i[k]=this,e[k]=this,i.on("conclude",_u),i.on("drain",yu),i.on("error",wu),i.on("message",xu),i.on("ping",Eu),i.on("pong",Ou),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Gi),e.on("data",ot),e.on("end",zi),e.on("error",Yi),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[z.extensionName]&&this._extensions[z.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){T(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),mu)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Jt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||st,t,n)}pong(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Jt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||st,t,n)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(n=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Jt(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[z.extensionName]||(i.compress=!1),this._sender.send(e||st,i,n)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){T(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(x,"CONNECTING",{enumerable:!0,value:V.indexOf("CONNECTING")});Object.defineProperty(x.prototype,"CONNECTING",{enumerable:!0,value:V.indexOf("CONNECTING")});Object.defineProperty(x,"OPEN",{enumerable:!0,value:V.indexOf("OPEN")});Object.defineProperty(x.prototype,"OPEN",{enumerable:!0,value:V.indexOf("OPEN")});Object.defineProperty(x,"CLOSING",{enumerable:!0,value:V.indexOf("CLOSING")});Object.defineProperty(x.prototype,"CLOSING",{enumerable:!0,value:V.indexOf("CLOSING")});Object.defineProperty(x,"CLOSED",{enumerable:!0,value:V.indexOf("CLOSED")});Object.defineProperty(x.prototype,"CLOSED",{enumerable:!0,value:V.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(x.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(x.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Kt])return e[uu];return null},set(e){for(let t of this.listeners(r))if(t[Kt]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Kt]:!0})}})});x.prototype.addEventListener=cu;x.prototype.removeEventListener=fu;Ki.exports=x;function Ui(r,e,t,n){let i={allowSynchronousEvents:!1,autoPong:!0,protocolVersion:Xt[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=i.autoPong,!Xt.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Xt.join(", ")})`);let s;if(e instanceof Yt)s=e;else try{s=new Yt(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),r._url=s.href;let a=s.protocol==="wss:",o=s.protocol==="ws+unix:",u;if(s.protocol!=="ws:"&&!a&&!o?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:o&&!s.pathname?u="The URL's pathname is empty":s.hash&&(u="The URL contains a fragment identifier"),u){let h=new SyntaxError(u);if(r._redirects===0)throw h;at(r,h);return}let l=a?443:80,c=nu(16).toString("base64"),f=a?eu.request:tu.request,b=new Set,_;if(i.createConnection=a?vu:bu,i.defaultPort=i.defaultPort||l,i.port=s.port||l,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(_=new z(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=hu({[z.extensionName]:_.offer()})),t.length){for(let h of t){if(typeof h!="string"||!gu.test(h)||b.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");b.add(h)}i.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),o){let h=i.path.split(":");i.socketPath=h[0],i.path=h[1]}let m;if(i.followRedirects){if(r._redirects===0){r._originalIpc=o,r._originalSecure=a,r._originalHostOrSocketPath=o?i.socketPath:s.host;let h=n&&n.headers;if(n={...n,headers:{}},h)for(let[v,y]of Object.entries(h))n.headers[v.toLowerCase()]=y}else if(r.listenerCount("redirect")===0){let h=o?r._originalIpc?i.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:s.host===r._originalHostOrSocketPath;(!h||r._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,h||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=r._req=f(i),r._redirects&&r.emit("redirect",r.url,m)}else m=r._req=f(i);i.timeout&&m.on("timeout",()=>{T(r,m,"Opening handshake has timed out")}),m.on("error",h=>{m===null||m[Vi]||(m=r._req=null,at(r,h))}),m.on("response",h=>{let v=h.headers.location,y=h.statusCode;if(v&&i.followRedirects&&y>=300&&y<400){if(++r._redirects>i.maxRedirects){T(r,m,"Maximum redirects exceeded");return}m.abort();let Y;try{Y=new Yt(v,e)}catch{let P=new SyntaxError(`Invalid URL: ${v}`);at(r,P);return}Ui(r,Y,t,n)}else r.emit("unexpected-response",m,h)||T(r,m,`Unexpected server response: ${h.statusCode}`)}),m.on("upgrade",(h,v,y)=>{if(r.emit("upgrade",h),r.readyState!==x.CONNECTING)return;if(m=r._req=null,h.headers.upgrade.toLowerCase()!=="websocket"){T(r,v,"Invalid Upgrade header");return}let Y=iu("sha1").update(c+ou).digest("base64");if(h.headers["sec-websocket-accept"]!==Y){T(r,v,"Invalid Sec-WebSocket-Accept header");return}let B=h.headers["sec-websocket-protocol"],P;if(B!==void 0?b.size?b.has(B)||(P="Server sent an invalid subprotocol"):P="Server sent a subprotocol but none was requested":b.size&&(P="Server sent no subprotocol"),P){T(r,v,P);return}B&&(r._protocol=B);let Ne=h.headers["sec-websocket-extensions"];if(Ne!==void 0){if(!_){T(r,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let K;try{K=du(Ne)}catch{T(r,v,"Invalid Sec-WebSocket-Extensions header");return}let $e=Object.keys(K);if($e.length!==1||$e[0]!==z.extensionName){T(r,v,"Server indicated an extension that was not requested");return}try{_.accept(K[z.extensionName])}catch{T(r,v,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[z.extensionName]=_}r.setSocket(v,y,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(m,r):m.end()}function at(r,e){r._readyState=x.CLOSING,r.emit("error",e),r.emitClose()}function bu(r){return r.path=r.socketPath,qi.connect(r)}function vu(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=qi.isIP(r.host)?"":r.host),ru.connect(r)}function T(r,e,t){r._readyState=x.CLOSING;let n=new Error(t);Error.captureStackTrace(n,T),e.setHeader?(e[Vi]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(at,r,n)):(e.destroy(n),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function Jt(r,e,t){if(e){let n=pu(e).length;r._socket?r._sender._bufferedBytes+=n:r._bufferedAmount+=n}if(t){let n=new Error(`WebSocket is not open: readyState ${r.readyState} (${V[r.readyState]})`);process.nextTick(t,n)}}function _u(r,e){let t=this[k];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[k]!==void 0&&(t._socket.removeListener("data",ot),process.nextTick(Hi,t._socket),r===1005?t.close():t.close(r,e))}function yu(){let r=this[k];r.isPaused||r._socket.resume()}function wu(r){let e=this[k];e._socket[k]!==void 0&&(e._socket.removeListener("data",ot),process.nextTick(Hi,e._socket),e.close(r[lu])),e.emit("error",r)}function Wi(){this[k].emitClose()}function xu(r,e){this[k].emit("message",r,e)}function Eu(r){let e=this[k];e._autoPong&&e.pong(r,!this._isServer,Di),e.emit("ping",r)}function Ou(r){this[k].emit("pong",r)}function Hi(r){r.resume()}function Gi(){let r=this[k];this.removeListener("close",Gi),this.removeListener("data",ot),this.removeListener("end",zi),r._readyState=x.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[k]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Wi),r._receiver.on("finish",Wi))}function ot(r){this[k]._receiver.write(r)||this.pause()}function zi(){let r=this[k];r._readyState=x.CLOSING,r._receiver.end(),this.end()}function Yi(){let r=this[k];this.removeListener("error",Yi),this.on("error",Di),r&&(r._readyState=x.CLOSING,this.destroy())}});var Ji=g((cc,Xi)=>{"use strict";var{tokenChars:Su}=Ce();function Cu(r){let e=new Set,t=-1,n=-1,i=0;for(i;i<r.length;i++){let a=r.charCodeAt(i);if(n===-1&&Su[a]===1)t===-1&&(t=i);else if(i!==0&&(a===32||a===9))n===-1&&t!==-1&&(n=i);else if(a===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let o=r.slice(t,n);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);e.add(o),t=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(t===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=r.slice(t,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}Xi.exports={parse:Cu}});var is=g((hc,ns)=>{"use strict";var ku=require("events"),ut=require("http"),{Duplex:fc}=require("stream"),{createHash:Au}=require("crypto"),Zi=zt(),ee=Se(),Mu=Ji(),Tu=Zt(),{GUID:Pu,kWebSocket:Ru}=H(),Nu=/^[+/0-9A-Za-z]{22}==$/,Qi=0,es=1,rs=2,Qt=class extends ku{constructor(e,t){if(super(),e={allowSynchronousEvents:!1,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Tu,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ut.createServer((n,i)=>{let s=ut.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=$u(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,s,a)=>{this.handleUpgrade(i,s,a,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Qi}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===rs){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Te,this);return}if(e&&this.once("close",e),this._state!==es)if(this._state=es,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Te,this):process.nextTick(Te,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{Te(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,i){t.on("error",ts);let s=e.headers["sec-websocket-key"],a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){te(this,e,t,405,"Invalid HTTP method");return}if(e.headers.upgrade.toLowerCase()!=="websocket"){te(this,e,t,400,"Invalid Upgrade header");return}if(!s||!Nu.test(s)){te(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){te(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){Pe(t,400);return}let o=e.headers["sec-websocket-protocol"],u=new Set;if(o!==void 0)try{u=Mu.parse(o)}catch{te(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&l!==void 0){let f=new ee(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let b=Zi.parse(l);b[ee.extensionName]&&(f.accept(b[ee.extensionName]),c[ee.extensionName]=f)}catch{te(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(f,(b,_,m,h)=>{if(!b)return Pe(t,_||401,m,h);this.completeUpgrade(c,s,u,e,t,n,i)});return}if(!this.options.verifyClient(f))return Pe(t,401)}this.completeUpgrade(c,s,u,e,t,n,i)}completeUpgrade(e,t,n,i,s,a,o){if(!s.readable||!s.writable)return s.destroy();if(s[Ru])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Qi)return Pe(s,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Au("sha1").update(t+Pu).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){let f=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;f&&(l.push(`Sec-WebSocket-Protocol: ${f}`),c._protocol=f)}if(e[ee.extensionName]){let f=e[ee.extensionName].params,b=Zi.format({[ee.extensionName]:[f]});l.push(`Sec-WebSocket-Extensions: ${b}`),c._extensions=e}this.emit("headers",l,i),s.write(l.concat(`\r
1
+ var ns=Object.create;var Oe=Object.defineProperty;var is=Object.getOwnPropertyDescriptor;var ss=Object.getOwnPropertyNames;var os=Object.getPrototypeOf,as=Object.prototype.hasOwnProperty;var m=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),us=(r,e)=>{for(var t in e)Oe(r,t,{get:e[t],enumerable:!0})},ir=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ss(e))!as.call(r,i)&&i!==t&&Oe(r,i,{get:()=>e[i],enumerable:!(n=is(e,i))||n.enumerable});return r};var $=(r,e,t)=>(t=r!=null?ns(os(r)):{},ir(e||!r||!r.__esModule?Oe(t,"default",{value:r,enumerable:!0}):t,r)),cs=r=>ir(Oe({},"__esModule",{value:!0}),r);var or=m((hu,sr)=>{"use strict";var ls=/[|\\{}()[\]^$+*?.-]/g;sr.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(ls,"\\$&")}});var lr=m((du,cr)=>{"use strict";var fs=or(),hs=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",ur=[].concat(require("module").builtinModules,"bootstrap_node","node").map(r=>new RegExp(`(?:\\((?:node:)?${r}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${r}(?:\\.js)?:\\d+:\\d+$)`));ur.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Ze=class r{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=r.nodeInternals()),"cwd"in e||(e.cwd=hs),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,ds(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...ur]}clean(e,t=0){t=" ".repeat(t),Array.isArray(e)||(e=e.split(`
2
+ `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,i=null,s=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(a=>a.test(o)))return;let u=/^\s*at /.test(o);n?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),u&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(u?(i&&(s.push(i),i=null),s.push(o)):(n=!0,i=o))}),s.map(o=>`${t}${o}
3
+ `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:s}=i;return Error.stackTraceLimit=n,this.clean(s)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:i}=Error;Error.prepareStackTrace=(u,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:o}=s;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:i}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};ar(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let i;try{i=t.getTypeName()}catch{}i&&i!=="Object"&&i!=="[object Object]"&&(n.type=i);let s=t.getFunctionName();s&&(n.function=s);let o=t.getMethodName();return o&&s!==o&&(n.method=o),n}parseLine(e){let t=e&&e.match(ps);if(!t)return null;let n=t[1]==="new",i=t[2],s=t[3],o=t[4],u=Number(t[5]),a=Number(t[6]),c=t[7],l=t[8],f=t[9],g=t[10]==="native",b=t[11]===")",p,h={};if(l&&(h.line=Number(l)),f&&(h.column=Number(f)),b&&c){let _=0;for(let y=c.length-1;y>0;y--)if(c.charAt(y)===")")_++;else if(c.charAt(y)==="("&&c.charAt(y-1)===" "&&(_--,_===-1&&c.charAt(y-1)===" ")){let U=c.slice(0,y-1);c=c.slice(y+1),i+=` (${U}`;break}}if(i){let _=i.match(ms);_&&(i=_[1],p=_[2])}return ar(h,c,this._cwd),n&&Object.defineProperty(h,"constructor",{value:!0,configurable:!0}),s&&(h.evalOrigin=s,h.evalLine=u,h.evalColumn=a,h.evalFile=o&&o.replace(/\\/g,"/")),g&&(h.native=!0),i&&(h.function=i),p&&i!==p&&(h.method=p),h}};function ar(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function ds(r){if(r.length===0)return[];let e=r.map(t=>fs(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var ps=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),ms=/^(.*?) \[as (.*?)\]$/;cr.exports=Ze});var fr=m(Ee=>{Object.defineProperty(Ee,"__esModule",{value:!0});Ee.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;Ee.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e}});var gr=m(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.isIdentifierChar=mr;oe.isIdentifierName=vs;oe.isIdentifierStart=pr;var et="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",hr="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",gs=new RegExp("["+et+"]"),_s=new RegExp("["+et+hr+"]");et=hr=null;var dr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],bs=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Qe(r,e){let t=65536;for(let n=0,i=e.length;n<i;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function pr(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&gs.test(String.fromCharCode(r)):Qe(r,dr)}function mr(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&_s.test(String.fromCharCode(r)):Qe(r,dr)||Qe(r,bs)}function vs(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){let i=r.charCodeAt(++t);(i&64512)===56320&&(n=65536+((n&1023)<<10)+(i&1023))}if(e){if(e=!1,!pr(n))return!1}else if(!mr(n))return!1}return!e}});var yr=m(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.isKeyword=Os;G.isReservedWord=_r;G.isStrictBindOnlyReservedWord=vr;G.isStrictBindReservedWord=Ss;G.isStrictReservedWord=br;var tt={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ys=new Set(tt.keyword),xs=new Set(tt.strict),ws=new Set(tt.strictBind);function _r(r,e){return e&&r==="await"||r==="enum"}function br(r,e){return _r(r,e)||xs.has(r)}function vr(r){return ws.has(r)}function Ss(r,e){return br(r,e)||vr(r)}function Os(r){return ys.has(r)}});var xr=m(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});Object.defineProperty(L,"isIdentifierChar",{enumerable:!0,get:function(){return rt.isIdentifierChar}});Object.defineProperty(L,"isIdentifierName",{enumerable:!0,get:function(){return rt.isIdentifierName}});Object.defineProperty(L,"isIdentifierStart",{enumerable:!0,get:function(){return rt.isIdentifierStart}});Object.defineProperty(L,"isKeyword",{enumerable:!0,get:function(){return ae.isKeyword}});Object.defineProperty(L,"isReservedWord",{enumerable:!0,get:function(){return ae.isReservedWord}});Object.defineProperty(L,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return ae.isStrictBindOnlyReservedWord}});Object.defineProperty(L,"isStrictBindReservedWord",{enumerable:!0,get:function(){return ae.isStrictBindReservedWord}});Object.defineProperty(L,"isStrictReservedWord",{enumerable:!0,get:function(){return ae.isStrictReservedWord}});var rt=gr(),ae=yr()});var it=m((bu,nt)=>{var Es=require("tty"),Cs=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Es.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),v=(r,e,t=r)=>n=>{let i=""+n,s=i.indexOf(e,r.length);return~s?r+wr(i,e,t,s)+e:r+i+e},wr=(r,e,t,n)=>{let i=r.substring(0,n)+t,s=r.substring(n+e.length),o=s.indexOf(e);return~o?i+wr(s,e,t,o):i+s},Sr=(r=Cs)=>({isColorSupported:r,reset:r?e=>`\x1B[0m${e}\x1B[0m`:String,bold:r?v("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:r?v("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:r?v("\x1B[3m","\x1B[23m"):String,underline:r?v("\x1B[4m","\x1B[24m"):String,inverse:r?v("\x1B[7m","\x1B[27m"):String,hidden:r?v("\x1B[8m","\x1B[28m"):String,strikethrough:r?v("\x1B[9m","\x1B[29m"):String,black:r?v("\x1B[30m","\x1B[39m"):String,red:r?v("\x1B[31m","\x1B[39m"):String,green:r?v("\x1B[32m","\x1B[39m"):String,yellow:r?v("\x1B[33m","\x1B[39m"):String,blue:r?v("\x1B[34m","\x1B[39m"):String,magenta:r?v("\x1B[35m","\x1B[39m"):String,cyan:r?v("\x1B[36m","\x1B[39m"):String,white:r?v("\x1B[37m","\x1B[39m"):String,gray:r?v("\x1B[90m","\x1B[39m"):String,bgBlack:r?v("\x1B[40m","\x1B[49m"):String,bgRed:r?v("\x1B[41m","\x1B[49m"):String,bgGreen:r?v("\x1B[42m","\x1B[49m"):String,bgYellow:r?v("\x1B[43m","\x1B[49m"):String,bgBlue:r?v("\x1B[44m","\x1B[49m"):String,bgMagenta:r?v("\x1B[45m","\x1B[49m"):String,bgCyan:r?v("\x1B[46m","\x1B[49m"):String,bgWhite:r?v("\x1B[47m","\x1B[49m"):String});nt.exports=Sr();nt.exports.createColors=Sr});var Er=m((vu,Or)=>{"use strict";var ks=/[|\\{}()[\]^$+*?.]/g;Or.exports=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(ks,"\\$&")}});var kr=m((yu,Cr)=>{"use strict";Cr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var st=m((xu,Mr)=>{var z=kr(),Pr={};for(Ce in z)z.hasOwnProperty(Ce)&&(Pr[z[Ce]]=Ce);var Ce,d=Mr.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(C in d)if(d.hasOwnProperty(C)){if(!("channels"in d[C]))throw new Error("missing channels property: "+C);if(!("labels"in d[C]))throw new Error("missing channel labels property: "+C);if(d[C].labels.length!==d[C].channels)throw new Error("channel and label counts mismatch: "+C);Ar=d[C].channels,Tr=d[C].labels,delete d[C].channels,delete d[C].labels,Object.defineProperty(d[C],"channels",{value:Ar}),Object.defineProperty(d[C],"labels",{value:Tr})}var Ar,Tr,C;d.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),s=Math.max(e,t,n),o=s-i,u,a,c;return s===i?u=0:e===s?u=(t-n)/o:t===s?u=2+(n-e)/o:n===s&&(u=4+(e-t)/o),u=Math.min(u*60,360),u<0&&(u+=360),c=(i+s)/2,s===i?a=0:c<=.5?a=o/(s+i):a=o/(2-s-i),[u,a*100,c*100]};d.rgb.hsv=function(r){var e,t,n,i,s,o=r[0]/255,u=r[1]/255,a=r[2]/255,c=Math.max(o,u,a),l=c-Math.min(o,u,a),f=function(g){return(c-g)/6/l+1/2};return l===0?i=s=0:(s=l/c,e=f(o),t=f(u),n=f(a),o===c?i=n-t:u===c?i=1/3+e-n:a===c&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,c*100]};d.rgb.hwb=function(r){var e=r[0],t=r[1],n=r[2],i=d.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,s*100,n*100]};d.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i,s,o,u;return u=Math.min(1-e,1-t,1-n),i=(1-e-u)/(1-u)||0,s=(1-t-u)/(1-u)||0,o=(1-n-u)/(1-u)||0,[i*100,s*100,o*100,u*100]};function As(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}d.rgb.keyword=function(r){var e=Pr[r];if(e)return e;var t=1/0,n;for(var i in z)if(z.hasOwnProperty(i)){var s=z[i],o=As(r,s);o<t&&(t=o,n=i)}return n};d.keyword.rgb=function(r){return z[r]};d.rgb.xyz=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+t*.3576+n*.1805,s=e*.2126+t*.7152+n*.0722,o=e*.0193+t*.1192+n*.9505;return[i*100,s*100,o*100]};d.rgb.lab=function(r){var e=d.rgb.xyz(r),t=e[0],n=e[1],i=e[2],s,o,u;return t/=95.047,n/=100,i/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,o=500*(t-n),u=200*(n-i),[s,o,u]};d.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i,s,o,u,a;if(t===0)return a=n*255,[a,a,a];n<.5?s=n*(1+t):s=n+t-n*t,i=2*n-s,u=[0,0,0];for(var c=0;c<3;c++)o=e+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?a=i+(s-i)*6*o:2*o<1?a=s:3*o<2?a=i+(s-i)*(2/3-o)*6:a=i,u[c]=a*255;return u};d.hsl.hsv=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=t,s=Math.max(n,.01),o,u;return n*=2,t*=n<=1?n:2-n,i*=s<=1?s:2-s,u=(n+t)/2,o=n===0?2*i/(s+i):2*t/(n+t),[e,o*100,u*100]};d.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-t),u=255*n*(1-t*s),a=255*n*(1-t*(1-s));switch(n*=255,i){case 0:return[n,a,o];case 1:return[u,n,o];case 2:return[o,n,a];case 3:return[o,u,n];case 4:return[a,o,n];case 5:return[n,o,u]}};d.hsv.hsl=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),s,o,u;return u=(2-t)*n,s=(2-t)*i,o=t*i,o/=s<=1?s:2-s,o=o||0,u/=2,[e,o*100,u*100]};d.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,s,o,u,a;i>1&&(t/=i,n/=i),s=Math.floor(6*e),o=1-n,u=6*e-s,s&1&&(u=1-u),a=t+u*(o-t);var c,l,f;switch(s){default:case 6:case 0:c=o,l=a,f=t;break;case 1:c=a,l=o,f=t;break;case 2:c=t,l=o,f=a;break;case 3:c=t,l=a,f=o;break;case 4:c=a,l=t,f=o;break;case 5:c=o,l=t,f=a;break}return[c*255,l*255,f*255]};d.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,s,o,u;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,t*(1-i)+i),u=1-Math.min(1,n*(1-i)+i),[s*255,o*255,u*255]};d.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i,s,o;return i=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,o=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};d.xyz.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return e/=95.047,t/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*t-16,s=500*(e-t),o=200*(t-n),[i,s,o]};d.lab.xyz=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;s=(e+16)/116,i=t/500+s,o=s-n/200;var u=Math.pow(s,3),a=Math.pow(i,3),c=Math.pow(o,3);return s=u>.008856?u:(s-16/116)/7.787,i=a>.008856?a:(i-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};d.lab.lch=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return i=Math.atan2(n,t),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(t*t+n*n),[e,o,s]};d.lch.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return o=n/360*2*Math.PI,i=t*Math.cos(o),s=t*Math.sin(o),[e,i,s]};d.rgb.ansi16=function(r){var e=r[0],t=r[1],n=r[2],i=1 in arguments?arguments[1]:d.rgb.hsv(r)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};d.hsv.ansi16=function(r){return d.rgb.ansi16(d.hsv.rgb(r),r[2])};d.rgb.ansi256=function(r){var e=r[0],t=r[1],n=r[2];if(e===t&&t===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};d.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,i,s]};d.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,n=Math.floor(r/36)/5*255,i=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[n,i,s]};d.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};d.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(u){return u+u}).join(""));var n=parseInt(t,16),i=n>>16&255,s=n>>8&255,o=n&255;return[i,s,o]};d.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),o=i-s,u,a;return o<1?u=s/(1-o):u=0,o<=0?a=0:i===e?a=(t-n)/o%6:i===t?a=2+(n-e)/o:a=4+(e-t)/o+4,a/=6,a%=1,[a*360,o*100,u*100]};d.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1,i=0;return t<.5?n=2*e*t:n=2*e*(1-t),n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};d.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};d.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,o=s%1,u=1-o,a=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return a=(1-t)*n,[(t*i[0]+a)*255,(t*i[1]+a)*255,(t*i[2]+a)*255]};d.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};d.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,n=t*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};d.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};d.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1-t,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[r[0],i*100,s*100]};d.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};d.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};d.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};d.gray.hsl=d.gray.hsv=function(r){return[0,0,r[0]]};d.gray.hwb=function(r){return[0,100,r[0]]};d.gray.cmyk=function(r){return[0,0,0,r[0]]};d.gray.lab=function(r){return[r[0],0,0]};d.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};d.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]}});var Rr=m((wu,Nr)=>{var ke=st();function Ts(){for(var r={},e=Object.keys(ke),t=e.length,n=0;n<t;n++)r[e[n]]={distance:-1,parent:null};return r}function Ps(r){var e=Ts(),t=[r];for(e[r].distance=0;t.length;)for(var n=t.pop(),i=Object.keys(ke[n]),s=i.length,o=0;o<s;o++){var u=i[o],a=e[u];a.distance===-1&&(a.distance=e[n].distance+1,a.parent=n,t.unshift(u))}return e}function Ms(r,e){return function(t){return e(r(t))}}function Ns(r,e){for(var t=[e[r].parent,r],n=ke[e[r].parent][r],i=e[r].parent;e[i].parent;)t.unshift(e[i].parent),n=Ms(ke[e[i].parent][i],n),i=e[i].parent;return n.conversion=t,n}Nr.exports=function(r){for(var e=Ps(r),t={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],u=e[o];u.parent!==null&&(t[o]=Ns(o,e))}return t}});var Lr=m((Su,$r)=>{var ot=st(),Rs=Rr(),J={},$s=Object.keys(ot);function Ls(r){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Is(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=r(t);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in r&&(e.conversion=r.conversion),e}$s.forEach(function(r){J[r]={},Object.defineProperty(J[r],"channels",{value:ot[r].channels}),Object.defineProperty(J[r],"labels",{value:ot[r].labels});var e=Rs(r),t=Object.keys(e);t.forEach(function(n){var i=e[n];J[r][n]=Is(i),J[r][n].raw=Ls(i)})});$r.exports=J});var Fr=m((Ou,Ir)=>{"use strict";var Z=Lr(),Ae=(r,e)=>function(){return`\x1B[${r.apply(Z,arguments)+e}m`},Te=(r,e)=>function(){let t=r.apply(Z,arguments);return`\x1B[${38+e};5;${t}m`},Pe=(r,e)=>function(){let t=r.apply(Z,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function Fs(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let s=e[i];for(let o of Object.keys(s)){let u=s[o];e[o]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},s[o]=e[o],r.set(u[0],u[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:r,enumerable:!1})}let t=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Ae(t,0)},e.color.ansi256={ansi256:Te(t,0)},e.color.ansi16m={rgb:Pe(n,0)},e.bgColor.ansi={ansi:Ae(t,10)},e.bgColor.ansi256={ansi256:Te(t,10)},e.bgColor.ansi16m={rgb:Pe(n,10)};for(let i of Object.keys(Z)){if(typeof Z[i]!="object")continue;let s=Z[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=Ae(s.ansi16,0),e.bgColor.ansi[i]=Ae(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=Te(s.ansi256,0),e.bgColor.ansi256[i]=Te(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=Pe(s.rgb,0),e.bgColor.ansi16m[i]=Pe(s.rgb,10))}return e}Object.defineProperty(Ir,"exports",{enumerable:!0,get:Fs})});var Wr=m((Eu,Br)=>{"use strict";Br.exports=(r,e)=>{e=e||process.argv;let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Dr=m((Cu,jr)=>{"use strict";var Bs=require("os"),M=Wr(),O=process.env,Q;M("no-color")||M("no-colors")||M("color=false")?Q=!1:(M("color")||M("colors")||M("color=true")||M("color=always"))&&(Q=!0);"FORCE_COLOR"in O&&(Q=O.FORCE_COLOR.length===0||parseInt(O.FORCE_COLOR,10)!==0);function Ws(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function js(r){if(Q===!1)return 0;if(M("color=16m")||M("color=full")||M("color=truecolor"))return 3;if(M("color=256"))return 2;if(r&&!r.isTTY&&Q!==!0)return 0;let e=Q?1:0;if(process.platform==="win32"){let t=Bs.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in O)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in O)||O.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in O){let t=parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:(O.TERM==="dumb",e)}function at(r){let e=js(r);return Ws(e)}jr.exports={supportsColor:at,stdout:at(process.stdout),stderr:at(process.stderr)}});var Gr=m((ku,Hr)=>{"use strict";var Ds=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,qr=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,qs=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Vs=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Us=new Map([["n",`
4
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ur(r){return r[0]==="u"&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):Us.get(r)||r}function Hs(r,e){let t=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))t.push(Number(s));else if(i=s.match(qs))t.push(i[2].replace(Vs,(o,u,a)=>u?Ur(u):a));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`);return t}function Gs(r){qr.lastIndex=0;let e=[],t;for(;(t=qr.exec(r))!==null;){let n=t[1];if(t[2]){let i=Hs(n,t[2]);e.push([n].concat(i))}else e.push([n])}return e}function Vr(r,e){let t={};for(let i of e)for(let s of i.styles)t[s[0]]=i.inverse?null:s.slice(1);let n=r;for(let i of Object.keys(t))if(Array.isArray(t[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);t[i].length>0?n=n[i].apply(n,t[i]):n=n[i]}return n}Hr.exports=(r,e)=>{let t=[],n=[],i=[];if(e.replace(Ds,(s,o,u,a,c,l)=>{if(o)i.push(Ur(o));else if(a){let f=i.join("");i=[],n.push(t.length===0?f:Vr(r,t)(f)),t.push({inverse:u,styles:Gs(a)})}else if(c){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Vr(r,t)(i.join(""))),i=[],t.pop()}else i.push(l)}),n.push(i.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var Jr=m((Au,ce)=>{"use strict";var ct=Er(),S=Fr(),ut=Dr().stdout,zs=Gr(),Yr=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Kr=["ansi","ansi","ansi256","ansi16m"],Xr=new Set(["gray"]),ee=Object.create(null);function zr(r,e){e=e||{};let t=ut?ut.level:0;r.level=e.level===void 0?t:e.level,r.enabled="enabled"in e?e.enabled:r.level>0}function ue(r){if(!this||!(this instanceof ue)||this.template){let e={};return zr(e,r),e.template=function(){let t=[].slice.call(arguments);return Xs.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,ue.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=ue,e.template}zr(this,r)}Yr&&(S.blue.open="\x1B[94m");for(let r of Object.keys(S))S[r].closeRe=new RegExp(ct(S[r].close),"g"),ee[r]={get(){let e=S[r];return Me.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}};ee.visible={get(){return Me.call(this,this._styles||[],!0,"visible")}};S.color.closeRe=new RegExp(ct(S.color.close),"g");for(let r of Object.keys(S.color.ansi))Xr.has(r)||(ee[r]={get(){let e=this.level;return function(){let n={open:S.color[Kr[e]][r].apply(null,arguments),close:S.color.close,closeRe:S.color.closeRe};return Me.call(this,this._styles?this._styles.concat(n):[n],this._empty,r)}}});S.bgColor.closeRe=new RegExp(ct(S.bgColor.close),"g");for(let r of Object.keys(S.bgColor.ansi)){if(Xr.has(r))continue;let e="bg"+r[0].toUpperCase()+r.slice(1);ee[e]={get(){let t=this.level;return function(){let i={open:S.bgColor[Kr[t]][r].apply(null,arguments),close:S.bgColor.close,closeRe:S.bgColor.closeRe};return Me.call(this,this._styles?this._styles.concat(i):[i],this._empty,r)}}}}var Ys=Object.defineProperties(()=>{},ee);function Me(r,e,t){let n=function(){return Ks.apply(n,arguments)};n._styles=r,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||t==="gray"||t==="grey",n.__proto__=Ys,n}function Ks(){let r=arguments,e=r.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)t+=" "+r[i];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let n=S.dim.open;Yr&&this.hasGrey&&(S.dim.open="");for(let i of this._styles.slice().reverse())t=i.open+t.replace(i.closeRe,i.open)+i.close,t=t.replace(/\r?\n/g,`${i.close}$&${i.open}`);return S.dim.open=n,t}function Xs(r,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(t[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return zs(r,n.join(""))}Object.defineProperties(ue.prototype,ee);ce.exports=ue();ce.exports.supportsColor=ut;ce.exports.default=ce.exports});var on=m(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.default=io;le.shouldHighlight=sn;var Zr=fr(),Qr=xr(),ft=Js(it(),!0);function tn(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(tn=function(n){return n?t:e})(r)}function Js(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=tn(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var o=i?Object.getOwnPropertyDescriptor(r,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var rn=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,ft.createColors)(!1):ft.default,en=(r,e)=>t=>r(e(t)),Zs=new Set(["as","async","from","get","of","set"]);function Qs(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.gray,invalid:en(en(r.white,r.bgRed),r.bold)}}var eo=/\r\n|[\n\r\u2028\u2029]/,to=/^[()[\]{}]$/,nn;{let r=/^[a-z][\w-]*$/i,e=function(t,n,i){if(t.type==="name"){if((0,Qr.isKeyword)(t.value)||(0,Qr.isStrictReservedWord)(t.value,!0)||Zs.has(t.value))return"keyword";if(r.test(t.value)&&(i[n-1]==="<"||i.slice(n-2,n)=="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&to.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};nn=function*(t){let n;for(;n=Zr.default.exec(t);){let i=Zr.matchToToken(n);yield{type:e(i,n.index,t),value:i.value}}}}function ro(r,e){let t="";for(let{type:n,value:i}of nn(e)){let s=r[n];s?t+=i.split(eo).map(o=>s(o)).join(`
5
+ `):t+=i}return t}function sn(r){return rn.isColorSupported||r.forceColor}var lt;function no(r){if(r){var e;return(e=lt)!=null||(lt=(0,ft.createColors)(!0)),lt}return rn}function io(r,e={}){if(r!==""&&sn(e)){let t=Qs(no(e.forceColor));return ro(t,r)}else return r}{let r,e;le.getChalk=({forceColor:t})=>{var n;if((n=r)!=null||(r=Jr()),t){var i;return(i=e)!=null||(e=new r.constructor({enabled:!0,level:1})),e}return r}}});var dn=m(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.codeFrameColumns=hn;Ne.default=lo;var an=on(),dt=so(it(),!0);function fn(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(fn=function(n){return n?t:e})(r)}function so(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=fn(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var o=i?Object.getOwnPropertyDescriptor(r,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var oo=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,dt.createColors)(!1):dt.default,un=(r,e)=>t=>r(e(t)),ht;function ao(r){if(r){var e;return(e=ht)!=null||(ht=(0,dt.createColors)(!0)),ht}return oo}var cn=!1;function uo(r){return{gutter:r.gray,marker:un(r.red,r.bold),message:un(r.red,r.bold)}}var ln=/\r\n|[\n\r\u2028\u2029]/;function co(r,e,t){let n=Object.assign({column:0,line:-1},r.start),i=Object.assign({},n,r.end),{linesAbove:s=2,linesBelow:o=3}=t||{},u=n.line,a=n.column,c=i.line,l=i.column,f=Math.max(u-(s+1),0),g=Math.min(e.length,c+o);u===-1&&(f=0),c===-1&&(g=e.length);let b=c-u,p={};if(b)for(let h=0;h<=b;h++){let _=h+u;if(!a)p[_]=!0;else if(h===0){let y=e[_-1].length;p[_]=[a,y-a+1]}else if(h===b)p[_]=[0,l];else{let y=e[_-h].length;p[_]=[0,y]}}else a===l?a?p[u]=[a,0]:p[u]=!0:p[u]=[a,l-a];return{start:f,end:g,markerLines:p}}function hn(r,e,t={}){let n=(t.highlightCode||t.forceColor)&&(0,an.shouldHighlight)(t),i=ao(t.forceColor),s=uo(i),o=(h,_)=>n?h(_):_,u=r.split(ln),{start:a,end:c,markerLines:l}=co(e,u,t),f=e.start&&typeof e.start.column=="number",g=String(c).length,p=(n?(0,an.default)(r,t):r).split(ln,c).slice(a,c).map((h,_)=>{let y=a+1+_,R=` ${` ${y}`.slice(-g)} |`,A=l[y],we=!l[y+1];if(A){let H="";if(Array.isArray(A)){let Se=h.slice(0,Math.max(A[0]-1,0)).replace(/[^\t]/g," "),se=A[1]||1;H=[`
6
+ `,o(s.gutter,R.replace(/\d/g," "))," ",Se,o(s.marker,"^").repeat(se)].join(""),we&&t.message&&(H+=" "+o(s.message,t.message))}return[o(s.marker,">"),o(s.gutter,R),h.length>0?` ${h}`:"",H].join("")}else return` ${o(s.gutter,R)}${h.length>0?` ${h}`:""}`}).join(`
7
+ `);return t.message&&!f&&(p=`${" ".repeat(g+1)}${t.message}
8
+ ${p}`),n?i.reset(p):p}function lo(r,e,t,n={}){if(!cn){cn=!0;let s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{let o=new Error(s);o.name="DeprecationWarning",console.warn(new Error(s))}}return t=Math.max(t,0),hn(r,{start:{column:t,line:e}},n)}});var _n=m((Mu,gn)=>{"use strict";var{Duplex:fo}=require("stream");function pn(r){r.emit("close")}function ho(){!this.destroyed&&this._writableState.finished&&this.destroy()}function mn(r){this.removeListener("error",mn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function po(r,e){let t=!0,n=new fo({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(s,o){let u=!o&&n._readableState.objectMode?s.toString():s;n.push(u)||r.pause()}),r.once("error",function(s){n.destroyed||(t=!1,n.destroy(s))}),r.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(i,s){if(r.readyState===r.CLOSED){s(i),process.nextTick(pn,n);return}let o=!1;r.once("error",function(a){o=!0,s(a)}),r.once("close",function(){o||s(i),process.nextTick(pn,n)}),t&&r.terminate()},n._final=function(i){if(r.readyState===r.CONNECTING){r.once("open",function(){n._final(i)});return}r._socket!==null&&(r._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(r._socket.once("finish",function(){i()}),r.close()))},n._read=function(){r.isPaused&&r.resume()},n._write=function(i,s,o){if(r.readyState===r.CONNECTING){r.once("open",function(){n._write(i,s,o)});return}r.send(i,o)},n.on("end",ho),n.on("error",mn),n}gn.exports=po});var D=m((Nu,bn)=>{"use strict";bn.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var fe=m((Ru,Re)=>{"use strict";var{EMPTY_BUFFER:mo}=D(),pt=Buffer[Symbol.species];function go(r,e){if(r.length===0)return mo;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),n=0;for(let i=0;i<r.length;i++){let s=r[i];t.set(s,n),n+=s.length}return n<e?new pt(t.buffer,t.byteOffset,n):t}function vn(r,e,t,n,i){for(let s=0;s<i;s++)t[n+s]=r[s]^e[s&3]}function yn(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function _o(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function mt(r){if(mt.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new pt(r):ArrayBuffer.isView(r)?e=new pt(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),mt.readOnly=!1),e}Re.exports={concat:go,mask:vn,toArrayBuffer:_o,toBuffer:mt,unmask:yn};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");Re.exports.mask=function(e,t,n,i,s){s<48?vn(e,t,n,i,s):r.mask(e,t,n,i,s)},Re.exports.unmask=function(e,t){e.length<32?yn(e,t):r.unmask(e,t)}}catch{}});var Sn=m(($u,wn)=>{"use strict";var xn=Symbol("kDone"),gt=Symbol("kRun"),_t=class{constructor(e){this[xn]=()=>{this.pending--,this[gt]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[gt]()}[gt](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[xn])}}};wn.exports=_t});var pe=m((Lu,kn)=>{"use strict";var he=require("zlib"),On=fe(),bo=Sn(),{kStatusCode:En}=D(),vo=Buffer[Symbol.species],yo=Buffer.from([0,0,255,255]),Ie=Symbol("permessage-deflate"),F=Symbol("total-length"),de=Symbol("callback"),q=Symbol("buffers"),Le=Symbol("error"),$e,bt=class{constructor(e,t,n){if(this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!$e){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;$e=new bo(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[de];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,n=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(n=>{let i=t[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);t[n]=i})}),e}decompress(e,t,n){$e.add(i=>{this._decompress(e,t,(s,o)=>{i(),n(s,o)})})}compress(e,t,n){$e.add(i=>{this._compress(e,t,(s,o)=>{i(),n(s,o)})})}_decompress(e,t,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,o=typeof this.params[s]!="number"?he.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=he.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Ie]=this,this._inflate[F]=0,this._inflate[q]=[],this._inflate.on("error",wo),this._inflate.on("data",Cn)}this._inflate[de]=n,this._inflate.write(e),t&&this._inflate.write(yo),this._inflate.flush(()=>{let s=this._inflate[Le];if(s){this._inflate.close(),this._inflate=null,n(s);return}let o=On.concat(this._inflate[q],this._inflate[F]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[F]=0,this._inflate[q]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,o)})}_compress(e,t,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,o=typeof this.params[s]!="number"?he.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=he.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[F]=0,this._deflate[q]=[],this._deflate.on("data",xo)}this._deflate[de]=n,this._deflate.write(e),this._deflate.flush(he.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=On.concat(this._deflate[q],this._deflate[F]);t&&(s=new vo(s.buffer,s.byteOffset,s.length-4)),this._deflate[de]=null,this._deflate[F]=0,this._deflate[q]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};kn.exports=bt;function xo(r){this[q].push(r),this[F]+=r.length}function Cn(r){if(this[F]+=r.length,this[Ie]._maxPayload<1||this[F]<=this[Ie]._maxPayload){this[q].push(r);return}this[Le]=new RangeError("Max payload size exceeded"),this[Le].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Le][En]=1009,this.removeListener("data",Cn),this.reset()}function wo(r){this[Ie]._inflate=null,r[En]=1007,this[de](r)}});var me=m((Iu,Fe)=>{"use strict";var{isUtf8:An}=require("buffer"),So=[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,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Oo(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function vt(r){let e=r.length,t=0;for(;t<e;)if(!(r[t]&128))t++;else if((r[t]&224)===192){if(t+1===e||(r[t+1]&192)!==128||(r[t]&254)===192)return!1;t+=2}else if((r[t]&240)===224){if(t+2>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}Fe.exports={isValidStatusCode:Oo,isValidUTF8:vt,tokenChars:So};if(An)Fe.exports.isValidUTF8=function(r){return r.length<24?vt(r):An(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");Fe.exports.isValidUTF8=function(e){return e.length<32?vt(e):r(e)}}catch{}});var Ot=m((Fu,Ln)=>{"use strict";var{Writable:Eo}=require("stream"),Tn=pe(),{BINARY_TYPES:Co,EMPTY_BUFFER:Pn,kStatusCode:ko,kWebSocket:Ao}=D(),{concat:yt,toArrayBuffer:To,unmask:Po}=fe(),{isValidStatusCode:Mo,isValidUTF8:Mn}=me(),Be=Buffer[Symbol.species],No=Promise.resolve(),xt=typeof queueMicrotask=="function"?queueMicrotask:Ro,T=0,Nn=1,Rn=2,$n=3,wt=4,We=5,je=6,St=class extends Eo{constructor(e={}){super(),this._allowSynchronousEvents=!!e.allowSynchronousEvents,this._binaryType=e.binaryType||Co[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Ao]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=T}_write(e,t,n){if(this._opcode===8&&this._state==T)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new Be(n.buffer,n.byteOffset+e,n.length-e),new Be(n.buffer,n.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=t.length-e;e>=n.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new Be(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case T:this.getInfo(e);break;case Nn:this.getPayloadLength16(e);break;case Rn:this.getPayloadLength64(e);break;case $n:this.getMask();break;case wt:this.getData(e);break;case We:case je:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(t[0]&64)===64;if(n&&!this._extensions[Tn.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=Nn:this._payloadLength===127?this._state=Rn:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=$n:this._state=wt}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=wt}getData(e){let t=Pn;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Po(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=We,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[Tn.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return t(i);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._fragments.push(s)}this.dataMessage(t),this._state===T&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=T;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=yt(n,t):this._binaryType==="arraybuffer"?i=To(yt(n,t)):i=n,this._state===We||this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=T):(this._state=je,xt(()=>{this.emit("message",i,!0),this._state=T,this.startLoop(e)}))}else{let i=yt(n,t);if(!this._skipUTF8Validation&&!Mn(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===We||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=T):(this._state=je,xt(()=>{this.emit("message",i,!1),this._state=T,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Pn),this.end();else{let n=e.readUInt16BE(0);if(!Mo(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let i=new Be(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Mn(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=T;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=T):(this._state=je,xt(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=T,this.startLoop(t)}))}createError(e,t,n,i,s){this._loop=!1,this._errored=!0;let o=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=s,o[ko]=i,o}};Ln.exports=St;function Ro(r){No.then(r).catch(Lo)}function $o(r){throw r}function Lo(r){process.nextTick($o,r)}});var Ct=m((Wu,Bn)=>{"use strict";var{Duplex:Bu}=require("stream"),{randomFillSync:Io}=require("crypto"),In=pe(),{EMPTY_BUFFER:Fo}=D(),{isValidStatusCode:Bo}=me(),{mask:Fn,toBuffer:te}=fe(),N=Symbol("kByteLength"),Wo=Buffer.alloc(4),Et=class r{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,i=!1,s=2,o=!1;t.mask&&(n=t.maskBuffer||Wo,t.generateMask?t.generateMask(n):Io(n,0,4),o=(n[0]|n[1]|n[2]|n[3])===0,s=6);let u;typeof e=="string"?(!t.mask||o)&&t[N]!==void 0?u=t[N]:(e=Buffer.from(e),u=e.length):(u=e.length,i=t.mask&&t.readOnly&&!o);let a=u;u>=65536?(s+=8,a=127):u>125&&(s+=2,a=126);let c=Buffer.allocUnsafe(i?u+s:s);return c[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,a===126?c.writeUInt16BE(u,2):a===127&&(c[2]=c[3]=0,c.writeUIntBE(u,4,6)),t.mask?(c[1]|=128,c[s-4]=n[0],c[s-3]=n[1],c[s-2]=n[2],c[s-1]=n[3],o?[c,e]:i?(Fn(e,n,c,s,u),[c]):(Fn(e,n,e,0,u),[c,e])):[c,e]}close(e,t,n,i){let s;if(e===void 0)s=Fo;else{if(typeof e!="number"||!Bo(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+u),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let o={[N]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,i]):this.sendFrame(r.frame(s,o),i)}ping(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=te(e),i=e.length,s=te.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[N]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(r.frame(e,o),n)}pong(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=te(e),i=e.length,s=te.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[N]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(r.frame(e,o),n)}send(e,t,n){let i=this._extensions[In.extensionName],s=t.binary?2:1,o=t.compress,u,a;if(typeof e=="string"?(u=Buffer.byteLength(e),a=!1):(e=te(e),u=e.length,a=te.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=u>=i._threshold),this._compress=o):(o=!1,s=0),t.fin&&(this._firstFragment=!0),i){let c={[N]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:a,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,n]):this.dispatch(e,this._compress,c,n)}else this.sendFrame(r.frame(e,{[N]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:a,rsv1:!1}),n)}dispatch(e,t,n,i){if(!t){this.sendFrame(r.frame(e,n),i);return}let s=this._extensions[In.extensionName];this._bufferedBytes+=n[N],this._deflating=!0,s.compress(e,n.fin,(o,u)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(a);for(let c=0;c<this._queue.length;c++){let l=this._queue[c],f=l[l.length-1];typeof f=="function"&&f(a)}return}this._bufferedBytes-=n[N],this._deflating=!1,n.readOnly=!1,this.sendFrame(r.frame(u,n),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][N],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][N],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Bn.exports=Et});var zn=m((ju,Gn)=>{"use strict";var{kForOnEventAttribute:ge,kListener:kt}=D(),Wn=Symbol("kCode"),jn=Symbol("kData"),Dn=Symbol("kError"),qn=Symbol("kMessage"),Vn=Symbol("kReason"),re=Symbol("kTarget"),Un=Symbol("kType"),Hn=Symbol("kWasClean"),B=class{constructor(e){this[re]=null,this[Un]=e}get target(){return this[re]}get type(){return this[Un]}};Object.defineProperty(B.prototype,"target",{enumerable:!0});Object.defineProperty(B.prototype,"type",{enumerable:!0});var Y=class extends B{constructor(e,t={}){super(e),this[Wn]=t.code===void 0?0:t.code,this[Vn]=t.reason===void 0?"":t.reason,this[Hn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Wn]}get reason(){return this[Vn]}get wasClean(){return this[Hn]}};Object.defineProperty(Y.prototype,"code",{enumerable:!0});Object.defineProperty(Y.prototype,"reason",{enumerable:!0});Object.defineProperty(Y.prototype,"wasClean",{enumerable:!0});var ne=class extends B{constructor(e,t={}){super(e),this[Dn]=t.error===void 0?null:t.error,this[qn]=t.message===void 0?"":t.message}get error(){return this[Dn]}get message(){return this[qn]}};Object.defineProperty(ne.prototype,"error",{enumerable:!0});Object.defineProperty(ne.prototype,"message",{enumerable:!0});var _e=class extends B{constructor(e,t={}){super(e),this[jn]=t.data===void 0?null:t.data}get data(){return this[jn]}};Object.defineProperty(_e.prototype,"data",{enumerable:!0});var jo={addEventListener(r,e,t={}){for(let i of this.listeners(r))if(!t[ge]&&i[kt]===e&&!i[ge])return;let n;if(r==="message")n=function(s,o){let u=new _e("message",{data:o?s:s.toString()});u[re]=this,De(e,this,u)};else if(r==="close")n=function(s,o){let u=new Y("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[re]=this,De(e,this,u)};else if(r==="error")n=function(s){let o=new ne("error",{error:s,message:s.message});o[re]=this,De(e,this,o)};else if(r==="open")n=function(){let s=new B("open");s[re]=this,De(e,this,s)};else return;n[ge]=!!t[ge],n[kt]=e,t.once?this.once(r,n):this.on(r,n)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[kt]===e&&!t[ge]){this.removeListener(r,t);break}}};Gn.exports={CloseEvent:Y,ErrorEvent:ne,Event:B,EventTarget:jo,MessageEvent:_e};function De(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var At=m((Du,Yn)=>{"use strict";var{tokenChars:be}=me();function I(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Do(r){let e=Object.create(null),t=Object.create(null),n=!1,i=!1,s=!1,o,u,a=-1,c=-1,l=-1,f=0;for(;f<r.length;f++)if(c=r.charCodeAt(f),o===void 0)if(l===-1&&be[c]===1)a===-1&&(a=f);else if(f!==0&&(c===32||c===9))l===-1&&a!==-1&&(l=f);else if(c===59||c===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1&&(l=f);let b=r.slice(a,l);c===44?(I(e,b,t),t=Object.create(null)):o=b,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(u===void 0)if(l===-1&&be[c]===1)a===-1&&(a=f);else if(c===32||c===9)l===-1&&a!==-1&&(l=f);else if(c===59||c===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1&&(l=f),I(t,r.slice(a,l),!0),c===44&&(I(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(c===61&&a!==-1&&l===-1)u=r.slice(a,f),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(i){if(be[c]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);a===-1?a=f:n||(n=!0),i=!1}else if(s)if(be[c]===1)a===-1&&(a=f);else if(c===34&&a!==-1)s=!1,l=f;else if(c===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(c===34&&r.charCodeAt(f-1)===61)s=!0;else if(l===-1&&be[c]===1)a===-1&&(a=f);else if(a!==-1&&(c===32||c===9))l===-1&&(l=f);else if(c===59||c===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1&&(l=f);let b=r.slice(a,l);n&&(b=b.replace(/\\/g,""),n=!1),I(t,u,b),c===44&&(I(e,o,t),t=Object.create(null),o=void 0),u=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(a===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=f);let g=r.slice(a,l);return o===void 0?I(e,g,t):(u===void 0?I(t,g,!0):n?I(t,u,g.replace(/\\/g,"")):I(t,u,g),I(e,o,t)),e}function qo(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Yn.exports={format:qo,parse:Do}});var Rt=m((Uu,si)=>{"use strict";var Vo=require("events"),Uo=require("https"),Ho=require("http"),Jn=require("net"),Go=require("tls"),{randomBytes:zo,createHash:Yo}=require("crypto"),{Duplex:qu,Readable:Vu}=require("stream"),{URL:Tt}=require("url"),V=pe(),Ko=Ot(),Xo=Ct(),{BINARY_TYPES:Kn,EMPTY_BUFFER:qe,GUID:Jo,kForOnEventAttribute:Pt,kListener:Zo,kStatusCode:Qo,kWebSocket:E,NOOP:Zn}=D(),{EventTarget:{addEventListener:ea,removeEventListener:ta}}=zn(),{format:ra,parse:na}=At(),{toBuffer:ia}=fe(),sa=30*1e3,Qn=Symbol("kAborted"),Mt=[8,13],W=["CONNECTING","OPEN","CLOSING","CLOSED"],oa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,w=class r extends Vo{constructor(e,t,n){super(),this._binaryType=Kn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=qe,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(n=t,t=[]):t=[t]),ei(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Kn.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){let i=new Ko({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Xo(e,this._extensions,n.generateMask),this._receiver=i,this._socket=e,i[E]=this,e[E]=this,i.on("conclude",ca),i.on("drain",la),i.on("error",fa),i.on("message",ha),i.on("ping",da),i.on("pong",pa),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ri),e.on("data",Ue),e.on("end",ni),e.on("error",ii),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[V.extensionName]&&this._extensions[V.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){k(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),sa)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Nt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||qe,t,n)}pong(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Nt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||qe,t,n)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(n=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Nt(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[V.extensionName]||(i.compress=!1),this._sender.send(e||qe,i,n)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){k(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(w,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(w.prototype,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(w,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(w.prototype,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(w,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(w.prototype,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(w,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});Object.defineProperty(w.prototype,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(w.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(w.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Pt])return e[Zo];return null},set(e){for(let t of this.listeners(r))if(t[Pt]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Pt]:!0})}})});w.prototype.addEventListener=ea;w.prototype.removeEventListener=ta;si.exports=w;function ei(r,e,t,n){let i={allowSynchronousEvents:!1,autoPong:!0,protocolVersion:Mt[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=i.autoPong,!Mt.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Mt.join(", ")})`);let s;if(e instanceof Tt)s=e;else try{s=new Tt(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),r._url=s.href;let o=s.protocol==="wss:",u=s.protocol==="ws+unix:",a;if(s.protocol!=="ws:"&&!o&&!u?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!s.pathname?a="The URL's pathname is empty":s.hash&&(a="The URL contains a fragment identifier"),a){let h=new SyntaxError(a);if(r._redirects===0)throw h;Ve(r,h);return}let c=o?443:80,l=zo(16).toString("base64"),f=o?Uo.request:Ho.request,g=new Set,b;if(i.createConnection=o?ua:aa,i.defaultPort=i.defaultPort||c,i.port=s.port||c,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(b=new V(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ra({[V.extensionName]:b.offer()})),t.length){for(let h of t){if(typeof h!="string"||!oa.test(h)||g.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");g.add(h)}i.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){let h=i.path.split(":");i.socketPath=h[0],i.path=h[1]}let p;if(i.followRedirects){if(r._redirects===0){r._originalIpc=u,r._originalSecure=o,r._originalHostOrSocketPath=u?i.socketPath:s.host;let h=n&&n.headers;if(n={...n,headers:{}},h)for(let[_,y]of Object.entries(h))n.headers[_.toLowerCase()]=y}else if(r.listenerCount("redirect")===0){let h=u?r._originalIpc?i.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:s.host===r._originalHostOrSocketPath;(!h||r._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,h||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=r._req=f(i),r._redirects&&r.emit("redirect",r.url,p)}else p=r._req=f(i);i.timeout&&p.on("timeout",()=>{k(r,p,"Opening handshake has timed out")}),p.on("error",h=>{p===null||p[Qn]||(p=r._req=null,Ve(r,h))}),p.on("response",h=>{let _=h.headers.location,y=h.statusCode;if(_&&i.followRedirects&&y>=300&&y<400){if(++r._redirects>i.maxRedirects){k(r,p,"Maximum redirects exceeded");return}p.abort();let U;try{U=new Tt(_,e)}catch{let A=new SyntaxError(`Invalid URL: ${_}`);Ve(r,A);return}ei(r,U,t,n)}else r.emit("unexpected-response",p,h)||k(r,p,`Unexpected server response: ${h.statusCode}`)}),p.on("upgrade",(h,_,y)=>{if(r.emit("upgrade",h),r.readyState!==w.CONNECTING)return;if(p=r._req=null,h.headers.upgrade.toLowerCase()!=="websocket"){k(r,_,"Invalid Upgrade header");return}let U=Yo("sha1").update(l+Jo).digest("base64");if(h.headers["sec-websocket-accept"]!==U){k(r,_,"Invalid Sec-WebSocket-Accept header");return}let R=h.headers["sec-websocket-protocol"],A;if(R!==void 0?g.size?g.has(R)||(A="Server sent an invalid subprotocol"):A="Server sent a subprotocol but none was requested":g.size&&(A="Server sent no subprotocol"),A){k(r,_,A);return}R&&(r._protocol=R);let we=h.headers["sec-websocket-extensions"];if(we!==void 0){if(!b){k(r,_,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let H;try{H=na(we)}catch{k(r,_,"Invalid Sec-WebSocket-Extensions header");return}let Se=Object.keys(H);if(Se.length!==1||Se[0]!==V.extensionName){k(r,_,"Server indicated an extension that was not requested");return}try{b.accept(H[V.extensionName])}catch{k(r,_,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[V.extensionName]=b}r.setSocket(_,y,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,r):p.end()}function Ve(r,e){r._readyState=w.CLOSING,r.emit("error",e),r.emitClose()}function aa(r){return r.path=r.socketPath,Jn.connect(r)}function ua(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=Jn.isIP(r.host)?"":r.host),Go.connect(r)}function k(r,e,t){r._readyState=w.CLOSING;let n=new Error(t);Error.captureStackTrace(n,k),e.setHeader?(e[Qn]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ve,r,n)):(e.destroy(n),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function Nt(r,e,t){if(e){let n=ia(e).length;r._socket?r._sender._bufferedBytes+=n:r._bufferedAmount+=n}if(t){let n=new Error(`WebSocket is not open: readyState ${r.readyState} (${W[r.readyState]})`);process.nextTick(t,n)}}function ca(r,e){let t=this[E];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[E]!==void 0&&(t._socket.removeListener("data",Ue),process.nextTick(ti,t._socket),r===1005?t.close():t.close(r,e))}function la(){let r=this[E];r.isPaused||r._socket.resume()}function fa(r){let e=this[E];e._socket[E]!==void 0&&(e._socket.removeListener("data",Ue),process.nextTick(ti,e._socket),e.close(r[Qo])),e.emit("error",r)}function Xn(){this[E].emitClose()}function ha(r,e){this[E].emit("message",r,e)}function da(r){let e=this[E];e._autoPong&&e.pong(r,!this._isServer,Zn),e.emit("ping",r)}function pa(r){this[E].emit("pong",r)}function ti(r){r.resume()}function ri(){let r=this[E];this.removeListener("close",ri),this.removeListener("data",Ue),this.removeListener("end",ni),r._readyState=w.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[E]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Xn),r._receiver.on("finish",Xn))}function Ue(r){this[E]._receiver.write(r)||this.pause()}function ni(){let r=this[E];r._readyState=w.CLOSING,r._receiver.end(),this.end()}function ii(){let r=this[E];this.removeListener("error",ii),this.on("error",Zn),r&&(r._readyState=w.CLOSING,this.destroy())}});var ai=m((Hu,oi)=>{"use strict";var{tokenChars:ma}=me();function ga(r){let e=new Set,t=-1,n=-1,i=0;for(i;i<r.length;i++){let o=r.charCodeAt(i);if(n===-1&&ma[o]===1)t===-1&&(t=i);else if(i!==0&&(o===32||o===9))n===-1&&t!==-1&&(n=i);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let u=r.slice(t,n);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(t===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=r.slice(t,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}oi.exports={parse:ga}});var pi=m((zu,di)=>{"use strict";var _a=require("events"),He=require("http"),{Duplex:Gu}=require("stream"),{createHash:ba}=require("crypto"),ui=At(),K=pe(),va=ai(),ya=Rt(),{GUID:xa,kWebSocket:wa}=D(),Sa=/^[+/0-9A-Za-z]{22}==$/,ci=0,li=1,hi=2,$t=class extends _a{constructor(e,t){if(super(),e={allowSynchronousEvents:!1,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:ya,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=He.createServer((n,i)=>{let s=He.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=Oa(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,s,o)=>{this.handleUpgrade(i,s,o,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=ci}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===hi){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(ve,this);return}if(e&&this.once("close",e),this._state!==li)if(this._state=li,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(ve,this):process.nextTick(ve,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{ve(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,i){t.on("error",fi);let s=e.headers["sec-websocket-key"],o=+e.headers["sec-websocket-version"];if(e.method!=="GET"){X(this,e,t,405,"Invalid HTTP method");return}if(e.headers.upgrade.toLowerCase()!=="websocket"){X(this,e,t,400,"Invalid Upgrade header");return}if(!s||!Sa.test(s)){X(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(o!==8&&o!==13){X(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){ye(t,400);return}let u=e.headers["sec-websocket-protocol"],a=new Set;if(u!==void 0)try{a=va.parse(u)}catch{X(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let c=e.headers["sec-websocket-extensions"],l={};if(this.options.perMessageDeflate&&c!==void 0){let f=new K(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=ui.parse(c);g[K.extensionName]&&(f.accept(g[K.extensionName]),l[K.extensionName]=f)}catch{X(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(f,(g,b,p,h)=>{if(!g)return ye(t,b||401,p,h);this.completeUpgrade(l,s,a,e,t,n,i)});return}if(!this.options.verifyClient(f))return ye(t,401)}this.completeUpgrade(l,s,a,e,t,n,i)}completeUpgrade(e,t,n,i,s,o,u){if(!s.readable||!s.writable)return s.destroy();if(s[wa])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>ci)return ye(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ba("sha1").update(t+xa).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(n.size){let f=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),l._protocol=f)}if(e[K.extensionName]){let f=e[K.extensionName].params,g=ui.format({[K.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${g}`),l._extensions=e}this.emit("headers",c,i),s.write(c.concat(`\r
10
9
  `).join(`\r
11
- `)),s.removeListener("error",ts),c.setSocket(s,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Te,this)})),o(c,i)}};ns.exports=Qt;function $u(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let n of Object.keys(e))r.removeListener(n,e[n])}}function Te(r){r._state=rs,r.emit("close")}function ts(){this.destroy()}function Pe(r,e,t,n){t=t||ut.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...n},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${ut.STATUS_CODES[e]}\r
10
+ `)),s.removeListener("error",fi),l.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(ve,this)})),u(l,i)}};di.exports=$t;function Oa(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let n of Object.keys(e))r.removeListener(n,e[n])}}function ve(r){r._state=hi,r.emit("close")}function fi(){this.destroy()}function ye(r,e,t,n){t=t||He.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...n},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${He.STATUS_CODES[e]}\r
12
11
  `+Object.keys(n).map(i=>`${i}: ${n[i]}`).join(`\r
13
12
  `)+`\r
14
13
  \r
15
- `+t)}function te(r,e,t,n,i){if(r.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,te),r.emit("wsClientError",s,t,e)}else Pe(t,n,i)}});var us=g((pc,os)=>{"use strict";function Fu(r){return r>=55296&&r<=56319}function ju(r){return r>=56320&&r<=57343}os.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var i=t.length,s=0,a,o,u=0;u<i;u+=1){if(a=t.charCodeAt(u),o=t[u],Fu(a)&&ju(t.charCodeAt(u+1))&&(u+=1,o+=t[u]),s+=e(o),s===n)return t.slice(0,u+1);if(s>n)return t.slice(0,u-o.length+1)}return t}});var cs=g((mc,ls)=>{"use strict";var Wu=us(),qu=Buffer.byteLength.bind(Buffer);ls.exports=Wu.bind(null,qu)});var ds=g((gc,hs)=>{"use strict";var Du=cs(),Vu=/[\/\?<>\\:\*\|"]/g,Uu=/[\x00-\x1f\x80-\x9f]/g,Hu=/^\.+$/,Gu=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,zu=/[\. ]+$/;function fs(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Vu,e).replace(Uu,e).replace(Hu,e).replace(Gu,e).replace(zu,e);return Du(t,255)}hs.exports=function(r,e){var t=e&&e.replacement||"",n=fs(r,t);return t===""?n:fs(n,"")}});var Re=g(rr=>{var lt=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},tr=class extends lt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};rr.CommanderError=lt;rr.InvalidArgumentError=tr});var ct=g(ir=>{var{InvalidArgumentError:Yu}=Re(),nr=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Yu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ku(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}ir.Argument=nr;ir.humanReadableArgName=Ku});var ar=g(ps=>{var{humanReadableArgName:Xu}=ct(),sr=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>Xu(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,s=2,a=2;function o(m,h){if(h){let v=`${m.padEnd(n+a)}${h}`;return t.wrap(v,i-s,n+a)}return m}function u(m){return m.join(`
16
- `).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],c=t.commandDescription(e);c.length>0&&(l=l.concat([t.wrap(c,i,0),""]));let f=t.visibleArguments(e).map(m=>o(t.argumentTerm(m),t.argumentDescription(m)));f.length>0&&(l=l.concat(["Arguments:",u(f),""]));let b=t.visibleOptions(e).map(m=>o(t.optionTerm(m),t.optionDescription(m)));if(b.length>0&&(l=l.concat(["Options:",u(b),""])),this.showGlobalOptions){let m=t.visibleGlobalOptions(e).map(h=>o(t.optionTerm(h),t.optionDescription(h)));m.length>0&&(l=l.concat(["Global Options:",u(m),""]))}let _=t.visibleCommands(e).map(m=>o(t.subcommandTerm(m),t.subcommandDescription(m)));return _.length>0&&(l=l.concat(["Commands:",u(_),""])),l.join(`
17
- `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",a=new RegExp(`[\\n][${s}]+`);if(e.match(a))return e;let o=t-n;if(o<i)return e;let u=e.slice(0,n),l=e.slice(n).replace(`\r
14
+ `+t)}function X(r,e,t,n,i){if(r.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,X),r.emit("wsClientError",s,t,e)}else ye(t,n,i)}});var bi=m((Ku,_i)=>{"use strict";function Aa(r){return r>=55296&&r<=56319}function Ta(r){return r>=56320&&r<=57343}_i.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var i=t.length,s=0,o,u,a=0;a<i;a+=1){if(o=t.charCodeAt(a),u=t[a],Aa(o)&&Ta(t.charCodeAt(a+1))&&(a+=1,u+=t[a]),s+=e(u),s===n)return t.slice(0,a+1);if(s>n)return t.slice(0,a-u.length+1)}return t}});var yi=m((Xu,vi)=>{"use strict";var Pa=bi(),Ma=Buffer.byteLength.bind(Buffer);vi.exports=Pa.bind(null,Ma)});var Si=m((Ju,wi)=>{"use strict";var Na=yi(),Ra=/[\/\?<>\\:\*\|"]/g,$a=/[\x00-\x1f\x80-\x9f]/g,La=/^\.+$/,Ia=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Fa=/[\. ]+$/;function xi(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Ra,e).replace($a,e).replace(La,e).replace(Ia,e).replace(Fa,e);return Na(t,255)}wi.exports=function(r,e){var t=e&&e.replacement||"",n=xi(r,t);return t===""?n:xi(n,"")}});var xe=m(Ft=>{var Ge=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},It=class extends Ge{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ft.CommanderError=Ge;Ft.InvalidArgumentError=It});var ze=m(Wt=>{var{InvalidArgumentError:Ba}=xe(),Bt=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Ba(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Wa(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Wt.Argument=Bt;Wt.humanReadableArgName=Wa});var Dt=m(Oi=>{var{humanReadableArgName:ja}=ze(),jt=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>ja(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,s=2,o=2;function u(p,h){if(h){let _=`${p.padEnd(n+o)}${h}`;return t.wrap(_,i-s,n+o)}return p}function a(p){return p.join(`
15
+ `).replace(/^/gm," ".repeat(s))}let c=[`Usage: ${t.commandUsage(e)}`,""],l=t.commandDescription(e);l.length>0&&(c=c.concat([t.wrap(l,i,0),""]));let f=t.visibleArguments(e).map(p=>u(t.argumentTerm(p),t.argumentDescription(p)));f.length>0&&(c=c.concat(["Arguments:",a(f),""]));let g=t.visibleOptions(e).map(p=>u(t.optionTerm(p),t.optionDescription(p)));if(g.length>0&&(c=c.concat(["Options:",a(g),""])),this.showGlobalOptions){let p=t.visibleGlobalOptions(e).map(h=>u(t.optionTerm(h),t.optionDescription(h)));p.length>0&&(c=c.concat(["Global Options:",a(p),""]))}let b=t.visibleCommands(e).map(p=>u(t.subcommandTerm(p),t.subcommandDescription(p)));return b.length>0&&(c=c.concat(["Commands:",a(b),""])),c.join(`
16
+ `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${s}]+`);if(e.match(o))return e;let u=t-n;if(u<i)return e;let a=e.slice(0,n),c=e.slice(n).replace(`\r
18
17
  `,`
19
- `),c=" ".repeat(n),b="\\s\u200B",_=new RegExp(`
20
- |.{1,${o-1}}([${b}]|$)|[^${b}]+?([${b}]|$)`,"g"),m=l.match(_)||[];return u+m.map((h,v)=>h===`
21
- `?"":(v>0?c:"")+h.trimEnd()).join(`
22
- `)}};ps.Help=sr});var cr=g(lr=>{var{InvalidArgumentError:Ju}=Re(),or=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Qu(e);this.short=n.shortFlag,this.long=n.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(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Ju(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Zu(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ur=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function Zu(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Qu(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}lr.Option=or;lr.DualOptions=ur});var gs=g(ms=>{function el(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function tl(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(a=>a.slice(2)));let n=[],i=3,s=.4;return e.forEach(a=>{if(a.length<=1)return;let o=el(r,a),u=Math.max(r.length,a.length);(u-o)/u>s&&(o<i?(i=o,n=[a]):o===i&&n.push(a))}),n.sort((a,o)=>a.localeCompare(o)),t&&(n=n.map(a=>`--${a}`)),n.length>1?`
18
+ `),l=" ".repeat(n),g="\\s\u200B",b=new RegExp(`
19
+ |.{1,${u-1}}([${g}]|$)|[^${g}]+?([${g}]|$)`,"g"),p=c.match(b)||[];return a+p.map((h,_)=>h===`
20
+ `?"":(_>0?l:"")+h.trimEnd()).join(`
21
+ `)}};Oi.Help=jt});var Ht=m(Ut=>{var{InvalidArgumentError:Da}=xe(),qt=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Va(e);this.short=n.shortFlag,this.long=n.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(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Da(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return qa(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Vt=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function qa(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Va(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}Ut.Option=qt;Ut.DualOptions=Vt});var Ci=m(Ei=>{function Ua(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function Ha(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let u=Ua(r,o),a=Math.max(r.length,o.length);(a-u)/a>s&&(u<i?(i=u,n=[o]):u===i&&n.push(o))}),n.sort((o,u)=>o.localeCompare(u)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
23
22
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
24
- (Did you mean ${n[0]}?)`:""}ms.suggestSimilar=tl});var ws=g(ys=>{var rl=require("events").EventEmitter,fr=require("child_process"),U=require("path"),hr=require("fs"),w=require("process"),{Argument:nl,humanReadableArgName:il}=ct(),{CommanderError:dr}=Re(),{Help:sl}=ar(),{Option:bs,DualOptions:al}=cr(),{suggestSimilar:vs}=gs(),pr=class r extends rl{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",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=>w.stdout.write(t),writeErr:t=>w.stderr.write(t),getOutHelpWidth:()=>w.stdout.isTTY?w.stdout.columns:void 0,getErrHelpWidth:()=>w.stderr.isTTY?w.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,a,o]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(a);return i&&(u.description(i),u._executableHandler=!0),s.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(s.noHelp||s.hidden),u._executableFile=s.executableFile||null,o&&u.arguments(o),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new r(e)}createHelp(){return Object.assign(new sl,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
25
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new nl(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",a=this.createCommand(n);return a.helpOption(!1),i&&a.arguments(i),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
26
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new dr(e,t,n)),w.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new bs(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let a=`${i} ${s.message}`;this.error(a,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
27
- - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,a,o)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let u=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,u,a):s!==null&&e.variadic&&(s=e._concatValue(s,u)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,o)};return this.on("option:"+t,s=>{let a=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,a,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let a=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,a,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof bs)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof i=="function")a.default(s).argParser(i);else if(i instanceof RegExp){let o=i;i=(u,l)=>{let c=o.exec(u);return c?c[0]:l},a.default(s).argParser(i)}else a.default(i);return this.addOption(a)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=w.argv,w.versions&&w.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":w.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(c,f){let b=U.resolve(c,f);if(hr.existsSync(b))return b;if(i.includes(U.extname(f)))return;let _=i.find(m=>hr.existsSync(`${b}${m}`));if(_)return`${b}${_}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,o=this._executableDir||"";if(this._scriptPath){let c;try{c=hr.realpathSync(this._scriptPath)}catch{c=this._scriptPath}o=U.resolve(U.dirname(c),o)}if(o){let c=s(o,a);if(!c&&!e._executableFile&&this._scriptPath){let f=U.basename(this._scriptPath,U.extname(this._scriptPath));f!==this._name&&(c=s(o,`${f}-${e._name}`))}a=c||a}n=i.includes(U.extname(a));let u;w.platform!=="win32"?n?(t.unshift(a),t=_s(w.execArgv).concat(t),u=fr.spawn(w.argv[0],t,{stdio:"inherit"})):u=fr.spawn(a,t,{stdio:"inherit"}):(t.unshift(a),t=_s(w.execArgv).concat(t),u=fr.spawn(w.execPath,t,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{w.on(f,()=>{u.killed===!1&&u.exitCode===null&&u.kill(f)})});let l=this._exitCallback;u.on("close",(c,f)=>{c=c??1,l?l(new dr(c,"commander.executeSubCommandAsync","(close)")):w.exit(c)}),u.on("error",c=>{if(c.code==="ENOENT"){let f=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",b=`'${a}' does not exist
23
+ (Did you mean ${n[0]}?)`:""}Ei.suggestSimilar=Ha});var Mi=m(Pi=>{var Ga=require("events").EventEmitter,Gt=require("child_process"),j=require("path"),zt=require("fs"),x=require("process"),{Argument:za,humanReadableArgName:Ya}=ze(),{CommanderError:Yt}=xe(),{Help:Ka}=Dt(),{Option:ki,DualOptions:Xa}=Ht(),{suggestSimilar:Ai}=Ci(),Kt=class r extends Ga{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",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=>x.stdout.write(t),writeErr:t=>x.stderr.write(t),getOutHelpWidth:()=>x.stdout.isTTY?x.stdout.columns:void 0,getErrHelpWidth:()=>x.stderr.isTTY?x.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,u]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(s.noHelp||s.hidden),a._executableFile=s.executableFile||null,u&&a.arguments(u),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new r(e)}createHelp(){return Object.assign(new Ka,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
24
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new za(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
25
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new Yt(e,t,n)),x.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new ki(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
26
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,o,u)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,a,o):s!==null&&e.variadic&&(s=e._concatValue(s,a)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,u)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof ki)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let u=i;i=(a,c)=>{let l=u.exec(a);return l?l[0]:c},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=x.argv,x.versions&&x.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":x.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(l,f){let g=j.resolve(l,f);if(zt.existsSync(g))return g;if(i.includes(j.extname(f)))return;let b=i.find(p=>zt.existsSync(`${g}${p}`));if(b)return`${g}${b}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=zt.realpathSync(this._scriptPath)}catch{l=this._scriptPath}u=j.resolve(j.dirname(l),u)}if(u){let l=s(u,o);if(!l&&!e._executableFile&&this._scriptPath){let f=j.basename(this._scriptPath,j.extname(this._scriptPath));f!==this._name&&(l=s(u,`${f}-${e._name}`))}o=l||o}n=i.includes(j.extname(o));let a;x.platform!=="win32"?n?(t.unshift(o),t=Ti(x.execArgv).concat(t),a=Gt.spawn(x.argv[0],t,{stdio:"inherit"})):a=Gt.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=Ti(x.execArgv).concat(t),a=Gt.spawn(x.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{x.on(f,()=>{a.killed===!1&&a.exitCode===null&&a.kill(f)})});let c=this._exitCallback;a.on("close",(l,f)=>{l=l??1,c?c(new Yt(l,"commander.executeSubCommandAsync","(close)")):x.exit(l)}),a.on("error",l=>{if(l.code==="ENOENT"){let f=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",g=`'${o}' does not exist
28
27
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
29
28
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
30
- - ${f}`;throw new Error(b)}else if(c.code==="EACCES")throw new Error(`'${a}' not executable`);if(!l)w.exit(1);else{let f=new dr(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,l(f)}}),this.runningCommand=u}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){var n,i;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[((n=this._getHelpOption())==null?void 0:n.long)??((i=this._getHelpOption())==null?void 0:i.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let a=i;if(i!==null&&n.parseArg){let o=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;a=this._callParseArg(n,i,s,o)}return a};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((a,o)=>e(n,o,a),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(a=>{i.push({hookedCommand:s,callback:a})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(s,e,t)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function a(u){return u.length>1&&u[0]==="-"}let o=null;for(;s.length;){let u=s.shift();if(u==="--"){i===n&&i.push(u),i.push(...s);break}if(o&&!a(u)){this.emit(`option:${o.name()}`,u);continue}if(o=null,a(u)){let l=this._findOption(u);if(l){if(l.required){let c=s.shift();c===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,c)}else if(l.optional){let c=null;s.length>0&&!a(s[0])&&(c=s.shift()),this.emit(`option:${l.name()}`,c)}else this.emit(`option:${l.name()}`);o=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),c=this._findOption(u.slice(0,l));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,u.slice(l+1));continue}}if(a(u)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(u)){t.push(u),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){t.push(u),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(u),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(u),s.length>0&&i.push(...s);break}i.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
29
+ - ${f}`;throw new Error(g)}else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)x.exit(1);else{let f=new Yt(1,"commander.executeSubCommandAsync","(error)");f.nestedError=l,c(f)}}),this.runningCommand=a}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){var n,i;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[((n=this._getHelpOption())==null?void 0:n.long)??((i=this._getHelpOption())==null?void 0:i.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,u)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,u)=>e(n,u,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function o(a){return a.length>1&&a[0]==="-"}let u=null;for(;s.length;){let a=s.shift();if(a==="--"){i===n&&i.push(a),i.push(...s);break}if(u&&!o(a)){this.emit(`option:${u.name()}`,a);continue}if(u=null,o(a)){let c=this._findOption(a);if(c){if(c.required){let l=s.shift();l===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,l)}else if(c.optional){let l=null;s.length>0&&!o(s[0])&&(l=s.shift()),this.emit(`option:${c.name()}`,l)}else this.emit(`option:${c.name()}`);u=c.variadic?c:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let c=this._findOption(`-${a[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,a.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let c=a.indexOf("="),l=this._findOption(a.slice(0,c));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,a.slice(c+1));continue}}if(o(a)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(a)){t.push(a),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){t.push(a),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(a),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(a),s.length>0&&i.push(...s);break}i.push(a)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
31
30
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
32
31
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
33
- `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in w.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,w.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new al(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=a=>{let o=a.attributeName(),u=this.getOptionValue(o),l=this.options.find(f=>f.negate&&o===f.attributeName()),c=this.options.find(f=>!f.negate&&o===f.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:c||a},i=a=>{let o=n(a),u=o.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${o.envVar}'`:`option '${o.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let a=s.createHelp().visibleOptions(s).filter(o=>o.long).map(o=>o.long);i=i.concat(a),s=s.parent}while(s&&!s._enablePositionalOptions);t=vs(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=vs(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
34
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var i;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=(i=this.parent)==null?void 0:i._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>il(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=U.basename(e,U.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){var s;let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),(s=this._getHelpOption())!=null&&s.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=w.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
35
- Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let a;typeof t=="function"?a=t({error:s.error,command:s.command}):a=t,a&&s.write(`${a}
36
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function _s(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}ys.Command=pr});var Ss=g(N=>{var{Argument:xs}=ct(),{Command:mr}=ws(),{CommanderError:ol,InvalidArgumentError:Es}=Re(),{Help:ul}=ar(),{Option:Os}=cr();N.program=new mr;N.createCommand=r=>new mr(r);N.createOption=(r,e)=>new Os(r,e);N.createArgument=(r,e)=>new xs(r,e);N.Command=mr;N.Option=Os;N.Argument=xs;N.Help=ul;N.CommanderError=ol;N.InvalidArgumentError=Es;N.InvalidOptionArgumentError=Es});var br=g((Lc,Ms)=>{"use strict";var As=require("fs"),gr;function ll(){try{return As.statSync("/.dockerenv"),!0}catch{return!1}}function cl(){try{return As.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Ms.exports=()=>(gr===void 0&&(gr=ll()||cl()),gr)});var Rs=g((Ic,vr)=>{"use strict";var fl=require("os"),hl=require("fs"),Ts=br(),Ps=()=>{if(process.platform!=="linux")return!1;if(fl.release().toLowerCase().includes("microsoft"))return!Ts();try{return hl.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Ts():!1}catch{return!1}};process.env.__IS_WSL_TEST__?vr.exports=Ps:vr.exports=Ps()});var $s=g((Bc,Ns)=>{"use strict";Ns.exports=(r,e,t)=>{let n=i=>Object.defineProperty(r,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let i=t();return n(i),i},set(i){n(i)}}),r}});var qs=g((Fc,Ws)=>{var dl=require("path"),pl=require("child_process"),{promises:ht,constants:js}=require("fs"),ft=Rs(),ml=br(),yr=$s(),Ls=dl.join(__dirname,"xdg-open"),{platform:de,arch:Is}=process,gl=()=>{try{return ht.statSync("/run/.containerenv"),!0}catch{return!1}},_r;function bl(){return _r===void 0&&(_r=gl()||ml()),_r}var vl=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",n=!1;try{await ht.access(t,js.F_OK),n=!0}catch{}if(!n)return r;let i=await ht.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),Bs=async(r,e)=>{let t;for(let n of r)try{return await e(n)}catch(i){t=i}throw t},dt=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return Bs(r.app,o=>dt({...r,app:o}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return Bs(e,o=>dt({...r,app:{name:o,arguments:t}}));let n,i=[],s={};if(de==="darwin")n="open",r.wait&&i.push("--wait-apps"),r.background&&i.push("--background"),r.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(de==="win32"||ft&&!bl()&&!e){let o=await vl();n=ft?`${o}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),ft||(s.windowsVerbatimArguments=!0);let u=["Start"];r.wait&&u.push("-Wait"),e?(u.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&u.push(`"${r.target}"`),t.length>0&&(t=t.map(l=>`"\`"${l}\`""`),u.push(t.join(","))),r.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let o=!__dirname||__dirname==="/",u=!1;try{await ht.access(Ls,js.X_OK),u=!0}catch{}n=process.versions.electron||de==="android"||o||!u?"xdg-open":Ls}t.length>0&&i.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&i.push(r.target),de==="darwin"&&t.length>0&&i.push("--args",...t);let a=pl.spawn(n,i,s);return r.wait?new Promise((o,u)=>{a.once("error",u),a.once("close",l=>{if(!r.allowNonzeroExitCode&&l>0){u(new Error(`Exited with code ${l}`));return}o(a)})}):(a.unref(),a)},wr=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return dt({...e,target:r})},_l=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return dt({...e,app:{name:r,arguments:t}})};function Fs(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Is]:e}=r;if(!e)throw new Error(`${Is} is not supported`);return e}function xr({[de]:r},{wsl:e}){if(e&&ft)return Fs(e);if(!r)throw new Error(`${de} is not supported`);return Fs(r)}var pt={};yr(pt,"chrome",()=>xr({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));yr(pt,"firefox",()=>xr({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));yr(pt,"edge",()=>xr({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));wr.apps=pt;wr.openApp=_l;Ws.exports=wr});var yl={};Zs(yl,{StackUtils:()=>Ds.default,WebSocket:()=>as,WebSocketServer:()=>er.default,codeFrameColumns:()=>Vs.codeFrameColumns,open:()=>Hs.default,program:()=>ks,sanitize:()=>Us.default});module.exports=Qs(yl);var Ds=F(Mr()),Vs=F(ni());var Lu=F(oi(),1),Iu=F(Vt(),1),Bu=F(Ht(),1),ss=F(Zt(),1),er=F(is(),1);var as=ss.default;var Us=F(ds());var Cs=F(Ss(),1),{program:ks,createCommand:Oc,createArgument:Sc,createOption:Cc,CommanderError:kc,InvalidArgumentError:Ac,InvalidOptionArgumentError:Mc,Command:Tc,Argument:Pc,Option:Rc,Help:Nc}=Cs.default;var Hs=F(qs());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,open,program,sanitize});
32
+ `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in x.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,x.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Xa(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let u=o.attributeName(),a=this.getOptionValue(u),c=this.options.find(f=>f.negate&&u===f.attributeName()),l=this.options.find(f=>!f.negate&&u===f.attributeName());return c&&(c.presetArg===void 0&&a===!1||c.presetArg!==void 0&&a===c.presetArg)?c:l||o},i=o=>{let u=n(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(u=>u.long).map(u=>u.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Ai(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=Ai(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
33
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var i;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=(i=this.parent)==null?void 0:i._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Ya(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=j.basename(e,j.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){var s;let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),(s=this._getHelpOption())!=null&&s.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=x.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
34
+ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
35
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ti(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}Pi.Command=Kt});var Li=m(P=>{var{Argument:Ni}=ze(),{Command:Xt}=Mi(),{CommanderError:Ja,InvalidArgumentError:Ri}=xe(),{Help:Za}=Dt(),{Option:$i}=Ht();P.program=new Xt;P.createCommand=r=>new Xt(r);P.createOption=(r,e)=>new $i(r,e);P.createArgument=(r,e)=>new Ni(r,e);P.Command=Xt;P.Option=$i;P.Argument=Ni;P.Help=Za;P.CommanderError=Ja;P.InvalidArgumentError=Ri;P.InvalidOptionArgumentError=Ri});var Zt=m((gc,Wi)=>{"use strict";var Bi=require("fs"),Jt;function Qa(){try{return Bi.statSync("/.dockerenv"),!0}catch{return!1}}function eu(){try{return Bi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Wi.exports=()=>(Jt===void 0&&(Jt=Qa()||eu()),Jt)});var qi=m((_c,Qt)=>{"use strict";var tu=require("os"),ru=require("fs"),ji=Zt(),Di=()=>{if(process.platform!=="linux")return!1;if(tu.release().toLowerCase().includes("microsoft"))return!ji();try{return ru.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!ji():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Qt.exports=Di:Qt.exports=Di()});var Ui=m((bc,Vi)=>{"use strict";Vi.exports=(r,e,t)=>{let n=i=>Object.defineProperty(r,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let i=t();return n(i),i},set(i){n(i)}}),r}});var Ji=m((vc,Xi)=>{var nu=require("path"),iu=require("child_process"),{promises:Ke,constants:Ki}=require("fs"),Ye=qi(),su=Zt(),tr=Ui(),Hi=nu.join(__dirname,"xdg-open"),{platform:ie,arch:Gi}=process,ou=()=>{try{return Ke.statSync("/run/.containerenv"),!0}catch{return!1}},er;function au(){return er===void 0&&(er=ou()||su()),er}var uu=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",n=!1;try{await Ke.access(t,Ki.F_OK),n=!0}catch{}if(!n)return r;let i=await Ke.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),zi=async(r,e)=>{let t;for(let n of r)try{return await e(n)}catch(i){t=i}throw t},Xe=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return zi(r.app,u=>Xe({...r,app:u}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return zi(e,u=>Xe({...r,app:{name:u,arguments:t}}));let n,i=[],s={};if(ie==="darwin")n="open",r.wait&&i.push("--wait-apps"),r.background&&i.push("--background"),r.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(ie==="win32"||Ye&&!au()&&!e){let u=await uu();n=Ye?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Ye||(s.windowsVerbatimArguments=!0);let a=["Start"];r.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&a.push(`"${r.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),a.push(t.join(","))),r.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let u=!__dirname||__dirname==="/",a=!1;try{await Ke.access(Hi,Ki.X_OK),a=!0}catch{}n=process.versions.electron||ie==="android"||u||!a?"xdg-open":Hi}t.length>0&&i.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&i.push(r.target),ie==="darwin"&&t.length>0&&i.push("--args",...t);let o=iu.spawn(n,i,s);return r.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",c=>{if(!r.allowNonzeroExitCode&&c>0){a(new Error(`Exited with code ${c}`));return}u(o)})}):(o.unref(),o)},rr=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return Xe({...e,target:r})},cu=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return Xe({...e,app:{name:r,arguments:t}})};function Yi(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Gi]:e}=r;if(!e)throw new Error(`${Gi} is not supported`);return e}function nr({[ie]:r},{wsl:e}){if(e&&Ye)return Yi(e);if(!r)throw new Error(`${ie} is not supported`);return Yi(r)}var Je={};tr(Je,"chrome",()=>nr({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));tr(Je,"firefox",()=>nr({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));tr(Je,"edge",()=>nr({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));rr.apps=Je;rr.openApp=cu;Xi.exports=rr});var lu={};us(lu,{StackUtils:()=>Zi.default,WebSocket:()=>gi,WebSocketServer:()=>Lt.default,codeFrameColumns:()=>Qi.codeFrameColumns,open:()=>ts.default,program:()=>Fi,sanitize:()=>es.default});module.exports=cs(lu);var Zi=$(lr()),Qi=$(dn());var Ea=$(_n(),1),Ca=$(Ot(),1),ka=$(Ct(),1),mi=$(Rt(),1),Lt=$(pi(),1);var gi=mi.default;var es=$(Si());var Ii=$(Li(),1),{program:Fi,createCommand:sc,createArgument:oc,createOption:ac,CommanderError:uc,InvalidArgumentError:cc,InvalidOptionArgumentError:lc,Command:fc,Argument:hc,Option:dc,Help:pc}=Ii.default;var ts=$(Ji());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,open,program,sanitize});