monocart-reporter 2.9.9 → 2.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -6
- package/lib/common.js +6 -1
- package/lib/default/summary.js +16 -10
- package/lib/generate-data.js +1 -1
- package/lib/packages/monocart-reporter-assets.js +1 -1
- package/lib/packages/monocart-reporter-vendor.js +15 -15
- package/lib/utils/pie.js +2 -2
- package/package.json +89 -89
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
var
|
|
1
|
+
var jh=Object.create;var Yt=Object.defineProperty;var Hh=Object.getOwnPropertyDescriptor;var Gh=Object.getOwnPropertyNames;var Vh=Object.getPrototypeOf,qh=Object.prototype.hasOwnProperty;var O=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Zh=(s,e)=>{for(var t in e)Yt(s,t,{get:e[t],enumerable:!0})},kr=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Gh(e))!qh.call(s,r)&&r!==t&&Yt(s,r,{get:()=>e[r],enumerable:!(i=Hh(e,r))||i.enumerable});return s};var k=(s,e,t)=>(t=s!=null?jh(Vh(s)):{},kr(e||!s||!s.__esModule?Yt(t,"default",{value:s,enumerable:!0}):t,s)),Yh=s=>kr(Yt({},"__esModule",{value:!0}),s);var Pr=O((ld,Fr)=>{"use strict";var Kh=/[|\\{}()[\]^$+*?.-]/g;Fr.exports=s=>{if(typeof s!="string")throw new TypeError("Expected a string");return s.replace(Kh,"\\$&")}});var Wr=O((cd,Br)=>{"use strict";var Xh=Pr(),Jh=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Ur=[].concat(require("module").builtinModules,"bootstrap_node","node").map(s=>new RegExp(`(?:\\((?:node:)?${s}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${s}(?:\\.js)?:\\d+:\\d+$)`));Ur.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Xi=class s{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=s.nodeInternals()),"cwd"in e||(e.cwd=Jh),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Qh(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
2
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let i=!1,r=null,n=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(a=>a.test(o)))return;let h=/^\s*at /.test(o);i?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),h&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(h?(r&&(n.push(r),r=null),n.push(o)):(i=!0,r=o))}),n.map(o=>`${t}${o}
|
|
3
|
-
`).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:i}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:n}=r;return Error.stackTraceLimit=i,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:i,stackTraceLimit:r}=Error;Error.prepareStackTrace=(h,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,t);let{stack:o}=n;return Object.assign(Error,{prepareStackTrace:i,stackTraceLimit:r}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let i={line:t.getLineNumber(),column:t.getColumnNumber()};Pr(i,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(i,"constructor",{value:!0,configurable:!0}),t.isEval()&&(i.evalOrigin=t.getEvalOrigin()),t.isNative()&&(i.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(i.type=r);let n=t.getFunctionName();n&&(i.function=n);let o=t.getMethodName();return o&&n!==o&&(i.method=o),i}parseLine(e){let t=e&&e.match(Xh);if(!t)return null;let i=t[1]==="new",r=t[2],n=t[3],o=t[4],h=Number(t[5]),a=Number(t[6]),u=t[7],l=t[8],c=t[9],d=t[10]==="native",p=t[11]===")",m,f={};if(l&&(f.line=Number(l)),c&&(f.column=Number(c)),p&&u){let b=0;for(let g=u.length-1;g>0;g--)if(u.charAt(g)===")")b++;else if(u.charAt(g)==="("&&u.charAt(g-1)===" "&&(b--,b===-1&&u.charAt(g-1)===" ")){let E=u.slice(0,g-1);u=u.slice(g+1),r+=` (${E}`;break}}if(r){let b=r.match(Jh);b&&(r=b[1],m=b[2])}return Pr(f,u,this._cwd),i&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=h,f.evalColumn=a,f.evalFile=o&&o.replace(/\\/g,"/")),d&&(f.native=!0),r&&(f.function=r),m&&r!==m&&(f.method=m),f}};function Pr(s,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),s.file=e)}function Kh(s){if(s.length===0)return[];let e=s.map(t=>Zh(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Xh=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Jh=/^(.*?) \[as (.*?)\]$/;Ur.exports=Xi});var zr=O((ud,Ji)=>{var Wr=process.argv||[],Yt=process.env,Qh=!("NO_COLOR"in Yt||Wr.includes("--no-color"))&&("FORCE_COLOR"in Yt||Wr.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&Yt.TERM!=="dumb"||"CI"in Yt),eu=(s,e,t=s)=>i=>{let r=""+i,n=r.indexOf(e,s.length);return~n?s+tu(r,e,t,n)+e:s+r+e},tu=(s,e,t,i)=>{let r="",n=0;do r+=s.substring(n,i)+t,n=i+e.length,i=s.indexOf(e,n);while(~i);return r+s.substring(n)},$r=(s=Qh)=>{let e=s?eu:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Ji.exports=$r();Ji.exports.createColors=$r});var jr=O(Kt=>{Object.defineProperty(Kt,"__esModule",{value:!0});Kt.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;Kt.matchToToken=function(s){var e={type:"invalid",value:s[0],closed:void 0};return s[1]?(e.type="string",e.closed=!!(s[3]||s[4])):s[5]?e.type="comment":s[6]?(e.type="comment",e.closed=!!s[7]):s[8]?e.type="regex":s[9]?e.type="number":s[10]?e.type="name":s[11]?e.type="punctuator":s[12]&&(e.type="whitespace"),e}});var Zr=O(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.isIdentifierChar=qr;bt.isIdentifierName=nu;bt.isIdentifierStart=Vr;var es="\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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="\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\u0897-\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",iu=new RegExp("["+es+"]"),su=new RegExp("["+es+Hr+"]");es=Hr=null;var Gr=[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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,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,229,29,3,0,496,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],ru=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,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,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Qi(s,e){let t=65536;for(let i=0,r=e.length;i<r;i+=2){if(t+=e[i],t>s)return!1;if(t+=e[i+1],t>=s)return!0}return!1}function Vr(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&iu.test(String.fromCharCode(s)):Qi(s,Gr)}function qr(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&su.test(String.fromCharCode(s)):Qi(s,Gr)||Qi(s,ru)}function nu(s){let e=!0;for(let t=0;t<s.length;t++){let i=s.charCodeAt(t);if((i&64512)===55296&&t+1<s.length){let r=s.charCodeAt(++t);(r&64512)===56320&&(i=65536+((i&1023)<<10)+(r&1023))}if(e){if(e=!1,!Vr(i))return!1}else if(!qr(i))return!1}return!e}});var Jr=O(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.isKeyword=lu;je.isReservedWord=Yr;je.isStrictBindOnlyReservedWord=Xr;je.isStrictBindReservedWord=uu;je.isStrictReservedWord=Kr;var ts={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"]},ou=new Set(ts.keyword),au=new Set(ts.strict),hu=new Set(ts.strictBind);function Yr(s,e){return e&&s==="await"||s==="enum"}function Kr(s,e){return Yr(s,e)||au.has(s)}function Xr(s){return hu.has(s)}function uu(s,e){return Kr(s,e)||Xr(s)}function lu(s){return ou.has(s)}});var Qr=O(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});Object.defineProperty(ge,"isIdentifierChar",{enumerable:!0,get:function(){return is.isIdentifierChar}});Object.defineProperty(ge,"isIdentifierName",{enumerable:!0,get:function(){return is.isIdentifierName}});Object.defineProperty(ge,"isIdentifierStart",{enumerable:!0,get:function(){return is.isIdentifierStart}});Object.defineProperty(ge,"isKeyword",{enumerable:!0,get:function(){return wt.isKeyword}});Object.defineProperty(ge,"isReservedWord",{enumerable:!0,get:function(){return wt.isReservedWord}});Object.defineProperty(ge,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return wt.isStrictBindOnlyReservedWord}});Object.defineProperty(ge,"isStrictBindReservedWord",{enumerable:!0,get:function(){return wt.isStrictBindReservedWord}});Object.defineProperty(ge,"isStrictReservedWord",{enumerable:!0,get:function(){return wt.isStrictReservedWord}});var is=Zr(),wt=Jr()});var ln=O(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});var ss=zr(),en=jr(),tn=Qr();function cu(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:ss.isColorSupported}var Xt=(s,e)=>t=>s(e(t));function nn(s){return{keyword:s.cyan,capitalized:s.yellow,jsxIdentifier:s.yellow,punctuator:s.yellow,number:s.magenta,string:s.green,regex:s.magenta,comment:s.gray,invalid:Xt(Xt(s.white,s.bgRed),s.bold),gutter:s.gray,marker:Xt(s.red,s.bold),message:Xt(s.red,s.bold),reset:s.reset}}var fu=nn(ss.createColors(!0)),du=nn(ss.createColors(!1));function on(s){return s?fu:du}var pu=new Set(["as","async","from","get","of","set"]),mu=/\r\n|[\n\r\u2028\u2029]/,gu=/^[()[\]{}]$/,an;{let s=/^[a-z][\w-]*$/i,e=function(t,i,r){if(t.type==="name"){if(tn.isKeyword(t.value)||tn.isStrictReservedWord(t.value,!0)||pu.has(t.value))return"keyword";if(s.test(t.value)&&(r[i-1]==="<"||r.slice(i-2,i)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&gu.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};an=function*(t){let i;for(;i=en.default.exec(t);){let r=en.matchToToken(i);yield{type:e(r,i.index,t),value:r.value}}}}function hn(s){if(s==="")return"";let e=on(!0),t="";for(let{type:i,value:r}of an(s))i in e?t+=r.split(mu).map(n=>e[i](n)).join(`
|
|
4
|
-
`):t+=r;return t}var
|
|
3
|
+
`).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:i}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:n}=r;return Error.stackTraceLimit=i,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:i,stackTraceLimit:r}=Error;Error.prepareStackTrace=(h,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,t);let{stack:o}=n;return Object.assign(Error,{prepareStackTrace:i,stackTraceLimit:r}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let i={line:t.getLineNumber(),column:t.getColumnNumber()};Mr(i,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(i,"constructor",{value:!0,configurable:!0}),t.isEval()&&(i.evalOrigin=t.getEvalOrigin()),t.isNative()&&(i.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(i.type=r);let n=t.getFunctionName();n&&(i.function=n);let o=t.getMethodName();return o&&n!==o&&(i.method=o),i}parseLine(e){let t=e&&e.match(eu);if(!t)return null;let i=t[1]==="new",r=t[2],n=t[3],o=t[4],h=Number(t[5]),a=Number(t[6]),u=t[7],l=t[8],c=t[9],d=t[10]==="native",p=t[11]===")",m,f={};if(l&&(f.line=Number(l)),c&&(f.column=Number(c)),p&&u){let b=0;for(let g=u.length-1;g>0;g--)if(u.charAt(g)===")")b++;else if(u.charAt(g)==="("&&u.charAt(g-1)===" "&&(b--,b===-1&&u.charAt(g-1)===" ")){let E=u.slice(0,g-1);u=u.slice(g+1),r+=` (${E}`;break}}if(r){let b=r.match(tu);b&&(r=b[1],m=b[2])}return Mr(f,u,this._cwd),i&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=h,f.evalColumn=a,f.evalFile=o&&o.replace(/\\/g,"/")),d&&(f.native=!0),r&&(f.function=r),m&&r!==m&&(f.method=m),f}};function Mr(s,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),s.file=e)}function Qh(s){if(s.length===0)return[];let e=s.map(t=>Xh(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var eu=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),tu=/^(.*?) \[as (.*?)\]$/;Br.exports=Xi});var jr=O((fd,Ji)=>{var $r=process.argv||[],Kt=process.env,iu=!("NO_COLOR"in Kt||$r.includes("--no-color"))&&("FORCE_COLOR"in Kt||$r.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&Kt.TERM!=="dumb"||"CI"in Kt),su=(s,e,t=s)=>i=>{let r=""+i,n=r.indexOf(e,s.length);return~n?s+ru(r,e,t,n)+e:s+r+e},ru=(s,e,t,i)=>{let r="",n=0;do r+=s.substring(n,i)+t,n=i+e.length,i=s.indexOf(e,n);while(~i);return r+s.substring(n)},zr=(s=iu)=>{let e=s?su:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Ji.exports=zr();Ji.exports.createColors=zr});var Hr=O(Xt=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.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;Xt.matchToToken=function(s){var e={type:"invalid",value:s[0],closed:void 0};return s[1]?(e.type="string",e.closed=!!(s[3]||s[4])):s[5]?e.type="comment":s[6]?(e.type="comment",e.closed=!!s[7]):s[8]?e.type="regex":s[9]?e.type="number":s[10]?e.type="name":s[11]?e.type="punctuator":s[12]&&(e.type="whitespace"),e}});var Yr=O(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.isIdentifierChar=Zr;bt.isIdentifierName=hu;bt.isIdentifierStart=qr;var es="\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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",Gr="\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\u0897-\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",nu=new RegExp("["+es+"]"),ou=new RegExp("["+es+Gr+"]");es=Gr=null;var Vr=[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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,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,229,29,3,0,496,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],au=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,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,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Qi(s,e){let t=65536;for(let i=0,r=e.length;i<r;i+=2){if(t+=e[i],t>s)return!1;if(t+=e[i+1],t>=s)return!0}return!1}function qr(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&nu.test(String.fromCharCode(s)):Qi(s,Vr)}function Zr(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&ou.test(String.fromCharCode(s)):Qi(s,Vr)||Qi(s,au)}function hu(s){let e=!0;for(let t=0;t<s.length;t++){let i=s.charCodeAt(t);if((i&64512)===55296&&t+1<s.length){let r=s.charCodeAt(++t);(r&64512)===56320&&(i=65536+((i&1023)<<10)+(r&1023))}if(e){if(e=!1,!qr(i))return!1}else if(!Zr(i))return!1}return!e}});var Qr=O(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.isKeyword=du;je.isReservedWord=Kr;je.isStrictBindOnlyReservedWord=Jr;je.isStrictBindReservedWord=fu;je.isStrictReservedWord=Xr;var ts={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"]},uu=new Set(ts.keyword),lu=new Set(ts.strict),cu=new Set(ts.strictBind);function Kr(s,e){return e&&s==="await"||s==="enum"}function Xr(s,e){return Kr(s,e)||lu.has(s)}function Jr(s){return cu.has(s)}function fu(s,e){return Xr(s,e)||Jr(s)}function du(s){return uu.has(s)}});var en=O(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});Object.defineProperty(ge,"isIdentifierChar",{enumerable:!0,get:function(){return is.isIdentifierChar}});Object.defineProperty(ge,"isIdentifierName",{enumerable:!0,get:function(){return is.isIdentifierName}});Object.defineProperty(ge,"isIdentifierStart",{enumerable:!0,get:function(){return is.isIdentifierStart}});Object.defineProperty(ge,"isKeyword",{enumerable:!0,get:function(){return wt.isKeyword}});Object.defineProperty(ge,"isReservedWord",{enumerable:!0,get:function(){return wt.isReservedWord}});Object.defineProperty(ge,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return wt.isStrictBindOnlyReservedWord}});Object.defineProperty(ge,"isStrictBindReservedWord",{enumerable:!0,get:function(){return wt.isStrictBindReservedWord}});Object.defineProperty(ge,"isStrictReservedWord",{enumerable:!0,get:function(){return wt.isStrictReservedWord}});var is=Yr(),wt=Qr()});var cn=O(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});var ss=jr(),tn=Hr(),sn=en();function pu(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:ss.isColorSupported}var Jt=(s,e)=>t=>s(e(t));function on(s){return{keyword:s.cyan,capitalized:s.yellow,jsxIdentifier:s.yellow,punctuator:s.yellow,number:s.magenta,string:s.green,regex:s.magenta,comment:s.gray,invalid:Jt(Jt(s.white,s.bgRed),s.bold),gutter:s.gray,marker:Jt(s.red,s.bold),message:Jt(s.red,s.bold),reset:s.reset}}var mu=on(ss.createColors(!0)),gu=on(ss.createColors(!1));function an(s){return s?mu:gu}var _u=new Set(["as","async","from","get","of","set"]),bu=/\r\n|[\n\r\u2028\u2029]/,wu=/^[()[\]{}]$/,hn;{let s=/^[a-z][\w-]*$/i,e=function(t,i,r){if(t.type==="name"){if(sn.isKeyword(t.value)||sn.isStrictReservedWord(t.value,!0)||_u.has(t.value))return"keyword";if(s.test(t.value)&&(r[i-1]==="<"||r.slice(i-2,i)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&wu.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};hn=function*(t){let i;for(;i=tn.default.exec(t);){let r=tn.matchToToken(i);yield{type:e(r,i.index,t),value:r.value}}}}function un(s){if(s==="")return"";let e=an(!0),t="";for(let{type:i,value:r}of hn(s))i in e?t+=r.split(bu).map(n=>e[i](n)).join(`
|
|
4
|
+
`):t+=r;return t}var rn=!1,nn=/\r\n|[\n\r\u2028\u2029]/;function Eu(s,e,t){let i=Object.assign({column:0,line:-1},s.start),r=Object.assign({},i,s.end),{linesAbove:n=2,linesBelow:o=3}=t||{},h=i.line,a=i.column,u=r.line,l=r.column,c=Math.max(h-(n+1),0),d=Math.min(e.length,u+o);h===-1&&(c=0),u===-1&&(d=e.length);let p=u-h,m={};if(p)for(let f=0;f<=p;f++){let b=f+h;if(!a)m[b]=!0;else if(f===0){let g=e[b-1].length;m[b]=[a,g-a+1]}else if(f===p)m[b]=[0,l];else{let g=e[b-f].length;m[b]=[0,g]}}else a===l?a?m[h]=[a,0]:m[h]=!0:m[h]=[a,l-a];return{start:c,end:d,markerLines:m}}function ln(s,e,t={}){let i=t.forceColor||pu()&&t.highlightCode,r=an(i),n=s.split(nn),{start:o,end:h,markerLines:a}=Eu(e,n,t),u=e.start&&typeof e.start.column=="number",l=String(h).length,d=(i?un(s):s).split(nn,h).slice(o,h).map((p,m)=>{let f=o+1+m,g=` ${` ${f}`.slice(-l)} |`,E=a[f],C=!a[f+1];if(E){let x="";if(Array.isArray(E)){let T=p.slice(0,Math.max(E[0]-1,0)).replace(/[^\t]/g," "),I=E[1]||1;x=[`
|
|
5
5
|
`,r.gutter(g.replace(/\d/g," "))," ",T,r.marker("^").repeat(I)].join(""),C&&t.message&&(x+=" "+r.message(t.message))}return[r.marker(">"),r.gutter(g),p.length>0?` ${p}`:"",x].join("")}else return` ${r.gutter(g)}${p.length>0?` ${p}`:""}`}).join(`
|
|
6
6
|
`);return t.message&&!u&&(d=`${" ".repeat(l+1)}${t.message}
|
|
7
|
-
${d}`),i?r.reset(d):d}function bu(s,e,t,i={}){if(!sn){sn=!0;let n="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(n,"DeprecationWarning");else{let o=new Error(n);o.name="DeprecationWarning",console.warn(new Error(n))}}return t=Math.max(t,0),un(s,{start:{column:t,line:e}},i)}Et.codeFrameColumns=un;Et.default=bu;Et.highlight=hn});var pn=O((md,dn)=>{"use strict";var{Duplex:wu}=require("stream");function cn(s){s.emit("close")}function Eu(){!this.destroyed&&this._writableState.finished&&this.destroy()}function fn(s){this.removeListener("error",fn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",s)}function yu(s,e){let t=!0,i=new wu({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return s.on("message",function(n,o){let h=!o&&i._readableState.objectMode?n.toString():n;i.push(h)||s.pause()}),s.once("error",function(n){i.destroyed||(t=!1,i.destroy(n))}),s.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(r,n){if(s.readyState===s.CLOSED){n(r),process.nextTick(cn,i);return}let o=!1;s.once("error",function(a){o=!0,n(a)}),s.once("close",function(){o||n(r),process.nextTick(cn,i)}),t&&s.terminate()},i._final=function(r){if(s.readyState===s.CONNECTING){s.once("open",function(){i._final(r)});return}s._socket!==null&&(s._socket._writableState.finished?(r(),i._readableState.endEmitted&&i.destroy()):(s._socket.once("finish",function(){r()}),s.close()))},i._read=function(){s.isPaused&&s.resume()},i._write=function(r,n,o){if(s.readyState===s.CONNECTING){s.once("open",function(){i._write(r,n,o)});return}s.send(r,o)},i.on("end",Eu),i.on("error",fn),i}dn.exports=yu});var Se=O((gd,_n)=>{"use strict";var mn=["nodebuffer","arraybuffer","fragments"],gn=typeof Blob<"u";gn&&mn.push("blob");_n.exports={BINARY_TYPES:mn,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:gn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var yt=O((_d,Jt)=>{"use strict";var{EMPTY_BUFFER:Su}=Se(),rs=Buffer[Symbol.species];function xu(s,e){if(s.length===0)return Su;if(s.length===1)return s[0];let t=Buffer.allocUnsafe(e),i=0;for(let r=0;r<s.length;r++){let n=s[r];t.set(n,i),i+=n.length}return i<e?new rs(t.buffer,t.byteOffset,i):t}function bn(s,e,t,i,r){for(let n=0;n<r;n++)t[i+n]=s[n]^e[n&3]}function wn(s,e){for(let t=0;t<s.length;t++)s[t]^=e[t&3]}function vu(s){return s.length===s.buffer.byteLength?s.buffer:s.buffer.slice(s.byteOffset,s.byteOffset+s.length)}function ns(s){if(ns.readOnly=!0,Buffer.isBuffer(s))return s;let e;return s instanceof ArrayBuffer?e=new rs(s):ArrayBuffer.isView(s)?e=new rs(s.buffer,s.byteOffset,s.byteLength):(e=Buffer.from(s),ns.readOnly=!1),e}Jt.exports={concat:xu,mask:bn,toArrayBuffer:vu,toBuffer:ns,unmask:wn};if(!process.env.WS_NO_BUFFER_UTIL)try{let s=require("bufferutil");Jt.exports.mask=function(e,t,i,r,n){n<48?bn(e,t,i,r,n):s.mask(e,t,i,r,n)},Jt.exports.unmask=function(e,t){e.length<32?wn(e,t):s.unmask(e,t)}}catch{}});var Sn=O((bd,yn)=>{"use strict";var En=Symbol("kDone"),os=Symbol("kRun"),as=class{constructor(e){this[En]=()=>{this.pending--,this[os]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[os]()}[os](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[En])}}};yn.exports=as});var vt=O((wd,On)=>{"use strict";var St=require("zlib"),xn=yt(),Cu=Sn(),{kStatusCode:vn}=Se(),Ou=Buffer[Symbol.species],Tu=Buffer.from([0,0,255,255]),ti=Symbol("permessage-deflate"),xe=Symbol("total-length"),xt=Symbol("callback"),Ie=Symbol("buffers"),ei=Symbol("error"),Qt,hs=class{constructor(e,t,i){if(this._maxPayload=i|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,!Qt){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Qt=new Cu(r)}}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[xt];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,i=e.find(r=>!(t.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>r.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}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(i=>{let r=t[i];if(r.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(r=r[0],i==="client_max_window_bits"){if(r!==!0){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else if(i==="server_max_window_bits"){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=n}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=r})}),e}decompress(e,t,i){Qt.add(r=>{this._decompress(e,t,(n,o)=>{r(),i(n,o)})})}compress(e,t,i){Qt.add(r=>{this._compress(e,t,(n,o)=>{r(),i(n,o)})})}_decompress(e,t,i){let r=this._isServer?"client":"server";if(!this._inflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?St.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=St.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ti]=this,this._inflate[xe]=0,this._inflate[Ie]=[],this._inflate.on("error",Au),this._inflate.on("data",Cn)}this._inflate[xt]=i,this._inflate.write(e),t&&this._inflate.write(Tu),this._inflate.flush(()=>{let n=this._inflate[ei];if(n){this._inflate.close(),this._inflate=null,i(n);return}let o=xn.concat(this._inflate[Ie],this._inflate[xe]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[xe]=0,this._inflate[Ie]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,t,i){let r=this._isServer?"server":"client";if(!this._deflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?St.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=St.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[xe]=0,this._deflate[Ie]=[],this._deflate.on("data",Lu)}this._deflate[xt]=i,this._deflate.write(e),this._deflate.flush(St.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=xn.concat(this._deflate[Ie],this._deflate[xe]);t&&(n=new Ou(n.buffer,n.byteOffset,n.length-4)),this._deflate[xt]=null,this._deflate[xe]=0,this._deflate[Ie]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,n)})}};On.exports=hs;function Lu(s){this[Ie].push(s),this[xe]+=s.length}function Cn(s){if(this[xe]+=s.length,this[ti]._maxPayload<1||this[xe]<=this[ti]._maxPayload){this[Ie].push(s);return}this[ei]=new RangeError("Max payload size exceeded"),this[ei].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ei][vn]=1009,this.removeListener("data",Cn),this.reset()}function Au(s){this[ti]._inflate=null,s[vn]=1007,this[xt](s)}});var Je=O((Ed,ii)=>{"use strict";var{isUtf8:Tn}=require("buffer"),{hasBlob:Iu}=Se(),Nu=[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 Du(s){return s>=1e3&&s<=1014&&s!==1004&&s!==1005&&s!==1006||s>=3e3&&s<=4999}function us(s){let e=s.length,t=0;for(;t<e;)if(!(s[t]&128))t++;else if((s[t]&224)===192){if(t+1===e||(s[t+1]&192)!==128||(s[t]&254)===192)return!1;t+=2}else if((s[t]&240)===224){if(t+2>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||s[t]===224&&(s[t+1]&224)===128||s[t]===237&&(s[t+1]&224)===160)return!1;t+=3}else if((s[t]&248)===240){if(t+3>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||(s[t+3]&192)!==128||s[t]===240&&(s[t+1]&240)===128||s[t]===244&&s[t+1]>143||s[t]>244)return!1;t+=4}else return!1;return!0}function Ru(s){return Iu&&typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&(s[Symbol.toStringTag]==="Blob"||s[Symbol.toStringTag]==="File")}ii.exports={isBlob:Ru,isValidStatusCode:Du,isValidUTF8:us,tokenChars:Nu};if(Tn)ii.exports.isValidUTF8=function(s){return s.length<24?us(s):Tn(s)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let s=require("utf-8-validate");ii.exports.isValidUTF8=function(e){return e.length<32?us(e):s(e)}}catch{}});var ps=O((yd,kn)=>{"use strict";var{Writable:ku}=require("stream"),Ln=vt(),{BINARY_TYPES:Fu,EMPTY_BUFFER:An,kStatusCode:Pu,kWebSocket:Mu}=Se(),{concat:ls,toArrayBuffer:Uu,unmask:Bu}=yt(),{isValidStatusCode:Wu,isValidUTF8:In}=Je(),si=Buffer[Symbol.species],te=0,Nn=1,Dn=2,Rn=3,cs=4,fs=5,ri=6,ds=class extends ku{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Fu[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Mu]=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=te}_write(e,t,i){if(this._opcode===8&&this._state==te)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new si(i.buffer,i.byteOffset+e,i.length-e),new si(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],r=t.length-e;e>=i.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),r),this._buffers[0]=new si(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case te:this.getInfo(e);break;case Nn:this.getPayloadLength16(e);break;case Dn:this.getPayloadLength64(e);break;case Rn:this.getMask();break;case cs:this.getData(e);break;case fs:case ri: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 r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(r);return}let i=(t[0]&64)===64;if(i&&!this._extensions[Ln.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(r);return}if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(r);return}this._payloadLength===126?this._state=Nn:this._payloadLength===127?this._state=Dn: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),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(r);return}this._payloadLength=i*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=Rn:this._state=cs}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=cs}getData(e){let t=An;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]&&Bu(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=fs,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[Ln.extensionName].decompress(e,this._fin,(r,n)=>{if(r)return t(r);if(n.length){if(this._messageLength+=n.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(n)}this.dataMessage(t),this._state===te&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=te;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=ls(i,t):this._binaryType==="arraybuffer"?r=Uu(ls(i,t)):this._binaryType==="blob"?r=new Blob(i):r=i,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=te):(this._state=ri,setImmediate(()=>{this.emit("message",r,!0),this._state=te,this.startLoop(e)}))}else{let r=ls(i,t);if(!this._skipUTF8Validation&&!In(r)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===fs||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=te):(this._state=ri,setImmediate(()=>{this.emit("message",r,!1),this._state=te,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,An),this.end();else{let i=e.readUInt16BE(0);if(!Wu(i)){let n=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let r=new si(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!In(r)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(n);return}this._loop=!1,this.emit("conclude",i,r),this.end()}this._state=te;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=te):(this._state=ri,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=te,this.startLoop(t)}))}createError(e,t,i,r,n){this._loop=!1,this._errored=!0;let o=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[Pu]=r,o}};kn.exports=ds});var _s=O((xd,Mn)=>{"use strict";var{Duplex:Sd}=require("stream"),{randomFillSync:$u}=require("crypto"),Fn=vt(),{EMPTY_BUFFER:zu,kWebSocket:ju,NOOP:Hu}=Se(),{isBlob:Qe,isValidStatusCode:Gu}=Je(),{mask:Pn,toBuffer:He}=yt(),ie=Symbol("kByteLength"),Vu=Buffer.alloc(4),ni=8*1024,Ge,et=ni,le=0,qu=1,Zu=2,ms=class s{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=le,this.onerror=Hu,this[ju]=void 0}static frame(e,t){let i,r=!1,n=2,o=!1;t.mask&&(i=t.maskBuffer||Vu,t.generateMask?t.generateMask(i):(et===ni&&(Ge===void 0&&(Ge=Buffer.alloc(ni)),$u(Ge,0,ni),et=0),i[0]=Ge[et++],i[1]=Ge[et++],i[2]=Ge[et++],i[3]=Ge[et++]),o=(i[0]|i[1]|i[2]|i[3])===0,n=6);let h;typeof e=="string"?(!t.mask||o)&&t[ie]!==void 0?h=t[ie]:(e=Buffer.from(e),h=e.length):(h=e.length,r=t.mask&&t.readOnly&&!o);let a=h;h>=65536?(n+=8,a=127):h>125&&(n+=2,a=126);let u=Buffer.allocUnsafe(r?h+n:n);return u[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,a===126?u.writeUInt16BE(h,2):a===127&&(u[2]=u[3]=0,u.writeUIntBE(h,4,6)),t.mask?(u[1]|=128,u[n-4]=i[0],u[n-3]=i[1],u[n-2]=i[2],u[n-1]=i[3],o?[u,e]:r?(Pn(e,i,u,n,h),[u]):(Pn(e,i,e,0,h),[u,e])):[u,e]}close(e,t,i,r){let n;if(e===void 0)n=zu;else{if(typeof e!="number"||!Gu(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let h=Buffer.byteLength(t);if(h>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+h),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[ie]:n.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==le?this.enqueue([this.dispatch,n,!1,o,r]):this.sendFrame(s.frame(n,o),r)}ping(e,t,i){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):Qe(e)?(r=e.size,n=!1):(e=He(e),r=e.length,n=He.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ie]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==le?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(s.frame(e,o),i)}pong(e,t,i){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):Qe(e)?(r=e.size,n=!1):(e=He(e),r=e.length,n=He.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ie]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==le?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(s.frame(e,o),i)}send(e,t,i){let r=this._extensions[Fn.extensionName],n=t.binary?2:1,o=t.compress,h,a;typeof e=="string"?(h=Buffer.byteLength(e),a=!1):Qe(e)?(h=e.size,a=!1):(e=He(e),h=e.length,a=He.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=h>=r._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let u={[ie]:h,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,this._compress,u,i]):this.getBlobData(e,this._compress,u,i):this._state!==le?this.enqueue([this.dispatch,e,this._compress,u,i]):this.dispatch(e,this._compress,u,i)}getBlobData(e,t,i,r){this._bufferedBytes+=i[ie],this._state=Zu,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let h=new Error("The socket was closed while the blob was being read");process.nextTick(gs,this,h,r);return}this._bufferedBytes-=i[ie];let o=He(n);t?this.dispatch(o,t,i,r):(this._state=le,this.sendFrame(s.frame(o,i),r),this.dequeue())}).catch(n=>{process.nextTick(Yu,this,n,r)})}dispatch(e,t,i,r){if(!t){this.sendFrame(s.frame(e,i),r);return}let n=this._extensions[Fn.extensionName];this._bufferedBytes+=i[ie],this._state=qu,n.compress(e,i.fin,(o,h)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");gs(this,a,r);return}this._bufferedBytes-=i[ie],this._state=le,i.readOnly=!1,this.sendFrame(s.frame(h,i),r),this.dequeue()})}dequeue(){for(;this._state===le&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][ie],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ie],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)}};Mn.exports=ms;function gs(s,e,t){typeof t=="function"&&t(e);for(let i=0;i<s._queue.length;i++){let r=s._queue[i],n=r[r.length-1];typeof n=="function"&&n(e)}}function Yu(s,e,t){gs(s,e,t),s.onerror(e)}});var Vn=O((vd,Gn)=>{"use strict";var{kForOnEventAttribute:Ct,kListener:bs}=Se(),Un=Symbol("kCode"),Bn=Symbol("kData"),Wn=Symbol("kError"),$n=Symbol("kMessage"),zn=Symbol("kReason"),tt=Symbol("kTarget"),jn=Symbol("kType"),Hn=Symbol("kWasClean"),ve=class{constructor(e){this[tt]=null,this[jn]=e}get target(){return this[tt]}get type(){return this[jn]}};Object.defineProperty(ve.prototype,"target",{enumerable:!0});Object.defineProperty(ve.prototype,"type",{enumerable:!0});var Ve=class extends ve{constructor(e,t={}){super(e),this[Un]=t.code===void 0?0:t.code,this[zn]=t.reason===void 0?"":t.reason,this[Hn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Un]}get reason(){return this[zn]}get wasClean(){return this[Hn]}};Object.defineProperty(Ve.prototype,"code",{enumerable:!0});Object.defineProperty(Ve.prototype,"reason",{enumerable:!0});Object.defineProperty(Ve.prototype,"wasClean",{enumerable:!0});var it=class extends ve{constructor(e,t={}){super(e),this[Wn]=t.error===void 0?null:t.error,this[$n]=t.message===void 0?"":t.message}get error(){return this[Wn]}get message(){return this[$n]}};Object.defineProperty(it.prototype,"error",{enumerable:!0});Object.defineProperty(it.prototype,"message",{enumerable:!0});var Ot=class extends ve{constructor(e,t={}){super(e),this[Bn]=t.data===void 0?null:t.data}get data(){return this[Bn]}};Object.defineProperty(Ot.prototype,"data",{enumerable:!0});var Ku={addEventListener(s,e,t={}){for(let r of this.listeners(s))if(!t[Ct]&&r[bs]===e&&!r[Ct])return;let i;if(s==="message")i=function(n,o){let h=new Ot("message",{data:o?n:n.toString()});h[tt]=this,oi(e,this,h)};else if(s==="close")i=function(n,o){let h=new Ve("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});h[tt]=this,oi(e,this,h)};else if(s==="error")i=function(n){let o=new it("error",{error:n,message:n.message});o[tt]=this,oi(e,this,o)};else if(s==="open")i=function(){let n=new ve("open");n[tt]=this,oi(e,this,n)};else return;i[Ct]=!!t[Ct],i[bs]=e,t.once?this.once(s,i):this.on(s,i)},removeEventListener(s,e){for(let t of this.listeners(s))if(t[bs]===e&&!t[Ct]){this.removeListener(s,t);break}}};Gn.exports={CloseEvent:Ve,ErrorEvent:it,Event:ve,EventTarget:Ku,MessageEvent:Ot};function oi(s,e,t){typeof s=="object"&&s.handleEvent?s.handleEvent.call(s,t):s.call(e,t)}});var ws=O((Cd,qn)=>{"use strict";var{tokenChars:Tt}=Je();function _e(s,e,t){s[e]===void 0?s[e]=[t]:s[e].push(t)}function Xu(s){let e=Object.create(null),t=Object.create(null),i=!1,r=!1,n=!1,o,h,a=-1,u=-1,l=-1,c=0;for(;c<s.length;c++)if(u=s.charCodeAt(c),o===void 0)if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(c!==0&&(u===32||u===9))l===-1&&a!==-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=s.slice(a,l);u===44?(_e(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===void 0)if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(u===32||u===9)l===-1&&a!==-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),_e(t,s.slice(a,l),!0),u===44&&(_e(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(u===61&&a!==-1&&l===-1)h=s.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(r){if(Tt[u]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:i||(i=!0),r=!1}else if(n)if(Tt[u]===1)a===-1&&(a=c);else if(u===34&&a!==-1)n=!1,l=c;else if(u===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===34&&s.charCodeAt(c-1)===61)n=!0;else if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(a!==-1&&(u===32||u===9))l===-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=s.slice(a,l);i&&(p=p.replace(/\\/g,""),i=!1),_e(t,h,p),u===44&&(_e(e,o,t),t=Object.create(null),o=void 0),h=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||u===32||u===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=s.slice(a,l);return o===void 0?_e(e,d,t):(h===void 0?_e(t,d,!0):i?_e(t,h,d.replace(/\\/g,"")):_e(t,h,d),_e(e,o,t)),e}function Ju(s){return Object.keys(s).map(e=>{let t=s[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(r=>{let n=i[r];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?r:`${r}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}qn.exports={format:Ju,parse:Xu}});var vs=O((Ld,no)=>{"use strict";var Qu=require("events"),el=require("https"),tl=require("http"),Kn=require("net"),il=require("tls"),{randomBytes:sl,createHash:rl}=require("crypto"),{Duplex:Od,Readable:Td}=require("stream"),{URL:Es}=require("url"),Ne=vt(),nl=ps(),ol=_s(),{isBlob:al}=Je(),{BINARY_TYPES:Zn,EMPTY_BUFFER:ai,GUID:hl,kForOnEventAttribute:ys,kListener:ul,kStatusCode:ll,kWebSocket:$,NOOP:Xn}=Se(),{EventTarget:{addEventListener:cl,removeEventListener:fl}}=Vn(),{format:dl,parse:pl}=ws(),{toBuffer:ml}=yt(),gl=30*1e3,Jn=Symbol("kAborted"),Ss=[8,13],Ce=["CONNECTING","OPEN","CLOSING","CLOSED"],_l=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,D=class s extends Qu{constructor(e,t,i){super(),this._binaryType=Zn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ai,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=s.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?(i=t,t=[]):t=[t]),Qn(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Zn.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,i){let r=new nl({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),n=new ol(e,this._extensions,i.generateMask);this._receiver=r,this._sender=n,this._socket=e,r[$]=this,n[$]=this,e[$]=this,r.on("conclude",El),r.on("drain",yl),r.on("error",Sl),r.on("message",xl),r.on("ping",vl),r.on("pong",Cl),n.onerror=Ol,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",io),e.on("data",ui),e.on("end",so),e.on("error",ro),this._readyState=s.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ne.extensionName]&&this._extensions[Ne.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){J(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===s.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=s.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),to(this)}}pause(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||ai,t,i)}pong(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||ai,t,i)}resume(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Ne.extensionName]||(r.compress=!1),this._sender.send(e||ai,r,i)}terminate(){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){J(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=s.CLOSING,this._socket.destroy())}}};Object.defineProperty(D,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(D.prototype,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(D,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(D.prototype,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(D,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(D.prototype,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(D,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});Object.defineProperty(D.prototype,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(s=>{Object.defineProperty(D.prototype,s,{enumerable:!0})});["open","error","close","message"].forEach(s=>{Object.defineProperty(D.prototype,`on${s}`,{enumerable:!0,get(){for(let e of this.listeners(s))if(e[ys])return e[ul];return null},set(e){for(let t of this.listeners(s))if(t[ys]){this.removeListener(s,t);break}typeof e=="function"&&this.addEventListener(s,e,{[ys]:!0})}})});D.prototype.addEventListener=cl;D.prototype.removeEventListener=fl;no.exports=D;function Qn(s,e,t,i){let r={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Ss[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(s._autoPong=r.autoPong,!Ss.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${Ss.join(", ")})`);let n;if(e instanceof Es)n=e;else try{n=new Es(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),s._url=n.href;let o=n.protocol==="wss:",h=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!h?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:h&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"),a){let f=new SyntaxError(a);if(s._redirects===0)throw f;hi(s,f);return}let u=o?443:80,l=sl(16).toString("base64"),c=o?el.request:tl.request,d=new Set,p;if(r.createConnection=r.createConnection||(o?wl:bl),r.defaultPort=r.defaultPort||u,r.port=n.port||u,r.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},r.path=n.pathname+n.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(p=new Ne(r.perMessageDeflate!==!0?r.perMessageDeflate:{},!1,r.maxPayload),r.headers["Sec-WebSocket-Extensions"]=dl({[Ne.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!_l.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}r.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(n.username||n.password)&&(r.auth=`${n.username}:${n.password}`),h){let f=r.path.split(":");r.socketPath=f[0],r.path=f[1]}let m;if(r.followRedirects){if(s._redirects===0){s._originalIpc=h,s._originalSecure=o,s._originalHostOrSocketPath=h?r.socketPath:n.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[b,g]of Object.entries(f))i.headers[b.toLowerCase()]=g}else if(s.listenerCount("redirect")===0){let f=h?s._originalIpc?r.socketPath===s._originalHostOrSocketPath:!1:s._originalIpc?!1:n.host===s._originalHostOrSocketPath;(!f||s._originalSecure&&!o)&&(delete r.headers.authorization,delete r.headers.cookie,f||delete r.headers.host,r.auth=void 0)}r.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),m=s._req=c(r),s._redirects&&s.emit("redirect",s.url,m)}else m=s._req=c(r);r.timeout&&m.on("timeout",()=>{J(s,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[Jn]||(m=s._req=null,hi(s,f))}),m.on("response",f=>{let b=f.headers.location,g=f.statusCode;if(b&&r.followRedirects&&g>=300&&g<400){if(++s._redirects>r.maxRedirects){J(s,m,"Maximum redirects exceeded");return}m.abort();let E;try{E=new Es(b,e)}catch{let x=new SyntaxError(`Invalid URL: ${b}`);hi(s,x);return}Qn(s,E,t,i)}else s.emit("unexpected-response",m,f)||J(s,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,b,g)=>{if(s.emit("upgrade",f),s.readyState!==D.CONNECTING)return;m=s._req=null;let E=f.headers.upgrade;if(E===void 0||E.toLowerCase()!=="websocket"){J(s,b,"Invalid Upgrade header");return}let C=rl("sha1").update(l+hl).digest("base64");if(f.headers["sec-websocket-accept"]!==C){J(s,b,"Invalid Sec-WebSocket-Accept header");return}let x=f.headers["sec-websocket-protocol"],T;if(x!==void 0?d.size?d.has(x)||(T="Server sent an invalid subprotocol"):T="Server sent a subprotocol but none was requested":d.size&&(T="Server sent no subprotocol"),T){J(s,b,T);return}x&&(s._protocol=x);let I=f.headers["sec-websocket-extensions"];if(I!==void 0){if(!p){J(s,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let W;try{W=pl(I)}catch{J(s,b,"Invalid Sec-WebSocket-Extensions header");return}let X=Object.keys(W);if(X.length!==1||X[0]!==Ne.extensionName){J(s,b,"Server indicated an extension that was not requested");return}try{p.accept(W[Ne.extensionName])}catch{J(s,b,"Invalid Sec-WebSocket-Extensions header");return}s._extensions[Ne.extensionName]=p}s.setSocket(b,g,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(m,s):m.end()}function hi(s,e){s._readyState=D.CLOSING,s._errorEmitted=!0,s.emit("error",e),s.emitClose()}function bl(s){return s.path=s.socketPath,Kn.connect(s)}function wl(s){return s.path=void 0,!s.servername&&s.servername!==""&&(s.servername=Kn.isIP(s.host)?"":s.host),il.connect(s)}function J(s,e,t){s._readyState=D.CLOSING;let i=new Error(t);Error.captureStackTrace(i,J),e.setHeader?(e[Jn]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(hi,s,i)):(e.destroy(i),e.once("error",s.emit.bind(s,"error")),e.once("close",s.emitClose.bind(s)))}function xs(s,e,t){if(e){let i=al(e)?e.size:ml(e).length;s._socket?s._sender._bufferedBytes+=i:s._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${s.readyState} (${Ce[s.readyState]})`);process.nextTick(t,i)}}function El(s,e){let t=this[$];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=s,t._socket[$]!==void 0&&(t._socket.removeListener("data",ui),process.nextTick(eo,t._socket),s===1005?t.close():t.close(s,e))}function yl(){let s=this[$];s.isPaused||s._socket.resume()}function Sl(s){let e=this[$];e._socket[$]!==void 0&&(e._socket.removeListener("data",ui),process.nextTick(eo,e._socket),e.close(s[ll])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s))}function Yn(){this[$].emitClose()}function xl(s,e){this[$].emit("message",s,e)}function vl(s){let e=this[$];e._autoPong&&e.pong(s,!this._isServer,Xn),e.emit("ping",s)}function Cl(s){this[$].emit("pong",s)}function eo(s){s.resume()}function Ol(s){let e=this[$];e.readyState!==D.CLOSED&&(e.readyState===D.OPEN&&(e._readyState=D.CLOSING,to(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s)))}function to(s){s._closeTimer=setTimeout(s._socket.destroy.bind(s._socket),gl)}function io(){let s=this[$];this.removeListener("close",io),this.removeListener("data",ui),this.removeListener("end",so),s._readyState=D.CLOSING;let e;!this._readableState.endEmitted&&!s._closeFrameReceived&&!s._receiver._writableState.errorEmitted&&(e=s._socket.read())!==null&&s._receiver.write(e),s._receiver.end(),this[$]=void 0,clearTimeout(s._closeTimer),s._receiver._writableState.finished||s._receiver._writableState.errorEmitted?s.emitClose():(s._receiver.on("error",Yn),s._receiver.on("finish",Yn))}function ui(s){this[$]._receiver.write(s)||this.pause()}function so(){let s=this[$];s._readyState=D.CLOSING,s._receiver.end(),this.end()}function ro(){let s=this[$];this.removeListener("error",ro),this.on("error",Xn),s&&(s._readyState=D.CLOSING,this.destroy())}});var ao=O((Ad,oo)=>{"use strict";var{tokenChars:Tl}=Je();function Ll(s){let e=new Set,t=-1,i=-1,r=0;for(r;r<s.length;r++){let o=s.charCodeAt(r);if(i===-1&&Tl[o]===1)t===-1&&(t=r);else if(r!==0&&(o===32||o===9))i===-1&&t!==-1&&(i=r);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${r}`);i===-1&&(i=r);let h=s.slice(t,i);if(e.has(h))throw new SyntaxError(`The "${h}" subprotocol is duplicated`);e.add(h),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let n=s.slice(t,r);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}oo.exports={parse:Ll}});var mo=O((Nd,po)=>{"use strict";var Al=require("events"),li=require("http"),{Duplex:Id}=require("stream"),{createHash:Il}=require("crypto"),ho=ws(),qe=vt(),Nl=ao(),Dl=vs(),{GUID:Rl,kWebSocket:kl}=Se(),Fl=/^[+/0-9A-Za-z]{22}==$/,uo=0,lo=1,fo=2,Cs=class extends Al{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,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:Dl,...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=li.createServer((i,r)=>{let n=li.STATUS_CODES[426];r.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),r.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=Pl(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,n,o)=>{this.handleUpgrade(r,n,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=uo}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===fo){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Lt,this);return}if(e&&this.once("close",e),this._state!==lo)if(this._state=lo,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(Lt,this):process.nextTick(Lt,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{Lt(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,i,r){t.on("error",co);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,h=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!Fl.test(n)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(h!==8&&h!==13){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){At(t,400);return}let a=e.headers["sec-websocket-protocol"],u=new Set;if(a!==void 0)try{u=Nl.parse(a)}catch{Ze(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 d=new qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=ho.parse(l);p[qe.extensionName]&&(d.accept(p[qe.extensionName]),c[qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${h===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(p,m,f,b)=>{if(!p)return At(t,m||401,f,b);this.completeUpgrade(c,n,u,e,t,i,r)});return}if(!this.options.verifyClient(d))return At(t,401)}this.completeUpgrade(c,n,u,e,t,i,r)}completeUpgrade(e,t,i,r,n,o,h){if(!n.readable||!n.writable)return n.destroy();if(n[kl])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>uo)return At(n,503);let u=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Il("sha1").update(t+Rl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let c=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;c&&(u.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[qe.extensionName]){let c=e[qe.extensionName].params,d=ho.format({[qe.extensionName]:[c]});u.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",u,r),n.write(u.concat(`\r
|
|
7
|
+
${d}`),i?r.reset(d):d}function yu(s,e,t,i={}){if(!rn){rn=!0;let n="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(n,"DeprecationWarning");else{let o=new Error(n);o.name="DeprecationWarning",console.warn(new Error(n))}}return t=Math.max(t,0),ln(s,{start:{column:t,line:e}},i)}Et.codeFrameColumns=ln;Et.default=yu;Et.highlight=un});var mn=O((bd,pn)=>{"use strict";var{Duplex:Su}=require("stream");function fn(s){s.emit("close")}function xu(){!this.destroyed&&this._writableState.finished&&this.destroy()}function dn(s){this.removeListener("error",dn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",s)}function vu(s,e){let t=!0,i=new Su({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return s.on("message",function(n,o){let h=!o&&i._readableState.objectMode?n.toString():n;i.push(h)||s.pause()}),s.once("error",function(n){i.destroyed||(t=!1,i.destroy(n))}),s.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(r,n){if(s.readyState===s.CLOSED){n(r),process.nextTick(fn,i);return}let o=!1;s.once("error",function(a){o=!0,n(a)}),s.once("close",function(){o||n(r),process.nextTick(fn,i)}),t&&s.terminate()},i._final=function(r){if(s.readyState===s.CONNECTING){s.once("open",function(){i._final(r)});return}s._socket!==null&&(s._socket._writableState.finished?(r(),i._readableState.endEmitted&&i.destroy()):(s._socket.once("finish",function(){r()}),s.close()))},i._read=function(){s.isPaused&&s.resume()},i._write=function(r,n,o){if(s.readyState===s.CONNECTING){s.once("open",function(){i._write(r,n,o)});return}s.send(r,o)},i.on("end",xu),i.on("error",dn),i}pn.exports=vu});var Se=O((wd,bn)=>{"use strict";var gn=["nodebuffer","arraybuffer","fragments"],_n=typeof Blob<"u";_n&&gn.push("blob");bn.exports={BINARY_TYPES:gn,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:_n,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var yt=O((Ed,Qt)=>{"use strict";var{EMPTY_BUFFER:Cu}=Se(),rs=Buffer[Symbol.species];function Ou(s,e){if(s.length===0)return Cu;if(s.length===1)return s[0];let t=Buffer.allocUnsafe(e),i=0;for(let r=0;r<s.length;r++){let n=s[r];t.set(n,i),i+=n.length}return i<e?new rs(t.buffer,t.byteOffset,i):t}function wn(s,e,t,i,r){for(let n=0;n<r;n++)t[i+n]=s[n]^e[n&3]}function En(s,e){for(let t=0;t<s.length;t++)s[t]^=e[t&3]}function Tu(s){return s.length===s.buffer.byteLength?s.buffer:s.buffer.slice(s.byteOffset,s.byteOffset+s.length)}function ns(s){if(ns.readOnly=!0,Buffer.isBuffer(s))return s;let e;return s instanceof ArrayBuffer?e=new rs(s):ArrayBuffer.isView(s)?e=new rs(s.buffer,s.byteOffset,s.byteLength):(e=Buffer.from(s),ns.readOnly=!1),e}Qt.exports={concat:Ou,mask:wn,toArrayBuffer:Tu,toBuffer:ns,unmask:En};if(!process.env.WS_NO_BUFFER_UTIL)try{let s=require("bufferutil");Qt.exports.mask=function(e,t,i,r,n){n<48?wn(e,t,i,r,n):s.mask(e,t,i,r,n)},Qt.exports.unmask=function(e,t){e.length<32?En(e,t):s.unmask(e,t)}}catch{}});var xn=O((yd,Sn)=>{"use strict";var yn=Symbol("kDone"),os=Symbol("kRun"),as=class{constructor(e){this[yn]=()=>{this.pending--,this[os]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[os]()}[os](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[yn])}}};Sn.exports=as});var vt=O((Sd,Tn)=>{"use strict";var St=require("zlib"),vn=yt(),Lu=xn(),{kStatusCode:Cn}=Se(),Au=Buffer[Symbol.species],Iu=Buffer.from([0,0,255,255]),ii=Symbol("permessage-deflate"),xe=Symbol("total-length"),xt=Symbol("callback"),Ie=Symbol("buffers"),ti=Symbol("error"),ei,hs=class{constructor(e,t,i){if(this._maxPayload=i|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,!ei){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ei=new Lu(r)}}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[xt];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,i=e.find(r=>!(t.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>r.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}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(i=>{let r=t[i];if(r.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(r=r[0],i==="client_max_window_bits"){if(r!==!0){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else if(i==="server_max_window_bits"){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${r}`);r=n}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${r}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=r})}),e}decompress(e,t,i){ei.add(r=>{this._decompress(e,t,(n,o)=>{r(),i(n,o)})})}compress(e,t,i){ei.add(r=>{this._compress(e,t,(n,o)=>{r(),i(n,o)})})}_decompress(e,t,i){let r=this._isServer?"client":"server";if(!this._inflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?St.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=St.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ii]=this,this._inflate[xe]=0,this._inflate[Ie]=[],this._inflate.on("error",Du),this._inflate.on("data",On)}this._inflate[xt]=i,this._inflate.write(e),t&&this._inflate.write(Iu),this._inflate.flush(()=>{let n=this._inflate[ti];if(n){this._inflate.close(),this._inflate=null,i(n);return}let o=vn.concat(this._inflate[Ie],this._inflate[xe]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[xe]=0,this._inflate[Ie]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,t,i){let r=this._isServer?"server":"client";if(!this._deflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?St.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=St.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[xe]=0,this._deflate[Ie]=[],this._deflate.on("data",Nu)}this._deflate[xt]=i,this._deflate.write(e),this._deflate.flush(St.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=vn.concat(this._deflate[Ie],this._deflate[xe]);t&&(n=new Au(n.buffer,n.byteOffset,n.length-4)),this._deflate[xt]=null,this._deflate[xe]=0,this._deflate[Ie]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,n)})}};Tn.exports=hs;function Nu(s){this[Ie].push(s),this[xe]+=s.length}function On(s){if(this[xe]+=s.length,this[ii]._maxPayload<1||this[xe]<=this[ii]._maxPayload){this[Ie].push(s);return}this[ti]=new RangeError("Max payload size exceeded"),this[ti].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ti][Cn]=1009,this.removeListener("data",On),this.reset()}function Du(s){this[ii]._inflate=null,s[Cn]=1007,this[xt](s)}});var Je=O((xd,si)=>{"use strict";var{isUtf8:Ln}=require("buffer"),{hasBlob:Ru}=Se(),ku=[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 Fu(s){return s>=1e3&&s<=1014&&s!==1004&&s!==1005&&s!==1006||s>=3e3&&s<=4999}function us(s){let e=s.length,t=0;for(;t<e;)if(!(s[t]&128))t++;else if((s[t]&224)===192){if(t+1===e||(s[t+1]&192)!==128||(s[t]&254)===192)return!1;t+=2}else if((s[t]&240)===224){if(t+2>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||s[t]===224&&(s[t+1]&224)===128||s[t]===237&&(s[t+1]&224)===160)return!1;t+=3}else if((s[t]&248)===240){if(t+3>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||(s[t+3]&192)!==128||s[t]===240&&(s[t+1]&240)===128||s[t]===244&&s[t+1]>143||s[t]>244)return!1;t+=4}else return!1;return!0}function Pu(s){return Ru&&typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&(s[Symbol.toStringTag]==="Blob"||s[Symbol.toStringTag]==="File")}si.exports={isBlob:Pu,isValidStatusCode:Fu,isValidUTF8:us,tokenChars:ku};if(Ln)si.exports.isValidUTF8=function(s){return s.length<24?us(s):Ln(s)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let s=require("utf-8-validate");si.exports.isValidUTF8=function(e){return e.length<32?us(e):s(e)}}catch{}});var ps=O((vd,Fn)=>{"use strict";var{Writable:Mu}=require("stream"),An=vt(),{BINARY_TYPES:Uu,EMPTY_BUFFER:In,kStatusCode:Bu,kWebSocket:Wu}=Se(),{concat:ls,toArrayBuffer:$u,unmask:zu}=yt(),{isValidStatusCode:ju,isValidUTF8:Nn}=Je(),ri=Buffer[Symbol.species],te=0,Dn=1,Rn=2,kn=3,cs=4,fs=5,ni=6,ds=class extends Mu{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Uu[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Wu]=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=te}_write(e,t,i){if(this._opcode===8&&this._state==te)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new ri(i.buffer,i.byteOffset+e,i.length-e),new ri(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],r=t.length-e;e>=i.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),r),this._buffers[0]=new ri(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case te:this.getInfo(e);break;case Dn:this.getPayloadLength16(e);break;case Rn:this.getPayloadLength64(e);break;case kn:this.getMask();break;case cs:this.getData(e);break;case fs:case ni: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 r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(r);return}let i=(t[0]&64)===64;if(i&&!this._extensions[An.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(r);return}if(i){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(r);return}this._payloadLength===126?this._state=Dn: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),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(r);return}this._payloadLength=i*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=kn:this._state=cs}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=cs}getData(e){let t=In;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]&&zu(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=fs,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[An.extensionName].decompress(e,this._fin,(r,n)=>{if(r)return t(r);if(n.length){if(this._messageLength+=n.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(n)}this.dataMessage(t),this._state===te&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=te;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=ls(i,t):this._binaryType==="arraybuffer"?r=$u(ls(i,t)):this._binaryType==="blob"?r=new Blob(i):r=i,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=te):(this._state=ni,setImmediate(()=>{this.emit("message",r,!0),this._state=te,this.startLoop(e)}))}else{let r=ls(i,t);if(!this._skipUTF8Validation&&!Nn(r)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===fs||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=te):(this._state=ni,setImmediate(()=>{this.emit("message",r,!1),this._state=te,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,In),this.end();else{let i=e.readUInt16BE(0);if(!ju(i)){let n=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let r=new ri(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Nn(r)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(n);return}this._loop=!1,this.emit("conclude",i,r),this.end()}this._state=te;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=te):(this._state=ni,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=te,this.startLoop(t)}))}createError(e,t,i,r,n){this._loop=!1,this._errored=!0;let o=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[Bu]=r,o}};Fn.exports=ds});var _s=O((Od,Un)=>{"use strict";var{Duplex:Cd}=require("stream"),{randomFillSync:Hu}=require("crypto"),Pn=vt(),{EMPTY_BUFFER:Gu,kWebSocket:Vu,NOOP:qu}=Se(),{isBlob:Qe,isValidStatusCode:Zu}=Je(),{mask:Mn,toBuffer:He}=yt(),ie=Symbol("kByteLength"),Yu=Buffer.alloc(4),oi=8*1024,Ge,et=oi,le=0,Ku=1,Xu=2,ms=class s{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=le,this.onerror=qu,this[Vu]=void 0}static frame(e,t){let i,r=!1,n=2,o=!1;t.mask&&(i=t.maskBuffer||Yu,t.generateMask?t.generateMask(i):(et===oi&&(Ge===void 0&&(Ge=Buffer.alloc(oi)),Hu(Ge,0,oi),et=0),i[0]=Ge[et++],i[1]=Ge[et++],i[2]=Ge[et++],i[3]=Ge[et++]),o=(i[0]|i[1]|i[2]|i[3])===0,n=6);let h;typeof e=="string"?(!t.mask||o)&&t[ie]!==void 0?h=t[ie]:(e=Buffer.from(e),h=e.length):(h=e.length,r=t.mask&&t.readOnly&&!o);let a=h;h>=65536?(n+=8,a=127):h>125&&(n+=2,a=126);let u=Buffer.allocUnsafe(r?h+n:n);return u[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,a===126?u.writeUInt16BE(h,2):a===127&&(u[2]=u[3]=0,u.writeUIntBE(h,4,6)),t.mask?(u[1]|=128,u[n-4]=i[0],u[n-3]=i[1],u[n-2]=i[2],u[n-1]=i[3],o?[u,e]:r?(Mn(e,i,u,n,h),[u]):(Mn(e,i,e,0,h),[u,e])):[u,e]}close(e,t,i,r){let n;if(e===void 0)n=Gu;else{if(typeof e!="number"||!Zu(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let h=Buffer.byteLength(t);if(h>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+h),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[ie]:n.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==le?this.enqueue([this.dispatch,n,!1,o,r]):this.sendFrame(s.frame(n,o),r)}ping(e,t,i){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):Qe(e)?(r=e.size,n=!1):(e=He(e),r=e.length,n=He.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ie]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==le?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(s.frame(e,o),i)}pong(e,t,i){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):Qe(e)?(r=e.size,n=!1):(e=He(e),r=e.length,n=He.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ie]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==le?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(s.frame(e,o),i)}send(e,t,i){let r=this._extensions[Pn.extensionName],n=t.binary?2:1,o=t.compress,h,a;typeof e=="string"?(h=Buffer.byteLength(e),a=!1):Qe(e)?(h=e.size,a=!1):(e=He(e),h=e.length,a=He.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=h>=r._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let u={[ie]:h,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};Qe(e)?this._state!==le?this.enqueue([this.getBlobData,e,this._compress,u,i]):this.getBlobData(e,this._compress,u,i):this._state!==le?this.enqueue([this.dispatch,e,this._compress,u,i]):this.dispatch(e,this._compress,u,i)}getBlobData(e,t,i,r){this._bufferedBytes+=i[ie],this._state=Xu,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let h=new Error("The socket was closed while the blob was being read");process.nextTick(gs,this,h,r);return}this._bufferedBytes-=i[ie];let o=He(n);t?this.dispatch(o,t,i,r):(this._state=le,this.sendFrame(s.frame(o,i),r),this.dequeue())}).catch(n=>{process.nextTick(Ju,this,n,r)})}dispatch(e,t,i,r){if(!t){this.sendFrame(s.frame(e,i),r);return}let n=this._extensions[Pn.extensionName];this._bufferedBytes+=i[ie],this._state=Ku,n.compress(e,i.fin,(o,h)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");gs(this,a,r);return}this._bufferedBytes-=i[ie],this._state=le,i.readOnly=!1,this.sendFrame(s.frame(h,i),r),this.dequeue()})}dequeue(){for(;this._state===le&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][ie],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ie],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)}};Un.exports=ms;function gs(s,e,t){typeof t=="function"&&t(e);for(let i=0;i<s._queue.length;i++){let r=s._queue[i],n=r[r.length-1];typeof n=="function"&&n(e)}}function Ju(s,e,t){gs(s,e,t),s.onerror(e)}});var qn=O((Td,Vn)=>{"use strict";var{kForOnEventAttribute:Ct,kListener:bs}=Se(),Bn=Symbol("kCode"),Wn=Symbol("kData"),$n=Symbol("kError"),zn=Symbol("kMessage"),jn=Symbol("kReason"),tt=Symbol("kTarget"),Hn=Symbol("kType"),Gn=Symbol("kWasClean"),ve=class{constructor(e){this[tt]=null,this[Hn]=e}get target(){return this[tt]}get type(){return this[Hn]}};Object.defineProperty(ve.prototype,"target",{enumerable:!0});Object.defineProperty(ve.prototype,"type",{enumerable:!0});var Ve=class extends ve{constructor(e,t={}){super(e),this[Bn]=t.code===void 0?0:t.code,this[jn]=t.reason===void 0?"":t.reason,this[Gn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Bn]}get reason(){return this[jn]}get wasClean(){return this[Gn]}};Object.defineProperty(Ve.prototype,"code",{enumerable:!0});Object.defineProperty(Ve.prototype,"reason",{enumerable:!0});Object.defineProperty(Ve.prototype,"wasClean",{enumerable:!0});var it=class extends ve{constructor(e,t={}){super(e),this[$n]=t.error===void 0?null:t.error,this[zn]=t.message===void 0?"":t.message}get error(){return this[$n]}get message(){return this[zn]}};Object.defineProperty(it.prototype,"error",{enumerable:!0});Object.defineProperty(it.prototype,"message",{enumerable:!0});var Ot=class extends ve{constructor(e,t={}){super(e),this[Wn]=t.data===void 0?null:t.data}get data(){return this[Wn]}};Object.defineProperty(Ot.prototype,"data",{enumerable:!0});var Qu={addEventListener(s,e,t={}){for(let r of this.listeners(s))if(!t[Ct]&&r[bs]===e&&!r[Ct])return;let i;if(s==="message")i=function(n,o){let h=new Ot("message",{data:o?n:n.toString()});h[tt]=this,ai(e,this,h)};else if(s==="close")i=function(n,o){let h=new Ve("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});h[tt]=this,ai(e,this,h)};else if(s==="error")i=function(n){let o=new it("error",{error:n,message:n.message});o[tt]=this,ai(e,this,o)};else if(s==="open")i=function(){let n=new ve("open");n[tt]=this,ai(e,this,n)};else return;i[Ct]=!!t[Ct],i[bs]=e,t.once?this.once(s,i):this.on(s,i)},removeEventListener(s,e){for(let t of this.listeners(s))if(t[bs]===e&&!t[Ct]){this.removeListener(s,t);break}}};Vn.exports={CloseEvent:Ve,ErrorEvent:it,Event:ve,EventTarget:Qu,MessageEvent:Ot};function ai(s,e,t){typeof s=="object"&&s.handleEvent?s.handleEvent.call(s,t):s.call(e,t)}});var ws=O((Ld,Zn)=>{"use strict";var{tokenChars:Tt}=Je();function _e(s,e,t){s[e]===void 0?s[e]=[t]:s[e].push(t)}function el(s){let e=Object.create(null),t=Object.create(null),i=!1,r=!1,n=!1,o,h,a=-1,u=-1,l=-1,c=0;for(;c<s.length;c++)if(u=s.charCodeAt(c),o===void 0)if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(c!==0&&(u===32||u===9))l===-1&&a!==-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=s.slice(a,l);u===44?(_e(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===void 0)if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(u===32||u===9)l===-1&&a!==-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),_e(t,s.slice(a,l),!0),u===44&&(_e(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(u===61&&a!==-1&&l===-1)h=s.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(r){if(Tt[u]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:i||(i=!0),r=!1}else if(n)if(Tt[u]===1)a===-1&&(a=c);else if(u===34&&a!==-1)n=!1,l=c;else if(u===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===34&&s.charCodeAt(c-1)===61)n=!0;else if(l===-1&&Tt[u]===1)a===-1&&(a=c);else if(a!==-1&&(u===32||u===9))l===-1&&(l=c);else if(u===59||u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=s.slice(a,l);i&&(p=p.replace(/\\/g,""),i=!1),_e(t,h,p),u===44&&(_e(e,o,t),t=Object.create(null),o=void 0),h=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||u===32||u===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=s.slice(a,l);return o===void 0?_e(e,d,t):(h===void 0?_e(t,d,!0):i?_e(t,h,d.replace(/\\/g,"")):_e(t,h,d),_e(e,o,t)),e}function tl(s){return Object.keys(s).map(e=>{let t=s[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(r=>{let n=i[r];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?r:`${r}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Zn.exports={format:tl,parse:el}});var vs=O((Nd,oo)=>{"use strict";var il=require("events"),sl=require("https"),rl=require("http"),Xn=require("net"),nl=require("tls"),{randomBytes:ol,createHash:al}=require("crypto"),{Duplex:Ad,Readable:Id}=require("stream"),{URL:Es}=require("url"),Ne=vt(),hl=ps(),ul=_s(),{isBlob:ll}=Je(),{BINARY_TYPES:Yn,EMPTY_BUFFER:hi,GUID:cl,kForOnEventAttribute:ys,kListener:fl,kStatusCode:dl,kWebSocket:$,NOOP:Jn}=Se(),{EventTarget:{addEventListener:pl,removeEventListener:ml}}=qn(),{format:gl,parse:_l}=ws(),{toBuffer:bl}=yt(),wl=30*1e3,Qn=Symbol("kAborted"),Ss=[8,13],Ce=["CONNECTING","OPEN","CLOSING","CLOSED"],El=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,D=class s extends il{constructor(e,t,i){super(),this._binaryType=Yn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=hi,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=s.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?(i=t,t=[]):t=[t]),eo(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Yn.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,i){let r=new hl({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),n=new ul(e,this._extensions,i.generateMask);this._receiver=r,this._sender=n,this._socket=e,r[$]=this,n[$]=this,e[$]=this,r.on("conclude",xl),r.on("drain",vl),r.on("error",Cl),r.on("message",Ol),r.on("ping",Tl),r.on("pong",Ll),n.onerror=Al,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",so),e.on("data",li),e.on("end",ro),e.on("error",no),this._readyState=s.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ne.extensionName]&&this._extensions[Ne.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){J(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===s.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=s.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),io(this)}}pause(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||hi,t,i)}pong(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||hi,t,i)}resume(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){xs(this,e,i);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Ne.extensionName]||(r.compress=!1),this._sender.send(e||hi,r,i)}terminate(){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){J(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=s.CLOSING,this._socket.destroy())}}};Object.defineProperty(D,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(D.prototype,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(D,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(D.prototype,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(D,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(D.prototype,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(D,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});Object.defineProperty(D.prototype,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(s=>{Object.defineProperty(D.prototype,s,{enumerable:!0})});["open","error","close","message"].forEach(s=>{Object.defineProperty(D.prototype,`on${s}`,{enumerable:!0,get(){for(let e of this.listeners(s))if(e[ys])return e[fl];return null},set(e){for(let t of this.listeners(s))if(t[ys]){this.removeListener(s,t);break}typeof e=="function"&&this.addEventListener(s,e,{[ys]:!0})}})});D.prototype.addEventListener=pl;D.prototype.removeEventListener=ml;oo.exports=D;function eo(s,e,t,i){let r={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Ss[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(s._autoPong=r.autoPong,!Ss.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${Ss.join(", ")})`);let n;if(e instanceof Es)n=e;else try{n=new Es(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),s._url=n.href;let o=n.protocol==="wss:",h=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!h?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:h&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"),a){let f=new SyntaxError(a);if(s._redirects===0)throw f;ui(s,f);return}let u=o?443:80,l=ol(16).toString("base64"),c=o?sl.request:rl.request,d=new Set,p;if(r.createConnection=r.createConnection||(o?Sl:yl),r.defaultPort=r.defaultPort||u,r.port=n.port||u,r.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},r.path=n.pathname+n.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(p=new Ne(r.perMessageDeflate!==!0?r.perMessageDeflate:{},!1,r.maxPayload),r.headers["Sec-WebSocket-Extensions"]=gl({[Ne.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!El.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}r.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(n.username||n.password)&&(r.auth=`${n.username}:${n.password}`),h){let f=r.path.split(":");r.socketPath=f[0],r.path=f[1]}let m;if(r.followRedirects){if(s._redirects===0){s._originalIpc=h,s._originalSecure=o,s._originalHostOrSocketPath=h?r.socketPath:n.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[b,g]of Object.entries(f))i.headers[b.toLowerCase()]=g}else if(s.listenerCount("redirect")===0){let f=h?s._originalIpc?r.socketPath===s._originalHostOrSocketPath:!1:s._originalIpc?!1:n.host===s._originalHostOrSocketPath;(!f||s._originalSecure&&!o)&&(delete r.headers.authorization,delete r.headers.cookie,f||delete r.headers.host,r.auth=void 0)}r.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),m=s._req=c(r),s._redirects&&s.emit("redirect",s.url,m)}else m=s._req=c(r);r.timeout&&m.on("timeout",()=>{J(s,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[Qn]||(m=s._req=null,ui(s,f))}),m.on("response",f=>{let b=f.headers.location,g=f.statusCode;if(b&&r.followRedirects&&g>=300&&g<400){if(++s._redirects>r.maxRedirects){J(s,m,"Maximum redirects exceeded");return}m.abort();let E;try{E=new Es(b,e)}catch{let x=new SyntaxError(`Invalid URL: ${b}`);ui(s,x);return}eo(s,E,t,i)}else s.emit("unexpected-response",m,f)||J(s,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,b,g)=>{if(s.emit("upgrade",f),s.readyState!==D.CONNECTING)return;m=s._req=null;let E=f.headers.upgrade;if(E===void 0||E.toLowerCase()!=="websocket"){J(s,b,"Invalid Upgrade header");return}let C=al("sha1").update(l+cl).digest("base64");if(f.headers["sec-websocket-accept"]!==C){J(s,b,"Invalid Sec-WebSocket-Accept header");return}let x=f.headers["sec-websocket-protocol"],T;if(x!==void 0?d.size?d.has(x)||(T="Server sent an invalid subprotocol"):T="Server sent a subprotocol but none was requested":d.size&&(T="Server sent no subprotocol"),T){J(s,b,T);return}x&&(s._protocol=x);let I=f.headers["sec-websocket-extensions"];if(I!==void 0){if(!p){J(s,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let W;try{W=_l(I)}catch{J(s,b,"Invalid Sec-WebSocket-Extensions header");return}let X=Object.keys(W);if(X.length!==1||X[0]!==Ne.extensionName){J(s,b,"Server indicated an extension that was not requested");return}try{p.accept(W[Ne.extensionName])}catch{J(s,b,"Invalid Sec-WebSocket-Extensions header");return}s._extensions[Ne.extensionName]=p}s.setSocket(b,g,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(m,s):m.end()}function ui(s,e){s._readyState=D.CLOSING,s._errorEmitted=!0,s.emit("error",e),s.emitClose()}function yl(s){return s.path=s.socketPath,Xn.connect(s)}function Sl(s){return s.path=void 0,!s.servername&&s.servername!==""&&(s.servername=Xn.isIP(s.host)?"":s.host),nl.connect(s)}function J(s,e,t){s._readyState=D.CLOSING;let i=new Error(t);Error.captureStackTrace(i,J),e.setHeader?(e[Qn]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ui,s,i)):(e.destroy(i),e.once("error",s.emit.bind(s,"error")),e.once("close",s.emitClose.bind(s)))}function xs(s,e,t){if(e){let i=ll(e)?e.size:bl(e).length;s._socket?s._sender._bufferedBytes+=i:s._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${s.readyState} (${Ce[s.readyState]})`);process.nextTick(t,i)}}function xl(s,e){let t=this[$];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=s,t._socket[$]!==void 0&&(t._socket.removeListener("data",li),process.nextTick(to,t._socket),s===1005?t.close():t.close(s,e))}function vl(){let s=this[$];s.isPaused||s._socket.resume()}function Cl(s){let e=this[$];e._socket[$]!==void 0&&(e._socket.removeListener("data",li),process.nextTick(to,e._socket),e.close(s[dl])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s))}function Kn(){this[$].emitClose()}function Ol(s,e){this[$].emit("message",s,e)}function Tl(s){let e=this[$];e._autoPong&&e.pong(s,!this._isServer,Jn),e.emit("ping",s)}function Ll(s){this[$].emit("pong",s)}function to(s){s.resume()}function Al(s){let e=this[$];e.readyState!==D.CLOSED&&(e.readyState===D.OPEN&&(e._readyState=D.CLOSING,io(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s)))}function io(s){s._closeTimer=setTimeout(s._socket.destroy.bind(s._socket),wl)}function so(){let s=this[$];this.removeListener("close",so),this.removeListener("data",li),this.removeListener("end",ro),s._readyState=D.CLOSING;let e;!this._readableState.endEmitted&&!s._closeFrameReceived&&!s._receiver._writableState.errorEmitted&&(e=s._socket.read())!==null&&s._receiver.write(e),s._receiver.end(),this[$]=void 0,clearTimeout(s._closeTimer),s._receiver._writableState.finished||s._receiver._writableState.errorEmitted?s.emitClose():(s._receiver.on("error",Kn),s._receiver.on("finish",Kn))}function li(s){this[$]._receiver.write(s)||this.pause()}function ro(){let s=this[$];s._readyState=D.CLOSING,s._receiver.end(),this.end()}function no(){let s=this[$];this.removeListener("error",no),this.on("error",Jn),s&&(s._readyState=D.CLOSING,this.destroy())}});var ho=O((Dd,ao)=>{"use strict";var{tokenChars:Il}=Je();function Nl(s){let e=new Set,t=-1,i=-1,r=0;for(r;r<s.length;r++){let o=s.charCodeAt(r);if(i===-1&&Il[o]===1)t===-1&&(t=r);else if(r!==0&&(o===32||o===9))i===-1&&t!==-1&&(i=r);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${r}`);i===-1&&(i=r);let h=s.slice(t,i);if(e.has(h))throw new SyntaxError(`The "${h}" subprotocol is duplicated`);e.add(h),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let n=s.slice(t,r);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}ao.exports={parse:Nl}});var go=O((kd,mo)=>{"use strict";var Dl=require("events"),ci=require("http"),{Duplex:Rd}=require("stream"),{createHash:Rl}=require("crypto"),uo=ws(),qe=vt(),kl=ho(),Fl=vs(),{GUID:Pl,kWebSocket:Ml}=Se(),Ul=/^[+/0-9A-Za-z]{22}==$/,lo=0,co=1,po=2,Cs=class extends Dl{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,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:Fl,...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=ci.createServer((i,r)=>{let n=ci.STATUS_CODES[426];r.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),r.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=Bl(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,n,o)=>{this.handleUpgrade(r,n,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=lo}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===po){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Lt,this);return}if(e&&this.once("close",e),this._state!==co)if(this._state=co,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(Lt,this):process.nextTick(Lt,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{Lt(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,i,r){t.on("error",fo);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,h=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!Ul.test(n)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(h!==8&&h!==13){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){At(t,400);return}let a=e.headers["sec-websocket-protocol"],u=new Set;if(a!==void 0)try{u=kl.parse(a)}catch{Ze(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 d=new qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=uo.parse(l);p[qe.extensionName]&&(d.accept(p[qe.extensionName]),c[qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${h===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(p,m,f,b)=>{if(!p)return At(t,m||401,f,b);this.completeUpgrade(c,n,u,e,t,i,r)});return}if(!this.options.verifyClient(d))return At(t,401)}this.completeUpgrade(c,n,u,e,t,i,r)}completeUpgrade(e,t,i,r,n,o,h){if(!n.readable||!n.writable)return n.destroy();if(n[Ml])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>lo)return At(n,503);let u=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Rl("sha1").update(t+Pl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let c=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;c&&(u.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[qe.extensionName]){let c=e[qe.extensionName].params,d=uo.format({[qe.extensionName]:[c]});u.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",u,r),n.write(u.concat(`\r
|
|
8
8
|
`).join(`\r
|
|
9
|
-
`)),n.removeListener("error",
|
|
9
|
+
`)),n.removeListener("error",fo),l.setSocket(n,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(Lt,this)})),h(l,r)}};mo.exports=Cs;function Bl(s,e){for(let t of Object.keys(e))s.on(t,e[t]);return function(){for(let i of Object.keys(e))s.removeListener(i,e[i])}}function Lt(s){s._state=po,s.emit("close")}function fo(){this.destroy()}function At(s,e,t,i){t=t||ci.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...i},s.once("finish",s.destroy),s.end(`HTTP/1.1 ${e} ${ci.STATUS_CODES[e]}\r
|
|
10
10
|
`+Object.keys(i).map(r=>`${r}: ${i[r]}`).join(`\r
|
|
11
11
|
`)+`\r
|
|
12
12
|
\r
|
|
13
|
-
`+t)}function Ze(s,e,t,i,r){if(s.listenerCount("wsClientError")){let n=new Error(r);Error.captureStackTrace(n,Ze),s.emit("wsClientError",n,t,e)}else At(t,i,r)}});var
|
|
13
|
+
`+t)}function Ze(s,e,t,i,r){if(s.listenerCount("wsClientError")){let n=new Error(r);Error.captureStackTrace(n,Ze),s.emit("wsClientError",n,t,e)}else At(t,i,r)}});var Eo=O((Pd,wo)=>{"use strict";function jl(s){return s>=55296&&s<=56319}function Hl(s){return s>=56320&&s<=57343}wo.exports=function(e,t,i){if(typeof t!="string")throw new Error("Input must be string");for(var r=t.length,n=0,o,h,a=0;a<r;a+=1){if(o=t.charCodeAt(a),h=t[a],jl(o)&&Hl(t.charCodeAt(a+1))&&(a+=1,h+=t[a]),n+=e(h),n===i)return t.slice(0,a+1);if(n>i)return t.slice(0,a-h.length+1)}return t}});var So=O((Md,yo)=>{"use strict";var Gl=Eo(),Vl=Buffer.byteLength.bind(Buffer);yo.exports=Gl.bind(null,Vl)});var Co=O((Ud,vo)=>{"use strict";var ql=So(),Zl=/[\/\?<>\\:\*\|"]/g,Yl=/[\x00-\x1f\x80-\x9f]/g,Kl=/^\.+$/,Xl=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Jl=/[\. ]+$/;function xo(s,e){if(typeof s!="string")throw new Error("Input must be string");var t=s.replace(Zl,e).replace(Yl,e).replace(Kl,e).replace(Xl,e).replace(Jl,e);return ql(t,255)}vo.exports=function(s,e){var t=e&&e.replacement||"",i=xo(s,t);return t===""?i:xo(i,"")}});var It=O(Ls=>{var fi=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Ts=class extends fi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ls.CommanderError=fi;Ls.InvalidArgumentError=Ts});var di=O(Is=>{var{InvalidArgumentError:Ql}=It(),As=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,i)=>{if(!this.argChoices.includes(t))throw new Ql(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function ec(s){let e=s.name()+(s.variadic===!0?"...":"");return s.required?"<"+e+">":"["+e+"]"}Is.Argument=As;Is.humanReadableArgName=ec});var Ds=O(Oo=>{var{humanReadableArgName:tc}=di(),Ns=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(r=>!r._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((r,n)=>r.name().localeCompare(n.name())),t}compareOptions(e,t){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),i=e._getHelpOption();if(i&&!i.hidden){let r=i.short&&e._findOption(i.short),n=i.long&&e._findOption(i.long);!r&&!n?t.push(i):i.long&&!n?t.push(e.createOption(i.long,i.description)):i.short&&!r&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let r=i.options.filter(n=>!n.hidden);t.push(...r)}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(i=>tc(i)).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((i,r)=>Math.max(i,t.subcommandTerm(r).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,r)=>Math.max(i,t.optionTerm(r).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,r)=>Math.max(i,t.optionTerm(r).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,r)=>Math.max(i,t.argumentTerm(r).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let r=e.parent;r;r=r.parent)i=r.name()+" "+i;return i+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(i=>JSON.stringify(i)).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(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,t){let i=t.padWidth(e,t),r=t.helpWidth||80,n=2,o=2;function h(m,f){if(f){let b=`${m.padEnd(i+o)}${f}`;return t.wrap(b,r-n,i+o)}return m}function a(m){return m.join(`
|
|
14
14
|
`).replace(/^/gm," ".repeat(n))}let u=[`Usage: ${t.commandUsage(e)}`,""],l=t.commandDescription(e);l.length>0&&(u=u.concat([t.wrap(l,r,0),""]));let c=t.visibleArguments(e).map(m=>h(t.argumentTerm(m),t.argumentDescription(m)));c.length>0&&(u=u.concat(["Arguments:",a(c),""]));let d=t.visibleOptions(e).map(m=>h(t.optionTerm(m),t.optionDescription(m)));if(d.length>0&&(u=u.concat(["Options:",a(d),""])),this.showGlobalOptions){let m=t.visibleGlobalOptions(e).map(f=>h(t.optionTerm(f),t.optionDescription(f)));m.length>0&&(u=u.concat(["Global Options:",a(m),""]))}let p=t.visibleCommands(e).map(m=>h(t.subcommandTerm(m),t.subcommandDescription(m)));return p.length>0&&(u=u.concat(["Commands:",a(p),""])),u.join(`
|
|
15
15
|
`)}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,i,r=40){let n=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${n}]+`);if(e.match(o))return e;let h=t-i;if(h<r)return e;let a=e.slice(0,i),u=e.slice(i).replace(`\r
|
|
16
16
|
`,`
|
|
17
17
|
`),l=" ".repeat(i),d="\\s\u200B",p=new RegExp(`
|
|
18
18
|
|.{1,${h-1}}([${d}]|$)|[^${d}]+?([${d}]|$)`,"g"),m=u.match(p)||[];return a+m.map((f,b)=>f===`
|
|
19
19
|
`?"":(b>0?l:"")+f.trimEnd()).join(`
|
|
20
|
-
`)}};
|
|
20
|
+
`)}};Oo.Help=Ns});var Ps=O(Fs=>{var{InvalidArgumentError:ic}=It(),Rs=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 i=rc(e);this.short=i.shortFlag,this.long=i.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,i)=>{if(!this.argChoices.includes(t))throw new ic(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return sc(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ks=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,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){let i=t.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,n=r!==void 0?r:!1;return t.negate===(n===e)}};function sc(s){return s.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function rc(s){let e,t,i=s.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),t=i.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}Fs.Option=Rs;Fs.DualOptions=ks});var Lo=O(To=>{function nc(s,e){if(Math.abs(s.length-e.length)>3)return Math.max(s.length,e.length);let t=[];for(let i=0;i<=s.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let r=1;r<=s.length;r++){let n=1;s[r-1]===e[i-1]?n=0:n=1,t[r][i]=Math.min(t[r-1][i]+1,t[r][i-1]+1,t[r-1][i-1]+n),r>1&&i>1&&s[r-1]===e[i-2]&&s[r-2]===e[i-1]&&(t[r][i]=Math.min(t[r][i],t[r-2][i-2]+1))}return t[s.length][e.length]}function oc(s,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=s.startsWith("--");t&&(s=s.slice(2),e=e.map(o=>o.slice(2)));let i=[],r=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let h=nc(s,o),a=Math.max(s.length,o.length);(a-h)/a>n&&(h<r?(r=h,i=[o]):h===r&&i.push(o))}),i.sort((o,h)=>o.localeCompare(h)),t&&(i=i.map(o=>`--${o}`)),i.length>1?`
|
|
21
21
|
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
|
|
22
|
-
(Did you mean ${i[0]}?)`:""}
|
|
23
|
-
- 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
|
|
24
|
-
Expecting one of '${i.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,i){this._exitCallback&&this._exitCallback(new Bs(e,t,i)),F.exit(e)}action(e){let t=i=>{let r=this.registeredArguments.length,n=i.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=t,this}createOption(e,t){return new
|
|
25
|
-
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),i=t(e).find(r=>this._findCommand(r));if(i){let r=t(this._findCommand(i)).join("|"),n=t(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),i=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let r=(n,o,h)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(i);n!==null&&e.parseArg?n=this._callParseArg(e,n,a,o):n!==null&&e.variadic&&(n=e._concatValue(n,a)),n==null&&(e.negate?n=!1:e.isBoolean()||e.optional?n=!0:n=""),this.setOptionValueWithSource(i,n,h)};return this.on("option:"+t,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;r(n,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;r(n,o,"env")}),this}_optionEx(e,t,i,r,n){if(typeof t=="object"&&t instanceof
|
|
22
|
+
(Did you mean ${i[0]}?)`:""}To.suggestSimilar=oc});var Ro=O(Do=>{var ac=require("node:events").EventEmitter,Ms=require("node:child_process"),Oe=require("node:path"),Us=require("node:fs"),F=require("node:process"),{Argument:hc,humanReadableArgName:uc}=di(),{CommanderError:Bs}=It(),{Help:lc}=Ds(),{Option:Ao,DualOptions:cc}=Ps(),{suggestSimilar:Io}=Lo(),Ws=class s extends ac{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=>F.stdout.write(t),writeErr:t=>F.stderr.write(t),getOutHelpWidth:()=>F.stdout.isTTY?F.stdout.columns:void 0,getErrHelpWidth:()=>F.stderr.isTTY?F.stderr.columns:void 0,outputError:(t,i)=>i(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,i){let r=t,n=i;typeof r=="object"&&r!==null&&(n=r,r=null),n=n||{};let[,o,h]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return r&&(a.description(r),a._executableHandler=!0),n.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(n.noHelp||n.hidden),a._executableFile=n.executableFile||null,h&&a.arguments(h),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(e){return new s(e)}createHelp(){return Object.assign(new lc,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
|
|
23
|
+
- 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 hc(e,t)}argument(e,t,i,r){let n=this.createArgument(e,t);return typeof i=="function"?n.default(r).argParser(i):n.default(i),this.addArgument(n),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[,i,r]=e.match(/([^ ]+) *(.*)/),n=t??"display help for command",o=this.createCommand(i);return o.helpOption(!1),r&&o.arguments(r),n&&o.description(n),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 i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
24
|
+
Expecting one of '${i.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,i){this._exitCallback&&this._exitCallback(new Bs(e,t,i)),F.exit(e)}action(e){let t=i=>{let r=this.registeredArguments.length,n=i.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=t,this}createOption(e,t){return new Ao(e,t)}_callParseArg(e,t,i,r){try{return e.parseArg(t,i)}catch(n){if(n.code==="commander.invalidArgument"){let o=`${r} ${n.message}`;this.error(o,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let i=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 '${i}'
|
|
25
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),i=t(e).find(r=>this._findCommand(r));if(i){let r=t(this._findCommand(i)).join("|"),n=t(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),i=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let r=(n,o,h)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(i);n!==null&&e.parseArg?n=this._callParseArg(e,n,a,o):n!==null&&e.variadic&&(n=e._concatValue(n,a)),n==null&&(e.negate?n=!1:e.isBoolean()||e.optional?n=!0:n=""),this.setOptionValueWithSource(i,n,h)};return this.on("option:"+t,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;r(n,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;r(n,o,"env")}),this}_optionEx(e,t,i,r,n){if(typeof t=="object"&&t instanceof Ao)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,i);if(o.makeOptionMandatory(!!e.mandatory),typeof r=="function")o.default(n).argParser(r);else if(r instanceof RegExp){let h=r;r=(a,u)=>{let l=h.exec(a);return l?l[0]:u},o.default(n).argParser(r)}else o.default(r);return this.addOption(o)}option(e,t,i,r){return this._optionEx({},e,t,i,r)}requiredOption(e,t,i,r){return this._optionEx({mandatory:!0},e,t,i,r)}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,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(t=i.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var r;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(r=F.versions)!=null&&r.electron&&(t.from="electron");let n=F.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(t.from="eval")}e===void 0&&(e=F.argv),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":F.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);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",i}parse(e,t){let i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){let i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_executeSubCommand(e,t){t=t.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,c){let d=Oe.resolve(l,c);if(Us.existsSync(d))return d;if(r.includes(Oe.extname(c)))return;let p=r.find(m=>Us.existsSync(`${d}${m}`));if(p)return`${d}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,h=this._executableDir||"";if(this._scriptPath){let l;try{l=Us.realpathSync(this._scriptPath)}catch{l=this._scriptPath}h=Oe.resolve(Oe.dirname(l),h)}if(h){let l=n(h,o);if(!l&&!e._executableFile&&this._scriptPath){let c=Oe.basename(this._scriptPath,Oe.extname(this._scriptPath));c!==this._name&&(l=n(h,`${c}-${e._name}`))}o=l||o}i=r.includes(Oe.extname(o));let a;F.platform!=="win32"?i?(t.unshift(o),t=No(F.execArgv).concat(t),a=Ms.spawn(F.argv[0],t,{stdio:"inherit"})):a=Ms.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=No(F.execArgv).concat(t),a=Ms.spawn(F.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{F.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let u=this._exitCallback;a.on("close",l=>{l=l??1,u?u(new Bs(l,"commander.executeSubCommandAsync","(close)")):F.exit(l)}),a.on("error",l=>{if(l.code==="ENOENT"){let c=h?`searched for local subcommand relative to directory '${h}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",d=`'${o}' does not exist
|
|
26
26
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
27
27
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
28
28
|
- ${c}`;throw new Error(d)}else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)F.exit(1);else{let c=new Bs(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,u(c)}}),this.runningCommand=a}_dispatchSubcommand(e,t,i){let r=this._findCommand(e);r||this.help({error:!0});let n;return n=this._chainOrCallSubCommandHook(n,r,"preSubcommand"),n=this._chainOrCall(n,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(i));else return r._parseCommand(t,i)}),n}_dispatchHelpCommand(e){var i,r;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[((i=this._getHelpOption())==null?void 0:i.long)??((r=this._getHelpOption())==null?void 0:r.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=(i,r,n)=>{let o=r;if(r!==null&&i.parseArg){let h=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;o=this._callParseArg(i,r,n,h)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((i,r)=>{let n=i.defaultValue;i.variadic?r<this.args.length?(n=this.args.slice(r),i.parseArg&&(n=n.reduce((o,h)=>e(i,h,o),i.defaultValue))):n===void 0&&(n=[]):r<this.args.length&&(n=this.args[r],i.parseArg&&(n=e(i,n,i.defaultValue))),t[r]=n}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e,r=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[t]!==void 0).forEach(n=>{n._lifeCycleHooks[t].forEach(o=>{r.push({hookedCommand:n,callback:o})})}),t==="postAction"&&r.reverse(),r.forEach(n=>{i=this._chainOrCall(i,()=>n.callback(n.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let r=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(n=>{r=this._chainOrCall(r,()=>n(this,t))}),r}_parseCommand(e,t){let i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.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(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){r(),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(n,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(n))r(),this._processArguments(),this.parent.emit(n,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():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),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(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=e.find(n=>i.conflictsWith.includes(n.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],i=[],r=t,n=e.slice();function o(a){return a.length>1&&a[0]==="-"}let h=null;for(;n.length;){let a=n.shift();if(a==="--"){r===i&&r.push(a),r.push(...n);break}if(h&&!o(a)){this.emit(`option:${h.name()}`,a);continue}if(h=null,o(a)){let u=this._findOption(a);if(u){if(u.required){let l=n.shift();l===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,l)}else if(u.optional){let l=null;n.length>0&&!o(n[0])&&(l=n.shift()),this.emit(`option:${u.name()}`,l)}else this.emit(`option:${u.name()}`);h=u.variadic?u:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let u=this._findOption(`-${a[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,a.slice(2)):(this.emit(`option:${u.name()}`),n.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let u=a.indexOf("="),l=this._findOption(a.slice(0,u));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,a.slice(u+1));continue}}if(o(a)&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(a)){t.push(a),n.length>0&&i.push(...n);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){t.push(a),n.length>0&&t.push(...n);break}else if(this._defaultCommandName){i.push(a),n.length>0&&i.push(...n);break}}if(this._passThroughOptions){r.push(a),n.length>0&&r.push(...n);break}r.push(a)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let i=0;i<t;i++){let r=this.options[i].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}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
29
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
30
30
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
31
|
-
`),this.outputHelp({error:!0}));let i=t||{},r=i.exitCode||1,n=i.code||"commander.error";this._exit(r,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in F.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()}`,F.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new
|
|
32
|
-
`),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 r;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 i=(r=this.parent)==null?void 0:r._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}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(i=>
|
|
31
|
+
`),this.outputHelp({error:!0}));let i=t||{},r=i.exitCode||1,n=i.code||"commander.error";this._exit(r,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in F.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()}`,F.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new cc(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"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 i=o=>{let h=o.attributeName(),a=this.getOptionValue(h),u=this.options.find(c=>c.negate&&h===c.attributeName()),l=this.options.find(c=>!c.negate&&h===c.attributeName());return u&&(u.presetArg===void 0&&a===!1||u.presetArg!==void 0&&a===u.presetArg)?u:l||o},r=o=>{let h=i(o),a=h.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${h.envVar}'`:`option '${h.flags}'`},n=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(h=>h.long).map(h=>h.long);r=r.concat(o),n=n.parent}while(n&&!n._enablePositionalOptions);t=Io(e,r)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(n=>{r.push(n.name()),n.alias()&&r.push(n.alias())}),t=Io(e,r)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let r=this.createOption(t,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
32
|
+
`),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 r;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 i=(r=this.parent)==null?void 0:r._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}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(i=>uc(i));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=Oe.basename(e,Oe.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},i;return t.error?i=r=>this._outputConfiguration.writeErr(r):i=r=>this._outputConfiguration.writeOut(r),t.write=e.write||i,t.command=this,t}outputHelp(e){var n;let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let r=this.helpInformation(i);if(t&&(r=t(r),typeof r!="string"&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(r),(n=this._getHelpOption())!=null&&n.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}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=F.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
33
33
|
Expecting one of '${i.join("', '")}'`);let r=`${e}Help`;return this.on(r,n=>{let o;typeof t=="function"?o=t({error:n.error,command:n.command}):o=t,o&&n.write(`${o}
|
|
34
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Io(s){return s.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",r="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],i=n[3],r=n[4]),t&&r!=="0"?`${t}=${i}:${parseInt(r)+1}`:e})}No.Command=Ws});var Po=O(se=>{var{Argument:Ro}=fi(),{Command:$s}=Do(),{CommanderError:uc,InvalidArgumentError:ko}=It(),{Help:lc}=Ds(),{Option:Fo}=Ps();se.program=new $s;se.createCommand=s=>new $s(s);se.createOption=(s,e)=>new Fo(s,e);se.createArgument=(s,e)=>new Ro(s,e);se.Command=$s;se.Option=Fo;se.Argument=Ro;se.Help=lc;se.CommanderError=uc;se.InvalidArgumentError=ko;se.InvalidOptionArgumentError=ko});var js=O((ep,Wo)=>{"use strict";var Bo=require("fs"),zs;function cc(){try{return Bo.statSync("/.dockerenv"),!0}catch{return!1}}function fc(){try{return Bo.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Wo.exports=()=>(zs===void 0&&(zs=cc()||fc()),zs)});var jo=O((tp,Hs)=>{"use strict";var dc=require("os"),pc=require("fs"),$o=js(),zo=()=>{if(process.platform!=="linux")return!1;if(dc.release().toLowerCase().includes("microsoft"))return!$o();try{return pc.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!$o():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Hs.exports=zo:Hs.exports=zo()});var Go=O((ip,Ho)=>{"use strict";Ho.exports=(s,e,t)=>{let i=r=>Object.defineProperty(s,e,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){let r=t();return i(r),r},set(r){i(r)}}),s}});var Jo=O((sp,Xo)=>{var mc=require("path"),gc=require("child_process"),{promises:pi,constants:Ko}=require("fs"),di=jo(),_c=js(),Vs=Go(),Vo=mc.join(__dirname,"xdg-open"),{platform:st,arch:qo}=process,bc=()=>{try{return pi.statSync("/run/.containerenv"),!0}catch{return!1}},Gs;function wc(){return Gs===void 0&&(Gs=bc()||_c()),Gs}var Ec=(()=>{let s="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",i=!1;try{await pi.access(t,Ko.F_OK),i=!0}catch{}if(!i)return s;let r=await pi.readFile(t,{encoding:"utf8"}),n=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(r);return n?(e=n.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):s}})(),Zo=async(s,e)=>{let t;for(let i of s)try{return await e(i)}catch(r){t=r}throw t},mi=async s=>{if(s={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...s},Array.isArray(s.app))return Zo(s.app,h=>mi({...s,app:h}));let{name:e,arguments:t=[]}=s.app||{};if(t=[...t],Array.isArray(e))return Zo(e,h=>mi({...s,app:{name:h,arguments:t}}));let i,r=[],n={};if(st==="darwin")i="open",s.wait&&r.push("--wait-apps"),s.background&&r.push("--background"),s.newInstance&&r.push("--new"),e&&r.push("-a",e);else if(st==="win32"||di&&!wc()&&!e){let h=await Ec();i=di?`${h}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,r.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),di||(n.windowsVerbatimArguments=!0);let a=["Start"];s.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),s.target&&t.unshift(s.target)):s.target&&a.push(`"${s.target}"`),t.length>0&&(t=t.map(u=>`"\`"${u}\`""`),a.push(t.join(","))),s.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)i=e;else{let h=!__dirname||__dirname==="/",a=!1;try{await pi.access(Vo,Ko.X_OK),a=!0}catch{}i=process.versions.electron||st==="android"||h||!a?"xdg-open":Vo}t.length>0&&r.push(...t),s.wait||(n.stdio="ignore",n.detached=!0)}s.target&&r.push(s.target),st==="darwin"&&t.length>0&&r.push("--args",...t);let o=gc.spawn(i,r,n);return s.wait?new Promise((h,a)=>{o.once("error",a),o.once("close",u=>{if(!s.allowNonzeroExitCode&&u>0){a(new Error(`Exited with code ${u}`));return}h(o)})}):(o.unref(),o)},qs=(s,e)=>{if(typeof s!="string")throw new TypeError("Expected a `target`");return mi({...e,target:s})},yc=(s,e)=>{if(typeof s!="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 mi({...e,app:{name:s,arguments:t}})};function Yo(s){if(typeof s=="string"||Array.isArray(s))return s;let{[qo]:e}=s;if(!e)throw new Error(`${qo} is not supported`);return e}function Zs({[st]:s},{wsl:e}){if(e&&di)return Yo(e);if(!s)throw new Error(`${st} is not supported`);return Yo(s)}var gi={};Vs(gi,"chrome",()=>Zs({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"]}}));Vs(gi,"firefox",()=>Zs({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Vs(gi,"edge",()=>Zs({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));qs.apps=gi;qs.openApp=yc;Xo.exports=qs});var sa=O((rp,ia)=>{"use strict";ia.exports=ea;function ea(s,e,t){s instanceof RegExp&&(s=Qo(s,t)),e instanceof RegExp&&(e=Qo(e,t));var i=ta(s,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+s.length,i[1]),post:t.slice(i[1]+e.length)}}function Qo(s,e){var t=e.match(s);return t?t[0]:null}ea.range=ta;function ta(s,e,t){var i,r,n,o,h,a=t.indexOf(s),u=t.indexOf(e,a+1),l=a;if(a>=0&&u>0){if(s===e)return[a,u];for(i=[],n=t.length;l>=0&&!h;)l==a?(i.push(l),a=t.indexOf(s,l+1)):i.length==1?h=[i.pop(),u]:(r=i.pop(),r<n&&(n=r,o=u),u=t.indexOf(e,l+1)),l=a<u&&a>=0?a:u;i.length&&(h=[n,o])}return h}});var ca=O((np,la)=>{var ra=sa();la.exports=vc;var na="\0SLASH"+Math.random()+"\0",oa="\0OPEN"+Math.random()+"\0",Ks="\0CLOSE"+Math.random()+"\0",aa="\0COMMA"+Math.random()+"\0",ha="\0PERIOD"+Math.random()+"\0";function Ys(s){return parseInt(s,10)==s?parseInt(s,10):s.charCodeAt(0)}function Sc(s){return s.split("\\\\").join(na).split("\\{").join(oa).split("\\}").join(Ks).split("\\,").join(aa).split("\\.").join(ha)}function xc(s){return s.split(na).join("\\").split(oa).join("{").split(Ks).join("}").split(aa).join(",").split(ha).join(".")}function ua(s){if(!s)return[""];var e=[],t=ra("{","}",s);if(!t)return s.split(",");var i=t.pre,r=t.body,n=t.post,o=i.split(",");o[o.length-1]+="{"+r+"}";var h=ua(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),e.push.apply(e,o),e}function vc(s){return s?(s.substr(0,2)==="{}"&&(s="\\{\\}"+s.substr(2)),Nt(Sc(s),!0).map(xc)):[]}function Cc(s){return"{"+s+"}"}function Oc(s){return/^-?0\d/.test(s)}function Tc(s,e){return s<=e}function Lc(s,e){return s>=e}function Nt(s,e){var t=[],i=ra("{","}",s);if(!i)return[s];var r=i.pre,n=i.post.length?Nt(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<n.length;o++){var h=r+"{"+i.body+"}"+n[o];t.push(h)}else{var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||u,c=i.body.indexOf(",")>=0;if(!l&&!c)return i.post.match(/,.*\}/)?(s=i.pre+"{"+i.body+Ks+i.post,Nt(s)):[s];var d;if(l)d=i.body.split(/\.\./);else if(d=ua(i.body),d.length===1&&(d=Nt(d[0],!1).map(Cc),d.length===1))return n.map(function(ye){return i.pre+d[0]+ye});var p;if(l){var m=Ys(d[0]),f=Ys(d[1]),b=Math.max(d[0].length,d[1].length),g=d.length==3?Math.abs(Ys(d[2])):1,E=Tc,C=f<m;C&&(g*=-1,E=Lc);var x=d.some(Oc);p=[];for(var T=m;E(T,f);T+=g){var I;if(u)I=String.fromCharCode(T),I==="\\"&&(I="");else if(I=String(T),x){var W=b-I.length;if(W>0){var X=new Array(W+1).join("0");T<0?I="-"+X+I.slice(1):I=X+I}}p.push(I)}}else{p=[];for(var B=0;B<d.length;B++)p.push.apply(p,Nt(d[B],!1))}for(var B=0;B<p.length;B++)for(var o=0;o<n.length;o++){var h=r+p[B]+n[o];(!e||l||h)&&t.push(h)}}return t}});var ah=O((ym,oh)=>{"use strict";function zf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var jf=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function nh(s){if(Buffer.isBuffer(s))return s;if(typeof s=="number")return Buffer.alloc(s);if(typeof s=="string")return Buffer.from(s);throw new Error("input must be buffer, number, or string, received "+typeof s)}function Hf(s){let e=nh(4);return e.writeInt32BE(s,0),e}function gr(s,e){s=nh(s),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let t=~~e^-1;for(var i=0;i<s.length;i++)t=jf[(t^s[i])&255]^t>>>8;return t^-1}function _r(){return Hf(gr.apply(null,arguments))}_r.signed=function(){return gr.apply(null,arguments)};_r.unsigned=function(){return gr.apply(null,arguments)>>>0};var Gf=_r,Vf=zf(Gf);oh.exports=Vf});var xh=O(xr=>{var hh=require("fs"),zi=require("stream").Transform,uh=require("stream").PassThrough,lh=require("zlib"),yr=require("util"),qf=require("events").EventEmitter,Zf=require("events").errorMonitor,ch=ah();xr.ZipFile=Ue;xr.dateToDosDateTime=Sh;yr.inherits(Ue,qf);function Ue(){this.outputStream=new uh,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(Zf,function(){this.errored=!0})}Ue.prototype.addFile=function(s,e,t){var i=this;if(e=Hi(e,!1),t==null&&(t={}),!ji(i)){var r=new N(e,!1,t);i.entries.push(r),hh.stat(s,function(n,o){if(n)return i.emit("error",n);if(!o.isFile())return i.emit("error",new Error("not a file: "+s));r.uncompressedSize=o.size,t.mtime==null&&r.setLastModDate(o.mtime),t.mode==null&&r.setFileAttributesMode(o.mode),r.setFileDataPumpFunction(function(){var h=hh.createReadStream(s);r.state=N.FILE_DATA_IN_PROGRESS,h.on("error",function(a){i.emit("error",a)}),fh(i,r,h)}),Me(i)})}};Ue.prototype.addReadStream=function(s,e,t){this.addReadStreamLazy(e,t,function(i){i(null,s)})};Ue.prototype.addReadStreamLazy=function(s,e,t){var i=this;if(typeof e=="function"&&(t=e,e=null),e==null&&(e={}),s=Hi(s,!1),!ji(i)){var r=new N(s,!1,e);i.entries.push(r),r.setFileDataPumpFunction(function(){t(function(n,o){if(n)return i.emit("error",n);r.state=N.FILE_DATA_IN_PROGRESS,fh(i,r,o)})}),Me(i)}};Ue.prototype.addBuffer=function(s,e,t){var i=this;if(e=Hi(e,!1),s.length>1073741823)throw new Error("buffer too large: "+s.length+" > 1073741823");if(t==null&&(t={}),t.size!=null)throw new Error("options.size not allowed");if(ji(i))return;var r=new N(e,!1,t);r.uncompressedSize=s.length,r.crc32=ch.unsigned(s),r.crcAndFileSizeKnown=!0,i.entries.push(r),r.compressionLevel===0?n(s):lh.deflateRaw(s,{level:r.compressionLevel},function(o,h){n(h)});function n(o){r.compressedSize=o.length,r.setFileDataPumpFunction(function(){Xe(i,o),Xe(i,r.getDataDescriptor()),r.state=N.FILE_DATA_DONE,setImmediate(function(){Me(i)})}),Me(i)}};Ue.prototype.addEmptyDirectory=function(s,e){var t=this;if(s=Hi(s,!0),e==null&&(e={}),e.size!=null)throw new Error("options.size not allowed");if(e.compress!=null)throw new Error("options.compress not allowed");if(e.compressionLevel!=null)throw new Error("options.compressionLevel not allowed");if(!ji(t)){var i=new N(s,!0,e);t.entries.push(i),i.setFileDataPumpFunction(function(){Xe(t,i.getDataDescriptor()),i.state=N.FILE_DATA_DONE,Me(t)}),Me(t)}};var Yf=Pe([80,75,5,6]);Ue.prototype.end=function(s,e){if(typeof s=="function"&&(e=s,s=null),s==null&&(s={}),!this.ended&&(this.ended=!0,!this.errored)){if(this.calculatedTotalSizeCallback=e,this.forceZip64Eocd=!!s.forceZip64Format,s.comment){if(typeof s.comment=="string"?this.comment=Qf(s.comment):this.comment=s.comment,this.comment.length>65535)throw new Error("comment is too large");if(qt(this.comment,Yf))throw new Error("comment contains end of central directory record signature")}else this.comment=Gi;Me(this)}};function Xe(s,e){s.outputStream.write(e),s.outputStreamCursor+=e.length}function fh(s,e,t){var i=new Sr,r=new $i,n=e.compressionLevel!==0?new lh.DeflateRaw({level:e.compressionLevel}):new uh,o=new $i;t.pipe(i).pipe(r).pipe(n).pipe(o).pipe(s.outputStream,{end:!1}),o.on("end",function(){if(e.crc32=i.crc32,e.uncompressedSize==null)e.uncompressedSize=r.byteCount;else if(e.uncompressedSize!==r.byteCount)return s.emit("error",new Error("file data stream has unexpected number of bytes"));e.compressedSize=o.byteCount,s.outputStreamCursor+=e.compressedSize,Xe(s,e.getDataDescriptor()),e.state=N.FILE_DATA_DONE,Me(s)})}function Kf(s){if(s.compress!=null&&s.compressionLevel!=null&&!!s.compress!=!!s.compressionLevel)throw new Error("conflicting settings for compress and compressionLevel");return s.compressionLevel!=null?s.compressionLevel:s.compress===!1?0:6}function Me(s){if(s.allDone||s.errored)return;if(s.ended&&s.calculatedTotalSizeCallback!=null){var e=Xf(s);e!=null&&(s.calculatedTotalSizeCallback(e),s.calculatedTotalSizeCallback=null)}var t=i();function i(){for(var n=0;n<s.entries.length;n++){var o=s.entries[n];if(o.state<N.FILE_DATA_DONE)return o}return null}if(t!=null){if(t.state<N.READY_TO_PUMP_FILE_DATA||t.state===N.FILE_DATA_IN_PROGRESS)return;t.relativeOffsetOfLocalHeader=s.outputStreamCursor;var r=t.getLocalFileHeader();Xe(s,r),t.doFileDataPump()}else s.ended&&(s.offsetOfStartOfCentralDirectory=s.outputStreamCursor,s.entries.forEach(function(n){var o=n.getCentralDirectoryRecord();Xe(s,o)}),Xe(s,Jf(s)),s.outputStream.end(),s.allDone=!0)}function Xf(s){for(var e=0,t=0,i=0;i<s.entries.length;i++){var r=s.entries[i];if(r.compressionLevel!==0)return-1;if(r.state>=N.READY_TO_PUMP_FILE_DATA){if(r.uncompressedSize==null)return-1}else if(r.uncompressedSize==null)return null;r.relativeOffsetOfLocalHeader=e;var n=r.useZip64Format();e+=dh+r.utf8FileName.length,e+=r.uncompressedSize,r.crcAndFileSizeKnown||(n?e+=Eh:e+=wh),t+=yh+r.utf8FileName.length+r.fileComment.length,n&&(t+=wr)}var o=0;return(s.forceZip64Eocd||s.entries.length>=65535||t>=65535||e>=4294967295)&&(o+=Bi+br),o+=Wi+s.comment.length,e+t+o}function ji(s){if(s.ended)throw new Error("cannot add entries after calling end()");return!!s.errored}var Bi=56,br=20,Wi=22;function Jf(s,e){var t=!1,i=s.entries.length;(s.forceZip64Eocd||s.entries.length>=65535)&&(i=65535,t=!0);var r=s.outputStreamCursor-s.offsetOfStartOfCentralDirectory,n=r;(s.forceZip64Eocd||r>=4294967295)&&(n=4294967295,t=!0);var o=s.offsetOfStartOfCentralDirectory;if((s.forceZip64Eocd||s.offsetOfStartOfCentralDirectory>=4294967295)&&(o=4294967295,t=!0),e)return t?Bi+br+Wi:Wi;var h=K(Wi+s.comment.length);if(h.writeUInt32LE(101010256,0),h.writeUInt16LE(0,4),h.writeUInt16LE(0,6),h.writeUInt16LE(i,8),h.writeUInt16LE(i,10),h.writeUInt32LE(n,12),h.writeUInt32LE(o,16),h.writeUInt16LE(s.comment.length,20),s.comment.copy(h,22),!t)return h;var a=K(Bi);a.writeUInt32LE(101075792,0),me(a,Bi-12,4),a.writeUInt16LE(gh,12),a.writeUInt16LE(mh,14),a.writeUInt32LE(0,16),a.writeUInt32LE(0,20),me(a,s.entries.length,24),me(a,s.entries.length,32),me(a,r,40),me(a,s.offsetOfStartOfCentralDirectory,48);var u=K(br);return u.writeUInt32LE(117853008,0),u.writeUInt32LE(0,4),me(u,s.outputStreamCursor,8),u.writeUInt32LE(1,16),Buffer.concat([a,u,h])}function Hi(s,e){if(s==="")throw new Error("empty metadataPath");if(s=s.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(s)||/^\//.test(s))throw new Error("absolute path: "+s);if(s.split("/").indexOf("..")!==-1)throw new Error("invalid relative path: "+s);var t=/\/$/.test(s);if(e)t||(s+="/");else if(t)throw new Error("file path cannot end with '/': "+s);return s}var Gi=K(0);function N(s,e,t){if(this.utf8FileName=Pe(s),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=e,this.state=N.WAITING_FOR_METADATA,this.setLastModDate(t.mtime!=null?t.mtime:new Date),t.mode!=null?this.setFileAttributesMode(t.mode):this.setFileAttributesMode(e?16893:33204),e?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,t.size!=null&&(this.uncompressedSize=t.size)),e?this.compressionLevel=0:this.compressionLevel=Kf(t),this.forceZip64Format=!!t.forceZip64Format,t.fileComment){if(typeof t.fileComment=="string"?this.fileComment=Pe(t.fileComment,"utf-8"):this.fileComment=t.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=Gi}N.WAITING_FOR_METADATA=0;N.READY_TO_PUMP_FILE_DATA=1;N.FILE_DATA_IN_PROGRESS=2;N.FILE_DATA_DONE=3;N.prototype.setLastModDate=function(s){var e=Sh(s);this.lastModFileTime=e.time,this.lastModFileDate=e.date};N.prototype.setFileAttributesMode=function(s){if((s&65535)!==s)throw new Error("invalid mode. expected: 0 <= "+s+" <= 65535");this.externalFileAttributes=s<<16>>>0};N.prototype.setFileDataPumpFunction=function(s){this.doFileDataPump=s,this.state=N.READY_TO_PUMP_FILE_DATA};N.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var dh=30,ph=20,mh=45,gh=831,_h=2048,bh=8;N.prototype.getLocalFileHeader=function(){var s=0,e=0,t=0;this.crcAndFileSizeKnown&&(s=this.crc32,e=this.compressedSize,t=this.uncompressedSize);var i=K(dh),r=_h;return this.crcAndFileSizeKnown||(r|=bh),i.writeUInt32LE(67324752,0),i.writeUInt16LE(ph,4),i.writeUInt16LE(r,6),i.writeUInt16LE(this.getCompressionMethod(),8),i.writeUInt16LE(this.lastModFileTime,10),i.writeUInt16LE(this.lastModFileDate,12),i.writeUInt32LE(s,14),i.writeUInt32LE(e,18),i.writeUInt32LE(t,22),i.writeUInt16LE(this.utf8FileName.length,26),i.writeUInt16LE(0,28),Buffer.concat([i,this.utf8FileName])};var wh=16,Eh=24;N.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return Gi;if(this.useZip64Format()){var s=K(Eh);return s.writeUInt32LE(134695760,0),s.writeUInt32LE(this.crc32,4),me(s,this.compressedSize,8),me(s,this.uncompressedSize,16),s}else{var s=K(wh);return s.writeUInt32LE(134695760,0),s.writeUInt32LE(this.crc32,4),s.writeUInt32LE(this.compressedSize,8),s.writeUInt32LE(this.uncompressedSize,12),s}};var yh=46,wr=28;N.prototype.getCentralDirectoryRecord=function(){var s=K(yh),e=_h;this.crcAndFileSizeKnown||(e|=bh);var t=this.compressedSize,i=this.uncompressedSize,r=this.relativeOffsetOfLocalHeader,n,o;return this.useZip64Format()?(t=4294967295,i=4294967295,r=4294967295,n=mh,o=K(wr),o.writeUInt16LE(1,0),o.writeUInt16LE(wr-4,2),me(o,this.uncompressedSize,4),me(o,this.compressedSize,12),me(o,this.relativeOffsetOfLocalHeader,20)):(n=ph,o=Gi),s.writeUInt32LE(33639248,0),s.writeUInt16LE(gh,4),s.writeUInt16LE(n,6),s.writeUInt16LE(e,8),s.writeUInt16LE(this.getCompressionMethod(),10),s.writeUInt16LE(this.lastModFileTime,12),s.writeUInt16LE(this.lastModFileDate,14),s.writeUInt32LE(this.crc32,16),s.writeUInt32LE(t,20),s.writeUInt32LE(i,24),s.writeUInt16LE(this.utf8FileName.length,28),s.writeUInt16LE(o.length,30),s.writeUInt16LE(this.fileComment.length,32),s.writeUInt16LE(0,34),s.writeUInt16LE(0,36),s.writeUInt32LE(this.externalFileAttributes,38),s.writeUInt32LE(r,42),Buffer.concat([s,this.utf8FileName,o,this.fileComment])};N.prototype.getCompressionMethod=function(){var s=0,e=8;return this.compressionLevel===0?s:e};function Sh(s){var e=0;e|=s.getDate()&31,e|=(s.getMonth()+1&15)<<5,e|=(s.getFullYear()-1980&127)<<9;var t=0;return t|=Math.floor(s.getSeconds()/2),t|=(s.getMinutes()&63)<<5,t|=(s.getHours()&31)<<11,{date:e,time:t}}function me(s,e,t){var i=Math.floor(e/4294967296),r=e%4294967296;s.writeUInt32LE(r,t),s.writeUInt32LE(i,t+4)}yr.inherits($i,zi);function $i(s){zi.call(this,s),this.byteCount=0}$i.prototype._transform=function(s,e,t){this.byteCount+=s.length,t(null,s)};yr.inherits(Sr,zi);function Sr(s){zi.call(this,s),this.crc32=0}Sr.prototype._transform=function(s,e,t){this.crc32=ch.unsigned(s,this.crc32),t(null,s)};var Er="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";if(Er.length!==256)throw new Error("assertion failure");var Ui=null;function Qf(s){if(/^[\x20-\x7e]*$/.test(s))return Pe(s,"utf-8");if(Ui==null){Ui={};for(var e=0;e<Er.length;e++)Ui[Er[e]]=e}for(var t=K(s.length),e=0;e<s.length;e++){var i=Ui[s[e]];if(i==null)throw new Error("character not encodable in CP437: "+JSON.stringify(s[e]));t[e]=i}return t}function K(s){K=e;try{return K(s)}catch{return K=t,K(s)}function e(i){return Buffer.allocUnsafe(i)}function t(i){return new Buffer(i)}}function Pe(s,e){Pe=t;try{return Pe(s,e)}catch{return Pe=i,Pe(s,e)}function t(r,n){return Buffer.from(r,n)}function i(r,n){return new Buffer(r,n)}}function qt(s,e){qt=t;try{return qt(s,e)}catch{return qt=i,qt(s,e)}function t(r,n){return r.includes(n)}function i(r,n){for(var o=0;o<=r.length-n.length;o++)for(var h=0;;h++){if(h===n.length)return!0;if(r[o+h]!==n[h])break}return!1}}});var Ah=O((vm,Lh)=>{var ae=require("fs"),ed=require("util"),gt=require("path"),Ir=require("events"),vh=require("zlib"),Th=require("stream"),w={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSIGFIRST:80,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,MAXFILECOMMENT:65535,ENDL64HDR:20,ENDL64SIG:117853008,ENDL64SIGFIRST:80,ENDL64OFS:8,END64HDR:56,END64SIG:101075792,END64SIGFIRST:80,END64SUB:24,END64TOT:32,END64SIZ:40,END64OFF:48,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FLG_ENTRY_ENC:1,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535},ze=function(s){let e,t,i,r,n,o,a=this,u=s.storeEntries!==!1?{}:null,l=s.file,c=s.nameEncoding?new TextDecoder(s.nameEncoding):null;d();function d(){s.fd?(e=s.fd,p()):ae.open(l,"r",(_,y)=>{if(_)return a.emit("error",_);e=y,p()})}function p(){ae.fstat(e,(_,y)=>{if(_)return a.emit("error",_);t=y.size,i=s.chunkSize||Math.round(t/1e3),i=Math.max(Math.min(i,Math.min(128*1024,t)),Math.min(1024,t)),f()})}function m(_,y){if(_||!y)return a.emit("error",_||new Error("Archive read error"));let v=r.lastPos,S=v-r.win.position,A=r.win.buffer,L=r.minPos;for(;--v>=L&&--S>=0;)if(A.length-S>=4&&A[S]===r.firstByte&&A.readUInt32LE(S)===r.sig){r.lastBufferPosition=S,r.lastBytesRead=y,r.complete();return}if(v===L)return a.emit("error",new Error("Bad archive"));if(r.lastPos=v+1,r.chunkSize*=2,v<=L)return a.emit("error",new Error("Bad archive"));let P=Math.min(r.chunkSize,v-L);r.win.expandLeft(P,m)}function f(){let _=Math.min(w.ENDHDR+w.MAXFILECOMMENT,t);r={win:new Vi(e),totalReadLength:_,minPos:t-_,lastPos:t,chunkSize:Math.min(1024,i),firstByte:w.ENDSIGFIRST,sig:w.ENDSIG,complete:b},r.win.read(t-r.chunkSize,r.chunkSize,m)}function b(){let _=r.win.buffer,y=r.lastBufferPosition;try{n=new vr,n.read(_.slice(y,y+w.ENDHDR)),n.headerOffset=r.win.position+y,n.commentLength?a.comment=_.slice(y+w.ENDHDR,y+w.ENDHDR+n.commentLength).toString():a.comment=null,a.entriesCount=n.volumeEntries,a.centralDirectory=n,n.volumeEntries===w.EF_ZIP64_OR_16&&n.totalEntries===w.EF_ZIP64_OR_16||n.size===w.EF_ZIP64_OR_32||n.offset===w.EF_ZIP64_OR_32?g():(r={},x())}catch(v){a.emit("error",v)}}function g(){let _=w.ENDL64HDR;r.lastBufferPosition>_?(r.lastBufferPosition-=_,E()):(r={win:r.win,totalReadLength:_,minPos:r.win.position-_,lastPos:r.win.position,chunkSize:r.chunkSize,firstByte:w.ENDL64SIGFIRST,sig:w.ENDL64SIG,complete:E},r.win.read(r.lastPos-r.chunkSize,r.chunkSize,m))}function E(){let _=r.win.buffer,y=new Cr;y.read(_.slice(r.lastBufferPosition,r.lastBufferPosition+w.ENDL64HDR));let v=t-y.headerOffset;r={win:r.win,totalReadLength:v,minPos:y.headerOffset,lastPos:r.lastPos,chunkSize:r.chunkSize,firstByte:w.END64SIGFIRST,sig:w.END64SIG,complete:C},r.win.read(t-r.chunkSize,r.chunkSize,m)}function C(){let _=r.win.buffer,y=new Or;y.read(_.slice(r.lastBufferPosition,r.lastBufferPosition+w.END64HDR)),a.centralDirectory.volumeEntries=y.volumeEntries,a.centralDirectory.totalEntries=y.totalEntries,a.centralDirectory.size=y.size,a.centralDirectory.offset=y.offset,a.entriesCount=y.volumeEntries,r={},x()}function x(){r={win:new Vi(e),pos:n.offset,chunkSize:i,entriesLeft:n.volumeEntries},r.win.read(r.pos,Math.min(i,t-r.pos),T)}function T(_,y){if(_||!y)return a.emit("error",_||new Error("Entries read error"));let v=r.pos-r.win.position,S=r.entry,A=r.win.buffer,L=A.length;try{for(;r.entriesLeft>0;){S||(S=new Tr,S.readHeader(A,v),S.headerOffset=r.win.position+v,r.entry=S,r.pos+=w.CENHDR,v+=w.CENHDR);let P=S.fnameLen+S.extraLen+S.comLen,U=P+(r.entriesLeft>1?w.CENHDR:0);if(L-v<U){r.win.moveRight(i,T,v),r.move=!0;return}S.read(A,v,c),s.skipEntryNameValidation||S.validateName(),u&&(u[S.name]=S),a.emit("entry",S),r.entry=S=null,r.entriesLeft--,r.pos+=P,v+=P}a.emit("ready")}catch(P){a.emit("error",P)}}function I(){if(!u)throw new Error("storeEntries disabled")}Object.defineProperty(this,"ready",{get(){return!1}}),this.entry=function(_){return I(),u[_]},this.entries=function(){return I(),u},this.stream=function(_,y){return this.openEntry(_,(v,S)=>{if(v)return y(v);let A=W(S),L=new Lr(e,A,S.compressedSize);if(S.method!==w.STORED)if(S.method===w.DEFLATED)L=L.pipe(vh.createInflateRaw());else return y(new Error("Unknown compression method: "+S.method));X(S)&&(L=L.pipe(new Ar(L,S.crc,S.size))),y(null,L)},!1)},this.entryDataSync=function(_){let y=null;if(this.openEntry(_,(S,A)=>{y=S,_=A},!0),y)throw y;let v=Buffer.alloc(_.compressedSize);if(new We(e,v,0,_.compressedSize,W(_),S=>{y=S}).read(!0),y)throw y;if(_.method!==w.STORED)if(_.method===w.DEFLATED||_.method===w.ENHANCED_DEFLATED)v=vh.inflateRawSync(v);else throw new Error("Unknown compression method: "+_.method);if(v.length!==_.size)throw new Error("Invalid size");return X(_)&&new qi(_.crc,_.size).data(v),v},this.openEntry=function(_,y,v){if(typeof _=="string"&&(I(),_=u[_],!_))return y(new Error("Entry not found"));if(!_.isFile)return y(new Error("Entry is not file"));if(!e)return y(new Error("Archive closed"));let S=Buffer.alloc(w.LOCHDR);new We(e,S,0,S.length,_.offset,A=>{if(A)return y(A);let L;try{_.readDataHeader(S),_.encrypted&&(L=new Error("Entry encrypted"))}catch(P){L=P}y(L,_)}).read(v)};function W(_){return _.offset+w.LOCHDR+_.fnameLen+_.extraLen}function X(_){return(_.flags&8)!==8}function B(_,y,v){a.stream(_,(S,A)=>{if(S)v(S);else{let L,P;A.on("error",U=>{P=U,L&&(A.unpipe(L),L.close(()=>{v(U)}))}),ae.open(y,"w",(U,ue)=>{if(U)return v(U);if(P){ae.close(e,()=>{v(P)});return}L=ae.createWriteStream(y,{fd:ue}),L.on("finish",()=>{a.emit("extract",_,y),P||v()}),A.pipe(L)})}})}function ye(_,y,v){if(!y.length)return v();let S=y.shift();S=gt.join(_,gt.join(...S)),ae.mkdir(S,{recursive:!0},A=>{if(A&&A.code!=="EEXIST")return v(A);ye(_,y,v)})}function Ki(_,y,v,S,A){if(!v.length)return S(null,A);let L=v.shift(),P=gt.join(_,L.name.replace(y,""));B(L,P,U=>{if(U)return S(U,A);Ki(_,y,v,S,A+1)})}this.extract=function(_,y,v){let S=_||"";if(typeof _=="string"&&(_=this.entry(_),_?S=_.name:S.length&&S[S.length-1]!=="/"&&(S+="/")),!_||_.isDirectory){let A=[],L=[],P={};for(let U in u)if(Object.prototype.hasOwnProperty.call(u,U)&&U.lastIndexOf(S,0)===0){let ue=U.replace(S,""),Dr=u[U];if(Dr.isFile&&(A.push(Dr),ue=gt.dirname(ue)),ue&&!P[ue]&&ue!=="."){P[ue]=!0;let Ae=ue.split("/").filter(_t=>_t);for(Ae.length&&L.push(Ae);Ae.length>1;){Ae=Ae.slice(0,Ae.length-1);let _t=Ae.join("/");if(P[_t]||_t===".")break;P[_t]=!0,L.push(Ae)}}}L.sort((U,ue)=>U.length-ue.length),L.length?ye(y,L,U=>{U?v(U):Ki(y,S,A,v,0)}):Ki(y,S,A,v,0)}else ae.stat(y,(A,L)=>{L&&L.isDirectory()?B(_,gt.join(y,gt.basename(_.name)),v):B(_,y,v)})},this.close=function(_){o||!e?(o=!0,_&&_()):(o=!0,ae.close(e,y=>{e=null,_&&_(y)}))};let Bh=Ir.EventEmitter.prototype.emit;this.emit=function(..._){if(!o)return Bh.call(this,..._)}};ze.setFs=function(s){ae=s};ze.debugLog=(...s)=>{ze.debug&&console.log(...s)};ed.inherits(ze,Ir.EventEmitter);var Be=Symbol("zip");ze.async=class extends Ir.EventEmitter{constructor(e){super();let t=new ze(e);t.on("entry",i=>this.emit("entry",i)),t.on("extract",(i,r)=>this.emit("extract",i,r)),this[Be]=new Promise((i,r)=>{t.on("ready",()=>{t.removeListener("error",r),i(t)}),t.on("error",r)})}get entriesCount(){return this[Be].then(e=>e.entriesCount)}get comment(){return this[Be].then(e=>e.comment)}async entry(e){return(await this[Be]).entry(e)}async entries(){return(await this[Be]).entries()}async stream(e){let t=await this[Be];return new Promise((i,r)=>{t.stream(e,(n,o)=>{n?r(n):i(o)})})}async entryData(e){let t=await this.stream(e);return new Promise((i,r)=>{let n=[];t.on("data",o=>n.push(o)),t.on("end",()=>{i(Buffer.concat(n))}),t.on("error",o=>{t.removeAllListeners("end"),r(o)})})}async extract(e,t){let i=await this[Be];return new Promise((r,n)=>{i.extract(e,t,(o,h)=>{o?n(o):r(h)})})}async close(){let e=await this[Be];return new Promise((t,i)=>{e.close(r=>{r?i(r):t()})})}};var vr=class{read(e){if(e.length!==w.ENDHDR||e.readUInt32LE(0)!==w.ENDSIG)throw new Error("Invalid central directory");this.volumeEntries=e.readUInt16LE(w.ENDSUB),this.totalEntries=e.readUInt16LE(w.ENDTOT),this.size=e.readUInt32LE(w.ENDSIZ),this.offset=e.readUInt32LE(w.ENDOFF),this.commentLength=e.readUInt16LE(w.ENDCOM)}},Cr=class{read(e){if(e.length!==w.ENDL64HDR||e.readUInt32LE(0)!==w.ENDL64SIG)throw new Error("Invalid zip64 central directory locator");this.headerOffset=$e(e,w.ENDSUB)}},Or=class{read(e){if(e.length!==w.END64HDR||e.readUInt32LE(0)!==w.END64SIG)throw new Error("Invalid central directory");this.volumeEntries=$e(e,w.END64SUB),this.totalEntries=$e(e,w.END64TOT),this.size=$e(e,w.END64SIZ),this.offset=$e(e,w.END64OFF)}},Tr=class{readHeader(e,t){if(e.length<t+w.CENHDR||e.readUInt32LE(t)!==w.CENSIG)throw new Error("Invalid entry header");this.verMade=e.readUInt16LE(t+w.CENVEM),this.version=e.readUInt16LE(t+w.CENVER),this.flags=e.readUInt16LE(t+w.CENFLG),this.method=e.readUInt16LE(t+w.CENHOW);let i=e.readUInt16LE(t+w.CENTIM),r=e.readUInt16LE(t+w.CENTIM+2);this.time=Ch(i,r),this.crc=e.readUInt32LE(t+w.CENCRC),this.compressedSize=e.readUInt32LE(t+w.CENSIZ),this.size=e.readUInt32LE(t+w.CENLEN),this.fnameLen=e.readUInt16LE(t+w.CENNAM),this.extraLen=e.readUInt16LE(t+w.CENEXT),this.comLen=e.readUInt16LE(t+w.CENCOM),this.diskStart=e.readUInt16LE(t+w.CENDSK),this.inattr=e.readUInt16LE(t+w.CENATT),this.attr=e.readUInt32LE(t+w.CENATX),this.offset=e.readUInt32LE(t+w.CENOFF)}readDataHeader(e){if(e.readUInt32LE(0)!==w.LOCSIG)throw new Error("Invalid local header");this.version=e.readUInt16LE(w.LOCVER),this.flags=e.readUInt16LE(w.LOCFLG),this.method=e.readUInt16LE(w.LOCHOW);let t=e.readUInt16LE(w.LOCTIM),i=e.readUInt16LE(w.LOCTIM+2);this.time=Ch(t,i),this.crc=e.readUInt32LE(w.LOCCRC)||this.crc;let r=e.readUInt32LE(w.LOCSIZ);r&&r!==w.EF_ZIP64_OR_32&&(this.compressedSize=r);let n=e.readUInt32LE(w.LOCLEN);n&&n!==w.EF_ZIP64_OR_32&&(this.size=n),this.fnameLen=e.readUInt16LE(w.LOCNAM),this.extraLen=e.readUInt16LE(w.LOCEXT)}read(e,t,i){let r=e.slice(t,t+=this.fnameLen);this.name=i?i.decode(new Uint8Array(r)):r.toString("utf8");let n=e[t-1];this.isDirectory=n===47||n===92,this.extraLen&&(this.readExtra(e,t),t+=this.extraLen),this.comment=this.comLen?e.slice(t,t+this.comLen).toString():null}validateName(){if(/\\|^\w+:|^\/|(^|\/)\.\.(\/|$)/.test(this.name))throw new Error("Malicious entry: "+this.name)}readExtra(e,t){let i,r,n=t+this.extraLen;for(;t<n;)i=e.readUInt16LE(t),t+=2,r=e.readUInt16LE(t),t+=2,w.ID_ZIP64===i&&this.parseZip64Extra(e,t,r),t+=r}parseZip64Extra(e,t,i){i>=8&&this.size===w.EF_ZIP64_OR_32&&(this.size=$e(e,t),t+=8,i-=8),i>=8&&this.compressedSize===w.EF_ZIP64_OR_32&&(this.compressedSize=$e(e,t),t+=8,i-=8),i>=8&&this.offset===w.EF_ZIP64_OR_32&&(this.offset=$e(e,t),t+=8,i-=8),i>=4&&this.diskStart===w.EF_ZIP64_OR_16&&(this.diskStart=e.readUInt32LE(t))}get encrypted(){return(this.flags&w.FLG_ENTRY_ENC)===w.FLG_ENTRY_ENC}get isFile(){return!this.isDirectory}},We=class{constructor(e,t,i,r,n,o){this.fd=e,this.buffer=t,this.offset=i,this.length=r,this.position=n,this.callback=o,this.bytesRead=0,this.waiting=!1}read(e){ze.debugLog("read",this.position,this.bytesRead,this.length,this.offset),this.waiting=!0;let t;if(e){let i=0;try{i=ae.readSync(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead)}catch(r){t=r}this.readCallback(e,t,t?i:null)}else ae.read(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead,this.readCallback.bind(this,e))}readCallback(e,t,i){if(typeof i=="number"&&(this.bytesRead+=i),t||!i||this.bytesRead===this.length)return this.waiting=!1,this.callback(t,this.bytesRead);this.read(e)}},Vi=class{constructor(e){this.position=0,this.buffer=Buffer.alloc(0),this.fd=e,this.fsOp=null}checkOp(){if(this.fsOp&&this.fsOp.waiting)throw new Error("Operation in progress")}read(e,t,i){this.checkOp(),this.buffer.length<t&&(this.buffer=Buffer.alloc(t)),this.position=e,this.fsOp=new We(this.fd,this.buffer,0,t,this.position,i).read()}expandLeft(e,t){this.checkOp(),this.buffer=Buffer.concat([Buffer.alloc(e),this.buffer]),this.position-=e,this.position<0&&(this.position=0),this.fsOp=new We(this.fd,this.buffer,0,e,this.position,t).read()}expandRight(e,t){this.checkOp();let i=this.buffer.length;this.buffer=Buffer.concat([this.buffer,Buffer.alloc(e)]),this.fsOp=new We(this.fd,this.buffer,i,e,this.position+i,t).read()}moveRight(e,t,i){this.checkOp(),i?this.buffer.copy(this.buffer,0,i):i=0,this.position+=i,this.fsOp=new We(this.fd,this.buffer,this.buffer.length-i,i,this.position+this.buffer.length-i,t).read()}},Lr=class extends Th.Readable{constructor(e,t,i){super(),this.fd=e,this.offset=t,this.length=i,this.pos=0,this.readCallback=this.readCallback.bind(this)}_read(e){let t=Buffer.alloc(Math.min(e,this.length-this.pos));t.length?ae.read(this.fd,t,0,t.length,this.offset+this.pos,this.readCallback):this.push(null)}readCallback(e,t,i){this.pos+=t,e?(this.emit("error",e),this.push(null)):t?(t!==i.length&&(i=i.slice(0,t)),this.push(i)):this.push(null)}},Ar=class extends Th.Transform{constructor(e,t,i){super(),this.verify=new qi(t,i),e.on("error",r=>{this.emit("error",r)})}_transform(e,t,i){let r;try{this.verify.data(e)}catch(n){r=n}i(r,e)}},qi=class s{constructor(e,t){this.crc=e,this.size=t,this.state={crc:-1,size:0}}data(e){let t=s.getCrcTable(),i=this.state.crc,r=0,n=e.length;for(;--n>=0;)i=t[(i^e[r++])&255]^i>>>8;if(this.state.crc=i,this.state.size+=e.length,this.state.size>=this.size){let o=Buffer.alloc(4);if(o.writeInt32LE(~this.state.crc&4294967295,0),i=o.readUInt32LE(0),i!==this.crc)throw new Error("Invalid CRC");if(this.state.size!==this.size)throw new Error("Invalid size")}}static getCrcTable(){let e=s.crcTable;if(!e){s.crcTable=e=[];let t=Buffer.alloc(4);for(let i=0;i<256;i++){let r=i;for(let n=8;--n>=0;)r&1?r=3988292384^r>>>1:r=r>>>1;r<0&&(t.writeInt32LE(r,0),r=t.readUInt32LE(0)),e[i]=r}}return e}};function Ch(s,e){let t=Oh(s,16),i=Oh(e,16),r={h:parseInt(t.slice(0,5).join(""),2),m:parseInt(t.slice(5,11).join(""),2),s:parseInt(t.slice(11,16).join(""),2)*2,Y:parseInt(i.slice(0,7).join(""),2)+1980,M:parseInt(i.slice(7,11).join(""),2),D:parseInt(i.slice(11,16).join(""),2)},n=[r.Y,r.M,r.D].join("-")+" "+[r.h,r.m,r.s].join(":")+" GMT+0";return new Date(n).getTime()}function Oh(s,e){let t=(s>>>0).toString(2);for(;t.length<e;)t="0"+t;return t.split("")}function $e(s,e){return s.readUInt32LE(e+4)*4294967296+s.readUInt32LE(e)}Lh.exports=ze});var nd={};Gh(nd,{StackUtils:()=>Rh.default,StreamZip:()=>Uh.async,WebSocket:()=>_o,WebSocketServer:()=>Os.default,ZipFile:()=>Mh.ZipFile,codeFrameColumns:()=>kh.codeFrameColumns,findUpSync:()=>rh,glob:()=>ki,open:()=>Ph.default,program:()=>Uo,sanitize:()=>Fh.default,supportsColor:()=>Dh});module.exports=Vh(nd);var Rh=k(Br()),kh=k(ln());var Ml=k(pn(),1),Ul=k(ps(),1),Bl=k(_s(),1),go=k(vs(),1),Os=k(mo(),1);var _o=go.default;var Fh=k(vo());var Mo=k(Po(),1),{program:Uo,createCommand:jd,createArgument:Hd,createOption:Gd,CommanderError:Vd,InvalidArgumentError:qd,InvalidOptionArgumentError:Zd,Command:Yd,Argument:Kd,Option:Xd,Help:Jd}=Mo.default;var Ph=k(Jo());var wa=k(ca(),1);var Dt=s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")};var Ac={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Rt=s=>s.replace(/[[\]\\-]/g,"\\$&"),Ic=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fa=s=>s.join(""),da=(s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],r=[],n=t+1,o=!1,h=!1,a=!1,u=!1,l=t,c="";e:for(;n<s.length;){let f=s.charAt(n);if((f==="!"||f==="^")&&n===t+1){u=!0,n++;continue}if(f==="]"&&o&&!a){l=n+1;break}if(o=!0,f==="\\"&&!a){a=!0,n++;continue}if(f==="["&&!a){for(let[b,[g,E,C]]of Object.entries(Ac))if(s.startsWith(b,n)){if(c)return["$.",!1,s.length-t,!0];n+=b.length,C?r.push(g):i.push(g),h=h||E;continue e}}if(a=!1,c){f>c?i.push(Rt(c)+"-"+Rt(f)):f===c&&i.push(Rt(f)),c="",n++;continue}if(s.startsWith("-]",n+1)){i.push(Rt(f+"-")),n+=2;continue}if(s.startsWith("-",n+1)){c=f,n+=2;continue}i.push(Rt(f)),n++}if(l<n)return["",!1,0,!1];if(!i.length&&!r.length)return["$.",!1,s.length-t,!0];if(r.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let f=i[0].length===2?i[0].slice(-1):i[0];return[Ic(f),!1,l-t,!1]}let d="["+(u?"^":"")+fa(i)+"]",p="["+(u?"":"^")+fa(r)+"]";return[i.length&&r.length?"("+d+"|"+p+")":i.length?d:p,h,l-t,!0]};var ce=(s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Nc=new Set(["!","?","+","*","@"]),pa=s=>Nc.has(s),Dc="(?!(?:^|/)\\.\\.?(?:$|/))",_i="(?!\\.)",Rc=new Set(["[","."]),kc=new Set(["..","."]),Fc=new Set("().*{}+?[]^$\\!"),Pc=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xs="[^/]",ma=Xs+"*?",ga=Xs+"+?",rt=class s{type;#e;#t;#n=!1;#s=[];#o;#E;#u;#c=!1;#a;#h;#r=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#c&&this.#u.push(this),this.#E=this.#o?this.#o.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#s)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#s.map(e=>String(e)).join("|")+")":this.#h=this.#s.map(e=>String(e)).join("")}#g(){if(this!==this.#e)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let r=t.#E+1;!i.type&&r<i.#s.length;r++)for(let n of e.#s){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(i.#s[r])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#o===this))throw new Error("invalid part: "+t);this.#s.push(t)}}toJSON(){var t;let e=this.type===null?this.#s.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#s.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&((t=this.#o)==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(this.#e===this)return!0;if(!((t=this.#o)!=null&&t.isStart()))return!1;if(this.#E===0)return!0;let e=this.#o;for(let i=0;i<this.#E;i++){let r=e.#s[i];if(!(r instanceof s&&r.type==="!"))return!1}return!0}isEnd(){var t,i,r;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((i=this.#o)!=null&&i.isEnd()))return!1;if(!this.type)return(r=this.#o)==null?void 0:r.isEnd();let e=this.#o?this.#o.#s.length:0;return this.#E===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let i of this.#s)t.copyIn(i);return t}static#_(e,t,i,r){let n=!1,o=!1,h=-1,a=!1;if(t.type===null){let p=i,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===h+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===h+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,h=p,a=!1,m+=f;continue}if(!r.noext&&pa(f)&&e.charAt(p)==="("){t.push(m),m="";let b=new s(f,t);p=s.#_(e,b,p,r),t.push(b);continue}m+=f}return t.push(m),p}let u=i+1,l=new s(null,t),c=[],d="";for(;u<e.length;){let p=e.charAt(u++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){u===h+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(u===h+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,h=u,a=!1,d+=p;continue}if(pa(p)&&e.charAt(u)==="("){l.push(d),d="";let m=new s(p,l);l.push(m),u=s.#_(e,m,u,r);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new s(null,t);continue}if(p===")")return d===""&&t.#s.length===0&&(t.#r=!0),l.push(d),d="",t.push(...c,l),u;d+=p}return t.type=null,t.#t=void 0,t.#s=[e.substring(i-1)],u}static fromGlob(e,t={}){let i=new s(null,void 0,t);return s.#_(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,r,n]=this.toRegExpSource();if(!(r||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let h=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,h),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){var a;let t=e??!!this.#a.dot;if(this.#e===this&&this.#g(),!this.type){let u=this.isStart()&&this.isEnd(),l=this.#s.map(m=>{let[f,b,g,E]=typeof m=="string"?s.#f(m,this.#t,u):m.toRegExpSource(e);return this.#t=this.#t||g,this.#n=this.#n||E,f}).join(""),c="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&kc.has(this.#s[0]))){let f=Rc,b=t&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),g=!t&&!e&&f.has(l.charAt(0));c=b?Dc:g?_i:""}let d="";return this.isEnd()&&this.#e.#c&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,ce(l),this.#t=!!this.#t,this.#n]}let i=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let u=this.toString();return this.#s=[u],this.type=null,this.#t=void 0,[u,ce(this.toString()),!1,!1]}let o=!i||e||t||!_i?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let h="";if(this.type==="!"&&this.#r)h=(this.isStart()&&!t?_i:"")+ga;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?_i:"")+ma+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=r+n+u}return[h,ce(n),this.#t=!!this.#t,this.#n]}#d(e){return this.#s.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,r,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,i=!1){let r=!1,n="",o=!1;for(let h=0;h<e.length;h++){let a=e.charAt(h);if(r){r=!1,n+=(Fc.has(a)?"\\":"")+a;continue}if(a==="\\"){h===e.length-1?n+="\\\\":r=!0;continue}if(a==="["){let[u,l,c,d]=da(e,h);if(c){n+=u,o=o||l,h+=c-1,t=t||d;continue}}if(a==="*"){i&&e==="*"?n+=ga:n+=ma,t=!0;continue}if(a==="?"){n+=Xs,t=!0;continue}n+=Pc(a)}return[n,ce(e),!!t,o]}};var nt=(s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&");var Z=(s,e,t={})=>(Dt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Q(e,t).match(s)),Mc=/^\*+([^+@!?\*\[\(]*)$/,Uc=s=>e=>!e.startsWith(".")&&e.endsWith(s),Bc=s=>e=>e.endsWith(s),Wc=s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),$c=s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),zc=/^\*+\.\*+$/,jc=s=>!s.startsWith(".")&&s.includes("."),Hc=s=>s!=="."&&s!==".."&&s.includes("."),Gc=/^\.\*+$/,Vc=s=>s!=="."&&s!==".."&&s.startsWith("."),qc=/^\*+$/,Zc=s=>s.length!==0&&!s.startsWith("."),Yc=s=>s.length!==0&&s!=="."&&s!=="..",Kc=/^\?+([^+@!?\*\[\(]*)?$/,Xc=([s,e=""])=>{let t=Ea([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},Jc=([s,e=""])=>{let t=ya([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},Qc=([s,e=""])=>{let t=ya([s]);return e?i=>t(i)&&i.endsWith(e):t},ef=([s,e=""])=>{let t=Ea([s]);return e?i=>t(i)&&i.endsWith(e):t},Ea=([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},ya=([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},Sa=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_a={win32:{sep:"\\"},posix:{sep:"/"}},tf=Sa==="win32"?_a.win32.sep:_a.posix.sep;Z.sep=tf;var G=Symbol("globstar **");Z.GLOBSTAR=G;var sf="[^/]",rf=sf+"*?",nf="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",of="(?:(?!(?:\\/|^)\\.).)*?",af=(s,e={})=>t=>Z(t,s,e);Z.filter=af;var re=(s,e={})=>Object.assign({},s,e),hf=s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return Z;let e=Z;return Object.assign((i,r,n={})=>e(i,r,re(s,n)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,re(s,n))}static defaults(r){return e.defaults(re(s,r)).Minimatch}},AST:class extends e.AST{constructor(r,n,o={}){super(r,n,re(s,o))}static fromGlob(r,n={}){return e.AST.fromGlob(r,re(s,n))}},unescape:(i,r={})=>e.unescape(i,re(s,r)),escape:(i,r={})=>e.escape(i,re(s,r)),filter:(i,r={})=>e.filter(i,re(s,r)),defaults:i=>e.defaults(re(s,i)),makeRe:(i,r={})=>e.makeRe(i,re(s,r)),braceExpand:(i,r={})=>e.braceExpand(i,re(s,r)),match:(i,r,n={})=>e.match(i,r,re(s,n)),sep:e.sep,GLOBSTAR:G})};Z.defaults=hf;var xa=(s,e={})=>(Dt(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,wa.default)(s));Z.braceExpand=xa;var uf=(s,e={})=>new Q(s,e).makeRe();Z.makeRe=uf;var lf=(s,e,t={})=>{let i=new Q(e,t);return s=s.filter(r=>i.match(r)),i.options.nonull&&!s.length&&s.push(e),s};Z.match=lf;var ba=/[?*]|[+@!]\(.*?\)|\[|\]/,cf=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Dt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Sa,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!ba.test(n[2]))&&!ba.test(n[3]),u=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(u)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let o=this.set[n];o[0]===""&&o[1]===""&&this.globParts[n][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let r=0;r<e[i].length;r++)e[i][r]==="**"&&(e[i][r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let r=i;for(;t[r+1]==="**";)r++;r!==i&&t.splice(i,r-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,r)=>{let n=i[i.length-1];return r==="**"&&n==="**"?i:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(r),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let n=e[r];r===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let r=e[i-1];r&&r!=="."&&r!==".."&&r!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let r=-1;for(;(r=i.indexOf("**",r+1))!==-1;){let o=r;for(;i[o+1]==="**";)o++;o>r&&i.splice(r+1,o-r);let h=i[r+1],a=i[r+2],u=i[r+3];if(h!==".."||!a||a==="."||a===".."||!u||u==="."||u==="..")continue;t=!0,i.splice(r,1);let l=i.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let h=i[o];o===1&&h===""&&i[0]===""||(h==="."||h==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let n=0;for(;(n=i.indexOf("..",n+1))!==-1;){let o=i[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&i[n+1]==="**"?["."]:[];i.splice(n-1,2,...a),i.length===0&&i.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let r=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(r){e[t]=[],e[i]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let r=0,n=0,o=[],h="";for(;r<e.length&&n<t.length;)if(e[r]===t[n])o.push(h==="b"?t[n]:e[r]),r++,n++;else if(i&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(i&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(h==="b")return!1;h="a",o.push(e[r]),r++,n++}else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(h==="a")return!1;h="b",o.push(t[n]),r++,n++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let r=this.options;if(this.isWindows){let f=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!f&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),g=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),E=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),C=b?3:f?0:void 0,x=E?3:g?0:void 0;if(typeof C=="number"&&typeof x=="number"){let[T,I]=[e[C],t[x]];T.toLowerCase()===I.toLowerCase()&&(t[x]=T,x>C?t=t.slice(x):C>x&&(e=e.slice(C)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,h=0,a=e.length,u=t.length;o<a&&h<u;o++,h++){this.debug("matchOne loop");var l=t[h],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===G){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=h+1;if(p===u){for(this.debug("** at the end");o<a;o++)if(e[o]==="."||e[o]===".."||!r.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<a;){var m=e[d];if(this.debug(`
|
|
34
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function No(s){return s.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",r="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],i=n[3],r=n[4]),t&&r!=="0"?`${t}=${i}:${parseInt(r)+1}`:e})}Do.Command=Ws});var Mo=O(se=>{var{Argument:ko}=di(),{Command:$s}=Ro(),{CommanderError:fc,InvalidArgumentError:Fo}=It(),{Help:dc}=Ds(),{Option:Po}=Ps();se.program=new $s;se.createCommand=s=>new $s(s);se.createOption=(s,e)=>new Po(s,e);se.createArgument=(s,e)=>new ko(s,e);se.Command=$s;se.Option=Po;se.Argument=ko;se.Help=dc;se.CommanderError=fc;se.InvalidArgumentError=Fo;se.InvalidOptionArgumentError=Fo});var js=O((sp,$o)=>{"use strict";var Wo=require("fs"),zs;function pc(){try{return Wo.statSync("/.dockerenv"),!0}catch{return!1}}function mc(){try{return Wo.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}$o.exports=()=>(zs===void 0&&(zs=pc()||mc()),zs)});var Ho=O((rp,Hs)=>{"use strict";var gc=require("os"),_c=require("fs"),zo=js(),jo=()=>{if(process.platform!=="linux")return!1;if(gc.release().toLowerCase().includes("microsoft"))return!zo();try{return _c.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!zo():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Hs.exports=jo:Hs.exports=jo()});var Vo=O((np,Go)=>{"use strict";Go.exports=(s,e,t)=>{let i=r=>Object.defineProperty(s,e,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){let r=t();return i(r),r},set(r){i(r)}}),s}});var Qo=O((op,Jo)=>{var bc=require("path"),wc=require("child_process"),{promises:mi,constants:Xo}=require("fs"),pi=Ho(),Ec=js(),Vs=Vo(),qo=bc.join(__dirname,"xdg-open"),{platform:st,arch:Zo}=process,yc=()=>{try{return mi.statSync("/run/.containerenv"),!0}catch{return!1}},Gs;function Sc(){return Gs===void 0&&(Gs=yc()||Ec()),Gs}var xc=(()=>{let s="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",i=!1;try{await mi.access(t,Xo.F_OK),i=!0}catch{}if(!i)return s;let r=await mi.readFile(t,{encoding:"utf8"}),n=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(r);return n?(e=n.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):s}})(),Yo=async(s,e)=>{let t;for(let i of s)try{return await e(i)}catch(r){t=r}throw t},gi=async s=>{if(s={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...s},Array.isArray(s.app))return Yo(s.app,h=>gi({...s,app:h}));let{name:e,arguments:t=[]}=s.app||{};if(t=[...t],Array.isArray(e))return Yo(e,h=>gi({...s,app:{name:h,arguments:t}}));let i,r=[],n={};if(st==="darwin")i="open",s.wait&&r.push("--wait-apps"),s.background&&r.push("--background"),s.newInstance&&r.push("--new"),e&&r.push("-a",e);else if(st==="win32"||pi&&!Sc()&&!e){let h=await xc();i=pi?`${h}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,r.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),pi||(n.windowsVerbatimArguments=!0);let a=["Start"];s.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),s.target&&t.unshift(s.target)):s.target&&a.push(`"${s.target}"`),t.length>0&&(t=t.map(u=>`"\`"${u}\`""`),a.push(t.join(","))),s.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)i=e;else{let h=!__dirname||__dirname==="/",a=!1;try{await mi.access(qo,Xo.X_OK),a=!0}catch{}i=process.versions.electron||st==="android"||h||!a?"xdg-open":qo}t.length>0&&r.push(...t),s.wait||(n.stdio="ignore",n.detached=!0)}s.target&&r.push(s.target),st==="darwin"&&t.length>0&&r.push("--args",...t);let o=wc.spawn(i,r,n);return s.wait?new Promise((h,a)=>{o.once("error",a),o.once("close",u=>{if(!s.allowNonzeroExitCode&&u>0){a(new Error(`Exited with code ${u}`));return}h(o)})}):(o.unref(),o)},qs=(s,e)=>{if(typeof s!="string")throw new TypeError("Expected a `target`");return gi({...e,target:s})},vc=(s,e)=>{if(typeof s!="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 gi({...e,app:{name:s,arguments:t}})};function Ko(s){if(typeof s=="string"||Array.isArray(s))return s;let{[Zo]:e}=s;if(!e)throw new Error(`${Zo} is not supported`);return e}function Zs({[st]:s},{wsl:e}){if(e&&pi)return Ko(e);if(!s)throw new Error(`${st} is not supported`);return Ko(s)}var _i={};Vs(_i,"chrome",()=>Zs({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"]}}));Vs(_i,"firefox",()=>Zs({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Vs(_i,"edge",()=>Zs({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));qs.apps=_i;qs.openApp=vc;Jo.exports=qs});var ra=O((ap,sa)=>{"use strict";sa.exports=ta;function ta(s,e,t){s instanceof RegExp&&(s=ea(s,t)),e instanceof RegExp&&(e=ea(e,t));var i=ia(s,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+s.length,i[1]),post:t.slice(i[1]+e.length)}}function ea(s,e){var t=e.match(s);return t?t[0]:null}ta.range=ia;function ia(s,e,t){var i,r,n,o,h,a=t.indexOf(s),u=t.indexOf(e,a+1),l=a;if(a>=0&&u>0){if(s===e)return[a,u];for(i=[],n=t.length;l>=0&&!h;)l==a?(i.push(l),a=t.indexOf(s,l+1)):i.length==1?h=[i.pop(),u]:(r=i.pop(),r<n&&(n=r,o=u),u=t.indexOf(e,l+1)),l=a<u&&a>=0?a:u;i.length&&(h=[n,o])}return h}});var fa=O((hp,ca)=>{var na=ra();ca.exports=Tc;var oa="\0SLASH"+Math.random()+"\0",aa="\0OPEN"+Math.random()+"\0",Ks="\0CLOSE"+Math.random()+"\0",ha="\0COMMA"+Math.random()+"\0",ua="\0PERIOD"+Math.random()+"\0";function Ys(s){return parseInt(s,10)==s?parseInt(s,10):s.charCodeAt(0)}function Cc(s){return s.split("\\\\").join(oa).split("\\{").join(aa).split("\\}").join(Ks).split("\\,").join(ha).split("\\.").join(ua)}function Oc(s){return s.split(oa).join("\\").split(aa).join("{").split(Ks).join("}").split(ha).join(",").split(ua).join(".")}function la(s){if(!s)return[""];var e=[],t=na("{","}",s);if(!t)return s.split(",");var i=t.pre,r=t.body,n=t.post,o=i.split(",");o[o.length-1]+="{"+r+"}";var h=la(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),e.push.apply(e,o),e}function Tc(s){return s?(s.substr(0,2)==="{}"&&(s="\\{\\}"+s.substr(2)),Nt(Cc(s),!0).map(Oc)):[]}function Lc(s){return"{"+s+"}"}function Ac(s){return/^-?0\d/.test(s)}function Ic(s,e){return s<=e}function Nc(s,e){return s>=e}function Nt(s,e){var t=[],i=na("{","}",s);if(!i)return[s];var r=i.pre,n=i.post.length?Nt(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<n.length;o++){var h=r+"{"+i.body+"}"+n[o];t.push(h)}else{var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||u,c=i.body.indexOf(",")>=0;if(!l&&!c)return i.post.match(/,.*\}/)?(s=i.pre+"{"+i.body+Ks+i.post,Nt(s)):[s];var d;if(l)d=i.body.split(/\.\./);else if(d=la(i.body),d.length===1&&(d=Nt(d[0],!1).map(Lc),d.length===1))return n.map(function(ye){return i.pre+d[0]+ye});var p;if(l){var m=Ys(d[0]),f=Ys(d[1]),b=Math.max(d[0].length,d[1].length),g=d.length==3?Math.abs(Ys(d[2])):1,E=Ic,C=f<m;C&&(g*=-1,E=Nc);var x=d.some(Ac);p=[];for(var T=m;E(T,f);T+=g){var I;if(u)I=String.fromCharCode(T),I==="\\"&&(I="");else if(I=String(T),x){var W=b-I.length;if(W>0){var X=new Array(W+1).join("0");T<0?I="-"+X+I.slice(1):I=X+I}}p.push(I)}}else{p=[];for(var B=0;B<d.length;B++)p.push.apply(p,Nt(d[B],!1))}for(var B=0;B<p.length;B++)for(var o=0;o<n.length;o++){var h=r+p[B]+n[o];(!e||l||h)&&t.push(h)}}return t}});var hh=O((vm,ah)=>{"use strict";function Gf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Vf=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function oh(s){if(Buffer.isBuffer(s))return s;if(typeof s=="number")return Buffer.alloc(s);if(typeof s=="string")return Buffer.from(s);throw new Error("input must be buffer, number, or string, received "+typeof s)}function qf(s){let e=oh(4);return e.writeInt32BE(s,0),e}function gr(s,e){s=oh(s),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let t=~~e^-1;for(var i=0;i<s.length;i++)t=Vf[(t^s[i])&255]^t>>>8;return t^-1}function _r(){return qf(gr.apply(null,arguments))}_r.signed=function(){return gr.apply(null,arguments)};_r.unsigned=function(){return gr.apply(null,arguments)>>>0};var Zf=_r,Yf=Gf(Zf);ah.exports=Yf});var Oh=O(vr=>{var uh=require("fs"),ji=require("stream").Transform,fh=require("stream").PassThrough,dh=require("zlib"),Sr=require("util"),Kf=require("events").EventEmitter,Xf=require("events").errorMonitor,ph=hh();vr.ZipFile=Ue;vr.dateToDosDateTime=Ch;Sr.inherits(Ue,Kf);function Ue(){this.outputStream=new fh,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(Xf,function(){this.errored=!0})}Ue.prototype.addFile=function(s,e,t){var i=this;if(e=Gi(e,!1),t==null&&(t={}),!Hi(i)){var r=new N(e,!1,t);i.entries.push(r),uh.stat(s,function(n,o){if(n)return i.emit("error",n);if(!o.isFile())return i.emit("error",new Error("not a file: "+s));r.uncompressedSize=o.size,t.mtime==null&&r.setLastModDate(o.mtime),t.mode==null&&r.setFileAttributesMode(o.mode),r.setFileDataPumpFunction(function(){var h=uh.createReadStream(s);r.state=N.FILE_DATA_IN_PROGRESS,h.on("error",function(a){i.emit("error",a)}),mh(i,r,h)}),Me(i)})}};Ue.prototype.addReadStream=function(s,e,t){this.addReadStreamLazy(e,t,function(i){i(null,s)})};Ue.prototype.addReadStreamLazy=function(s,e,t){var i=this;if(typeof e=="function"&&(t=e,e=null),e==null&&(e={}),s=Gi(s,!1),!Hi(i)){var r=new N(s,!1,e);i.entries.push(r),r.setFileDataPumpFunction(function(){t(function(n,o){if(n)return i.emit("error",n);r.state=N.FILE_DATA_IN_PROGRESS,mh(i,r,o)})}),Me(i)}};Ue.prototype.addBuffer=function(s,e,t){var i=this;if(e=Gi(e,!1),s.length>1073741823)throw new Error("buffer too large: "+s.length+" > 1073741823");if(t==null&&(t={}),t.size!=null)throw new Error("options.size not allowed");if(Hi(i))return;var r=new N(e,!1,t);r.uncompressedSize=s.length,r.crc32=ph.unsigned(s),r.crcAndFileSizeKnown=!0,i.entries.push(r),r.compressionLevel===0?n(s):dh.deflateRaw(s,{level:r.compressionLevel},function(o,h){n(h)});function n(o){r.compressedSize=o.length,r.setFileDataPumpFunction(function(){Xe(i,o),Xe(i,r.getDataDescriptor()),r.state=N.FILE_DATA_DONE,setImmediate(function(){Me(i)})}),Me(i)}};Ue.prototype.addEmptyDirectory=function(s,e){var t=this;if(s=Gi(s,!0),e==null&&(e={}),e.size!=null)throw new Error("options.size not allowed");if(e.compress!=null)throw new Error("options.compress not allowed");if(e.compressionLevel!=null)throw new Error("options.compressionLevel not allowed");if(!Hi(t)){var i=new N(s,!0,e);t.entries.push(i),i.setFileDataPumpFunction(function(){Xe(t,i.getDataDescriptor()),i.state=N.FILE_DATA_DONE,Me(t)}),Me(t)}};var Jf=Pe([80,75,5,6]);Ue.prototype.end=function(s,e){if(typeof s=="function"&&(e=s,s=null),s==null&&(s={}),!this.ended&&(this.ended=!0,!this.errored)){if(this.calculatedTotalSizeCallback=e,this.forceZip64Eocd=!!s.forceZip64Format,s.comment){if(typeof s.comment=="string"?this.comment=id(s.comment):this.comment=s.comment,this.comment.length>65535)throw new Error("comment is too large");if(qt(this.comment,Jf))throw new Error("comment contains end of central directory record signature")}else this.comment=Zt;Me(this)}};function Xe(s,e){s.outputStream.write(e),s.outputStreamCursor+=e.length}function mh(s,e,t){var i=new xr,r=new zi,n=e.compressionLevel!==0?new dh.DeflateRaw({level:e.compressionLevel}):new fh,o=new zi;t.pipe(i).pipe(r).pipe(n).pipe(o).pipe(s.outputStream,{end:!1}),o.on("end",function(){if(e.crc32=i.crc32,e.uncompressedSize==null)e.uncompressedSize=r.byteCount;else if(e.uncompressedSize!==r.byteCount)return s.emit("error",new Error("file data stream has unexpected number of bytes"));e.compressedSize=o.byteCount,s.outputStreamCursor+=e.compressedSize,Xe(s,e.getDataDescriptor()),e.state=N.FILE_DATA_DONE,Me(s)})}function Qf(s){if(s.compress!=null&&s.compressionLevel!=null&&!!s.compress!=!!s.compressionLevel)throw new Error("conflicting settings for compress and compressionLevel");return s.compressionLevel!=null?s.compressionLevel:s.compress===!1?0:6}function Me(s){if(s.allDone||s.errored)return;if(s.ended&&s.calculatedTotalSizeCallback!=null){var e=ed(s);e!=null&&(s.calculatedTotalSizeCallback(e),s.calculatedTotalSizeCallback=null)}var t=i();function i(){for(var n=0;n<s.entries.length;n++){var o=s.entries[n];if(o.state<N.FILE_DATA_DONE)return o}return null}if(t!=null){if(t.state<N.READY_TO_PUMP_FILE_DATA||t.state===N.FILE_DATA_IN_PROGRESS)return;t.relativeOffsetOfLocalHeader=s.outputStreamCursor;var r=t.getLocalFileHeader();Xe(s,r),t.doFileDataPump()}else s.ended&&(s.offsetOfStartOfCentralDirectory=s.outputStreamCursor,s.entries.forEach(function(n){var o=n.getCentralDirectoryRecord();Xe(s,o)}),Xe(s,td(s)),s.outputStream.end(),s.allDone=!0)}function ed(s){for(var e=0,t=0,i=0;i<s.entries.length;i++){var r=s.entries[i];if(r.compressionLevel!==0)return-1;if(r.state>=N.READY_TO_PUMP_FILE_DATA){if(r.uncompressedSize==null)return-1}else if(r.uncompressedSize==null)return null;r.relativeOffsetOfLocalHeader=e;var n=r.useZip64Format();e+=gh+r.utf8FileName.length,e+=r.uncompressedSize,r.crcAndFileSizeKnown||(n?e+=xh:e+=Sh),t+=vh+r.utf8FileName.length+r.fileComment.length,r.forceDosTimestamp||(t+=wr),n&&(t+=Er)}var o=0;return(s.forceZip64Eocd||s.entries.length>=65535||t>=65535||e>=4294967295)&&(o+=Wi+br),o+=$i+s.comment.length,e+t+o}function Hi(s){if(s.ended)throw new Error("cannot add entries after calling end()");return!!s.errored}var Wi=56,br=20,$i=22;function td(s,e){var t=!1,i=s.entries.length;(s.forceZip64Eocd||s.entries.length>=65535)&&(i=65535,t=!0);var r=s.outputStreamCursor-s.offsetOfStartOfCentralDirectory,n=r;(s.forceZip64Eocd||r>=4294967295)&&(n=4294967295,t=!0);var o=s.offsetOfStartOfCentralDirectory;if((s.forceZip64Eocd||s.offsetOfStartOfCentralDirectory>=4294967295)&&(o=4294967295,t=!0),e)return t?Wi+br+$i:$i;var h=K($i+s.comment.length);if(h.writeUInt32LE(101010256,0),h.writeUInt16LE(0,4),h.writeUInt16LE(0,6),h.writeUInt16LE(i,8),h.writeUInt16LE(i,10),h.writeUInt32LE(n,12),h.writeUInt32LE(o,16),h.writeUInt16LE(s.comment.length,20),s.comment.copy(h,22),!t)return h;var a=K(Wi);a.writeUInt32LE(101075792,0),me(a,Wi-12,4),a.writeUInt16LE(wh,12),a.writeUInt16LE(bh,14),a.writeUInt32LE(0,16),a.writeUInt32LE(0,20),me(a,s.entries.length,24),me(a,s.entries.length,32),me(a,r,40),me(a,s.offsetOfStartOfCentralDirectory,48);var u=K(br);return u.writeUInt32LE(117853008,0),u.writeUInt32LE(0,4),me(u,s.outputStreamCursor,8),u.writeUInt32LE(1,16),Buffer.concat([a,u,h])}function Gi(s,e){if(s==="")throw new Error("empty metadataPath");if(s=s.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(s)||/^\//.test(s))throw new Error("absolute path: "+s);if(s.split("/").indexOf("..")!==-1)throw new Error("invalid relative path: "+s);var t=/\/$/.test(s);if(e)t||(s+="/");else if(t)throw new Error("file path cannot end with '/': "+s);return s}var Zt=K(0);function N(s,e,t){if(this.utf8FileName=Pe(s),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=e,this.state=N.WAITING_FOR_METADATA,this.setLastModDate(t.mtime!=null?t.mtime:new Date),this.forceDosTimestamp=!!t.forceDosTimestamp,t.mode!=null?this.setFileAttributesMode(t.mode):this.setFileAttributesMode(e?16893:33204),e?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,t.size!=null&&(this.uncompressedSize=t.size)),e?this.compressionLevel=0:this.compressionLevel=Qf(t),this.forceZip64Format=!!t.forceZip64Format,t.fileComment){if(typeof t.fileComment=="string"?this.fileComment=Pe(t.fileComment,"utf-8"):this.fileComment=t.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=Zt}N.WAITING_FOR_METADATA=0;N.READY_TO_PUMP_FILE_DATA=1;N.FILE_DATA_IN_PROGRESS=2;N.FILE_DATA_DONE=3;N.prototype.setLastModDate=function(s){this.mtime=s;var e=Ch(s);this.lastModFileTime=e.time,this.lastModFileDate=e.date};N.prototype.setFileAttributesMode=function(s){if((s&65535)!==s)throw new Error("invalid mode. expected: 0 <= "+s+" <= 65535");this.externalFileAttributes=s<<16>>>0};N.prototype.setFileDataPumpFunction=function(s){this.doFileDataPump=s,this.state=N.READY_TO_PUMP_FILE_DATA};N.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var gh=30,_h=20,bh=45,wh=831,Eh=2048,yh=8;N.prototype.getLocalFileHeader=function(){var s=0,e=0,t=0;this.crcAndFileSizeKnown&&(s=this.crc32,e=this.compressedSize,t=this.uncompressedSize);var i=K(gh),r=Eh;return this.crcAndFileSizeKnown||(r|=yh),i.writeUInt32LE(67324752,0),i.writeUInt16LE(_h,4),i.writeUInt16LE(r,6),i.writeUInt16LE(this.getCompressionMethod(),8),i.writeUInt16LE(this.lastModFileTime,10),i.writeUInt16LE(this.lastModFileDate,12),i.writeUInt32LE(s,14),i.writeUInt32LE(e,18),i.writeUInt32LE(t,22),i.writeUInt16LE(this.utf8FileName.length,26),i.writeUInt16LE(0,28),Buffer.concat([i,this.utf8FileName])};var Sh=16,xh=24;N.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return Zt;if(this.useZip64Format()){var s=K(xh);return s.writeUInt32LE(134695760,0),s.writeUInt32LE(this.crc32,4),me(s,this.compressedSize,8),me(s,this.uncompressedSize,16),s}else{var s=K(Sh);return s.writeUInt32LE(134695760,0),s.writeUInt32LE(this.crc32,4),s.writeUInt32LE(this.compressedSize,8),s.writeUInt32LE(this.uncompressedSize,12),s}};var vh=46,wr=9,Er=28;N.prototype.getCentralDirectoryRecord=function(){var s=K(vh),e=Eh;this.crcAndFileSizeKnown||(e|=yh);var t=Zt;if(!this.forceDosTimestamp){t=K(wr),t.writeUInt16LE(21589,0),t.writeUInt16LE(wr-4,2);var i=1,r=2;t.writeUInt8(i|r,4);var n=Math.floor(this.mtime.getTime()/1e3);n<-2147483648&&(n=-2147483648),n>2147483647&&(n=2147483647),t.writeUInt32LE(n,5)}var o=this.compressedSize,h=this.uncompressedSize,a=this.relativeOffsetOfLocalHeader,u=_h,l=Zt;return this.useZip64Format()&&(o=4294967295,h=4294967295,a=4294967295,u=bh,l=K(Er),l.writeUInt16LE(1,0),l.writeUInt16LE(Er-4,2),me(l,this.uncompressedSize,4),me(l,this.compressedSize,12),me(l,this.relativeOffsetOfLocalHeader,20)),s.writeUInt32LE(33639248,0),s.writeUInt16LE(wh,4),s.writeUInt16LE(u,6),s.writeUInt16LE(e,8),s.writeUInt16LE(this.getCompressionMethod(),10),s.writeUInt16LE(this.lastModFileTime,12),s.writeUInt16LE(this.lastModFileDate,14),s.writeUInt32LE(this.crc32,16),s.writeUInt32LE(o,20),s.writeUInt32LE(h,24),s.writeUInt16LE(this.utf8FileName.length,28),s.writeUInt16LE(t.length+l.length,30),s.writeUInt16LE(this.fileComment.length,32),s.writeUInt16LE(0,34),s.writeUInt16LE(0,36),s.writeUInt32LE(this.externalFileAttributes,38),s.writeUInt32LE(a,42),Buffer.concat([s,this.utf8FileName,t,l,this.fileComment])};N.prototype.getCompressionMethod=function(){var s=0,e=8;return this.compressionLevel===0?s:e};var lh=new Date(1980,0,1),ch=new Date(2107,11,31,23,59,58);function Ch(s){s<lh?s=lh:s>ch&&(s=ch);var e=0;e|=s.getDate()&31,e|=(s.getMonth()+1&15)<<5,e|=(s.getFullYear()-1980&127)<<9;var t=0;return t|=Math.floor(s.getSeconds()/2),t|=(s.getMinutes()&63)<<5,t|=(s.getHours()&31)<<11,{date:e,time:t}}function me(s,e,t){var i=Math.floor(e/4294967296),r=e%4294967296;s.writeUInt32LE(r,t),s.writeUInt32LE(i,t+4)}Sr.inherits(zi,ji);function zi(s){ji.call(this,s),this.byteCount=0}zi.prototype._transform=function(s,e,t){this.byteCount+=s.length,t(null,s)};Sr.inherits(xr,ji);function xr(s){ji.call(this,s),this.crc32=0}xr.prototype._transform=function(s,e,t){this.crc32=ph.unsigned(s,this.crc32),t(null,s)};var yr="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";if(yr.length!==256)throw new Error("assertion failure");var Bi=null;function id(s){if(/^[\x20-\x7e]*$/.test(s))return Pe(s,"utf-8");if(Bi==null){Bi={};for(var e=0;e<yr.length;e++)Bi[yr[e]]=e}for(var t=K(s.length),e=0;e<s.length;e++){var i=Bi[s[e]];if(i==null)throw new Error("character not encodable in CP437: "+JSON.stringify(s[e]));t[e]=i}return t}function K(s){K=e;try{return K(s)}catch{return K=t,K(s)}function e(i){return Buffer.allocUnsafe(i)}function t(i){return new Buffer(i)}}function Pe(s,e){Pe=t;try{return Pe(s,e)}catch{return Pe=i,Pe(s,e)}function t(r,n){return Buffer.from(r,n)}function i(r,n){return new Buffer(r,n)}}function qt(s,e){qt=t;try{return qt(s,e)}catch{return qt=i,qt(s,e)}function t(r,n){return r.includes(n)}function i(r,n){for(var o=0;o<=r.length-n.length;o++)for(var h=0;;h++){if(h===n.length)return!0;if(r[o+h]!==n[h])break}return!1}}});var Dh=O((Tm,Nh)=>{var ae=require("fs"),sd=require("util"),gt=require("path"),Nr=require("events"),Th=require("zlib"),Ih=require("stream"),w={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSIGFIRST:80,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,MAXFILECOMMENT:65535,ENDL64HDR:20,ENDL64SIG:117853008,ENDL64SIGFIRST:80,ENDL64OFS:8,END64HDR:56,END64SIG:101075792,END64SIGFIRST:80,END64SUB:24,END64TOT:32,END64SIZ:40,END64OFF:48,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FLG_ENTRY_ENC:1,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535},ze=function(s){let e,t,i,r,n,o,a=this,u=s.storeEntries!==!1?{}:null,l=s.file,c=s.nameEncoding?new TextDecoder(s.nameEncoding):null;d();function d(){s.fd?(e=s.fd,p()):ae.open(l,"r",(_,y)=>{if(_)return a.emit("error",_);e=y,p()})}function p(){ae.fstat(e,(_,y)=>{if(_)return a.emit("error",_);t=y.size,i=s.chunkSize||Math.round(t/1e3),i=Math.max(Math.min(i,Math.min(128*1024,t)),Math.min(1024,t)),f()})}function m(_,y){if(_||!y)return a.emit("error",_||new Error("Archive read error"));let v=r.lastPos,S=v-r.win.position,A=r.win.buffer,L=r.minPos;for(;--v>=L&&--S>=0;)if(A.length-S>=4&&A[S]===r.firstByte&&A.readUInt32LE(S)===r.sig){r.lastBufferPosition=S,r.lastBytesRead=y,r.complete();return}if(v===L)return a.emit("error",new Error("Bad archive"));if(r.lastPos=v+1,r.chunkSize*=2,v<=L)return a.emit("error",new Error("Bad archive"));let P=Math.min(r.chunkSize,v-L);r.win.expandLeft(P,m)}function f(){let _=Math.min(w.ENDHDR+w.MAXFILECOMMENT,t);r={win:new Vi(e),totalReadLength:_,minPos:t-_,lastPos:t,chunkSize:Math.min(1024,i),firstByte:w.ENDSIGFIRST,sig:w.ENDSIG,complete:b},r.win.read(t-r.chunkSize,r.chunkSize,m)}function b(){let _=r.win.buffer,y=r.lastBufferPosition;try{n=new Cr,n.read(_.slice(y,y+w.ENDHDR)),n.headerOffset=r.win.position+y,n.commentLength?a.comment=_.slice(y+w.ENDHDR,y+w.ENDHDR+n.commentLength).toString():a.comment=null,a.entriesCount=n.volumeEntries,a.centralDirectory=n,n.volumeEntries===w.EF_ZIP64_OR_16&&n.totalEntries===w.EF_ZIP64_OR_16||n.size===w.EF_ZIP64_OR_32||n.offset===w.EF_ZIP64_OR_32?g():(r={},x())}catch(v){a.emit("error",v)}}function g(){let _=w.ENDL64HDR;r.lastBufferPosition>_?(r.lastBufferPosition-=_,E()):(r={win:r.win,totalReadLength:_,minPos:r.win.position-_,lastPos:r.win.position,chunkSize:r.chunkSize,firstByte:w.ENDL64SIGFIRST,sig:w.ENDL64SIG,complete:E},r.win.read(r.lastPos-r.chunkSize,r.chunkSize,m))}function E(){let _=r.win.buffer,y=new Or;y.read(_.slice(r.lastBufferPosition,r.lastBufferPosition+w.ENDL64HDR));let v=t-y.headerOffset;r={win:r.win,totalReadLength:v,minPos:y.headerOffset,lastPos:r.lastPos,chunkSize:r.chunkSize,firstByte:w.END64SIGFIRST,sig:w.END64SIG,complete:C},r.win.read(t-r.chunkSize,r.chunkSize,m)}function C(){let _=r.win.buffer,y=new Tr;y.read(_.slice(r.lastBufferPosition,r.lastBufferPosition+w.END64HDR)),a.centralDirectory.volumeEntries=y.volumeEntries,a.centralDirectory.totalEntries=y.totalEntries,a.centralDirectory.size=y.size,a.centralDirectory.offset=y.offset,a.entriesCount=y.volumeEntries,r={},x()}function x(){r={win:new Vi(e),pos:n.offset,chunkSize:i,entriesLeft:n.volumeEntries},r.win.read(r.pos,Math.min(i,t-r.pos),T)}function T(_,y){if(_||!y)return a.emit("error",_||new Error("Entries read error"));let v=r.pos-r.win.position,S=r.entry,A=r.win.buffer,L=A.length;try{for(;r.entriesLeft>0;){S||(S=new Lr,S.readHeader(A,v),S.headerOffset=r.win.position+v,r.entry=S,r.pos+=w.CENHDR,v+=w.CENHDR);let P=S.fnameLen+S.extraLen+S.comLen,U=P+(r.entriesLeft>1?w.CENHDR:0);if(L-v<U){r.win.moveRight(i,T,v),r.move=!0;return}S.read(A,v,c),s.skipEntryNameValidation||S.validateName(),u&&(u[S.name]=S),a.emit("entry",S),r.entry=S=null,r.entriesLeft--,r.pos+=P,v+=P}a.emit("ready")}catch(P){a.emit("error",P)}}function I(){if(!u)throw new Error("storeEntries disabled")}Object.defineProperty(this,"ready",{get(){return!1}}),this.entry=function(_){return I(),u[_]},this.entries=function(){return I(),u},this.stream=function(_,y){return this.openEntry(_,(v,S)=>{if(v)return y(v);let A=W(S),L=new Ar(e,A,S.compressedSize);if(S.method!==w.STORED)if(S.method===w.DEFLATED)L=L.pipe(Th.createInflateRaw());else return y(new Error("Unknown compression method: "+S.method));X(S)&&(L=L.pipe(new Ir(L,S.crc,S.size))),y(null,L)},!1)},this.entryDataSync=function(_){let y=null;if(this.openEntry(_,(S,A)=>{y=S,_=A},!0),y)throw y;let v=Buffer.alloc(_.compressedSize);if(new We(e,v,0,_.compressedSize,W(_),S=>{y=S}).read(!0),y)throw y;if(_.method!==w.STORED)if(_.method===w.DEFLATED||_.method===w.ENHANCED_DEFLATED)v=Th.inflateRawSync(v);else throw new Error("Unknown compression method: "+_.method);if(v.length!==_.size)throw new Error("Invalid size");return X(_)&&new qi(_.crc,_.size).data(v),v},this.openEntry=function(_,y,v){if(typeof _=="string"&&(I(),_=u[_],!_))return y(new Error("Entry not found"));if(!_.isFile)return y(new Error("Entry is not file"));if(!e)return y(new Error("Archive closed"));let S=Buffer.alloc(w.LOCHDR);new We(e,S,0,S.length,_.offset,A=>{if(A)return y(A);let L;try{_.readDataHeader(S),_.encrypted&&(L=new Error("Entry encrypted"))}catch(P){L=P}y(L,_)}).read(v)};function W(_){return _.offset+w.LOCHDR+_.fnameLen+_.extraLen}function X(_){return(_.flags&8)!==8}function B(_,y,v){a.stream(_,(S,A)=>{if(S)v(S);else{let L,P;A.on("error",U=>{P=U,L&&(A.unpipe(L),L.close(()=>{v(U)}))}),ae.open(y,"w",(U,ue)=>{if(U)return v(U);if(P){ae.close(e,()=>{v(P)});return}L=ae.createWriteStream(y,{fd:ue}),L.on("finish",()=>{a.emit("extract",_,y),P||v()}),A.pipe(L)})}})}function ye(_,y,v){if(!y.length)return v();let S=y.shift();S=gt.join(_,gt.join(...S)),ae.mkdir(S,{recursive:!0},A=>{if(A&&A.code!=="EEXIST")return v(A);ye(_,y,v)})}function Ki(_,y,v,S,A){if(!v.length)return S(null,A);let L=v.shift(),P=gt.join(_,L.name.replace(y,""));B(L,P,U=>{if(U)return S(U,A);Ki(_,y,v,S,A+1)})}this.extract=function(_,y,v){let S=_||"";if(typeof _=="string"&&(_=this.entry(_),_?S=_.name:S.length&&S[S.length-1]!=="/"&&(S+="/")),!_||_.isDirectory){let A=[],L=[],P={};for(let U in u)if(Object.prototype.hasOwnProperty.call(u,U)&&U.lastIndexOf(S,0)===0){let ue=U.replace(S,""),Rr=u[U];if(Rr.isFile&&(A.push(Rr),ue=gt.dirname(ue)),ue&&!P[ue]&&ue!=="."){P[ue]=!0;let Ae=ue.split("/").filter(_t=>_t);for(Ae.length&&L.push(Ae);Ae.length>1;){Ae=Ae.slice(0,Ae.length-1);let _t=Ae.join("/");if(P[_t]||_t===".")break;P[_t]=!0,L.push(Ae)}}}L.sort((U,ue)=>U.length-ue.length),L.length?ye(y,L,U=>{U?v(U):Ki(y,S,A,v,0)}):Ki(y,S,A,v,0)}else ae.stat(y,(A,L)=>{L&&L.isDirectory()?B(_,gt.join(y,gt.basename(_.name)),v):B(_,y,v)})},this.close=function(_){o||!e?(o=!0,_&&_()):(o=!0,ae.close(e,y=>{e=null,_&&_(y)}))};let zh=Nr.EventEmitter.prototype.emit;this.emit=function(..._){if(!o)return zh.call(this,..._)}};ze.setFs=function(s){ae=s};ze.debugLog=(...s)=>{ze.debug&&console.log(...s)};sd.inherits(ze,Nr.EventEmitter);var Be=Symbol("zip");ze.async=class extends Nr.EventEmitter{constructor(e){super();let t=new ze(e);t.on("entry",i=>this.emit("entry",i)),t.on("extract",(i,r)=>this.emit("extract",i,r)),this[Be]=new Promise((i,r)=>{t.on("ready",()=>{t.removeListener("error",r),i(t)}),t.on("error",r)})}get entriesCount(){return this[Be].then(e=>e.entriesCount)}get comment(){return this[Be].then(e=>e.comment)}async entry(e){return(await this[Be]).entry(e)}async entries(){return(await this[Be]).entries()}async stream(e){let t=await this[Be];return new Promise((i,r)=>{t.stream(e,(n,o)=>{n?r(n):i(o)})})}async entryData(e){let t=await this.stream(e);return new Promise((i,r)=>{let n=[];t.on("data",o=>n.push(o)),t.on("end",()=>{i(Buffer.concat(n))}),t.on("error",o=>{t.removeAllListeners("end"),r(o)})})}async extract(e,t){let i=await this[Be];return new Promise((r,n)=>{i.extract(e,t,(o,h)=>{o?n(o):r(h)})})}async close(){let e=await this[Be];return new Promise((t,i)=>{e.close(r=>{r?i(r):t()})})}};var Cr=class{read(e){if(e.length!==w.ENDHDR||e.readUInt32LE(0)!==w.ENDSIG)throw new Error("Invalid central directory");this.volumeEntries=e.readUInt16LE(w.ENDSUB),this.totalEntries=e.readUInt16LE(w.ENDTOT),this.size=e.readUInt32LE(w.ENDSIZ),this.offset=e.readUInt32LE(w.ENDOFF),this.commentLength=e.readUInt16LE(w.ENDCOM)}},Or=class{read(e){if(e.length!==w.ENDL64HDR||e.readUInt32LE(0)!==w.ENDL64SIG)throw new Error("Invalid zip64 central directory locator");this.headerOffset=$e(e,w.ENDSUB)}},Tr=class{read(e){if(e.length!==w.END64HDR||e.readUInt32LE(0)!==w.END64SIG)throw new Error("Invalid central directory");this.volumeEntries=$e(e,w.END64SUB),this.totalEntries=$e(e,w.END64TOT),this.size=$e(e,w.END64SIZ),this.offset=$e(e,w.END64OFF)}},Lr=class{readHeader(e,t){if(e.length<t+w.CENHDR||e.readUInt32LE(t)!==w.CENSIG)throw new Error("Invalid entry header");this.verMade=e.readUInt16LE(t+w.CENVEM),this.version=e.readUInt16LE(t+w.CENVER),this.flags=e.readUInt16LE(t+w.CENFLG),this.method=e.readUInt16LE(t+w.CENHOW);let i=e.readUInt16LE(t+w.CENTIM),r=e.readUInt16LE(t+w.CENTIM+2);this.time=Lh(i,r),this.crc=e.readUInt32LE(t+w.CENCRC),this.compressedSize=e.readUInt32LE(t+w.CENSIZ),this.size=e.readUInt32LE(t+w.CENLEN),this.fnameLen=e.readUInt16LE(t+w.CENNAM),this.extraLen=e.readUInt16LE(t+w.CENEXT),this.comLen=e.readUInt16LE(t+w.CENCOM),this.diskStart=e.readUInt16LE(t+w.CENDSK),this.inattr=e.readUInt16LE(t+w.CENATT),this.attr=e.readUInt32LE(t+w.CENATX),this.offset=e.readUInt32LE(t+w.CENOFF)}readDataHeader(e){if(e.readUInt32LE(0)!==w.LOCSIG)throw new Error("Invalid local header");this.version=e.readUInt16LE(w.LOCVER),this.flags=e.readUInt16LE(w.LOCFLG),this.method=e.readUInt16LE(w.LOCHOW);let t=e.readUInt16LE(w.LOCTIM),i=e.readUInt16LE(w.LOCTIM+2);this.time=Lh(t,i),this.crc=e.readUInt32LE(w.LOCCRC)||this.crc;let r=e.readUInt32LE(w.LOCSIZ);r&&r!==w.EF_ZIP64_OR_32&&(this.compressedSize=r);let n=e.readUInt32LE(w.LOCLEN);n&&n!==w.EF_ZIP64_OR_32&&(this.size=n),this.fnameLen=e.readUInt16LE(w.LOCNAM),this.extraLen=e.readUInt16LE(w.LOCEXT)}read(e,t,i){let r=e.slice(t,t+=this.fnameLen);this.name=i?i.decode(new Uint8Array(r)):r.toString("utf8");let n=e[t-1];this.isDirectory=n===47||n===92,this.extraLen&&(this.readExtra(e,t),t+=this.extraLen),this.comment=this.comLen?e.slice(t,t+this.comLen).toString():null}validateName(){if(/\\|^\w+:|^\/|(^|\/)\.\.(\/|$)/.test(this.name))throw new Error("Malicious entry: "+this.name)}readExtra(e,t){let i,r,n=t+this.extraLen;for(;t<n;)i=e.readUInt16LE(t),t+=2,r=e.readUInt16LE(t),t+=2,w.ID_ZIP64===i&&this.parseZip64Extra(e,t,r),t+=r}parseZip64Extra(e,t,i){i>=8&&this.size===w.EF_ZIP64_OR_32&&(this.size=$e(e,t),t+=8,i-=8),i>=8&&this.compressedSize===w.EF_ZIP64_OR_32&&(this.compressedSize=$e(e,t),t+=8,i-=8),i>=8&&this.offset===w.EF_ZIP64_OR_32&&(this.offset=$e(e,t),t+=8,i-=8),i>=4&&this.diskStart===w.EF_ZIP64_OR_16&&(this.diskStart=e.readUInt32LE(t))}get encrypted(){return(this.flags&w.FLG_ENTRY_ENC)===w.FLG_ENTRY_ENC}get isFile(){return!this.isDirectory}},We=class{constructor(e,t,i,r,n,o){this.fd=e,this.buffer=t,this.offset=i,this.length=r,this.position=n,this.callback=o,this.bytesRead=0,this.waiting=!1}read(e){ze.debugLog("read",this.position,this.bytesRead,this.length,this.offset),this.waiting=!0;let t;if(e){let i=0;try{i=ae.readSync(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead)}catch(r){t=r}this.readCallback(e,t,t?i:null)}else ae.read(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead,this.readCallback.bind(this,e))}readCallback(e,t,i){if(typeof i=="number"&&(this.bytesRead+=i),t||!i||this.bytesRead===this.length)return this.waiting=!1,this.callback(t,this.bytesRead);this.read(e)}},Vi=class{constructor(e){this.position=0,this.buffer=Buffer.alloc(0),this.fd=e,this.fsOp=null}checkOp(){if(this.fsOp&&this.fsOp.waiting)throw new Error("Operation in progress")}read(e,t,i){this.checkOp(),this.buffer.length<t&&(this.buffer=Buffer.alloc(t)),this.position=e,this.fsOp=new We(this.fd,this.buffer,0,t,this.position,i).read()}expandLeft(e,t){this.checkOp(),this.buffer=Buffer.concat([Buffer.alloc(e),this.buffer]),this.position-=e,this.position<0&&(this.position=0),this.fsOp=new We(this.fd,this.buffer,0,e,this.position,t).read()}expandRight(e,t){this.checkOp();let i=this.buffer.length;this.buffer=Buffer.concat([this.buffer,Buffer.alloc(e)]),this.fsOp=new We(this.fd,this.buffer,i,e,this.position+i,t).read()}moveRight(e,t,i){this.checkOp(),i?this.buffer.copy(this.buffer,0,i):i=0,this.position+=i,this.fsOp=new We(this.fd,this.buffer,this.buffer.length-i,i,this.position+this.buffer.length-i,t).read()}},Ar=class extends Ih.Readable{constructor(e,t,i){super(),this.fd=e,this.offset=t,this.length=i,this.pos=0,this.readCallback=this.readCallback.bind(this)}_read(e){let t=Buffer.alloc(Math.min(e,this.length-this.pos));t.length?ae.read(this.fd,t,0,t.length,this.offset+this.pos,this.readCallback):this.push(null)}readCallback(e,t,i){this.pos+=t,e?(this.emit("error",e),this.push(null)):t?(t!==i.length&&(i=i.slice(0,t)),this.push(i)):this.push(null)}},Ir=class extends Ih.Transform{constructor(e,t,i){super(),this.verify=new qi(t,i),e.on("error",r=>{this.emit("error",r)})}_transform(e,t,i){let r;try{this.verify.data(e)}catch(n){r=n}i(r,e)}},qi=class s{constructor(e,t){this.crc=e,this.size=t,this.state={crc:-1,size:0}}data(e){let t=s.getCrcTable(),i=this.state.crc,r=0,n=e.length;for(;--n>=0;)i=t[(i^e[r++])&255]^i>>>8;if(this.state.crc=i,this.state.size+=e.length,this.state.size>=this.size){let o=Buffer.alloc(4);if(o.writeInt32LE(~this.state.crc&4294967295,0),i=o.readUInt32LE(0),i!==this.crc)throw new Error("Invalid CRC");if(this.state.size!==this.size)throw new Error("Invalid size")}}static getCrcTable(){let e=s.crcTable;if(!e){s.crcTable=e=[];let t=Buffer.alloc(4);for(let i=0;i<256;i++){let r=i;for(let n=8;--n>=0;)r&1?r=3988292384^r>>>1:r=r>>>1;r<0&&(t.writeInt32LE(r,0),r=t.readUInt32LE(0)),e[i]=r}}return e}};function Lh(s,e){let t=Ah(s,16),i=Ah(e,16),r={h:parseInt(t.slice(0,5).join(""),2),m:parseInt(t.slice(5,11).join(""),2),s:parseInt(t.slice(11,16).join(""),2)*2,Y:parseInt(i.slice(0,7).join(""),2)+1980,M:parseInt(i.slice(7,11).join(""),2),D:parseInt(i.slice(11,16).join(""),2)},n=[r.Y,r.M,r.D].join("-")+" "+[r.h,r.m,r.s].join(":")+" GMT+0";return new Date(n).getTime()}function Ah(s,e){let t=(s>>>0).toString(2);for(;t.length<e;)t="0"+t;return t.split("")}function $e(s,e){return s.readUInt32LE(e+4)*4294967296+s.readUInt32LE(e)}Nh.exports=ze});var hd={};Zh(hd,{StackUtils:()=>Ph.default,StreamZip:()=>$h.async,WebSocket:()=>bo,WebSocketServer:()=>Os.default,ZipFile:()=>Wh.ZipFile,codeFrameColumns:()=>Mh.codeFrameColumns,findUpSync:()=>nh,glob:()=>Fi,open:()=>Bh.default,program:()=>Bo,sanitize:()=>Uh.default,supportsColor:()=>Fh});module.exports=Yh(hd);var Ph=k(Wr()),Mh=k(cn());var Wl=k(mn(),1),$l=k(ps(),1),zl=k(_s(),1),_o=k(vs(),1),Os=k(go(),1);var bo=_o.default;var Uh=k(Co());var Uo=k(Mo(),1),{program:Bo,createCommand:Vd,createArgument:qd,createOption:Zd,CommanderError:Yd,InvalidArgumentError:Kd,InvalidOptionArgumentError:Xd,Command:Jd,Argument:Qd,Option:ep,Help:tp}=Uo.default;var Bh=k(Qo());var Ea=k(fa(),1);var Dt=s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")};var Dc={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Rt=s=>s.replace(/[[\]\\-]/g,"\\$&"),Rc=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),da=s=>s.join(""),pa=(s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],r=[],n=t+1,o=!1,h=!1,a=!1,u=!1,l=t,c="";e:for(;n<s.length;){let f=s.charAt(n);if((f==="!"||f==="^")&&n===t+1){u=!0,n++;continue}if(f==="]"&&o&&!a){l=n+1;break}if(o=!0,f==="\\"&&!a){a=!0,n++;continue}if(f==="["&&!a){for(let[b,[g,E,C]]of Object.entries(Dc))if(s.startsWith(b,n)){if(c)return["$.",!1,s.length-t,!0];n+=b.length,C?r.push(g):i.push(g),h=h||E;continue e}}if(a=!1,c){f>c?i.push(Rt(c)+"-"+Rt(f)):f===c&&i.push(Rt(f)),c="",n++;continue}if(s.startsWith("-]",n+1)){i.push(Rt(f+"-")),n+=2;continue}if(s.startsWith("-",n+1)){c=f,n+=2;continue}i.push(Rt(f)),n++}if(l<n)return["",!1,0,!1];if(!i.length&&!r.length)return["$.",!1,s.length-t,!0];if(r.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let f=i[0].length===2?i[0].slice(-1):i[0];return[Rc(f),!1,l-t,!1]}let d="["+(u?"^":"")+da(i)+"]",p="["+(u?"":"^")+da(r)+"]";return[i.length&&r.length?"("+d+"|"+p+")":i.length?d:p,h,l-t,!0]};var ce=(s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var kc=new Set(["!","?","+","*","@"]),ma=s=>kc.has(s),Fc="(?!(?:^|/)\\.\\.?(?:$|/))",bi="(?!\\.)",Pc=new Set(["[","."]),Mc=new Set(["..","."]),Uc=new Set("().*{}+?[]^$\\!"),Bc=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xs="[^/]",ga=Xs+"*?",_a=Xs+"+?",rt=class s{type;#e;#t;#n=!1;#s=[];#o;#E;#u;#c=!1;#a;#h;#r=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#c&&this.#u.push(this),this.#E=this.#o?this.#o.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#s)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#s.map(e=>String(e)).join("|")+")":this.#h=this.#s.map(e=>String(e)).join("")}#g(){if(this!==this.#e)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let r=t.#E+1;!i.type&&r<i.#s.length;r++)for(let n of e.#s){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(i.#s[r])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#o===this))throw new Error("invalid part: "+t);this.#s.push(t)}}toJSON(){var t;let e=this.type===null?this.#s.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#s.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&((t=this.#o)==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(this.#e===this)return!0;if(!((t=this.#o)!=null&&t.isStart()))return!1;if(this.#E===0)return!0;let e=this.#o;for(let i=0;i<this.#E;i++){let r=e.#s[i];if(!(r instanceof s&&r.type==="!"))return!1}return!0}isEnd(){var t,i,r;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((i=this.#o)!=null&&i.isEnd()))return!1;if(!this.type)return(r=this.#o)==null?void 0:r.isEnd();let e=this.#o?this.#o.#s.length:0;return this.#E===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let i of this.#s)t.copyIn(i);return t}static#_(e,t,i,r){let n=!1,o=!1,h=-1,a=!1;if(t.type===null){let p=i,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===h+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===h+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,h=p,a=!1,m+=f;continue}if(!r.noext&&ma(f)&&e.charAt(p)==="("){t.push(m),m="";let b=new s(f,t);p=s.#_(e,b,p,r),t.push(b);continue}m+=f}return t.push(m),p}let u=i+1,l=new s(null,t),c=[],d="";for(;u<e.length;){let p=e.charAt(u++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){u===h+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(u===h+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,h=u,a=!1,d+=p;continue}if(ma(p)&&e.charAt(u)==="("){l.push(d),d="";let m=new s(p,l);l.push(m),u=s.#_(e,m,u,r);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new s(null,t);continue}if(p===")")return d===""&&t.#s.length===0&&(t.#r=!0),l.push(d),d="",t.push(...c,l),u;d+=p}return t.type=null,t.#t=void 0,t.#s=[e.substring(i-1)],u}static fromGlob(e,t={}){let i=new s(null,void 0,t);return s.#_(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,r,n]=this.toRegExpSource();if(!(r||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let h=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,h),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){var a;let t=e??!!this.#a.dot;if(this.#e===this&&this.#g(),!this.type){let u=this.isStart()&&this.isEnd(),l=this.#s.map(m=>{let[f,b,g,E]=typeof m=="string"?s.#f(m,this.#t,u):m.toRegExpSource(e);return this.#t=this.#t||g,this.#n=this.#n||E,f}).join(""),c="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&Mc.has(this.#s[0]))){let f=Pc,b=t&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),g=!t&&!e&&f.has(l.charAt(0));c=b?Fc:g?bi:""}let d="";return this.isEnd()&&this.#e.#c&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,ce(l),this.#t=!!this.#t,this.#n]}let i=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let u=this.toString();return this.#s=[u],this.type=null,this.#t=void 0,[u,ce(this.toString()),!1,!1]}let o=!i||e||t||!bi?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let h="";if(this.type==="!"&&this.#r)h=(this.isStart()&&!t?bi:"")+_a;else{let u=this.type==="!"?"))"+(this.isStart()&&!t&&!e?bi:"")+ga+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=r+n+u}return[h,ce(n),this.#t=!!this.#t,this.#n]}#d(e){return this.#s.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,r,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,i=!1){let r=!1,n="",o=!1;for(let h=0;h<e.length;h++){let a=e.charAt(h);if(r){r=!1,n+=(Uc.has(a)?"\\":"")+a;continue}if(a==="\\"){h===e.length-1?n+="\\\\":r=!0;continue}if(a==="["){let[u,l,c,d]=pa(e,h);if(c){n+=u,o=o||l,h+=c-1,t=t||d;continue}}if(a==="*"){i&&e==="*"?n+=_a:n+=ga,t=!0;continue}if(a==="?"){n+=Xs,t=!0;continue}n+=Bc(a)}return[n,ce(e),!!t,o]}};var nt=(s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&");var Z=(s,e,t={})=>(Dt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Q(e,t).match(s)),Wc=/^\*+([^+@!?\*\[\(]*)$/,$c=s=>e=>!e.startsWith(".")&&e.endsWith(s),zc=s=>e=>e.endsWith(s),jc=s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),Hc=s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),Gc=/^\*+\.\*+$/,Vc=s=>!s.startsWith(".")&&s.includes("."),qc=s=>s!=="."&&s!==".."&&s.includes("."),Zc=/^\.\*+$/,Yc=s=>s!=="."&&s!==".."&&s.startsWith("."),Kc=/^\*+$/,Xc=s=>s.length!==0&&!s.startsWith("."),Jc=s=>s.length!==0&&s!=="."&&s!=="..",Qc=/^\?+([^+@!?\*\[\(]*)?$/,ef=([s,e=""])=>{let t=ya([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},tf=([s,e=""])=>{let t=Sa([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},sf=([s,e=""])=>{let t=Sa([s]);return e?i=>t(i)&&i.endsWith(e):t},rf=([s,e=""])=>{let t=ya([s]);return e?i=>t(i)&&i.endsWith(e):t},ya=([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},Sa=([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},xa=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",ba={win32:{sep:"\\"},posix:{sep:"/"}},nf=xa==="win32"?ba.win32.sep:ba.posix.sep;Z.sep=nf;var G=Symbol("globstar **");Z.GLOBSTAR=G;var of="[^/]",af=of+"*?",hf="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",uf="(?:(?!(?:\\/|^)\\.).)*?",lf=(s,e={})=>t=>Z(t,s,e);Z.filter=lf;var re=(s,e={})=>Object.assign({},s,e),cf=s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return Z;let e=Z;return Object.assign((i,r,n={})=>e(i,r,re(s,n)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,re(s,n))}static defaults(r){return e.defaults(re(s,r)).Minimatch}},AST:class extends e.AST{constructor(r,n,o={}){super(r,n,re(s,o))}static fromGlob(r,n={}){return e.AST.fromGlob(r,re(s,n))}},unescape:(i,r={})=>e.unescape(i,re(s,r)),escape:(i,r={})=>e.escape(i,re(s,r)),filter:(i,r={})=>e.filter(i,re(s,r)),defaults:i=>e.defaults(re(s,i)),makeRe:(i,r={})=>e.makeRe(i,re(s,r)),braceExpand:(i,r={})=>e.braceExpand(i,re(s,r)),match:(i,r,n={})=>e.match(i,r,re(s,n)),sep:e.sep,GLOBSTAR:G})};Z.defaults=cf;var va=(s,e={})=>(Dt(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,Ea.default)(s));Z.braceExpand=va;var ff=(s,e={})=>new Q(s,e).makeRe();Z.makeRe=ff;var df=(s,e,t={})=>{let i=new Q(e,t);return s=s.filter(r=>i.match(r)),i.options.nonull&&!s.length&&s.push(e),s};Z.match=df;var wa=/[?*]|[+@!]\(.*?\)|\[|\]/,pf=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Dt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||xa,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!wa.test(n[2]))&&!wa.test(n[3]),u=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(u)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let o=this.set[n];o[0]===""&&o[1]===""&&this.globParts[n][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let r=0;r<e[i].length;r++)e[i][r]==="**"&&(e[i][r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let r=i;for(;t[r+1]==="**";)r++;r!==i&&t.splice(i,r-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,r)=>{let n=i[i.length-1];return r==="**"&&n==="**"?i:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(r),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let n=e[r];r===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let r=e[i-1];r&&r!=="."&&r!==".."&&r!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let r=-1;for(;(r=i.indexOf("**",r+1))!==-1;){let o=r;for(;i[o+1]==="**";)o++;o>r&&i.splice(r+1,o-r);let h=i[r+1],a=i[r+2],u=i[r+3];if(h!==".."||!a||a==="."||a===".."||!u||u==="."||u==="..")continue;t=!0,i.splice(r,1);let l=i.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let h=i[o];o===1&&h===""&&i[0]===""||(h==="."||h==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let n=0;for(;(n=i.indexOf("..",n+1))!==-1;){let o=i[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&i[n+1]==="**"?["."]:[];i.splice(n-1,2,...a),i.length===0&&i.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let r=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(r){e[t]=[],e[i]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let r=0,n=0,o=[],h="";for(;r<e.length&&n<t.length;)if(e[r]===t[n])o.push(h==="b"?t[n]:e[r]),r++,n++;else if(i&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(i&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(h==="b")return!1;h="a",o.push(e[r]),r++,n++}else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(h==="a")return!1;h="b",o.push(t[n]),r++,n++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let r=this.options;if(this.isWindows){let f=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!f&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),g=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),E=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),C=b?3:f?0:void 0,x=E?3:g?0:void 0;if(typeof C=="number"&&typeof x=="number"){let[T,I]=[e[C],t[x]];T.toLowerCase()===I.toLowerCase()&&(t[x]=T,x>C?t=t.slice(x):C>x&&(e=e.slice(C)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,h=0,a=e.length,u=t.length;o<a&&h<u;o++,h++){this.debug("matchOne loop");var l=t[h],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===G){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=h+1;if(p===u){for(this.debug("** at the end");o<a;o++)if(e[o]==="."||e[o]===".."||!r.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<a;){var m=e[d];if(this.debug(`
|
|
35
35
|
globstar while`,e,d,t,p,m),this.matchOne(e.slice(d),t.slice(p),i))return this.debug("globstar found match!",d,a,m),!0;if(m==="."||m===".."||!r.dot&&m.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(i&&(this.debug(`
|
|
36
|
-
>>> no match, partial?`,e,d,t,p),d===a))}let f;if(typeof l=="string"?(f=c===l,this.debug("string match",l,c,f)):(f=l.test(c),this.debug("pattern match",l,c,f)),!f)return!1}if(o===a&&h===u)return!0;if(o===a)return i;if(h===u)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return xa(this.pattern,this.options)}parse(e){Dt(e);let t=this.options;if(e==="**")return G;if(e==="")return"";let i,r=null;(i=e.match(qc))?r=t.dot?Yc:Zc:(i=e.match(Mc))?r=(t.nocase?t.dot?$c:Wc:t.dot?Bc:Uc)(i[1]):(i=e.match(Kc))?r=(t.nocase?t.dot?Jc:Xc:t.dot?Qc:ef)(i):(i=e.match(zc))?r=t.dot?Hc:jc:(i=e.match(Gc))&&(r=Vc);let n=rt.fromGlob(e,this.options).toMMPattern();return r&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:r}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?rf:t.dot?nf:of,r=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let u=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))r.add(c);return typeof l=="string"?cf(l):l===G?G:l._src});return u.forEach((l,c)=>{let d=u[c+1],p=u[c-1];l!==G||p===G||(p===void 0?d!==void 0&&d!==G?u[c+1]="(?:\\/|"+i+"\\/)?"+d:u[c]=i:d===void 0?u[c-1]=p+"(?:\\/|"+i+")?":d!==G&&(u[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+d,u[c+1]=G))}),u.filter(l=>l!==G).join("/")}).join("|"),[o,h]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+h+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let n=this.set;this.debug(this.pattern,"set",n);let o=r[r.length-1];if(!o)for(let h=r.length-2;!o&&h>=0;h--)o=r[h];for(let h=0;h<n.length;h++){let a=n[h],u=r;if(i.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Z.defaults(e).Minimatch}};Z.AST=rt;Z.Minimatch=Q;Z.escape=nt;Z.unescape=ce;var Za=require("node:url");var ot=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oa=new Set,Js=typeof process=="object"&&process?process:{},Ta=(s,e,t,i)=>{typeof Js.emitWarning=="function"?Js.emitWarning(s,e,t,i):console.error(`[${t}] ${e}: ${s}`)},bi=globalThis.AbortController,va=globalThis.AbortSignal,Ca;if(typeof bi>"u"){va=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},bi=class{constructor(){e()}signal=new va;abort(i){var r,n;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(n=(r=this.signal).onabort)==null||n.call(r,i)}}};let s=((Ca=Js.env)==null?void 0:Ca.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{s&&(s=!1,Ta("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var ff=s=>!Oa.has(s),Cp=Symbol("type"),De=s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),La=s=>De(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?at:null:null,at=class extends Array{constructor(e){super(e),this.fill(0)}},Qs=class s{heap;length;static#e=!1;static create(e){let t=La(e);if(!t)return[];s.#e=!0;let i=new s(e,t);return s.#e=!1,i}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},kt=class s{#e;#t;#n;#s;#o;#E;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#c;#a;#h;#r;#g;#_;#d;#f;#x;#m;#v;#C;#w;#y;#S;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#w,sizes:e.#v,keyMap:e.#a,keyList:e.#h,valList:e.#r,next:e.#g,prev:e.#_,get head(){return e.#d},get tail(){return e.#f},free:e.#x,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,i,r,n)=>e.#U(t,i,r,n),moveToTail:t=>e.#W(t),indexes:t=>e.#T(t),rindexes:t=>e.#L(t),isStale:t=>e.#b(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#u}get fetchMethod(){return this.#o}get memoMethod(){return this.#E}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:b,memoMethod:g,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:T,ignoreFetchAbort:I}=e;if(t!==0&&!De(t))throw new TypeError("max option must be a nonnegative integer");let W=t?La(t):Array;if(!W)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=m||this.#t,this.sizeCalculation=f,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#E=g,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=b,this.#S=!!b,this.#a=new Map,this.#h=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new W(t),this.#_=new W(t),this.#d=0,this.#f=0,this.#x=Qs.create(t),this.#u=0,this.#c=0,typeof u=="function"&&(this.#n=u),typeof l=="function"?(this.#s=l,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#y=!!this.#n,this.#p=!!this.#s,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.#t!==0&&!De(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=De(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!De(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let X="LRU_CACHE_UNBOUNDED";ff(X)&&(Oa.add(X),Ta("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",X,s))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new at(this.#e),t=new at(this.#e);this.#w=e,this.#C=t,this.#D=(n,o,h=ot.now())=>{if(t[n]=o!==0?h:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#b(n)&&this.#N(this.#h[n],"expire")},o+1);a.unref&&a.unref()}},this.#O=n=>{t[n]=e[n]!==0?ot.now():0},this.#i=(n,o)=>{if(e[o]){let h=e[o],a=t[o];if(!h||!a)return;n.ttl=h,n.start=a,n.now=i||r();let u=n.now-a;n.remainingTTL=h-u}};let i=0,r=()=>{let n=ot.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#a.get(n);if(o===void 0)return 0;let h=e[o],a=t[o];if(!h||!a)return 1/0;let u=(i||r())-a;return h-u},this.#b=n=>{let o=t[n],h=e[n];return!!h&&!!o&&(i||r())-o>h}}#O=()=>{};#i=()=>{};#D=()=>{};#b=()=>!1;#I(){let e=new at(this.#e);this.#c=0,this.#v=e,this.#R=t=>{this.#c-=e[t],e[t]=0},this.#F=(t,i,r,n)=>{if(this.#l(i))return 0;if(!De(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(i,t),!De(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#k=(t,i,r)=>{if(e[t]=i,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#M(!0)}this.#c+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#c)}}#R=e=>{};#k=(e,t,i)=>{};#F=(e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#f;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#d));)t=this.#_[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#d;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#f));)t=this.#g[t]}#P(e){return e!==void 0&&this.#a.get(this.#h[e])===e}*entries(){for(let e of this.#T())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*rentries(){for(let e of this.#L())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*keys(){for(let e of this.#T()){let t=this.#h[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#h[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*values(){for(let e of this.#T())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#L())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#T()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#L()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#b(t)&&(this.#N(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#r[t],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0)return;let n={value:r};if(this.#w&&this.#C){let o=this.#w[t],h=this.#C[t];if(o&&h){let a=o-(ot.now()-h);n.ttl=a,n.start=Date.now()}}return this.#v&&(n.size=this.#v[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:!0})){let i=this.#h[t],r=this.#r[t],n=this.#l(r)?r.__staleWhileFetching:r;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#w&&this.#C){o.ttl=this.#w[t];let h=ot.now()-this.#C[t];o.start=Math.floor(Date.now()-h)}this.#v&&(o.size=this.#v[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=ot.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){var d,p,m,f,b;if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,l=this.#F(e,t,i.size||0,h);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#N(e,"set"),this;let c=this.#u===0?void 0:this.#a.get(e);if(c===void 0)c=this.#u===0?this.#f:this.#x.length!==0?this.#x.pop():this.#u===this.#e?this.#M(!1):this.#u,this.#h[c]=e,this.#r[c]=t,this.#a.set(e,c),this.#g[this.#f]=c,this.#_[c]=this.#f,this.#f=c,this.#u++,this.#k(c,l,a),a&&(a.set="add"),u=!1;else{this.#W(c);let g=this.#r[c];if(t!==g){if(this.#S&&this.#l(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:E}=g;E!==void 0&&!o&&(this.#y&&((d=this.#n)==null||d.call(this,E,e,"set")),this.#p&&((p=this.#m)==null||p.push([E,e,"set"])))}else o||(this.#y&&((m=this.#n)==null||m.call(this,g,e,"set")),this.#p&&((f=this.#m)==null||f.push([g,e,"set"])));if(this.#R(c),this.#k(c,l,a),this.#r[c]=t,a){a.set="replace";let E=g&&this.#l(g)?g.__staleWhileFetching:g;E!==void 0&&(a.oldValue=E)}}else a&&(a.set="update")}if(r!==0&&!this.#w&&this.#A(),this.#w&&(u||this.#D(c,r,n),a&&this.#i(a,c)),!o&&this.#p&&this.#m){let g=this.#m,E;for(;E=g==null?void 0:g.shift();)(b=this.#s)==null||b.call(this,...E)}return this}pop(){var e;try{for(;this.#u;){let t=this.#r[this.#d];if(this.#M(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#m){let t=this.#m,i;for(;i=t==null?void 0:t.shift();)(e=this.#s)==null||e.call(this,...i)}}}#M(e){var n,o;let t=this.#d,i=this.#h[t],r=this.#r[t];return this.#S&&this.#l(r)?r.__abortController.abort(new Error("evicted")):(this.#y||this.#p)&&(this.#y&&((n=this.#n)==null||n.call(this,r,i,"evict")),this.#p&&((o=this.#m)==null||o.push([r,i,"evict"]))),this.#R(t),e&&(this.#h[t]=void 0,this.#r[t]=void 0,this.#x.push(t)),this.#u===1?(this.#d=this.#f=0,this.#x.length=0):this.#d=this.#g[t],this.#a.delete(i),this.#u--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,n=this.#a.get(e);if(n!==void 0){let o=this.#r[n];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#b(n))r&&(r.has="stale",this.#i(r,n));else return i&&this.#O(n),r&&(r.has="hit",this.#i(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#a.get(e);if(r===void 0||!i&&this.#b(r))return;let n=this.#r[r];return this.#l(n)?n.__staleWhileFetching:n}#U(e,t,i,r){let n=t===void 0?void 0:this.#r[t];if(this.#l(n))return n;let o=new bi,{signal:h}=i;h==null||h.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:r},u=(f,b=!1)=>{let{aborted:g}=o.signal,E=i.ignoreFetchAbort&&f!==void 0;if(i.status&&(g&&!b?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,E&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),g&&!E&&!b)return c(o.signal.reason);let C=p;return this.#r[t]===p&&(f===void 0?C.__staleWhileFetching?this.#r[t]=C.__staleWhileFetching:this.#N(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),c(f)),c=f=>{let{aborted:b}=o.signal,g=b&&i.allowStaleOnFetchAbort,E=g||i.allowStaleOnFetchRejection,C=E||i.noDeleteOnFetchRejection,x=p;if(this.#r[t]===p&&(!C||x.__staleWhileFetching===void 0?this.#N(e,"fetch"):g||(this.#r[t]=x.__staleWhileFetching)),E)return i.status&&x.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw f},d=(f,b)=>{var E;let g=(E=this.#o)==null?void 0:E.call(this,e,n,a);g&&g instanceof Promise&&g.then(C=>f(C===void 0?void 0:C),b),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=C=>u(C,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(u,l),m=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,m,{...a.options,status:void 0}),t=this.#a.get(e)):this.#r[t]=m,m}#l(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof bi}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:g,signal:E}=t;if(!this.#S)return g&&(g.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:g});let C={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:E},x=this.#a.get(e);if(x===void 0){g&&(g.fetch="miss");let T=this.#U(e,x,C,f);return T.__returned=T}else{let T=this.#r[x];if(this.#l(T)){let ye=i&&T.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",ye&&(g.returnedStale=!0)),ye?T.__staleWhileFetching:T.__returned=T}let I=this.#b(x);if(!b&&!I)return g&&(g.fetch="hit"),this.#W(x),r&&this.#O(x),g&&this.#i(g,x),T;let W=this.#U(e,x,C,f),B=W.__staleWhileFetching!==void 0&&i;return g&&(g.fetch=I?"stale":"refresh",B&&I&&(g.returnedStale=!0)),B?W.__staleWhileFetching:W.__returned=W}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#E;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=t,h=this.get(e,o);if(!n&&h!==void 0)return h;let a=i(e,h,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,h=this.#a.get(e);if(h!==void 0){let a=this.#r[h],u=this.#l(a);return o&&this.#i(o,h),this.#b(h)?(o&&(o.get="stale"),u?(o&&i&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?a.__staleWhileFetching:void 0):(n||this.#N(e,"expire"),o&&i&&(o.returnedStale=!0),i?a:void 0)):(o&&(o.get="hit"),u?a.__staleWhileFetching:(this.#W(h),r&&this.#O(h),a))}else o&&(o.get="miss")}#B(e,t){this.#_[t]=e,this.#g[e]=t}#W(e){e!==this.#f&&(e===this.#d?this.#d=this.#g[e]:this.#B(this.#_[e],this.#g[e]),this.#B(this.#f,e),this.#f=e)}delete(e){return this.#N(e,"delete")}#N(e,t){var r,n,o,h;let i=!1;if(this.#u!==0){let a=this.#a.get(e);if(a!==void 0)if(i=!0,this.#u===1)this.#$(t);else{this.#R(a);let u=this.#r[a];if(this.#l(u)?u.__abortController.abort(new Error("deleted")):(this.#y||this.#p)&&(this.#y&&((r=this.#n)==null||r.call(this,u,e,t)),this.#p&&((n=this.#m)==null||n.push([u,e,t]))),this.#a.delete(e),this.#h[a]=void 0,this.#r[a]=void 0,a===this.#f)this.#f=this.#_[a];else if(a===this.#d)this.#d=this.#g[a];else{let l=this.#_[a];this.#g[l]=this.#g[a];let c=this.#g[a];this.#_[c]=this.#_[a]}this.#u--,this.#x.push(a)}}if(this.#p&&((o=this.#m)!=null&&o.length)){let a=this.#m,u;for(;u=a==null?void 0:a.shift();)(h=this.#s)==null||h.call(this,...u)}return i}clear(){return this.#$("delete")}#$(e){var t,i,r;for(let n of this.#L({allowStale:!0})){let o=this.#r[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let h=this.#h[n];this.#y&&((t=this.#n)==null||t.call(this,o,h,e)),this.#p&&((i=this.#m)==null||i.push([o,h,e]))}}if(this.#a.clear(),this.#r.fill(void 0),this.#h.fill(void 0),this.#w&&this.#C&&(this.#w.fill(0),this.#C.fill(0)),this.#v&&this.#v.fill(0),this.#d=0,this.#f=0,this.#x.length=0,this.#c=0,this.#u=0,this.#p&&this.#m){let n=this.#m,o;for(;o=n==null?void 0:n.shift();)(r=this.#s)==null||r.call(this,...o)}}};var lt=require("node:path"),Ua=require("node:url"),Ee=require("fs"),Sf=k(require("node:fs"),1),Fe=require("node:fs/promises");var Ci=require("node:events"),or=k(require("node:stream"),1),Ra=require("node:string_decoder"),Aa=typeof process=="object"&&process?process:{stdout:null,stderr:null},df=s=>!!s&&typeof s=="object"&&(s instanceof ke||s instanceof or.default||pf(s)||mf(s)),pf=s=>!!s&&typeof s=="object"&&s instanceof Ci.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==or.default.Writable.prototype.pipe,mf=s=>!!s&&typeof s=="object"&&s instanceof Ci.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function",Te=Symbol("EOF"),Le=Symbol("maybeEmitEnd"),Re=Symbol("emittedEnd"),wi=Symbol("emittingEnd"),Ft=Symbol("emittedError"),Ei=Symbol("closed"),Ia=Symbol("read"),yi=Symbol("flush"),Na=Symbol("flushChunk"),fe=Symbol("encoding"),ht=Symbol("decoder"),z=Symbol("flowing"),Pt=Symbol("paused"),ut=Symbol("resume"),j=Symbol("buffer"),Y=Symbol("pipes"),H=Symbol("bufferLength"),er=Symbol("bufferPush"),Si=Symbol("bufferShift"),V=Symbol("objectMode"),M=Symbol("destroyed"),tr=Symbol("error"),ir=Symbol("emitData"),Da=Symbol("emitEnd"),sr=Symbol("emitEnd2"),be=Symbol("async"),rr=Symbol("abort"),xi=Symbol("aborted"),Mt=Symbol("signal"),Ye=Symbol("dataListeners"),ee=Symbol("discarded"),Ut=s=>Promise.resolve().then(s),gf=s=>s(),_f=s=>s==="end"||s==="finish"||s==="prefinish",bf=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,wf=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),vi=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[ut](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},nr=class extends vi{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},Ef=s=>!!s.objectMode,yf=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",ke=class extends Ci.EventEmitter{[z]=!1;[Pt]=!1;[Y]=[];[j]=[];[V];[fe];[be];[ht];[Te]=!1;[Re]=!1;[wi]=!1;[Ei]=!1;[Ft]=null;[H]=0;[M]=!1;[Mt];[xi]=!1;[Ye]=0;[ee]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Ef(t)?(this[V]=!0,this[fe]=null):yf(t)?(this[fe]=t.encoding,this[V]=!1):(this[V]=!1,this[fe]=null),this[be]=!!t.async,this[ht]=this[fe]?new Ra.StringDecoder(this[fe]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[j]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Y]});let{signal:i}=t;i&&(this[Mt]=i,i.aborted?this[rr]():i.addEventListener("abort",()=>this[rr]()))}get bufferLength(){return this[H]}get encoding(){return this[fe]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[V]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[be]}set async(e){this[be]=this[be]||!!e}[rr](){var e,t;this[xi]=!0,this.emit("abort",(e=this[Mt])==null?void 0:e.reason),this.destroy((t=this[Mt])==null?void 0:t.reason)}get aborted(){return this[xi]}set aborted(e){}write(e,t,i){var n;if(this[xi])return!1;if(this[Te])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let r=this[be]?Ut:gf;if(!this[V]&&!Buffer.isBuffer(e)){if(wf(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(bf(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[V]?(this[z]&&this[H]!==0&&this[yi](!0),this[z]?this.emit("data",e):this[er](e),this[H]!==0&&this.emit("readable"),i&&r(i),this[z]):e.length?(typeof e=="string"&&!(t===this[fe]&&!((n=this[ht])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[fe]&&(e=this[ht].write(e)),this[z]&&this[H]!==0&&this[yi](!0),this[z]?this.emit("data",e):this[er](e),this[H]!==0&&this.emit("readable"),i&&r(i),this[z]):(this[H]!==0&&this.emit("readable"),i&&r(i),this[z])}read(e){if(this[M])return null;if(this[ee]=!1,this[H]===0||e===0||e&&e>this[H])return this[Le](),null;this[V]&&(e=null),this[j].length>1&&!this[V]&&(this[j]=[this[fe]?this[j].join(""):Buffer.concat(this[j],this[H])]);let t=this[Ia](e||null,this[j][0]);return this[Le](),t}[Ia](e,t){if(this[V])this[Si]();else{let i=t;e===i.length||e===null?this[Si]():typeof i=="string"?(this[j][0]=i.slice(e),t=i.slice(0,e),this[H]-=e):(this[j][0]=i.subarray(e),t=i.subarray(0,e),this[H]-=e)}return this.emit("data",t),!this[j].length&&!this[Te]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[Te]=!0,this.writable=!1,(this[z]||!this[Pt])&&this[Le](),this}[ut](){this[M]||(!this[Ye]&&!this[Y].length&&(this[ee]=!0),this[Pt]=!1,this[z]=!0,this.emit("resume"),this[j].length?this[yi]():this[Te]?this[Le]():this.emit("drain"))}resume(){return this[ut]()}pause(){this[z]=!1,this[Pt]=!0,this[ee]=!1}get destroyed(){return this[M]}get flowing(){return this[z]}get paused(){return this[Pt]}[er](e){this[V]?this[H]+=1:this[H]+=e.length,this[j].push(e)}[Si](){return this[V]?this[H]-=1:this[H]-=this[j][0].length,this[j].shift()}[yi](e=!1){do;while(this[Na](this[Si]())&&this[j].length);!e&&!this[j].length&&!this[Te]&&this.emit("drain")}[Na](e){return this.emit("data",e),this[z]}pipe(e,t){if(this[M])return e;this[ee]=!1;let i=this[Re];return t=t||{},e===Aa.stdout||e===Aa.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[Y].push(t.proxyErrors?new nr(this,e,t):new vi(this,e,t)),this[be]?Ut(()=>this[ut]()):this[ut]()),e}unpipe(e){let t=this[Y].find(i=>i.dest===e);t&&(this[Y].length===1?(this[z]&&this[Ye]===0&&(this[z]=!1),this[Y]=[]):this[Y].splice(this[Y].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[ee]=!1,this[Ye]++,!this[Y].length&&!this[z]&&this[ut]();else if(e==="readable"&&this[H]!==0)super.emit("readable");else if(_f(e)&&this[Re])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ft]){let r=t;this[be]?Ut(()=>r.call(this,this[Ft])):r.call(this,this[Ft])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Ye]=this.listeners("data").length,this[Ye]===0&&!this[ee]&&!this[Y].length&&(this[z]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ye]=0,!this[ee]&&!this[Y].length&&(this[z]=!1)),t}get emittedEnd(){return this[Re]}[Le](){!this[wi]&&!this[Re]&&!this[M]&&this[j].length===0&&this[Te]&&(this[wi]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ei]&&this.emit("close"),this[wi]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[V]&&!i?!1:this[be]?(Ut(()=>this[ir](i)),!0):this[ir](i);if(e==="end")return this[Da]();if(e==="close"){if(this[Ei]=!0,!this[Re]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ft]=i,super.emit(tr,i);let n=!this[Mt]||this.listeners("error").length?super.emit("error",i):!1;return this[Le](),n}else if(e==="resume"){let n=super.emit("resume");return this[Le](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let r=super.emit(e,...t);return this[Le](),r}[ir](e){for(let i of this[Y])i.dest.write(e)===!1&&this.pause();let t=this[ee]?!1:super.emit("data",e);return this[Le](),t}[Da](){return this[Re]?!1:(this[Re]=!0,this.readable=!1,this[be]?(Ut(()=>this[sr]()),!0):this[sr]())}[sr](){if(this[ht]){let t=this[ht].end();if(t){for(let i of this[Y])i.dest.write(t);this[ee]||super.emit("data",t)}}for(let t of this[Y])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[V]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[V]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[V])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[fe]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(M,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ee]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Te])return t();let n,o,h=c=>{this.off("data",a),this.off("end",u),this.off(M,l),t(),o(c)},a=c=>{this.off("error",h),this.off("end",u),this.off(M,l),this.pause(),n({value:c,done:!!this[Te]})},u=()=>{this.off("error",h),this.off("data",a),this.off(M,l),t(),n({done:!0,value:void 0})},l=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(M,l),this.once("error",h),this.once("end",u),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ee]=!1;let e=!1,t=()=>(this.pause(),this.off(tr,t),this.off(M,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(tr,t),this.once(M,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ee]=!0,this[j].length=0,this[H]=0;let t=this;return typeof t.close=="function"&&!this[Ei]&&t.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return df}};var xf=Ee.realpathSync.native,Wt={lstatSync:Ee.lstatSync,readdir:Ee.readdir,readdirSync:Ee.readdirSync,readlinkSync:Ee.readlinkSync,realpathSync:xf,promises:{lstat:Fe.lstat,readdir:Fe.readdir,readlink:Fe.readlink,realpath:Fe.realpath}},Ba=s=>!s||s===Wt||s===Sf?Wt:{...Wt,...s,promises:{...Wt.promises,...s.promises||{}}},Wa=/^\\\\\?\\([a-z]:)\\?$/i,vf=s=>s.replace(/\//g,"\\").replace(Wa,"$1\\"),Cf=/[\\\/]/,oe=0,$a=1,za=2,we=4,ja=6,Ha=8,Ke=10,Ga=12,ne=15,Bt=~ne,ar=16,ka=32,$t=64,de=128,Oi=256,Li=512,Fa=$t|de|Li,Of=1023,hr=s=>s.isFile()?Ha:s.isDirectory()?we:s.isSymbolicLink()?Ke:s.isCharacterDevice()?za:s.isBlockDevice()?ja:s.isSocket()?Ga:s.isFIFO()?$a:oe,Pa=new Map,zt=s=>{let e=Pa.get(s);if(e)return e;let t=s.normalize("NFKD");return Pa.set(s,t),t},Ma=new Map,Ti=s=>{let e=Ma.get(s);if(e)return e;let t=zt(s.toLowerCase());return Ma.set(s,t),t},Ai=class extends kt{constructor(){super({max:256})}},ur=class extends kt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Va=Symbol("PathScurry setAsCwd"),q=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#s;get nlink(){return this.#s}#o;get uid(){return this.#o}#E;get gid(){return this.#E}#u;get rdev(){return this.#u}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#h;get size(){return this.#h}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#_;get mtimeMs(){return this.#_}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#x;get atime(){return this.#x}#m;get mtime(){return this.#m}#v;get ctime(){return this.#v}#C;get birthtime(){return this.#C}#w;#y;#S;#p;#A;#O;#i;#D;#b;#I;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=oe,i,r,n,o,h){this.name=e,this.#w=n?Ti(e):zt(e),this.#i=t&Of,this.nocase=n,this.roots=r,this.root=i||this,this.#D=o,this.#S=h.fullpath,this.#A=h.relative,this.#O=h.relativePosix,this.parent=h.parent,this.parent?this.#e=this.parent.#e:this.#e=Ba(h.fs)}depth(){return this.#y!==void 0?this.#y:this.parent?this.#y=this.parent.depth()+1:this.#y=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#R(r):this.#R(r)}#R(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#D.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#D.set(this,t),this.#i&=~ar,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),r=this.nocase?Ti(e):zt(e);for(let a of i)if(a.#w===r)return a;let n=this.parent?this.sep:"",o=this.#S?this.#S+n+e:void 0,h=this.newChild(e,oe,{...t,parent:this,fullpath:o});return this.canReaddir()||(h.#i|=de),i.push(h),h}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,t=this.parent;if(!t)return this.#A=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#S=r}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#p=`//?/${r}`:this.#p=r}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#i&ne)===oe}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#i&ne)===Ha}isDirectory(){return(this.#i&ne)===we}isCharacterDevice(){return(this.#i&ne)===za}isBlockDevice(){return(this.#i&ne)===ja}isFIFO(){return(this.#i&ne)===$a}isSocket(){return(this.#i&ne)===Ga}isSymbolicLink(){return(this.#i&Ke)===Ke}lstatCached(){return this.#i&ka?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#I}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;let e=this.#i≠return!(e!==oe&&e!==Ke||this.#i&Oi||this.#i&de)}calledReaddir(){return!!(this.#i&ar)}isENOENT(){return!!(this.#i&de)}isNamed(e){return this.nocase?this.#w===Ti(e):this.#w===zt(e)}async readlink(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),r=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(r)return this.#b=r}catch(i){this.#l(i.code);return}}readlinkSync(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),r=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(r)return this.#b=r}catch(i){this.#l(i.code);return}}#k(e){this.#i|=ar;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#F()}}#F(){this.#i&de||(this.#i=(this.#i|de)&Bt,this.#T())}#T(){let e=this.children();e.provisional=0;for(let t of e)t.#F()}#L(){this.#i|=Li,this.#P()}#P(){if(this.#i&$t)return;let e=this.#i;(e&ne)===we&&(e&=Bt),this.#i=e|$t,this.#T()}#M(e=""){e==="ENOTDIR"||e==="EPERM"?this.#P():e==="ENOENT"?this.#F():this.children().provisional=0}#U(e=""){e==="ENOTDIR"?this.parent.#P():e==="ENOENT"&&this.#F()}#l(e=""){let t=this.#i;t|=Oi,e==="ENOENT"&&(t|=de),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Bt),this.#i=t,e==="ENOTDIR"&&this.parent&&this.parent.#P()}#B(e,t){return this.#N(e,t)||this.#W(e,t)}#W(e,t){let i=hr(e),r=this.newChild(e.name,i,{parent:this}),n=r.#i≠return n!==we&&n!==Ke&&n!==oe&&(r.#i|=$t),t.unshift(r),t.provisional++,r}#N(e,t){for(let i=t.provisional;i<t.length;i++){let r=t[i];if((this.nocase?Ti(e.name):zt(e.name))===r.#w)return this.#$(e,r,i,t)}}#$(e,t,i,r){let n=t.name;return t.#i=t.#i&Bt|hr(e),n!==e.name&&(t.name=e.name),i!==r.provisional&&(i===r.length-1?r.pop():r.splice(i,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#i&de))try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#U(e.code)}}lstatSync(){if(!(this.#i&de))try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#U(e.code)}}#G(e){let{atime:t,atimeMs:i,birthtime:r,birthtimeMs:n,blksize:o,blocks:h,ctime:a,ctimeMs:u,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:b,rdev:g,size:E,uid:C}=e;this.#x=t,this.#g=i,this.#C=r,this.#f=n,this.#c=o,this.#r=h,this.#v=a,this.#d=u,this.#t=l,this.#E=c,this.#a=d,this.#n=p,this.#m=m,this.#_=f,this.#s=b,this.#u=g,this.#h=E,this.#o=C;let x=hr(e);this.#i=this.#i&Bt|x|ka,x!==oe&&x!==we&&x!==Ke&&(this.#i|=$t)}#j=[];#H=!1;#V(e){this.#H=!1;let t=this.#j.slice();this.#j.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#j.push(e),this.#H)return;this.#H=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(n,o)=>{if(n)this.#M(n.code),i.provisional=0;else{for(let h of o)this.#B(h,i);this.#k(i)}this.#V(i.slice(0,i.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#z)await this.#z;else{let i=()=>{};this.#z=new Promise(r=>i=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#B(r,e);this.#k(e)}catch(r){this.#M(r.code),e.provisional=0}this.#z=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#B(i,e);this.#k(e)}catch(i){this.#M(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&Fa)return!1;let e=ne&this.#i;return e===oe||e===we||e===Ke}shouldWalk(e,t){return(this.#i&we)===we&&!(this.#i&Fa)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#I)return this.#I;if(!((Li|Oi|de)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#I)return this.#I;if(!((Li|Oi|de)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}[Va](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],r=this;for(;r&&r.parent;)t.add(r),r.#A=i.join(this.sep),r.#O=i.join("/"),r=r.parent,i.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#A=void 0,r.#O=void 0,r=r.parent}},Ii=class s extends q{sep="\\";splitSep=Cf;constructor(e,t=oe,i,r,n,o,h){super(e,t,i,r,n,o,h)}newChild(e,t=oe,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return lt.win32.parse(e).root}getRoot(e){if(e=vf(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new ct(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Wa,"$1\\"),e===t}},Ni=class s extends q{splitSep="/";sep="/";constructor(e,t=oe,i,r,n,o,h){super(e,t,i,r,n,o,h)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=oe,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Di=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#s;constructor(e=process.cwd(),t,i,{nocase:r,childrenCacheSize:n=16*1024,fs:o=Wt}={}){this.#s=Ba(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Ua.fileURLToPath)(e));let h=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#e=new Ai,this.#t=new Ai,this.#n=new ur(n);let a=h.substring(this.rootPath.length).split(i);if(a.length===1&&!a[0]&&a.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let u=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;u=u.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let r=await e.readdir();return i?r:r.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=[];(!n||n(e))&&h.push(i?e:e.fullpath());let a=new Set,u=(c,d)=>{a.add(c),c.readdirCB((p,m)=>{if(p)return d(p);let f=m.length;if(!f)return d();let b=()=>{--f===0&&d()};for(let g of m)(!n||n(g))&&h.push(i?g:g.fullpath()),r&&g.isSymbolicLink()?g.realpath().then(E=>E!=null&&E.isUnknown()?E.lstat():E).then(E=>E!=null&&E.shouldWalk(a,o)?u(E,b):b()):g.shouldWalk(a,o)?u(g,b):b()},!0)},l=e;return new Promise((c,d)=>{u(l,p=>{if(p)return d(p);c(h)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=[];(!n||n(e))&&h.push(i?e:e.fullpath());let a=new Set([e]);for(let u of a){let l=u.readdirSync();for(let c of l){(!n||n(c))&&h.push(i?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(r&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield i?e:e.fullpath());let h=new Set([e]);for(let a of h){let u=a.readdirSync();for(let l of u){(!n||n(l))&&(yield i?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(r&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,o)&&h.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=new ke({objectMode:!0});(!n||n(e))&&h.write(i?e:e.fullpath());let a=new Set,u=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&h.end();return}l++,a.add(p);let m=(b,g,E=!1)=>{if(b)return h.emit("error",b);if(r&&!E){let C=[];for(let x of g)x.isSymbolicLink()&&C.push(x.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T));if(C.length){Promise.all(C).then(()=>m(null,g,!0));return}}for(let C of g)C&&(!n||n(C))&&(h.write(i?C:C.fullpath())||(d=!0));l--;for(let C of g){let x=C.realpathCached()||C;x.shouldWalk(a,o)&&u.push(x)}d&&!h.flowing?h.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),h}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=new ke({objectMode:!0}),a=new Set;(!n||n(e))&&h.write(i?e:e.fullpath());let u=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&h.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(h.write(i?f:f.fullpath())||(d=!0));l--;for(let f of m){let b=f;if(f.isSymbolicLink()){if(!(r&&(b=f.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,o)&&u.push(b)}}d&&!h.flowing&&h.once("drain",c)};return c(),h}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Va](t)}},ct=class extends Di{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,lt.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return lt.win32.parse(e).root.toUpperCase()}newRoot(e){return new Ii(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},ft=class extends Di{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,lt.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new Ni(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},jt=class extends ft{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},Ip=process.platform==="win32"?Ii:Ni,qa=process.platform==="win32"?ct:process.platform==="darwin"?jt:ft;var Tf=s=>s.length>=1,Lf=s=>s.length>=1,dt=class s{#e;#t;#n;length;#s;#o;#E;#u;#c;#a;#h=!0;constructor(e,t,i,r){if(!Tf(e))throw new TypeError("empty pattern list");if(!Lf(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#n=i,this.#s=r,this.#n===0){if(this.isUNC()){let[n,o,h,a,...u]=this.#e,[l,c,d,p,...m]=this.#t;u[0]===""&&(u.shift(),m.shift());let f=[n,o,h,a,""].join("/"),b=[l,c,d,p,""].join("/");this.#e=[f,...u],this.#t=[b,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[h,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let u=n+"/",l=h+"/";this.#e=[u,...o],this.#t=[l,...a],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===G}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#E=this.#E||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new s(this.#e,this.#t,this.#n+1,this.#s),this.#o.#a=this.#a,this.#o.#c=this.#c,this.#o.#u=this.#u,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#s==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#s==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};var Af=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",pt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:r,noglobstar:n,platform:o=Af}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:r,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of e)this.add(h)}add(e){let t=new Q(e,this.mmopts);for(let i=0;i<t.set.length;i++){let r=t.set[i],n=t.globParts[i];if(!r||!n)throw new Error("invalid pattern object");for(;r[0]==="."&&n[0]===".";)r.shift(),n.shift();let o=new dt(r,n,0,this.platform),h=new Q(o.globString(),this.mmopts),a=n[n.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(h):this.relative.push(h),a&&(u?this.absoluteChildren.push(h):this.relativeChildren.push(h))}}ignored(e){let t=e.fullpath(),i=`${t}/`,r=e.relative()||".",n=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(n))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(i))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}};var lr=class s{store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),r=this.store.get(i);r?r.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},cr=class{store=new Map;add(e,t,i){let r=(t?2:0)|(i?1:0),n=this.store.get(e);this.store.set(e,n===void 0?r:r&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},fr=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(r=>r.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ht=class s{hasWalkedCache;matches=new cr;subwalks=new fr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new lr}processPatterns(e,t){this.patterns=t;let i=t.map(r=>[e,r]);for(let[r,n]of i){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),h=n.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=n.rest();if(c)n=c;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let a,u,l=!1;for(;typeof(a=n.pattern())=="string"&&(u=n.rest());)r=r.resolve(a),n=u,l=!0;if(a=n.pattern(),u=n.rest(),l){if(this.hasWalkedCache.hasWalked(r,n))continue;this.hasWalkedCache.storeWalked(r,n)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(r.resolve(a),h,c);continue}else if(a===G){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let c=u==null?void 0:u.pattern(),d=u==null?void 0:u.rest();if(!u||(c===""||c===".")&&!d)this.matches.add(r,h,c===""||c===".");else if(c===".."){let p=r.parent||r;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,h,!0)}}else a instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),r=this.child();for(let n of t)for(let o of i){let h=o.isAbsolute(),a=o.pattern(),u=o.rest();a===G?r.testGlobstar(n,o,u,h):a instanceof RegExp?r.testRegExp(n,a,u,h):r.testString(n,a,u,h)}return r}testGlobstar(e,t,i,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let n=i.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,i.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,i)}else n instanceof RegExp&&this.testRegExp(e,n,i.rest(),r)}}testRegExp(e,t,i,r){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}testString(e,t,i,r){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}};var If=(s,e)=>typeof s=="string"?new pt([s],e):Array.isArray(s)?new pt(s,e):s,Ri=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=If(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=await n.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#s(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=n.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){var n;if(this.#s(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+r)}else{let o=this.opts.posix?e.relativePosix():e.relative(),h=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?h+o+r:"."+r)}}async match(e,t,i){let r=await this.matchCheck(e,i);r&&this.matchFinish(r,t)}matchSync(e,t,i){let r=this.matchCheckSync(e,i);r&&this.matchFinish(r,t)}walkCB(e,t,i){var r;(r=this.signal)!=null&&r.aborted&&i(),this.walkCB2(e,t,new Ht(this.opts),i)}walkCB2(e,t,i,r){var h;if(this.#o(e))return r();if((h=this.signal)!=null&&h.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,r));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,u,l]of i.matches.entries())this.#s(a)||(n++,this.match(a,u,l).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let u=a.readdirCached();a.calledReaddir()?this.walkCB3(a,u,i,o):a.readdirCB((l,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,t,i,r){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[h,a,u]of i.matches.entries())this.#s(h)||(n++,this.match(h,a,u).then(()=>o()));for(let[h,a]of i.subwalks.entries())n++,this.walkCB2(h,a,i.child(),o);o()}walkCBSync(e,t,i){var r;(r=this.signal)!=null&&r.aborted&&i(),this.walkCB2Sync(e,t,new Ht(this.opts),i)}walkCB2Sync(e,t,i,r){var h;if(this.#o(e))return r();if((h=this.signal)!=null&&h.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,r));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,u,l]of i.matches.entries())this.#s(a)||this.matchSync(a,u,l);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let u=a.readdirSync();this.walkCB3Sync(a,u,i,o)}o()}walkCB3Sync(e,t,i,r){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[h,a,u]of i.matches.entries())this.#s(h)||this.matchSync(h,a,u);for(let[h,a]of i.subwalks.entries())n++,this.walkCB2Sync(h,a,i.child(),o);o()}},Gt=class extends Ri{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var r;(r=this.signal)!=null&&r.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},Vt=class extends Ri{results;constructor(e,t,i){super(e,t,i),this.results=new ke({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Nf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",pe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,Za.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||Nf,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=t.platform==="win32"?ct:t.platform==="darwin"?jt:t.platform?ft:qa;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(a=>new Q(a,r)),[o,h]=n.reduce((a,u)=>(a[0].push(...u.set),a[1].push(...u.globParts),a),[[],[]]);this.patterns=o.map((a,u)=>{let l=h[u];if(!l)throw new Error("invalid pattern object");return new dt(a,l,0,this.platform)})}async walk(){return[...await new Gt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Gt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var dr=(s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new Q(t,e).hasMagic())return!0;return!1};function Fi(s,e={}){return new pe(s,e).streamSync()}function Ka(s,e={}){return new pe(s,e).stream()}function Xa(s,e={}){return new pe(s,e).walkSync()}async function Ya(s,e={}){return new pe(s,e).walk()}function Pi(s,e={}){return new pe(s,e).iterateSync()}function Ja(s,e={}){return new pe(s,e).iterate()}var Df=Fi,Rf=Object.assign(Ka,{sync:Fi}),kf=Pi,Ff=Object.assign(Ja,{sync:Pi}),Pf=Object.assign(Xa,{stream:Fi,iterate:Pi}),ki=Object.assign(Ya,{glob:Ya,globSync:Xa,sync:Pf,globStream:Ka,stream:Rf,globStreamSync:Fi,streamSync:Df,globIterate:Ja,iterate:Ff,globIterateSync:Pi,iterateSync:kf,Glob:pe,hasMagic:dr,escape:nt,unescape:ce});ki.glob=ki;var mt=k(require("node:path"),1);var Qa=k(require("node:process"),1),eh=k(require("node:path"),1),Mi=k(require("node:fs"),1),th=require("node:url");var ih={directory:"isDirectory",file:"isFile"};function Mf(s){if(!Object.hasOwnProperty.call(ih,s))throw new Error(`Invalid type specified: ${s}`)}var Uf=(s,e)=>e[ih[s]](),Bf=s=>s instanceof URL?(0,th.fileURLToPath)(s):s;function pr(s,{cwd:e=Qa.default.cwd(),type:t="file",allowSymlinks:i=!0}={}){Mf(t),e=Bf(e);let r=i?Mi.default.statSync:Mi.default.lstatSync;for(let n of s)try{let o=r(eh.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if(Uf(t,o))return n}catch{}}var sh=require("node:url");function mr(s){return s instanceof URL?(0,sh.fileURLToPath)(s):s}var Wf=Symbol("findUpStop");function $f(s,e={}){let t=mt.default.resolve(mr(e.cwd)??""),{root:i}=mt.default.parse(t),r=mt.default.resolve(t,mr(e.stopAt)??i),n=e.limit??Number.POSITIVE_INFINITY,o=[s].flat(),h=u=>{if(typeof s!="function")return pr(o,u);let l=s(u.cwd);return typeof l=="string"?pr([l],u):l},a=[];for(;;){let u=h({...e,cwd:t});if(u===Wf||(u&&a.push(mt.default.resolve(t,u)),t===r||a.length>=n))break;t=mt.default.dirname(t)}return a}function rh(s,e={}){return $f(s,{...e,limit:1})[0]}var Mh=k(xh()),Uh=k(Ah());var Yi=k(require("node:process"),1),Nh=k(require("node:os"),1),Nr=k(require("node:tty"),1);function he(s,e=globalThis.Deno?globalThis.Deno.args:Yi.default.argv){let t=s.startsWith("-")?"":s.length===1?"-":"--",i=e.indexOf(t+s),r=e.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:R}=Yi.default,Zi;he("no-color")||he("no-colors")||he("color=false")||he("color=never")?Zi=0:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Zi=1);function td(){if("FORCE_COLOR"in R)return R.FORCE_COLOR==="true"?1:R.FORCE_COLOR==="false"?0:R.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(R.FORCE_COLOR,10),3)}function id(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function sd(s,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=td();i!==void 0&&(Zi=i);let r=t?Zi:i;if(r===0)return 0;if(t){if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(s&&!e&&r===void 0)return 0;let n=r||0;if(R.TERM==="dumb")return n;if(Yi.default.platform==="win32"){let o=Nh.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in R)return"GITHUB_ACTIONS"in R||"GITEA_ACTIONS"in R?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in R)||R.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor"||R.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in R){let o=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:n}function Ih(s,e={}){let t=sd(s,{streamIsTTY:s&&s.isTTY,...e});return id(t)}var rd={stdout:Ih({isTTY:Nr.default.isatty(1)}),stderr:Ih({isTTY:Nr.default.isatty(2)})},Dh=rd;0&&(module.exports={StackUtils,StreamZip,WebSocket,WebSocketServer,ZipFile,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});
|
|
36
|
+
>>> no match, partial?`,e,d,t,p),d===a))}let f;if(typeof l=="string"?(f=c===l,this.debug("string match",l,c,f)):(f=l.test(c),this.debug("pattern match",l,c,f)),!f)return!1}if(o===a&&h===u)return!0;if(o===a)return i;if(h===u)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return va(this.pattern,this.options)}parse(e){Dt(e);let t=this.options;if(e==="**")return G;if(e==="")return"";let i,r=null;(i=e.match(Kc))?r=t.dot?Jc:Xc:(i=e.match(Wc))?r=(t.nocase?t.dot?Hc:jc:t.dot?zc:$c)(i[1]):(i=e.match(Qc))?r=(t.nocase?t.dot?tf:ef:t.dot?sf:rf)(i):(i=e.match(Gc))?r=t.dot?qc:Vc:(i=e.match(Zc))&&(r=Yc);let n=rt.fromGlob(e,this.options).toMMPattern();return r&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:r}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?af:t.dot?hf:uf,r=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let u=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))r.add(c);return typeof l=="string"?pf(l):l===G?G:l._src});return u.forEach((l,c)=>{let d=u[c+1],p=u[c-1];l!==G||p===G||(p===void 0?d!==void 0&&d!==G?u[c+1]="(?:\\/|"+i+"\\/)?"+d:u[c]=i:d===void 0?u[c-1]=p+"(?:\\/|"+i+")?":d!==G&&(u[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+d,u[c+1]=G))}),u.filter(l=>l!==G).join("/")}).join("|"),[o,h]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+h+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let n=this.set;this.debug(this.pattern,"set",n);let o=r[r.length-1];if(!o)for(let h=r.length-2;!o&&h>=0;h--)o=r[h];for(let h=0;h<n.length;h++){let a=n[h],u=r;if(i.matchBase&&a.length===1&&(u=[o]),this.matchOne(u,a,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Z.defaults(e).Minimatch}};Z.AST=rt;Z.Minimatch=Q;Z.escape=nt;Z.unescape=ce;var Ya=require("node:url");var ot=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ta=new Set,Js=typeof process=="object"&&process?process:{},La=(s,e,t,i)=>{typeof Js.emitWarning=="function"?Js.emitWarning(s,e,t,i):console.error(`[${t}] ${e}: ${s}`)},wi=globalThis.AbortController,Ca=globalThis.AbortSignal,Oa;if(typeof wi>"u"){Ca=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},wi=class{constructor(){e()}signal=new Ca;abort(i){var r,n;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(n=(r=this.signal).onabort)==null||n.call(r,i)}}};let s=((Oa=Js.env)==null?void 0:Oa.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{s&&(s=!1,La("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var mf=s=>!Ta.has(s),Lp=Symbol("type"),De=s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),Aa=s=>De(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?at:null:null,at=class extends Array{constructor(e){super(e),this.fill(0)}},Qs=class s{heap;length;static#e=!1;static create(e){let t=Aa(e);if(!t)return[];s.#e=!0;let i=new s(e,t);return s.#e=!1,i}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},kt=class s{#e;#t;#n;#s;#o;#E;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#c;#a;#h;#r;#g;#_;#d;#f;#x;#m;#v;#C;#w;#y;#S;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#w,sizes:e.#v,keyMap:e.#a,keyList:e.#h,valList:e.#r,next:e.#g,prev:e.#_,get head(){return e.#d},get tail(){return e.#f},free:e.#x,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,i,r,n)=>e.#U(t,i,r,n),moveToTail:t=>e.#W(t),indexes:t=>e.#T(t),rindexes:t=>e.#L(t),isStale:t=>e.#b(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#u}get fetchMethod(){return this.#o}get memoMethod(){return this.#E}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:b,memoMethod:g,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:T,ignoreFetchAbort:I}=e;if(t!==0&&!De(t))throw new TypeError("max option must be a nonnegative integer");let W=t?Aa(t):Array;if(!W)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=m||this.#t,this.sizeCalculation=f,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#E=g,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=b,this.#S=!!b,this.#a=new Map,this.#h=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new W(t),this.#_=new W(t),this.#d=0,this.#f=0,this.#x=Qs.create(t),this.#u=0,this.#c=0,typeof u=="function"&&(this.#n=u),typeof l=="function"?(this.#s=l,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#y=!!this.#n,this.#p=!!this.#s,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.#t!==0&&!De(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=De(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!De(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let X="LRU_CACHE_UNBOUNDED";mf(X)&&(Ta.add(X),La("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",X,s))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new at(this.#e),t=new at(this.#e);this.#w=e,this.#C=t,this.#D=(n,o,h=ot.now())=>{if(t[n]=o!==0?h:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#b(n)&&this.#N(this.#h[n],"expire")},o+1);a.unref&&a.unref()}},this.#O=n=>{t[n]=e[n]!==0?ot.now():0},this.#i=(n,o)=>{if(e[o]){let h=e[o],a=t[o];if(!h||!a)return;n.ttl=h,n.start=a,n.now=i||r();let u=n.now-a;n.remainingTTL=h-u}};let i=0,r=()=>{let n=ot.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#a.get(n);if(o===void 0)return 0;let h=e[o],a=t[o];if(!h||!a)return 1/0;let u=(i||r())-a;return h-u},this.#b=n=>{let o=t[n],h=e[n];return!!h&&!!o&&(i||r())-o>h}}#O=()=>{};#i=()=>{};#D=()=>{};#b=()=>!1;#I(){let e=new at(this.#e);this.#c=0,this.#v=e,this.#R=t=>{this.#c-=e[t],e[t]=0},this.#F=(t,i,r,n)=>{if(this.#l(i))return 0;if(!De(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(i,t),!De(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#k=(t,i,r)=>{if(e[t]=i,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#M(!0)}this.#c+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#c)}}#R=e=>{};#k=(e,t,i)=>{};#F=(e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#f;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#d));)t=this.#_[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#d;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#f));)t=this.#g[t]}#P(e){return e!==void 0&&this.#a.get(this.#h[e])===e}*entries(){for(let e of this.#T())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*rentries(){for(let e of this.#L())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*keys(){for(let e of this.#T()){let t=this.#h[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#h[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*values(){for(let e of this.#T())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#L())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#T()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#L()){let r=this.#r[i],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#b(t)&&(this.#N(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#r[t],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0)return;let n={value:r};if(this.#w&&this.#C){let o=this.#w[t],h=this.#C[t];if(o&&h){let a=o-(ot.now()-h);n.ttl=a,n.start=Date.now()}}return this.#v&&(n.size=this.#v[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:!0})){let i=this.#h[t],r=this.#r[t],n=this.#l(r)?r.__staleWhileFetching:r;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#w&&this.#C){o.ttl=this.#w[t];let h=ot.now()-this.#C[t];o.start=Math.floor(Date.now()-h)}this.#v&&(o.size=this.#v[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=ot.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){var d,p,m,f,b;if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,l=this.#F(e,t,i.size||0,h);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#N(e,"set"),this;let c=this.#u===0?void 0:this.#a.get(e);if(c===void 0)c=this.#u===0?this.#f:this.#x.length!==0?this.#x.pop():this.#u===this.#e?this.#M(!1):this.#u,this.#h[c]=e,this.#r[c]=t,this.#a.set(e,c),this.#g[this.#f]=c,this.#_[c]=this.#f,this.#f=c,this.#u++,this.#k(c,l,a),a&&(a.set="add"),u=!1;else{this.#W(c);let g=this.#r[c];if(t!==g){if(this.#S&&this.#l(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:E}=g;E!==void 0&&!o&&(this.#y&&((d=this.#n)==null||d.call(this,E,e,"set")),this.#p&&((p=this.#m)==null||p.push([E,e,"set"])))}else o||(this.#y&&((m=this.#n)==null||m.call(this,g,e,"set")),this.#p&&((f=this.#m)==null||f.push([g,e,"set"])));if(this.#R(c),this.#k(c,l,a),this.#r[c]=t,a){a.set="replace";let E=g&&this.#l(g)?g.__staleWhileFetching:g;E!==void 0&&(a.oldValue=E)}}else a&&(a.set="update")}if(r!==0&&!this.#w&&this.#A(),this.#w&&(u||this.#D(c,r,n),a&&this.#i(a,c)),!o&&this.#p&&this.#m){let g=this.#m,E;for(;E=g==null?void 0:g.shift();)(b=this.#s)==null||b.call(this,...E)}return this}pop(){var e;try{for(;this.#u;){let t=this.#r[this.#d];if(this.#M(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#m){let t=this.#m,i;for(;i=t==null?void 0:t.shift();)(e=this.#s)==null||e.call(this,...i)}}}#M(e){var n,o;let t=this.#d,i=this.#h[t],r=this.#r[t];return this.#S&&this.#l(r)?r.__abortController.abort(new Error("evicted")):(this.#y||this.#p)&&(this.#y&&((n=this.#n)==null||n.call(this,r,i,"evict")),this.#p&&((o=this.#m)==null||o.push([r,i,"evict"]))),this.#R(t),e&&(this.#h[t]=void 0,this.#r[t]=void 0,this.#x.push(t)),this.#u===1?(this.#d=this.#f=0,this.#x.length=0):this.#d=this.#g[t],this.#a.delete(i),this.#u--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,n=this.#a.get(e);if(n!==void 0){let o=this.#r[n];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#b(n))r&&(r.has="stale",this.#i(r,n));else return i&&this.#O(n),r&&(r.has="hit",this.#i(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#a.get(e);if(r===void 0||!i&&this.#b(r))return;let n=this.#r[r];return this.#l(n)?n.__staleWhileFetching:n}#U(e,t,i,r){let n=t===void 0?void 0:this.#r[t];if(this.#l(n))return n;let o=new wi,{signal:h}=i;h==null||h.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:r},u=(f,b=!1)=>{let{aborted:g}=o.signal,E=i.ignoreFetchAbort&&f!==void 0;if(i.status&&(g&&!b?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,E&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),g&&!E&&!b)return c(o.signal.reason);let C=p;return this.#r[t]===p&&(f===void 0?C.__staleWhileFetching?this.#r[t]=C.__staleWhileFetching:this.#N(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),c(f)),c=f=>{let{aborted:b}=o.signal,g=b&&i.allowStaleOnFetchAbort,E=g||i.allowStaleOnFetchRejection,C=E||i.noDeleteOnFetchRejection,x=p;if(this.#r[t]===p&&(!C||x.__staleWhileFetching===void 0?this.#N(e,"fetch"):g||(this.#r[t]=x.__staleWhileFetching)),E)return i.status&&x.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw f},d=(f,b)=>{var E;let g=(E=this.#o)==null?void 0:E.call(this,e,n,a);g&&g instanceof Promise&&g.then(C=>f(C===void 0?void 0:C),b),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=C=>u(C,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(u,l),m=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,m,{...a.options,status:void 0}),t=this.#a.get(e)):this.#r[t]=m,m}#l(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof wi}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:g,signal:E}=t;if(!this.#S)return g&&(g.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:g});let C={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:E},x=this.#a.get(e);if(x===void 0){g&&(g.fetch="miss");let T=this.#U(e,x,C,f);return T.__returned=T}else{let T=this.#r[x];if(this.#l(T)){let ye=i&&T.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",ye&&(g.returnedStale=!0)),ye?T.__staleWhileFetching:T.__returned=T}let I=this.#b(x);if(!b&&!I)return g&&(g.fetch="hit"),this.#W(x),r&&this.#O(x),g&&this.#i(g,x),T;let W=this.#U(e,x,C,f),B=W.__staleWhileFetching!==void 0&&i;return g&&(g.fetch=I?"stale":"refresh",B&&I&&(g.returnedStale=!0)),B?W.__staleWhileFetching:W.__returned=W}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#E;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=t,h=this.get(e,o);if(!n&&h!==void 0)return h;let a=i(e,h,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,h=this.#a.get(e);if(h!==void 0){let a=this.#r[h],u=this.#l(a);return o&&this.#i(o,h),this.#b(h)?(o&&(o.get="stale"),u?(o&&i&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?a.__staleWhileFetching:void 0):(n||this.#N(e,"expire"),o&&i&&(o.returnedStale=!0),i?a:void 0)):(o&&(o.get="hit"),u?a.__staleWhileFetching:(this.#W(h),r&&this.#O(h),a))}else o&&(o.get="miss")}#B(e,t){this.#_[t]=e,this.#g[e]=t}#W(e){e!==this.#f&&(e===this.#d?this.#d=this.#g[e]:this.#B(this.#_[e],this.#g[e]),this.#B(this.#f,e),this.#f=e)}delete(e){return this.#N(e,"delete")}#N(e,t){var r,n,o,h;let i=!1;if(this.#u!==0){let a=this.#a.get(e);if(a!==void 0)if(i=!0,this.#u===1)this.#$(t);else{this.#R(a);let u=this.#r[a];if(this.#l(u)?u.__abortController.abort(new Error("deleted")):(this.#y||this.#p)&&(this.#y&&((r=this.#n)==null||r.call(this,u,e,t)),this.#p&&((n=this.#m)==null||n.push([u,e,t]))),this.#a.delete(e),this.#h[a]=void 0,this.#r[a]=void 0,a===this.#f)this.#f=this.#_[a];else if(a===this.#d)this.#d=this.#g[a];else{let l=this.#_[a];this.#g[l]=this.#g[a];let c=this.#g[a];this.#_[c]=this.#_[a]}this.#u--,this.#x.push(a)}}if(this.#p&&((o=this.#m)!=null&&o.length)){let a=this.#m,u;for(;u=a==null?void 0:a.shift();)(h=this.#s)==null||h.call(this,...u)}return i}clear(){return this.#$("delete")}#$(e){var t,i,r;for(let n of this.#L({allowStale:!0})){let o=this.#r[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let h=this.#h[n];this.#y&&((t=this.#n)==null||t.call(this,o,h,e)),this.#p&&((i=this.#m)==null||i.push([o,h,e]))}}if(this.#a.clear(),this.#r.fill(void 0),this.#h.fill(void 0),this.#w&&this.#C&&(this.#w.fill(0),this.#C.fill(0)),this.#v&&this.#v.fill(0),this.#d=0,this.#f=0,this.#x.length=0,this.#c=0,this.#u=0,this.#p&&this.#m){let n=this.#m,o;for(;o=n==null?void 0:n.shift();)(r=this.#s)==null||r.call(this,...o)}}};var lt=require("node:path"),Ba=require("node:url"),Ee=require("fs"),Cf=k(require("node:fs"),1),Fe=require("node:fs/promises");var Oi=require("node:events"),or=k(require("node:stream"),1),ka=require("node:string_decoder"),Ia=typeof process=="object"&&process?process:{stdout:null,stderr:null},gf=s=>!!s&&typeof s=="object"&&(s instanceof ke||s instanceof or.default||_f(s)||bf(s)),_f=s=>!!s&&typeof s=="object"&&s instanceof Oi.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==or.default.Writable.prototype.pipe,bf=s=>!!s&&typeof s=="object"&&s instanceof Oi.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function",Te=Symbol("EOF"),Le=Symbol("maybeEmitEnd"),Re=Symbol("emittedEnd"),Ei=Symbol("emittingEnd"),Ft=Symbol("emittedError"),yi=Symbol("closed"),Na=Symbol("read"),Si=Symbol("flush"),Da=Symbol("flushChunk"),fe=Symbol("encoding"),ht=Symbol("decoder"),z=Symbol("flowing"),Pt=Symbol("paused"),ut=Symbol("resume"),j=Symbol("buffer"),Y=Symbol("pipes"),H=Symbol("bufferLength"),er=Symbol("bufferPush"),xi=Symbol("bufferShift"),V=Symbol("objectMode"),M=Symbol("destroyed"),tr=Symbol("error"),ir=Symbol("emitData"),Ra=Symbol("emitEnd"),sr=Symbol("emitEnd2"),be=Symbol("async"),rr=Symbol("abort"),vi=Symbol("aborted"),Mt=Symbol("signal"),Ye=Symbol("dataListeners"),ee=Symbol("discarded"),Ut=s=>Promise.resolve().then(s),wf=s=>s(),Ef=s=>s==="end"||s==="finish"||s==="prefinish",yf=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,Sf=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),Ci=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[ut](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},nr=class extends Ci{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},xf=s=>!!s.objectMode,vf=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",ke=class extends Oi.EventEmitter{[z]=!1;[Pt]=!1;[Y]=[];[j]=[];[V];[fe];[be];[ht];[Te]=!1;[Re]=!1;[Ei]=!1;[yi]=!1;[Ft]=null;[H]=0;[M]=!1;[Mt];[vi]=!1;[Ye]=0;[ee]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");xf(t)?(this[V]=!0,this[fe]=null):vf(t)?(this[fe]=t.encoding,this[V]=!1):(this[V]=!1,this[fe]=null),this[be]=!!t.async,this[ht]=this[fe]?new ka.StringDecoder(this[fe]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[j]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Y]});let{signal:i}=t;i&&(this[Mt]=i,i.aborted?this[rr]():i.addEventListener("abort",()=>this[rr]()))}get bufferLength(){return this[H]}get encoding(){return this[fe]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[V]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[be]}set async(e){this[be]=this[be]||!!e}[rr](){var e,t;this[vi]=!0,this.emit("abort",(e=this[Mt])==null?void 0:e.reason),this.destroy((t=this[Mt])==null?void 0:t.reason)}get aborted(){return this[vi]}set aborted(e){}write(e,t,i){var n;if(this[vi])return!1;if(this[Te])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let r=this[be]?Ut:wf;if(!this[V]&&!Buffer.isBuffer(e)){if(Sf(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(yf(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[V]?(this[z]&&this[H]!==0&&this[Si](!0),this[z]?this.emit("data",e):this[er](e),this[H]!==0&&this.emit("readable"),i&&r(i),this[z]):e.length?(typeof e=="string"&&!(t===this[fe]&&!((n=this[ht])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[fe]&&(e=this[ht].write(e)),this[z]&&this[H]!==0&&this[Si](!0),this[z]?this.emit("data",e):this[er](e),this[H]!==0&&this.emit("readable"),i&&r(i),this[z]):(this[H]!==0&&this.emit("readable"),i&&r(i),this[z])}read(e){if(this[M])return null;if(this[ee]=!1,this[H]===0||e===0||e&&e>this[H])return this[Le](),null;this[V]&&(e=null),this[j].length>1&&!this[V]&&(this[j]=[this[fe]?this[j].join(""):Buffer.concat(this[j],this[H])]);let t=this[Na](e||null,this[j][0]);return this[Le](),t}[Na](e,t){if(this[V])this[xi]();else{let i=t;e===i.length||e===null?this[xi]():typeof i=="string"?(this[j][0]=i.slice(e),t=i.slice(0,e),this[H]-=e):(this[j][0]=i.subarray(e),t=i.subarray(0,e),this[H]-=e)}return this.emit("data",t),!this[j].length&&!this[Te]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[Te]=!0,this.writable=!1,(this[z]||!this[Pt])&&this[Le](),this}[ut](){this[M]||(!this[Ye]&&!this[Y].length&&(this[ee]=!0),this[Pt]=!1,this[z]=!0,this.emit("resume"),this[j].length?this[Si]():this[Te]?this[Le]():this.emit("drain"))}resume(){return this[ut]()}pause(){this[z]=!1,this[Pt]=!0,this[ee]=!1}get destroyed(){return this[M]}get flowing(){return this[z]}get paused(){return this[Pt]}[er](e){this[V]?this[H]+=1:this[H]+=e.length,this[j].push(e)}[xi](){return this[V]?this[H]-=1:this[H]-=this[j][0].length,this[j].shift()}[Si](e=!1){do;while(this[Da](this[xi]())&&this[j].length);!e&&!this[j].length&&!this[Te]&&this.emit("drain")}[Da](e){return this.emit("data",e),this[z]}pipe(e,t){if(this[M])return e;this[ee]=!1;let i=this[Re];return t=t||{},e===Ia.stdout||e===Ia.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[Y].push(t.proxyErrors?new nr(this,e,t):new Ci(this,e,t)),this[be]?Ut(()=>this[ut]()):this[ut]()),e}unpipe(e){let t=this[Y].find(i=>i.dest===e);t&&(this[Y].length===1?(this[z]&&this[Ye]===0&&(this[z]=!1),this[Y]=[]):this[Y].splice(this[Y].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[ee]=!1,this[Ye]++,!this[Y].length&&!this[z]&&this[ut]();else if(e==="readable"&&this[H]!==0)super.emit("readable");else if(Ef(e)&&this[Re])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ft]){let r=t;this[be]?Ut(()=>r.call(this,this[Ft])):r.call(this,this[Ft])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Ye]=this.listeners("data").length,this[Ye]===0&&!this[ee]&&!this[Y].length&&(this[z]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ye]=0,!this[ee]&&!this[Y].length&&(this[z]=!1)),t}get emittedEnd(){return this[Re]}[Le](){!this[Ei]&&!this[Re]&&!this[M]&&this[j].length===0&&this[Te]&&(this[Ei]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[yi]&&this.emit("close"),this[Ei]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[V]&&!i?!1:this[be]?(Ut(()=>this[ir](i)),!0):this[ir](i);if(e==="end")return this[Ra]();if(e==="close"){if(this[yi]=!0,!this[Re]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ft]=i,super.emit(tr,i);let n=!this[Mt]||this.listeners("error").length?super.emit("error",i):!1;return this[Le](),n}else if(e==="resume"){let n=super.emit("resume");return this[Le](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let r=super.emit(e,...t);return this[Le](),r}[ir](e){for(let i of this[Y])i.dest.write(e)===!1&&this.pause();let t=this[ee]?!1:super.emit("data",e);return this[Le](),t}[Ra](){return this[Re]?!1:(this[Re]=!0,this.readable=!1,this[be]?(Ut(()=>this[sr]()),!0):this[sr]())}[sr](){if(this[ht]){let t=this[ht].end();if(t){for(let i of this[Y])i.dest.write(t);this[ee]||super.emit("data",t)}}for(let t of this[Y])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[V]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[V]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[V])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[fe]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(M,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ee]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Te])return t();let n,o,h=c=>{this.off("data",a),this.off("end",u),this.off(M,l),t(),o(c)},a=c=>{this.off("error",h),this.off("end",u),this.off(M,l),this.pause(),n({value:c,done:!!this[Te]})},u=()=>{this.off("error",h),this.off("data",a),this.off(M,l),t(),n({done:!0,value:void 0})},l=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(M,l),this.once("error",h),this.once("end",u),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ee]=!1;let e=!1,t=()=>(this.pause(),this.off(tr,t),this.off(M,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(tr,t),this.once(M,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ee]=!0,this[j].length=0,this[H]=0;let t=this;return typeof t.close=="function"&&!this[yi]&&t.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return gf}};var Of=Ee.realpathSync.native,Wt={lstatSync:Ee.lstatSync,readdir:Ee.readdir,readdirSync:Ee.readdirSync,readlinkSync:Ee.readlinkSync,realpathSync:Of,promises:{lstat:Fe.lstat,readdir:Fe.readdir,readlink:Fe.readlink,realpath:Fe.realpath}},Wa=s=>!s||s===Wt||s===Cf?Wt:{...Wt,...s,promises:{...Wt.promises,...s.promises||{}}},$a=/^\\\\\?\\([a-z]:)\\?$/i,Tf=s=>s.replace(/\//g,"\\").replace($a,"$1\\"),Lf=/[\\\/]/,oe=0,za=1,ja=2,we=4,Ha=6,Ga=8,Ke=10,Va=12,ne=15,Bt=~ne,ar=16,Fa=32,$t=64,de=128,Ti=256,Ai=512,Pa=$t|de|Ai,Af=1023,hr=s=>s.isFile()?Ga:s.isDirectory()?we:s.isSymbolicLink()?Ke:s.isCharacterDevice()?ja:s.isBlockDevice()?Ha:s.isSocket()?Va:s.isFIFO()?za:oe,Ma=new Map,zt=s=>{let e=Ma.get(s);if(e)return e;let t=s.normalize("NFKD");return Ma.set(s,t),t},Ua=new Map,Li=s=>{let e=Ua.get(s);if(e)return e;let t=zt(s.toLowerCase());return Ua.set(s,t),t},Ii=class extends kt{constructor(){super({max:256})}},ur=class extends kt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},qa=Symbol("PathScurry setAsCwd"),q=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#s;get nlink(){return this.#s}#o;get uid(){return this.#o}#E;get gid(){return this.#E}#u;get rdev(){return this.#u}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#h;get size(){return this.#h}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#_;get mtimeMs(){return this.#_}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#x;get atime(){return this.#x}#m;get mtime(){return this.#m}#v;get ctime(){return this.#v}#C;get birthtime(){return this.#C}#w;#y;#S;#p;#A;#O;#i;#D;#b;#I;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=oe,i,r,n,o,h){this.name=e,this.#w=n?Li(e):zt(e),this.#i=t&Af,this.nocase=n,this.roots=r,this.root=i||this,this.#D=o,this.#S=h.fullpath,this.#A=h.relative,this.#O=h.relativePosix,this.parent=h.parent,this.parent?this.#e=this.parent.#e:this.#e=Wa(h.fs)}depth(){return this.#y!==void 0?this.#y:this.parent?this.#y=this.parent.depth()+1:this.#y=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#R(r):this.#R(r)}#R(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#D.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#D.set(this,t),this.#i&=~ar,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),r=this.nocase?Li(e):zt(e);for(let a of i)if(a.#w===r)return a;let n=this.parent?this.sep:"",o=this.#S?this.#S+n+e:void 0,h=this.newChild(e,oe,{...t,parent:this,fullpath:o});return this.canReaddir()||(h.#i|=de),i.push(h),h}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,t=this.parent;if(!t)return this.#A=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#S=r}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#p=`//?/${r}`:this.#p=r}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#i&ne)===oe}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#i&ne)===Ga}isDirectory(){return(this.#i&ne)===we}isCharacterDevice(){return(this.#i&ne)===ja}isBlockDevice(){return(this.#i&ne)===Ha}isFIFO(){return(this.#i&ne)===za}isSocket(){return(this.#i&ne)===Va}isSymbolicLink(){return(this.#i&Ke)===Ke}lstatCached(){return this.#i&Fa?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#I}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;let e=this.#i≠return!(e!==oe&&e!==Ke||this.#i&Ti||this.#i&de)}calledReaddir(){return!!(this.#i&ar)}isENOENT(){return!!(this.#i&de)}isNamed(e){return this.nocase?this.#w===Li(e):this.#w===zt(e)}async readlink(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),r=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(r)return this.#b=r}catch(i){this.#l(i.code);return}}readlinkSync(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),r=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(r)return this.#b=r}catch(i){this.#l(i.code);return}}#k(e){this.#i|=ar;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#F()}}#F(){this.#i&de||(this.#i=(this.#i|de)&Bt,this.#T())}#T(){let e=this.children();e.provisional=0;for(let t of e)t.#F()}#L(){this.#i|=Ai,this.#P()}#P(){if(this.#i&$t)return;let e=this.#i;(e&ne)===we&&(e&=Bt),this.#i=e|$t,this.#T()}#M(e=""){e==="ENOTDIR"||e==="EPERM"?this.#P():e==="ENOENT"?this.#F():this.children().provisional=0}#U(e=""){e==="ENOTDIR"?this.parent.#P():e==="ENOENT"&&this.#F()}#l(e=""){let t=this.#i;t|=Ti,e==="ENOENT"&&(t|=de),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Bt),this.#i=t,e==="ENOTDIR"&&this.parent&&this.parent.#P()}#B(e,t){return this.#N(e,t)||this.#W(e,t)}#W(e,t){let i=hr(e),r=this.newChild(e.name,i,{parent:this}),n=r.#i≠return n!==we&&n!==Ke&&n!==oe&&(r.#i|=$t),t.unshift(r),t.provisional++,r}#N(e,t){for(let i=t.provisional;i<t.length;i++){let r=t[i];if((this.nocase?Li(e.name):zt(e.name))===r.#w)return this.#$(e,r,i,t)}}#$(e,t,i,r){let n=t.name;return t.#i=t.#i&Bt|hr(e),n!==e.name&&(t.name=e.name),i!==r.provisional&&(i===r.length-1?r.pop():r.splice(i,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#i&de))try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#U(e.code)}}lstatSync(){if(!(this.#i&de))try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#U(e.code)}}#G(e){let{atime:t,atimeMs:i,birthtime:r,birthtimeMs:n,blksize:o,blocks:h,ctime:a,ctimeMs:u,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:b,rdev:g,size:E,uid:C}=e;this.#x=t,this.#g=i,this.#C=r,this.#f=n,this.#c=o,this.#r=h,this.#v=a,this.#d=u,this.#t=l,this.#E=c,this.#a=d,this.#n=p,this.#m=m,this.#_=f,this.#s=b,this.#u=g,this.#h=E,this.#o=C;let x=hr(e);this.#i=this.#i&Bt|x|Fa,x!==oe&&x!==we&&x!==Ke&&(this.#i|=$t)}#j=[];#H=!1;#V(e){this.#H=!1;let t=this.#j.slice();this.#j.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#j.push(e),this.#H)return;this.#H=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(n,o)=>{if(n)this.#M(n.code),i.provisional=0;else{for(let h of o)this.#B(h,i);this.#k(i)}this.#V(i.slice(0,i.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#z)await this.#z;else{let i=()=>{};this.#z=new Promise(r=>i=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#B(r,e);this.#k(e)}catch(r){this.#M(r.code),e.provisional=0}this.#z=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#B(i,e);this.#k(e)}catch(i){this.#M(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&Pa)return!1;let e=ne&this.#i;return e===oe||e===we||e===Ke}shouldWalk(e,t){return(this.#i&we)===we&&!(this.#i&Pa)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#I)return this.#I;if(!((Ai|Ti|de)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#I)return this.#I;if(!((Ai|Ti|de)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}[qa](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],r=this;for(;r&&r.parent;)t.add(r),r.#A=i.join(this.sep),r.#O=i.join("/"),r=r.parent,i.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#A=void 0,r.#O=void 0,r=r.parent}},Ni=class s extends q{sep="\\";splitSep=Lf;constructor(e,t=oe,i,r,n,o,h){super(e,t,i,r,n,o,h)}newChild(e,t=oe,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return lt.win32.parse(e).root}getRoot(e){if(e=Tf(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new ct(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace($a,"$1\\"),e===t}},Di=class s extends q{splitSep="/";sep="/";constructor(e,t=oe,i,r,n,o,h){super(e,t,i,r,n,o,h)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=oe,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ri=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#s;constructor(e=process.cwd(),t,i,{nocase:r,childrenCacheSize:n=16*1024,fs:o=Wt}={}){this.#s=Wa(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Ba.fileURLToPath)(e));let h=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#e=new Ii,this.#t=new Ii,this.#n=new ur(n);let a=h.substring(this.rootPath.length).split(i);if(a.length===1&&!a[0]&&a.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let u=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;u=u.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let r=await e.readdir();return i?r:r.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=[];(!n||n(e))&&h.push(i?e:e.fullpath());let a=new Set,u=(c,d)=>{a.add(c),c.readdirCB((p,m)=>{if(p)return d(p);let f=m.length;if(!f)return d();let b=()=>{--f===0&&d()};for(let g of m)(!n||n(g))&&h.push(i?g:g.fullpath()),r&&g.isSymbolicLink()?g.realpath().then(E=>E!=null&&E.isUnknown()?E.lstat():E).then(E=>E!=null&&E.shouldWalk(a,o)?u(E,b):b()):g.shouldWalk(a,o)?u(g,b):b()},!0)},l=e;return new Promise((c,d)=>{u(l,p=>{if(p)return d(p);c(h)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=[];(!n||n(e))&&h.push(i?e:e.fullpath());let a=new Set([e]);for(let u of a){let l=u.readdirSync();for(let c of l){(!n||n(c))&&h.push(i?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(r&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield i?e:e.fullpath());let h=new Set([e]);for(let a of h){let u=a.readdirSync();for(let l of u){(!n||n(l))&&(yield i?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(r&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,o)&&h.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=new ke({objectMode:!0});(!n||n(e))&&h.write(i?e:e.fullpath());let a=new Set,u=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&h.end();return}l++,a.add(p);let m=(b,g,E=!1)=>{if(b)return h.emit("error",b);if(r&&!E){let C=[];for(let x of g)x.isSymbolicLink()&&C.push(x.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T));if(C.length){Promise.all(C).then(()=>m(null,g,!0));return}}for(let C of g)C&&(!n||n(C))&&(h.write(i?C:C.fullpath())||(d=!0));l--;for(let C of g){let x=C.realpathCached()||C;x.shouldWalk(a,o)&&u.push(x)}d&&!h.flowing?h.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),h}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:o}=t,h=new ke({objectMode:!0}),a=new Set;(!n||n(e))&&h.write(i?e:e.fullpath());let u=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&h.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(h.write(i?f:f.fullpath())||(d=!0));l--;for(let f of m){let b=f;if(f.isSymbolicLink()){if(!(r&&(b=f.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,o)&&u.push(b)}}d&&!h.flowing&&h.once("drain",c)};return c(),h}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[qa](t)}},ct=class extends Ri{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,lt.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return lt.win32.parse(e).root.toUpperCase()}newRoot(e){return new Ni(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},ft=class extends Ri{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,lt.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new Di(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},jt=class extends ft{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},Rp=process.platform==="win32"?Ni:Di,Za=process.platform==="win32"?ct:process.platform==="darwin"?jt:ft;var If=s=>s.length>=1,Nf=s=>s.length>=1,dt=class s{#e;#t;#n;length;#s;#o;#E;#u;#c;#a;#h=!0;constructor(e,t,i,r){if(!If(e))throw new TypeError("empty pattern list");if(!Nf(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#n=i,this.#s=r,this.#n===0){if(this.isUNC()){let[n,o,h,a,...u]=this.#e,[l,c,d,p,...m]=this.#t;u[0]===""&&(u.shift(),m.shift());let f=[n,o,h,a,""].join("/"),b=[l,c,d,p,""].join("/");this.#e=[f,...u],this.#t=[b,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[h,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let u=n+"/",l=h+"/";this.#e=[u,...o],this.#t=[l,...a],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===G}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#E=this.#E||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new s(this.#e,this.#t,this.#n+1,this.#s),this.#o.#a=this.#a,this.#o.#c=this.#c,this.#o.#u=this.#u,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#s==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#s==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};var Df=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",pt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:r,noglobstar:n,platform:o=Df}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:r,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of e)this.add(h)}add(e){let t=new Q(e,this.mmopts);for(let i=0;i<t.set.length;i++){let r=t.set[i],n=t.globParts[i];if(!r||!n)throw new Error("invalid pattern object");for(;r[0]==="."&&n[0]===".";)r.shift(),n.shift();let o=new dt(r,n,0,this.platform),h=new Q(o.globString(),this.mmopts),a=n[n.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(h):this.relative.push(h),a&&(u?this.absoluteChildren.push(h):this.relativeChildren.push(h))}}ignored(e){let t=e.fullpath(),i=`${t}/`,r=e.relative()||".",n=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(n))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(i))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}};var lr=class s{store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),r=this.store.get(i);r?r.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},cr=class{store=new Map;add(e,t,i){let r=(t?2:0)|(i?1:0),n=this.store.get(e);this.store.set(e,n===void 0?r:r&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},fr=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(r=>r.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ht=class s{hasWalkedCache;matches=new cr;subwalks=new fr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new lr}processPatterns(e,t){this.patterns=t;let i=t.map(r=>[e,r]);for(let[r,n]of i){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),h=n.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=n.rest();if(c)n=c;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let a,u,l=!1;for(;typeof(a=n.pattern())=="string"&&(u=n.rest());)r=r.resolve(a),n=u,l=!0;if(a=n.pattern(),u=n.rest(),l){if(this.hasWalkedCache.hasWalked(r,n))continue;this.hasWalkedCache.storeWalked(r,n)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(r.resolve(a),h,c);continue}else if(a===G){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let c=u==null?void 0:u.pattern(),d=u==null?void 0:u.rest();if(!u||(c===""||c===".")&&!d)this.matches.add(r,h,c===""||c===".");else if(c===".."){let p=r.parent||r;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,h,!0)}}else a instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),r=this.child();for(let n of t)for(let o of i){let h=o.isAbsolute(),a=o.pattern(),u=o.rest();a===G?r.testGlobstar(n,o,u,h):a instanceof RegExp?r.testRegExp(n,a,u,h):r.testString(n,a,u,h)}return r}testGlobstar(e,t,i,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let n=i.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,i.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,i)}else n instanceof RegExp&&this.testRegExp(e,n,i.rest(),r)}}testRegExp(e,t,i,r){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}testString(e,t,i,r){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}};var Rf=(s,e)=>typeof s=="string"?new pt([s],e):Array.isArray(s)?new pt(s,e):s,ki=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=Rf(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=await n.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#s(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=n.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){var n;if(this.#s(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+r)}else{let o=this.opts.posix?e.relativePosix():e.relative(),h=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?h+o+r:"."+r)}}async match(e,t,i){let r=await this.matchCheck(e,i);r&&this.matchFinish(r,t)}matchSync(e,t,i){let r=this.matchCheckSync(e,i);r&&this.matchFinish(r,t)}walkCB(e,t,i){var r;(r=this.signal)!=null&&r.aborted&&i(),this.walkCB2(e,t,new Ht(this.opts),i)}walkCB2(e,t,i,r){var h;if(this.#o(e))return r();if((h=this.signal)!=null&&h.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,r));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,u,l]of i.matches.entries())this.#s(a)||(n++,this.match(a,u,l).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let u=a.readdirCached();a.calledReaddir()?this.walkCB3(a,u,i,o):a.readdirCB((l,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,t,i,r){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[h,a,u]of i.matches.entries())this.#s(h)||(n++,this.match(h,a,u).then(()=>o()));for(let[h,a]of i.subwalks.entries())n++,this.walkCB2(h,a,i.child(),o);o()}walkCBSync(e,t,i){var r;(r=this.signal)!=null&&r.aborted&&i(),this.walkCB2Sync(e,t,new Ht(this.opts),i)}walkCB2Sync(e,t,i,r){var h;if(this.#o(e))return r();if((h=this.signal)!=null&&h.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,r));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,u,l]of i.matches.entries())this.#s(a)||this.matchSync(a,u,l);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let u=a.readdirSync();this.walkCB3Sync(a,u,i,o)}o()}walkCB3Sync(e,t,i,r){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[h,a,u]of i.matches.entries())this.#s(h)||this.matchSync(h,a,u);for(let[h,a]of i.subwalks.entries())n++,this.walkCB2Sync(h,a,i.child(),o);o()}},Gt=class extends ki{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var r;(r=this.signal)!=null&&r.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},Vt=class extends ki{results;constructor(e,t,i){super(e,t,i),this.results=new ke({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var kf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",pe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,Ya.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||kf,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=t.platform==="win32"?ct:t.platform==="darwin"?jt:t.platform?ft:Za;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(a=>new Q(a,r)),[o,h]=n.reduce((a,u)=>(a[0].push(...u.set),a[1].push(...u.globParts),a),[[],[]]);this.patterns=o.map((a,u)=>{let l=h[u];if(!l)throw new Error("invalid pattern object");return new dt(a,l,0,this.platform)})}async walk(){return[...await new Gt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Gt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var dr=(s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new Q(t,e).hasMagic())return!0;return!1};function Pi(s,e={}){return new pe(s,e).streamSync()}function Xa(s,e={}){return new pe(s,e).stream()}function Ja(s,e={}){return new pe(s,e).walkSync()}async function Ka(s,e={}){return new pe(s,e).walk()}function Mi(s,e={}){return new pe(s,e).iterateSync()}function Qa(s,e={}){return new pe(s,e).iterate()}var Ff=Pi,Pf=Object.assign(Xa,{sync:Pi}),Mf=Mi,Uf=Object.assign(Qa,{sync:Mi}),Bf=Object.assign(Ja,{stream:Pi,iterate:Mi}),Fi=Object.assign(Ka,{glob:Ka,globSync:Ja,sync:Bf,globStream:Xa,stream:Pf,globStreamSync:Pi,streamSync:Ff,globIterate:Qa,iterate:Uf,globIterateSync:Mi,iterateSync:Mf,Glob:pe,hasMagic:dr,escape:nt,unescape:ce});Fi.glob=Fi;var mt=k(require("node:path"),1);var eh=k(require("node:process"),1),th=k(require("node:path"),1),Ui=k(require("node:fs"),1),ih=require("node:url");var sh={directory:"isDirectory",file:"isFile"};function Wf(s){if(!Object.hasOwnProperty.call(sh,s))throw new Error(`Invalid type specified: ${s}`)}var $f=(s,e)=>e[sh[s]](),zf=s=>s instanceof URL?(0,ih.fileURLToPath)(s):s;function pr(s,{cwd:e=eh.default.cwd(),type:t="file",allowSymlinks:i=!0}={}){Wf(t),e=zf(e);let r=i?Ui.default.statSync:Ui.default.lstatSync;for(let n of s)try{let o=r(th.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if($f(t,o))return n}catch{}}var rh=require("node:url");function mr(s){return s instanceof URL?(0,rh.fileURLToPath)(s):s}var jf=Symbol("findUpStop");function Hf(s,e={}){let t=mt.default.resolve(mr(e.cwd)??""),{root:i}=mt.default.parse(t),r=mt.default.resolve(t,mr(e.stopAt)??i),n=e.limit??Number.POSITIVE_INFINITY,o=[s].flat(),h=u=>{if(typeof s!="function")return pr(o,u);let l=s(u.cwd);return typeof l=="string"?pr([l],u):l},a=[];for(;;){let u=h({...e,cwd:t});if(u===jf||(u&&a.push(mt.default.resolve(t,u)),t===r||a.length>=n))break;t=mt.default.dirname(t)}return a}function nh(s,e={}){return Hf(s,{...e,limit:1})[0]}var Wh=k(Oh()),$h=k(Dh());var Yi=k(require("node:process"),1),kh=k(require("node:os"),1),Dr=k(require("node:tty"),1);function he(s,e=globalThis.Deno?globalThis.Deno.args:Yi.default.argv){let t=s.startsWith("-")?"":s.length===1?"-":"--",i=e.indexOf(t+s),r=e.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:R}=Yi.default,Zi;he("no-color")||he("no-colors")||he("color=false")||he("color=never")?Zi=0:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Zi=1);function rd(){if("FORCE_COLOR"in R)return R.FORCE_COLOR==="true"?1:R.FORCE_COLOR==="false"?0:R.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(R.FORCE_COLOR,10),3)}function nd(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function od(s,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=rd();i!==void 0&&(Zi=i);let r=t?Zi:i;if(r===0)return 0;if(t){if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(s&&!e&&r===void 0)return 0;let n=r||0;if(R.TERM==="dumb")return n;if(Yi.default.platform==="win32"){let o=kh.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in R)return"GITHUB_ACTIONS"in R||"GITEA_ACTIONS"in R?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in R)||R.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor"||R.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in R){let o=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:n}function Rh(s,e={}){let t=od(s,{streamIsTTY:s&&s.isTTY,...e});return nd(t)}var ad={stdout:Rh({isTTY:Dr.default.isatty(1)}),stderr:Rh({isTTY:Dr.default.isatty(2)})},Fh=ad;0&&(module.exports={StackUtils,StreamZip,WebSocket,WebSocketServer,ZipFile,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});
|