monocart-reporter 2.8.0 → 2.8.2
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/lib/cli.js +37 -1
- package/lib/hooks.js +37 -0
- package/lib/merge-data.js +2 -2
- package/lib/packages/monocart-reporter-assets.js +2 -2
- package/lib/packages/monocart-reporter-vendor.js +11 -11
- package/lib/utils/util.js +17 -1
- package/lib/visitor.js +2 -0
- package/package.json +11 -10
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var _u=Object.create;var Lt=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var yu=Object.getOwnPropertyNames;var vu=Object.getPrototypeOf,
|
|
1
|
+
var _u=Object.create;var Lt=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var yu=Object.getOwnPropertyNames;var vu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var v=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Su=(i,e)=>{for(var t in e)Lt(i,t,{get:e[t],enumerable:!0})},ar=(i,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yu(e))!xu.call(i,r)&&r!==t&&Lt(i,r,{get:()=>e[r],enumerable:!(s=wu(e,r))||s.enumerable});return i};var T=(i,e,t)=>(t=i!=null?_u(vu(i)):{},ar(e||!i||!i.__esModule?Lt(t,"default",{value:i,enumerable:!0}):t,i)),Eu=i=>ar(Lt({},"__esModule",{value:!0}),i);var hr=v((sd,ur)=>{"use strict";var Ou=/[|\\{}()[\]^$+*?.-]/g;ur.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(Ou,"\\$&")}});var dr=v((id,fr)=>{"use strict";var Cu=hr(),ku=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",cr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\((?:node:)?${i}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${i}(?:\\.js)?:\\d+:\\d+$)`));cr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Ns=class i{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=i.nodeInternals()),"cwd"in e||(e.cwd=ku),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Au(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...cr]}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 s=!1,r=null,n=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(a=>a.test(o)))return;let u=/^\s*at /.test(o);s?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),u&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(u?(r&&(n.push(r),r=null),n.push(o)):(s=!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:s}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:n}=r;return Error.stackTraceLimit=s,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:r}=Error;Error.prepareStackTrace=(u,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:s,stackTraceLimit:r}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let s={line:t.getLineNumber(),column:t.getColumnNumber()};lr(s,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(s,"constructor",{value:!0,configurable:!0}),t.isEval()&&(s.evalOrigin=t.getEvalOrigin()),t.isNative()&&(s.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(s.type=r);let n=t.getFunctionName();n&&(s.function=n);let o=t.getMethodName();return o&&n!==o&&(s.method=o),s}parseLine(e){let t=e&&e.match(Tu);if(!t)return null;let s=t[1]==="new",r=t[2],n=t[3],o=t[4],u=Number(t[5]),a=Number(t[6]),h=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&&h){let b=0;for(let g=h.length-1;g>0;g--)if(h.charAt(g)===")")b++;else if(h.charAt(g)==="("&&h.charAt(g-1)===" "&&(b--,b===-1&&h.charAt(g-1)===" ")){let w=h.slice(0,g-1);h=h.slice(g+1),r+=` (${w}`;break}}if(r){let b=r.match(Ru);b&&(r=b[1],m=b[2])}return lr(f,h,this._cwd),s&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=u,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 lr(i,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),i.file=e)}function Au(i){if(i.length===0)return[];let e=i.map(t=>Cu(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Tu=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Ru=/^(.*?) \[as (.*?)\]$/;fr.exports=Ns});var pr=v(Ft=>{Object.defineProperty(Ft,"__esModule",{value:!0});Ft.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;Ft.matchToToken=function(i){var e={type:"invalid",value:i[0],closed:void 0};return i[1]?(e.type="string",e.closed=!!(i[3]||i[4])):i[5]?e.type="comment":i[6]?(e.type="comment",e.closed=!!i[7]):i[8]?e.type="regex":i[9]?e.type="number":i[10]?e.type="name":i[11]?e.type="punctuator":i[12]&&(e.type="whitespace"),e}});var wr=v(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.isIdentifierChar=_r;it.isIdentifierName=Lu;it.isIdentifierStart=br;var Ls="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",mr="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Mu=new RegExp("["+Ls+"]"),Nu=new RegExp("["+Ls+mr+"]");Ls=mr=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,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Pu=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ps(i,e){let t=65536;for(let s=0,r=e.length;s<r;s+=2){if(t+=e[s],t>i)return!1;if(t+=e[s+1],t>=i)return!0}return!1}function br(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Mu.test(String.fromCharCode(i)):Ps(i,gr)}function _r(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Nu.test(String.fromCharCode(i)):Ps(i,gr)||Ps(i,Pu)}function Lu(i){let e=!0;for(let t=0;t<i.length;t++){let s=i.charCodeAt(t);if((s&64512)===55296&&t+1<i.length){let r=i.charCodeAt(++t);(r&64512)===56320&&(s=65536+((s&1023)<<10)+(r&1023))}if(e){if(e=!1,!br(s))return!1}else if(!_r(s))return!1}return!e}});var xr=v(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.isKeyword=Bu;Oe.isReservedWord=yr;Oe.isStrictBindOnlyReservedWord=Sr;Oe.isStrictBindReservedWord=$u;Oe.isStrictReservedWord=vr;var Fs={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"]},Fu=new Set(Fs.keyword),Iu=new Set(Fs.strict),Du=new Set(Fs.strictBind);function yr(i,e){return e&&i==="await"||i==="enum"}function vr(i,e){return yr(i,e)||Iu.has(i)}function Sr(i){return Du.has(i)}function $u(i,e){return vr(i,e)||Sr(i)}function Bu(i){return Fu.has(i)}});var Er=v(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});Object.defineProperty(ae,"isIdentifierChar",{enumerable:!0,get:function(){return Is.isIdentifierChar}});Object.defineProperty(ae,"isIdentifierName",{enumerable:!0,get:function(){return Is.isIdentifierName}});Object.defineProperty(ae,"isIdentifierStart",{enumerable:!0,get:function(){return Is.isIdentifierStart}});Object.defineProperty(ae,"isKeyword",{enumerable:!0,get:function(){return rt.isKeyword}});Object.defineProperty(ae,"isReservedWord",{enumerable:!0,get:function(){return rt.isReservedWord}});Object.defineProperty(ae,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return rt.isStrictBindOnlyReservedWord}});Object.defineProperty(ae,"isStrictBindReservedWord",{enumerable:!0,get:function(){return rt.isStrictBindReservedWord}});Object.defineProperty(ae,"isStrictReservedWord",{enumerable:!0,get:function(){return rt.isStrictReservedWord}});var Is=wr(),rt=xr()});var $s=v((ud,Ds)=>{var Or=process.argv||[],It=process.env,Wu=!("NO_COLOR"in It||Or.includes("--no-color"))&&("FORCE_COLOR"in It||Or.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&It.TERM!=="dumb"||"CI"in It),ju=(i,e,t=i)=>s=>{let r=""+s,n=r.indexOf(e,i.length);return~n?i+Uu(r,e,t,n)+e:i+r+e},Uu=(i,e,t,s)=>{let r="",n=0;do r+=i.substring(n,s)+t,n=s+e.length,s=i.indexOf(e,n);while(~s);return r+i.substring(n)},Cr=(i=Wu)=>{let e=i?ju:()=>String;return{isColorSupported:i,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")}};Ds.exports=Cr();Ds.exports.createColors=Cr});var Ar=v((hd,kr)=>{"use strict";var qu=/[|\\{}()[\]^$+*?.]/g;kr.exports=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(qu,"\\$&")}});var Rr=v((ld,Tr)=>{"use strict";Tr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Bs=v((cd,Lr)=>{var Ce=Rr(),Pr={};for(Dt in Ce)Ce.hasOwnProperty(Dt)&&(Pr[Ce[Dt]]=Dt);var Dt,_=Lr.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(j in _)if(_.hasOwnProperty(j)){if(!("channels"in _[j]))throw new Error("missing channels property: "+j);if(!("labels"in _[j]))throw new Error("missing channel labels property: "+j);if(_[j].labels.length!==_[j].channels)throw new Error("channel and label counts mismatch: "+j);Mr=_[j].channels,Nr=_[j].labels,delete _[j].channels,delete _[j].labels,Object.defineProperty(_[j],"channels",{value:Mr}),Object.defineProperty(_[j],"labels",{value:Nr})}var Mr,Nr,j;_.rgb.hsl=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r=Math.min(e,t,s),n=Math.max(e,t,s),o=n-r,u,a,h;return n===r?u=0:e===n?u=(t-s)/o:t===n?u=2+(s-e)/o:s===n&&(u=4+(e-t)/o),u=Math.min(u*60,360),u<0&&(u+=360),h=(r+n)/2,n===r?a=0:h<=.5?a=o/(n+r):a=o/(2-n-r),[u,a*100,h*100]};_.rgb.hsv=function(i){var e,t,s,r,n,o=i[0]/255,u=i[1]/255,a=i[2]/255,h=Math.max(o,u,a),l=h-Math.min(o,u,a),c=function(d){return(h-d)/6/l+1/2};return l===0?r=n=0:(n=l/h,e=c(o),t=c(u),s=c(a),o===h?r=s-t:u===h?r=1/3+e-s:a===h&&(r=2/3+t-e),r<0?r+=1:r>1&&(r-=1)),[r*360,n*100,h*100]};_.rgb.hwb=function(i){var e=i[0],t=i[1],s=i[2],r=_.rgb.hsl(i)[0],n=1/255*Math.min(e,Math.min(t,s));return s=1-1/255*Math.max(e,Math.max(t,s)),[r,n*100,s*100]};_.rgb.cmyk=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r,n,o,u;return u=Math.min(1-e,1-t,1-s),r=(1-e-u)/(1-u)||0,n=(1-t-u)/(1-u)||0,o=(1-s-u)/(1-u)||0,[r*100,n*100,o*100,u*100]};function Vu(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)+Math.pow(i[2]-e[2],2)}_.rgb.keyword=function(i){var e=Pr[i];if(e)return e;var t=1/0,s;for(var r in Ce)if(Ce.hasOwnProperty(r)){var n=Ce[r],o=Vu(i,n);o<t&&(t=o,s=r)}return s};_.keyword.rgb=function(i){return Ce[i]};_.rgb.xyz=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.4124+t*.3576+s*.1805,n=e*.2126+t*.7152+s*.0722,o=e*.0193+t*.1192+s*.9505;return[r*100,n*100,o*100]};_.rgb.lab=function(i){var e=_.rgb.xyz(i),t=e[0],s=e[1],r=e[2],n,o,u;return t/=95.047,s/=100,r/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=116*s-16,o=500*(t-s),u=200*(s-r),[n,o,u]};_.hsl.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100,r,n,o,u,a;if(t===0)return a=s*255,[a,a,a];s<.5?n=s*(1+t):n=s+t-s*t,r=2*s-n,u=[0,0,0];for(var h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?a=r+(n-r)*6*o:2*o<1?a=n:3*o<2?a=r+(n-r)*(2/3-o)*6:a=r,u[h]=a*255;return u};_.hsl.hsv=function(i){var e=i[0],t=i[1]/100,s=i[2]/100,r=t,n=Math.max(s,.01),o,u;return s*=2,t*=s<=1?s:2-s,r*=n<=1?n:2-n,u=(s+t)/2,o=s===0?2*r/(n+r):2*t/(s+t),[e,o*100,u*100]};_.hsv.rgb=function(i){var e=i[0]/60,t=i[1]/100,s=i[2]/100,r=Math.floor(e)%6,n=e-Math.floor(e),o=255*s*(1-t),u=255*s*(1-t*n),a=255*s*(1-t*(1-n));switch(s*=255,r){case 0:return[s,a,o];case 1:return[u,s,o];case 2:return[o,s,a];case 3:return[o,u,s];case 4:return[a,o,s];case 5:return[s,o,u]}};_.hsv.hsl=function(i){var e=i[0],t=i[1]/100,s=i[2]/100,r=Math.max(s,.01),n,o,u;return u=(2-t)*s,n=(2-t)*r,o=t*r,o/=n<=1?n:2-n,o=o||0,u/=2,[e,o*100,u*100]};_.hwb.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100,r=t+s,n,o,u,a;r>1&&(t/=r,s/=r),n=Math.floor(6*e),o=1-s,u=6*e-n,n&1&&(u=1-u),a=t+u*(o-t);var h,l,c;switch(n){default:case 6:case 0:h=o,l=a,c=t;break;case 1:h=a,l=o,c=t;break;case 2:h=t,l=o,c=a;break;case 3:h=t,l=a,c=o;break;case 4:h=a,l=t,c=o;break;case 5:h=o,l=t,c=a;break}return[h*255,l*255,c*255]};_.cmyk.rgb=function(i){var e=i[0]/100,t=i[1]/100,s=i[2]/100,r=i[3]/100,n,o,u;return n=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,t*(1-r)+r),u=1-Math.min(1,s*(1-r)+r),[n*255,o*255,u*255]};_.xyz.rgb=function(i){var e=i[0]/100,t=i[1]/100,s=i[2]/100,r,n,o;return r=e*3.2406+t*-1.5372+s*-.4986,n=e*-.9689+t*1.8758+s*.0415,o=e*.0557+t*-.204+s*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),[r*255,n*255,o*255]};_.xyz.lab=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return e/=95.047,t/=100,s/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=116*t-16,n=500*(e-t),o=200*(t-s),[r,n,o]};_.lab.xyz=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;n=(e+16)/116,r=t/500+n,o=n-s/200;var u=Math.pow(n,3),a=Math.pow(r,3),h=Math.pow(o,3);return n=u>.008856?u:(n-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,o=h>.008856?h:(o-16/116)/7.787,r*=95.047,n*=100,o*=108.883,[r,n,o]};_.lab.lch=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return r=Math.atan2(s,t),n=r*360/2/Math.PI,n<0&&(n+=360),o=Math.sqrt(t*t+s*s),[e,o,n]};_.lch.lab=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return o=s/360*2*Math.PI,r=t*Math.cos(o),n=t*Math.sin(o),[e,r,n]};_.rgb.ansi16=function(i){var e=i[0],t=i[1],s=i[2],r=1 in arguments?arguments[1]:_.rgb.hsv(i)[2];if(r=Math.round(r/50),r===0)return 30;var n=30+(Math.round(s/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return r===2&&(n+=60),n};_.hsv.ansi16=function(i){return _.rgb.ansi16(_.hsv.rgb(i),i[2])};_.rgb.ansi256=function(i){var e=i[0],t=i[1],s=i[2];if(e===t&&t===s)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var r=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5);return r};_.ansi16.rgb=function(i){var e=i%10;if(e===0||e===7)return i>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(i>50)+1)*.5,s=(e&1)*t*255,r=(e>>1&1)*t*255,n=(e>>2&1)*t*255;return[s,r,n]};_.ansi256.rgb=function(i){if(i>=232){var e=(i-232)*10+8;return[e,e,e]}i-=16;var t,s=Math.floor(i/36)/5*255,r=Math.floor((t=i%36)/6)/5*255,n=t%6/5*255;return[s,r,n]};_.rgb.hex=function(i){var e=((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};_.hex.rgb=function(i){var e=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(u){return u+u}).join(""));var s=parseInt(t,16),r=s>>16&255,n=s>>8&255,o=s&255;return[r,n,o]};_.rgb.hcg=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r=Math.max(Math.max(e,t),s),n=Math.min(Math.min(e,t),s),o=r-n,u,a;return o<1?u=n/(1-o):u=0,o<=0?a=0:r===e?a=(t-s)/o%6:r===t?a=2+(s-e)/o:a=4+(e-t)/o+4,a/=6,a%=1,[a*360,o*100,u*100]};_.hsl.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=1,r=0;return t<.5?s=2*e*t:s=2*e*(1-t),s<1&&(r=(t-.5*s)/(1-s)),[i[0],s*100,r*100]};_.hsv.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=e*t,r=0;return s<1&&(r=(t-s)/(1-s)),[i[0],s*100,r*100]};_.hcg.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100;if(t===0)return[s*255,s*255,s*255];var r=[0,0,0],n=e%1*6,o=n%1,u=1-o,a=0;switch(Math.floor(n)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=u,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=u,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=u}return a=(1-t)*s,[(t*r[0]+a)*255,(t*r[1]+a)*255,(t*r[2]+a)*255]};_.hcg.hsv=function(i){var e=i[1]/100,t=i[2]/100,s=e+t*(1-e),r=0;return s>0&&(r=e/s),[i[0],r*100,s*100]};_.hcg.hsl=function(i){var e=i[1]/100,t=i[2]/100,s=t*(1-e)+.5*e,r=0;return s>0&&s<.5?r=e/(2*s):s>=.5&&s<1&&(r=e/(2*(1-s))),[i[0],r*100,s*100]};_.hcg.hwb=function(i){var e=i[1]/100,t=i[2]/100,s=e+t*(1-e);return[i[0],(s-e)*100,(1-s)*100]};_.hwb.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=1-t,r=s-e,n=0;return r<1&&(n=(s-r)/(1-r)),[i[0],r*100,n*100]};_.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};_.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};_.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};_.gray.hsl=_.gray.hsv=function(i){return[0,0,i[0]]};_.gray.hwb=function(i){return[0,100,i[0]]};_.gray.cmyk=function(i){return[0,0,0,i[0]]};_.gray.lab=function(i){return[i[0],0,0]};_.gray.hex=function(i){var e=Math.round(i[0]/100*255)&255,t=(e<<16)+(e<<8)+e,s=t.toString(16).toUpperCase();return"000000".substring(s.length)+s};_.rgb.gray=function(i){var e=(i[0]+i[1]+i[2])/3;return[e/255*100]}});var Ir=v((fd,Fr)=>{var $t=Bs();function Gu(){for(var i={},e=Object.keys($t),t=e.length,s=0;s<t;s++)i[e[s]]={distance:-1,parent:null};return i}function Hu(i){var e=Gu(),t=[i];for(e[i].distance=0;t.length;)for(var s=t.pop(),r=Object.keys($t[s]),n=r.length,o=0;o<n;o++){var u=r[o],a=e[u];a.distance===-1&&(a.distance=e[s].distance+1,a.parent=s,t.unshift(u))}return e}function zu(i,e){return function(t){return e(i(t))}}function Yu(i,e){for(var t=[e[i].parent,i],s=$t[e[i].parent][i],r=e[i].parent;e[r].parent;)t.unshift(e[r].parent),s=zu($t[e[r].parent][r],s),r=e[r].parent;return s.conversion=t,s}Fr.exports=function(i){for(var e=Hu(i),t={},s=Object.keys(e),r=s.length,n=0;n<r;n++){var o=s[n],u=e[o];u.parent!==null&&(t[o]=Yu(o,e))}return t}});var $r=v((dd,Dr)=>{var Ws=Bs(),Ku=Ir(),Fe={},Xu=Object.keys(Ws);function Ju(i){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),i(t))};return"conversion"in i&&(e.conversion=i.conversion),e}function Zu(i){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var s=i(t);if(typeof s=="object")for(var r=s.length,n=0;n<r;n++)s[n]=Math.round(s[n]);return s};return"conversion"in i&&(e.conversion=i.conversion),e}Xu.forEach(function(i){Fe[i]={},Object.defineProperty(Fe[i],"channels",{value:Ws[i].channels}),Object.defineProperty(Fe[i],"labels",{value:Ws[i].labels});var e=Ku(i),t=Object.keys(e);t.forEach(function(s){var r=e[s];Fe[i][s]=Zu(r),Fe[i][s].raw=Ju(r)})});Dr.exports=Fe});var Wr=v((pd,Br)=>{"use strict";var Ie=$r(),Bt=(i,e)=>function(){return`\x1B[${i.apply(Ie,arguments)+e}m`},Wt=(i,e)=>function(){let t=i.apply(Ie,arguments);return`\x1B[${38+e};5;${t}m`},jt=(i,e)=>function(){let t=i.apply(Ie,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function Qu(){let i=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let r of Object.keys(e)){let n=e[r];for(let o of Object.keys(n)){let u=n[o];e[o]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},n[o]=e[o],i.set(u[0],u[1])}Object.defineProperty(e,r,{value:n,enumerable:!1}),Object.defineProperty(e,"codes",{value:i,enumerable:!1})}let t=r=>r,s=(r,n,o)=>[r,n,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Bt(t,0)},e.color.ansi256={ansi256:Wt(t,0)},e.color.ansi16m={rgb:jt(s,0)},e.bgColor.ansi={ansi:Bt(t,10)},e.bgColor.ansi256={ansi256:Wt(t,10)},e.bgColor.ansi16m={rgb:jt(s,10)};for(let r of Object.keys(Ie)){if(typeof Ie[r]!="object")continue;let n=Ie[r];r==="ansi16"&&(r="ansi"),"ansi16"in n&&(e.color.ansi[r]=Bt(n.ansi16,0),e.bgColor.ansi[r]=Bt(n.ansi16,10)),"ansi256"in n&&(e.color.ansi256[r]=Wt(n.ansi256,0),e.bgColor.ansi256[r]=Wt(n.ansi256,10)),"rgb"in n&&(e.color.ansi16m[r]=jt(n.rgb,0),e.bgColor.ansi16m[r]=jt(n.rgb,10))}return e}Object.defineProperty(Br,"exports",{enumerable:!0,get:Qu})});var Ur=v((md,jr)=>{"use strict";jr.exports=(i,e)=>{e=e||process.argv;let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1?!0:s<r)}});var Vr=v((gd,qr)=>{"use strict";var eh=require("os"),te=Ur(),D=process.env,De;te("no-color")||te("no-colors")||te("color=false")?De=!1:(te("color")||te("colors")||te("color=true")||te("color=always"))&&(De=!0);"FORCE_COLOR"in D&&(De=D.FORCE_COLOR.length===0||parseInt(D.FORCE_COLOR,10)!==0);function th(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function sh(i){if(De===!1)return 0;if(te("color=16m")||te("color=full")||te("color=truecolor"))return 3;if(te("color=256"))return 2;if(i&&!i.isTTY&&De!==!0)return 0;let e=De?1:0;if(process.platform==="win32"){let t=eh.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in D)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in D)||D.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D.TEAMCITY_VERSION)?1:0;if(D.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in D){let t=parseInt((D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(D.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D.TERM)||"COLORTERM"in D?1:(D.TERM==="dumb",e)}function js(i){let e=sh(i);return th(e)}qr.exports={supportsColor:js,stdout:js(process.stdout),stderr:js(process.stderr)}});var Kr=v((bd,Yr)=>{"use strict";var ih=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Gr=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,rh=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,nh=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,oh=new Map([["n",`
|
|
4
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function zr(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):oh.get(i)||i}function ah(i,e){let t=[],s=e.trim().split(/\s*,\s*/g),r;for(let n of s)if(!isNaN(n))t.push(Number(n));else if(r=n.match(rh))t.push(r[2].replace(nh,(o,u,a)=>u?zr(u):a));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${i}')`);return t}function uh(i){Gr.lastIndex=0;let e=[],t;for(;(t=Gr.exec(i))!==null;){let s=t[1];if(t[2]){let r=ah(s,t[2]);e.push([s].concat(r))}else e.push([s])}return e}function Hr(i,e){let t={};for(let r of e)for(let n of r.styles)t[n[0]]=r.inverse?null:n.slice(1);let s=i;for(let r of Object.keys(t))if(Array.isArray(t[r])){if(!(r in s))throw new Error(`Unknown Chalk style: ${r}`);t[r].length>0?s=s[r].apply(s,t[r]):s=s[r]}return s}Yr.exports=(i,e)=>{let t=[],s=[],r=[];if(e.replace(ih,(n,o,u,a,h,l)=>{if(o)r.push(zr(o));else if(a){let c=r.join("");r=[],s.push(t.length===0?c:Hr(i,t)(c)),t.push({inverse:u,styles:uh(a)})}else if(h){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(Hr(i,t)(r.join(""))),r=[],t.pop()}else r.push(l)}),s.push(r.join("")),t.length>0){let n=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var en=v((_d,ot)=>{"use strict";var qs=Ar(),R=Wr(),Us=Vr().stdout,hh=Kr(),Jr=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Zr=["ansi","ansi","ansi256","ansi16m"],Qr=new Set(["gray"])
|
|
5
|
-
`):t+=r}return t}function un(i){return on.isColorSupported||i.forceColor}var Vs;function wh(i){if(i){var e;return(e=Vs)!=null||(Vs=(0,Gs.createColors)(!0)),Vs}return on}function yh(i,e={}){if(i!==""&&un(e)){let t=mh(wh(e.forceColor));return _h(t,i)}else return i}{let i,e;at.getChalk=({forceColor:t})=>{var s;if((s=i)!=null||(i=en()),t){var r;return(r=e)!=null||(e=new i.constructor({enabled:!0,level:1})),e}return i}}});var gn=v(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.codeFrameColumns=mn;qt.default=Ch;var ln=hn(),zs=vh(
|
|
6
|
-
`,o(n.gutter,
|
|
3
|
+
`).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:n}=r;return Error.stackTraceLimit=s,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:r}=Error;Error.prepareStackTrace=(u,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:s,stackTraceLimit:r}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let s={line:t.getLineNumber(),column:t.getColumnNumber()};lr(s,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(s,"constructor",{value:!0,configurable:!0}),t.isEval()&&(s.evalOrigin=t.getEvalOrigin()),t.isNative()&&(s.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(s.type=r);let n=t.getFunctionName();n&&(s.function=n);let o=t.getMethodName();return o&&n!==o&&(s.method=o),s}parseLine(e){let t=e&&e.match(Tu);if(!t)return null;let s=t[1]==="new",r=t[2],n=t[3],o=t[4],u=Number(t[5]),a=Number(t[6]),h=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&&h){let b=0;for(let g=h.length-1;g>0;g--)if(h.charAt(g)===")")b++;else if(h.charAt(g)==="("&&h.charAt(g-1)===" "&&(b--,b===-1&&h.charAt(g-1)===" ")){let w=h.slice(0,g-1);h=h.slice(g+1),r+=` (${w}`;break}}if(r){let b=r.match(Ru);b&&(r=b[1],m=b[2])}return lr(f,h,this._cwd),s&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=u,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 lr(i,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),i.file=e)}function Au(i){if(i.length===0)return[];let e=i.map(t=>Cu(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Tu=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Ru=/^(.*?) \[as (.*?)\]$/;fr.exports=Ns});var pr=v(Ft=>{Object.defineProperty(Ft,"__esModule",{value:!0});Ft.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;Ft.matchToToken=function(i){var e={type:"invalid",value:i[0],closed:void 0};return i[1]?(e.type="string",e.closed=!!(i[3]||i[4])):i[5]?e.type="comment":i[6]?(e.type="comment",e.closed=!!i[7]):i[8]?e.type="regex":i[9]?e.type="number":i[10]?e.type="name":i[11]?e.type="punctuator":i[12]&&(e.type="whitespace"),e}});var wr=v(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.isIdentifierChar=_r;it.isIdentifierName=Lu;it.isIdentifierStart=br;var Ls="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",mr="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Mu=new RegExp("["+Ls+"]"),Nu=new RegExp("["+Ls+mr+"]");Ls=mr=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,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Pu=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ps(i,e){let t=65536;for(let s=0,r=e.length;s<r;s+=2){if(t+=e[s],t>i)return!1;if(t+=e[s+1],t>=i)return!0}return!1}function br(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Mu.test(String.fromCharCode(i)):Ps(i,gr)}function _r(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Nu.test(String.fromCharCode(i)):Ps(i,gr)||Ps(i,Pu)}function Lu(i){let e=!0;for(let t=0;t<i.length;t++){let s=i.charCodeAt(t);if((s&64512)===55296&&t+1<i.length){let r=i.charCodeAt(++t);(r&64512)===56320&&(s=65536+((s&1023)<<10)+(r&1023))}if(e){if(e=!1,!br(s))return!1}else if(!_r(s))return!1}return!e}});var Sr=v(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.isKeyword=$u;Oe.isReservedWord=yr;Oe.isStrictBindOnlyReservedWord=xr;Oe.isStrictBindReservedWord=Bu;Oe.isStrictReservedWord=vr;var Fs={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"]},Fu=new Set(Fs.keyword),Iu=new Set(Fs.strict),Du=new Set(Fs.strictBind);function yr(i,e){return e&&i==="await"||i==="enum"}function vr(i,e){return yr(i,e)||Iu.has(i)}function xr(i){return Du.has(i)}function Bu(i,e){return vr(i,e)||xr(i)}function $u(i){return Fu.has(i)}});var Er=v(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});Object.defineProperty(ae,"isIdentifierChar",{enumerable:!0,get:function(){return Is.isIdentifierChar}});Object.defineProperty(ae,"isIdentifierName",{enumerable:!0,get:function(){return Is.isIdentifierName}});Object.defineProperty(ae,"isIdentifierStart",{enumerable:!0,get:function(){return Is.isIdentifierStart}});Object.defineProperty(ae,"isKeyword",{enumerable:!0,get:function(){return rt.isKeyword}});Object.defineProperty(ae,"isReservedWord",{enumerable:!0,get:function(){return rt.isReservedWord}});Object.defineProperty(ae,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return rt.isStrictBindOnlyReservedWord}});Object.defineProperty(ae,"isStrictBindReservedWord",{enumerable:!0,get:function(){return rt.isStrictBindReservedWord}});Object.defineProperty(ae,"isStrictReservedWord",{enumerable:!0,get:function(){return rt.isStrictReservedWord}});var Is=wr(),rt=Sr()});var Bs=v((ud,Ds)=>{var Or=process.argv||[],It=process.env,Wu=!("NO_COLOR"in It||Or.includes("--no-color"))&&("FORCE_COLOR"in It||Or.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&It.TERM!=="dumb"||"CI"in It),ju=(i,e,t=i)=>s=>{let r=""+s,n=r.indexOf(e,i.length);return~n?i+Uu(r,e,t,n)+e:i+r+e},Uu=(i,e,t,s)=>{let r="",n=0;do r+=i.substring(n,s)+t,n=s+e.length,s=i.indexOf(e,n);while(~s);return r+i.substring(n)},Cr=(i=Wu)=>{let e=i?ju:()=>String;return{isColorSupported:i,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")}};Ds.exports=Cr();Ds.exports.createColors=Cr});var Ar=v((hd,kr)=>{"use strict";var qu=/[|\\{}()[\]^$+*?.]/g;kr.exports=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(qu,"\\$&")}});var Rr=v((ld,Tr)=>{"use strict";Tr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var $s=v((cd,Lr)=>{var Ce=Rr(),Pr={};for(Dt in Ce)Ce.hasOwnProperty(Dt)&&(Pr[Ce[Dt]]=Dt);var Dt,_=Lr.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(j in _)if(_.hasOwnProperty(j)){if(!("channels"in _[j]))throw new Error("missing channels property: "+j);if(!("labels"in _[j]))throw new Error("missing channel labels property: "+j);if(_[j].labels.length!==_[j].channels)throw new Error("channel and label counts mismatch: "+j);Mr=_[j].channels,Nr=_[j].labels,delete _[j].channels,delete _[j].labels,Object.defineProperty(_[j],"channels",{value:Mr}),Object.defineProperty(_[j],"labels",{value:Nr})}var Mr,Nr,j;_.rgb.hsl=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r=Math.min(e,t,s),n=Math.max(e,t,s),o=n-r,u,a,h;return n===r?u=0:e===n?u=(t-s)/o:t===n?u=2+(s-e)/o:s===n&&(u=4+(e-t)/o),u=Math.min(u*60,360),u<0&&(u+=360),h=(r+n)/2,n===r?a=0:h<=.5?a=o/(n+r):a=o/(2-n-r),[u,a*100,h*100]};_.rgb.hsv=function(i){var e,t,s,r,n,o=i[0]/255,u=i[1]/255,a=i[2]/255,h=Math.max(o,u,a),l=h-Math.min(o,u,a),c=function(d){return(h-d)/6/l+1/2};return l===0?r=n=0:(n=l/h,e=c(o),t=c(u),s=c(a),o===h?r=s-t:u===h?r=1/3+e-s:a===h&&(r=2/3+t-e),r<0?r+=1:r>1&&(r-=1)),[r*360,n*100,h*100]};_.rgb.hwb=function(i){var e=i[0],t=i[1],s=i[2],r=_.rgb.hsl(i)[0],n=1/255*Math.min(e,Math.min(t,s));return s=1-1/255*Math.max(e,Math.max(t,s)),[r,n*100,s*100]};_.rgb.cmyk=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r,n,o,u;return u=Math.min(1-e,1-t,1-s),r=(1-e-u)/(1-u)||0,n=(1-t-u)/(1-u)||0,o=(1-s-u)/(1-u)||0,[r*100,n*100,o*100,u*100]};function Vu(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)+Math.pow(i[2]-e[2],2)}_.rgb.keyword=function(i){var e=Pr[i];if(e)return e;var t=1/0,s;for(var r in Ce)if(Ce.hasOwnProperty(r)){var n=Ce[r],o=Vu(i,n);o<t&&(t=o,s=r)}return s};_.keyword.rgb=function(i){return Ce[i]};_.rgb.xyz=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.4124+t*.3576+s*.1805,n=e*.2126+t*.7152+s*.0722,o=e*.0193+t*.1192+s*.9505;return[r*100,n*100,o*100]};_.rgb.lab=function(i){var e=_.rgb.xyz(i),t=e[0],s=e[1],r=e[2],n,o,u;return t/=95.047,s/=100,r/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=116*s-16,o=500*(t-s),u=200*(s-r),[n,o,u]};_.hsl.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100,r,n,o,u,a;if(t===0)return a=s*255,[a,a,a];s<.5?n=s*(1+t):n=s+t-s*t,r=2*s-n,u=[0,0,0];for(var h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?a=r+(n-r)*6*o:2*o<1?a=n:3*o<2?a=r+(n-r)*(2/3-o)*6:a=r,u[h]=a*255;return u};_.hsl.hsv=function(i){var e=i[0],t=i[1]/100,s=i[2]/100,r=t,n=Math.max(s,.01),o,u;return s*=2,t*=s<=1?s:2-s,r*=n<=1?n:2-n,u=(s+t)/2,o=s===0?2*r/(n+r):2*t/(s+t),[e,o*100,u*100]};_.hsv.rgb=function(i){var e=i[0]/60,t=i[1]/100,s=i[2]/100,r=Math.floor(e)%6,n=e-Math.floor(e),o=255*s*(1-t),u=255*s*(1-t*n),a=255*s*(1-t*(1-n));switch(s*=255,r){case 0:return[s,a,o];case 1:return[u,s,o];case 2:return[o,s,a];case 3:return[o,u,s];case 4:return[a,o,s];case 5:return[s,o,u]}};_.hsv.hsl=function(i){var e=i[0],t=i[1]/100,s=i[2]/100,r=Math.max(s,.01),n,o,u;return u=(2-t)*s,n=(2-t)*r,o=t*r,o/=n<=1?n:2-n,o=o||0,u/=2,[e,o*100,u*100]};_.hwb.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100,r=t+s,n,o,u,a;r>1&&(t/=r,s/=r),n=Math.floor(6*e),o=1-s,u=6*e-n,n&1&&(u=1-u),a=t+u*(o-t);var h,l,c;switch(n){default:case 6:case 0:h=o,l=a,c=t;break;case 1:h=a,l=o,c=t;break;case 2:h=t,l=o,c=a;break;case 3:h=t,l=a,c=o;break;case 4:h=a,l=t,c=o;break;case 5:h=o,l=t,c=a;break}return[h*255,l*255,c*255]};_.cmyk.rgb=function(i){var e=i[0]/100,t=i[1]/100,s=i[2]/100,r=i[3]/100,n,o,u;return n=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,t*(1-r)+r),u=1-Math.min(1,s*(1-r)+r),[n*255,o*255,u*255]};_.xyz.rgb=function(i){var e=i[0]/100,t=i[1]/100,s=i[2]/100,r,n,o;return r=e*3.2406+t*-1.5372+s*-.4986,n=e*-.9689+t*1.8758+s*.0415,o=e*.0557+t*-.204+s*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),[r*255,n*255,o*255]};_.xyz.lab=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return e/=95.047,t/=100,s/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=116*t-16,n=500*(e-t),o=200*(t-s),[r,n,o]};_.lab.xyz=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;n=(e+16)/116,r=t/500+n,o=n-s/200;var u=Math.pow(n,3),a=Math.pow(r,3),h=Math.pow(o,3);return n=u>.008856?u:(n-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,o=h>.008856?h:(o-16/116)/7.787,r*=95.047,n*=100,o*=108.883,[r,n,o]};_.lab.lch=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return r=Math.atan2(s,t),n=r*360/2/Math.PI,n<0&&(n+=360),o=Math.sqrt(t*t+s*s),[e,o,n]};_.lch.lab=function(i){var e=i[0],t=i[1],s=i[2],r,n,o;return o=s/360*2*Math.PI,r=t*Math.cos(o),n=t*Math.sin(o),[e,r,n]};_.rgb.ansi16=function(i){var e=i[0],t=i[1],s=i[2],r=1 in arguments?arguments[1]:_.rgb.hsv(i)[2];if(r=Math.round(r/50),r===0)return 30;var n=30+(Math.round(s/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return r===2&&(n+=60),n};_.hsv.ansi16=function(i){return _.rgb.ansi16(_.hsv.rgb(i),i[2])};_.rgb.ansi256=function(i){var e=i[0],t=i[1],s=i[2];if(e===t&&t===s)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var r=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5);return r};_.ansi16.rgb=function(i){var e=i%10;if(e===0||e===7)return i>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(i>50)+1)*.5,s=(e&1)*t*255,r=(e>>1&1)*t*255,n=(e>>2&1)*t*255;return[s,r,n]};_.ansi256.rgb=function(i){if(i>=232){var e=(i-232)*10+8;return[e,e,e]}i-=16;var t,s=Math.floor(i/36)/5*255,r=Math.floor((t=i%36)/6)/5*255,n=t%6/5*255;return[s,r,n]};_.rgb.hex=function(i){var e=((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};_.hex.rgb=function(i){var e=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(u){return u+u}).join(""));var s=parseInt(t,16),r=s>>16&255,n=s>>8&255,o=s&255;return[r,n,o]};_.rgb.hcg=function(i){var e=i[0]/255,t=i[1]/255,s=i[2]/255,r=Math.max(Math.max(e,t),s),n=Math.min(Math.min(e,t),s),o=r-n,u,a;return o<1?u=n/(1-o):u=0,o<=0?a=0:r===e?a=(t-s)/o%6:r===t?a=2+(s-e)/o:a=4+(e-t)/o+4,a/=6,a%=1,[a*360,o*100,u*100]};_.hsl.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=1,r=0;return t<.5?s=2*e*t:s=2*e*(1-t),s<1&&(r=(t-.5*s)/(1-s)),[i[0],s*100,r*100]};_.hsv.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=e*t,r=0;return s<1&&(r=(t-s)/(1-s)),[i[0],s*100,r*100]};_.hcg.rgb=function(i){var e=i[0]/360,t=i[1]/100,s=i[2]/100;if(t===0)return[s*255,s*255,s*255];var r=[0,0,0],n=e%1*6,o=n%1,u=1-o,a=0;switch(Math.floor(n)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=u,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=u,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=u}return a=(1-t)*s,[(t*r[0]+a)*255,(t*r[1]+a)*255,(t*r[2]+a)*255]};_.hcg.hsv=function(i){var e=i[1]/100,t=i[2]/100,s=e+t*(1-e),r=0;return s>0&&(r=e/s),[i[0],r*100,s*100]};_.hcg.hsl=function(i){var e=i[1]/100,t=i[2]/100,s=t*(1-e)+.5*e,r=0;return s>0&&s<.5?r=e/(2*s):s>=.5&&s<1&&(r=e/(2*(1-s))),[i[0],r*100,s*100]};_.hcg.hwb=function(i){var e=i[1]/100,t=i[2]/100,s=e+t*(1-e);return[i[0],(s-e)*100,(1-s)*100]};_.hwb.hcg=function(i){var e=i[1]/100,t=i[2]/100,s=1-t,r=s-e,n=0;return r<1&&(n=(s-r)/(1-r)),[i[0],r*100,n*100]};_.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};_.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};_.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};_.gray.hsl=_.gray.hsv=function(i){return[0,0,i[0]]};_.gray.hwb=function(i){return[0,100,i[0]]};_.gray.cmyk=function(i){return[0,0,0,i[0]]};_.gray.lab=function(i){return[i[0],0,0]};_.gray.hex=function(i){var e=Math.round(i[0]/100*255)&255,t=(e<<16)+(e<<8)+e,s=t.toString(16).toUpperCase();return"000000".substring(s.length)+s};_.rgb.gray=function(i){var e=(i[0]+i[1]+i[2])/3;return[e/255*100]}});var Ir=v((fd,Fr)=>{var Bt=$s();function Gu(){for(var i={},e=Object.keys(Bt),t=e.length,s=0;s<t;s++)i[e[s]]={distance:-1,parent:null};return i}function Hu(i){var e=Gu(),t=[i];for(e[i].distance=0;t.length;)for(var s=t.pop(),r=Object.keys(Bt[s]),n=r.length,o=0;o<n;o++){var u=r[o],a=e[u];a.distance===-1&&(a.distance=e[s].distance+1,a.parent=s,t.unshift(u))}return e}function zu(i,e){return function(t){return e(i(t))}}function Yu(i,e){for(var t=[e[i].parent,i],s=Bt[e[i].parent][i],r=e[i].parent;e[r].parent;)t.unshift(e[r].parent),s=zu(Bt[e[r].parent][r],s),r=e[r].parent;return s.conversion=t,s}Fr.exports=function(i){for(var e=Hu(i),t={},s=Object.keys(e),r=s.length,n=0;n<r;n++){var o=s[n],u=e[o];u.parent!==null&&(t[o]=Yu(o,e))}return t}});var Br=v((dd,Dr)=>{var Ws=$s(),Ku=Ir(),Fe={},Xu=Object.keys(Ws);function Ju(i){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),i(t))};return"conversion"in i&&(e.conversion=i.conversion),e}function Zu(i){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var s=i(t);if(typeof s=="object")for(var r=s.length,n=0;n<r;n++)s[n]=Math.round(s[n]);return s};return"conversion"in i&&(e.conversion=i.conversion),e}Xu.forEach(function(i){Fe[i]={},Object.defineProperty(Fe[i],"channels",{value:Ws[i].channels}),Object.defineProperty(Fe[i],"labels",{value:Ws[i].labels});var e=Ku(i),t=Object.keys(e);t.forEach(function(s){var r=e[s];Fe[i][s]=Zu(r),Fe[i][s].raw=Ju(r)})});Dr.exports=Fe});var Wr=v((pd,$r)=>{"use strict";var Ie=Br(),$t=(i,e)=>function(){return`\x1B[${i.apply(Ie,arguments)+e}m`},Wt=(i,e)=>function(){let t=i.apply(Ie,arguments);return`\x1B[${38+e};5;${t}m`},jt=(i,e)=>function(){let t=i.apply(Ie,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function Qu(){let i=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let r of Object.keys(e)){let n=e[r];for(let o of Object.keys(n)){let u=n[o];e[o]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},n[o]=e[o],i.set(u[0],u[1])}Object.defineProperty(e,r,{value:n,enumerable:!1}),Object.defineProperty(e,"codes",{value:i,enumerable:!1})}let t=r=>r,s=(r,n,o)=>[r,n,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:$t(t,0)},e.color.ansi256={ansi256:Wt(t,0)},e.color.ansi16m={rgb:jt(s,0)},e.bgColor.ansi={ansi:$t(t,10)},e.bgColor.ansi256={ansi256:Wt(t,10)},e.bgColor.ansi16m={rgb:jt(s,10)};for(let r of Object.keys(Ie)){if(typeof Ie[r]!="object")continue;let n=Ie[r];r==="ansi16"&&(r="ansi"),"ansi16"in n&&(e.color.ansi[r]=$t(n.ansi16,0),e.bgColor.ansi[r]=$t(n.ansi16,10)),"ansi256"in n&&(e.color.ansi256[r]=Wt(n.ansi256,0),e.bgColor.ansi256[r]=Wt(n.ansi256,10)),"rgb"in n&&(e.color.ansi16m[r]=jt(n.rgb,0),e.bgColor.ansi16m[r]=jt(n.rgb,10))}return e}Object.defineProperty($r,"exports",{enumerable:!0,get:Qu})});var Ur=v((md,jr)=>{"use strict";jr.exports=(i,e)=>{e=e||process.argv;let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1?!0:s<r)}});var Vr=v((gd,qr)=>{"use strict";var eh=require("os"),te=Ur(),D=process.env,De;te("no-color")||te("no-colors")||te("color=false")?De=!1:(te("color")||te("colors")||te("color=true")||te("color=always"))&&(De=!0);"FORCE_COLOR"in D&&(De=D.FORCE_COLOR.length===0||parseInt(D.FORCE_COLOR,10)!==0);function th(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function sh(i){if(De===!1)return 0;if(te("color=16m")||te("color=full")||te("color=truecolor"))return 3;if(te("color=256"))return 2;if(i&&!i.isTTY&&De!==!0)return 0;let e=De?1:0;if(process.platform==="win32"){let t=eh.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in D)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in D)||D.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D.TEAMCITY_VERSION)?1:0;if(D.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in D){let t=parseInt((D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(D.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D.TERM)||"COLORTERM"in D?1:(D.TERM==="dumb",e)}function js(i){let e=sh(i);return th(e)}qr.exports={supportsColor:js,stdout:js(process.stdout),stderr:js(process.stderr)}});var Kr=v((bd,Yr)=>{"use strict";var ih=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Gr=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,rh=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,nh=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,oh=new Map([["n",`
|
|
4
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function zr(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):oh.get(i)||i}function ah(i,e){let t=[],s=e.trim().split(/\s*,\s*/g),r;for(let n of s)if(!isNaN(n))t.push(Number(n));else if(r=n.match(rh))t.push(r[2].replace(nh,(o,u,a)=>u?zr(u):a));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${i}')`);return t}function uh(i){Gr.lastIndex=0;let e=[],t;for(;(t=Gr.exec(i))!==null;){let s=t[1];if(t[2]){let r=ah(s,t[2]);e.push([s].concat(r))}else e.push([s])}return e}function Hr(i,e){let t={};for(let r of e)for(let n of r.styles)t[n[0]]=r.inverse?null:n.slice(1);let s=i;for(let r of Object.keys(t))if(Array.isArray(t[r])){if(!(r in s))throw new Error(`Unknown Chalk style: ${r}`);t[r].length>0?s=s[r].apply(s,t[r]):s=s[r]}return s}Yr.exports=(i,e)=>{let t=[],s=[],r=[];if(e.replace(ih,(n,o,u,a,h,l)=>{if(o)r.push(zr(o));else if(a){let c=r.join("");r=[],s.push(t.length===0?c:Hr(i,t)(c)),t.push({inverse:u,styles:uh(a)})}else if(h){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(Hr(i,t)(r.join(""))),r=[],t.pop()}else r.push(l)}),s.push(r.join("")),t.length>0){let n=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var en=v((_d,ot)=>{"use strict";var qs=Ar(),R=Wr(),Us=Vr().stdout,hh=Kr(),Jr=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Zr=["ansi","ansi","ansi256","ansi16m"],Qr=new Set(["gray"]),Be=Object.create(null);function Xr(i,e){e=e||{};let t=Us?Us.level:0;i.level=e.level===void 0?t:e.level,i.enabled="enabled"in e?e.enabled:i.level>0}function nt(i){if(!this||!(this instanceof nt)||this.template){let e={};return Xr(e,i),e.template=function(){let t=[].slice.call(arguments);return fh.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,nt.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=nt,e.template}Xr(this,i)}Jr&&(R.blue.open="\x1B[94m");for(let i of Object.keys(R))R[i].closeRe=new RegExp(qs(R[i].close),"g"),Be[i]={get(){let e=R[i];return Ut.call(this,this._styles?this._styles.concat(e):[e],this._empty,i)}};Be.visible={get(){return Ut.call(this,this._styles||[],!0,"visible")}};R.color.closeRe=new RegExp(qs(R.color.close),"g");for(let i of Object.keys(R.color.ansi))Qr.has(i)||(Be[i]={get(){let e=this.level;return function(){let s={open:R.color[Zr[e]][i].apply(null,arguments),close:R.color.close,closeRe:R.color.closeRe};return Ut.call(this,this._styles?this._styles.concat(s):[s],this._empty,i)}}});R.bgColor.closeRe=new RegExp(qs(R.bgColor.close),"g");for(let i of Object.keys(R.bgColor.ansi)){if(Qr.has(i))continue;let e="bg"+i[0].toUpperCase()+i.slice(1);Be[e]={get(){let t=this.level;return function(){let r={open:R.bgColor[Zr[t]][i].apply(null,arguments),close:R.bgColor.close,closeRe:R.bgColor.closeRe};return Ut.call(this,this._styles?this._styles.concat(r):[r],this._empty,i)}}}}var lh=Object.defineProperties(()=>{},Be);function Ut(i,e,t){let s=function(){return ch.apply(s,arguments)};s._styles=i,s._empty=e;let r=this;return Object.defineProperty(s,"level",{enumerable:!0,get(){return r.level},set(n){r.level=n}}),Object.defineProperty(s,"enabled",{enumerable:!0,get(){return r.enabled},set(n){r.enabled=n}}),s.hasGrey=this.hasGrey||t==="gray"||t==="grey",s.__proto__=lh,s}function ch(){let i=arguments,e=i.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let r=1;r<e;r++)t+=" "+i[r];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let s=R.dim.open;Jr&&this.hasGrey&&(R.dim.open="");for(let r of this._styles.slice().reverse())t=r.open+t.replace(r.closeRe,r.open)+r.close,t=t.replace(/\r?\n/g,`${r.close}$&${r.open}`);return R.dim.open=s,t}function fh(i,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),s=[e.raw[0]];for(let r=1;r<e.length;r++)s.push(String(t[r-1]).replace(/[{}\\]/g,"\\$&")),s.push(String(e.raw[r]));return hh(i,s.join(""))}Object.defineProperties(nt.prototype,Be);ot.exports=nt();ot.exports.supportsColor=Us;ot.exports.default=ot.exports});var hn=v(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.default=yh;at.shouldHighlight=un;var tn=pr(),sn=Er(),Gs=dh(Bs(),!0);function nn(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(nn=function(s){return s?t:e})(i)}function dh(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=nn(e);if(t&&t.has(i))return t.get(i);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in i)if(n!=="default"&&{}.hasOwnProperty.call(i,n)){var o=r?Object.getOwnPropertyDescriptor(i,n):null;o&&(o.get||o.set)?Object.defineProperty(s,n,o):s[n]=i[n]}return s.default=i,t&&t.set(i,s),s}var on=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,Gs.createColors)(!1):Gs.default,rn=(i,e)=>t=>i(e(t)),ph=new Set(["as","async","from","get","of","set"]);function mh(i){return{keyword:i.cyan,capitalized:i.yellow,jsxIdentifier:i.yellow,punctuator:i.yellow,number:i.magenta,string:i.green,regex:i.magenta,comment:i.gray,invalid:rn(rn(i.white,i.bgRed),i.bold)}}var gh=/\r\n|[\n\r\u2028\u2029]/,bh=/^[()[\]{}]$/,an;{let i=/^[a-z][\w-]*$/i,e=function(t,s,r){if(t.type==="name"){if((0,sn.isKeyword)(t.value)||(0,sn.isStrictReservedWord)(t.value,!0)||ph.has(t.value))return"keyword";if(i.test(t.value)&&(r[s-1]==="<"||r.slice(s-2,s)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&bh.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};an=function*(t){let s;for(;s=tn.default.exec(t);){let r=tn.matchToToken(s);yield{type:e(r,s.index,t),value:r.value}}}}function _h(i,e){let t="";for(let{type:s,value:r}of an(e)){let n=i[s];n?t+=r.split(gh).map(o=>n(o)).join(`
|
|
5
|
+
`):t+=r}return t}function un(i){return on.isColorSupported||i.forceColor}var Vs;function wh(i){if(i){var e;return(e=Vs)!=null||(Vs=(0,Gs.createColors)(!0)),Vs}return on}function yh(i,e={}){if(i!==""&&un(e)){let t=mh(wh(e.forceColor));return _h(t,i)}else return i}{let i,e;at.getChalk=({forceColor:t})=>{var s;if((s=i)!=null||(i=en()),t){var r;return(r=e)!=null||(e=new i.constructor({enabled:!0,level:1})),e}return i}}});var gn=v(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.codeFrameColumns=mn;qt.default=Ch;var ln=hn(),zs=vh(Bs(),!0);function pn(i){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(pn=function(s){return s?t:e})(i)}function vh(i,e){if(!e&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var t=pn(e);if(t&&t.has(i))return t.get(i);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in i)if(n!=="default"&&{}.hasOwnProperty.call(i,n)){var o=r?Object.getOwnPropertyDescriptor(i,n):null;o&&(o.get||o.set)?Object.defineProperty(s,n,o):s[n]=i[n]}return s.default=i,t&&t.set(i,s),s}var xh=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,zs.createColors)(!1):zs.default,cn=(i,e)=>t=>i(e(t)),Hs;function Sh(i){if(i){var e;return(e=Hs)!=null||(Hs=(0,zs.createColors)(!0)),Hs}return xh}var fn=!1;function Eh(i){return{gutter:i.gray,marker:cn(i.red,i.bold),message:cn(i.red,i.bold)}}var dn=/\r\n|[\n\r\u2028\u2029]/;function Oh(i,e,t){let s=Object.assign({column:0,line:-1},i.start),r=Object.assign({},s,i.end),{linesAbove:n=2,linesBelow:o=3}=t||{},u=s.line,a=s.column,h=r.line,l=r.column,c=Math.max(u-(n+1),0),d=Math.min(e.length,h+o);u===-1&&(c=0),h===-1&&(d=e.length);let p=h-u,m={};if(p)for(let f=0;f<=p;f++){let b=f+u;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[u]=[a,0]:m[u]=!0:m[u]=[a,l-a];return{start:c,end:d,markerLines:m}}function mn(i,e,t={}){let s=(t.highlightCode||t.forceColor)&&(0,ln.shouldHighlight)(t),r=Sh(t.forceColor),n=Eh(r),o=(f,b)=>s?f(b):b,u=i.split(dn),{start:a,end:h,markerLines:l}=Oh(e,u,t),c=e.start&&typeof e.start.column=="number",d=String(h).length,m=(s?(0,ln.default)(i,t):i).split(dn,h).slice(a,h).map((f,b)=>{let g=a+1+b,x=` ${` ${g}`.slice(-d)} |`,y=l[g],S=!l[g+1];if(y){let E="";if(Array.isArray(y)){let F=f.slice(0,Math.max(y[0]-1,0)).replace(/[^\t]/g," "),z=y[1]||1;E=[`
|
|
6
|
+
`,o(n.gutter,x.replace(/\d/g," "))," ",F,o(n.marker,"^").repeat(z)].join(""),S&&t.message&&(E+=" "+o(n.message,t.message))}return[o(n.marker,">"),o(n.gutter,x),f.length>0?` ${f}`:"",E].join("")}else return` ${o(n.gutter,x)}${f.length>0?` ${f}`:""}`}).join(`
|
|
7
7
|
`);return t.message&&!c&&(m=`${" ".repeat(d+1)}${t.message}
|
|
8
|
-
${m}`),s?r.reset(m):m}function Ch(i,e,t,s={}){if(!fn){fn=!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),mn(i,{start:{column:t,line:e}},s)}});var yn=v((vd,wn)=>{"use strict";var{Duplex:kh}=require("stream");function bn(i){i.emit("close")}function Ah(){!this.destroyed&&this._writableState.finished&&this.destroy()}function _n(i){this.removeListener("error",_n),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function Th(i,e){let t=!0,s=new kh({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(n,o){let u=!o&&s._readableState.objectMode?n.toString():n;s.push(u)||i.pause()}),i.once("error",function(n){s.destroyed||(t=!1,s.destroy(n))}),i.once("close",function(){s.destroyed||s.push(null)}),s._destroy=function(r,n){if(i.readyState===i.CLOSED){n(r),process.nextTick(bn,s);return}let o=!1;i.once("error",function(a){o=!0,n(a)}),i.once("close",function(){o||n(r),process.nextTick(bn,s)}),t&&i.terminate()},s._final=function(r){if(i.readyState===i.CONNECTING){i.once("open",function(){s._final(r)});return}i._socket!==null&&(i._socket._writableState.finished?(r(),s._readableState.endEmitted&&s.destroy()):(i._socket.once("finish",function(){r()}),i.close()))},s._read=function(){i.isPaused&&i.resume()},s._write=function(r,n,o){if(i.readyState===i.CONNECTING){i.once("open",function(){s._write(r,n,o)});return}i.send(r,o)},s.on("end",Ah),s.on("error",_n),s}wn.exports=Th});var fe=v((Sd,xn)=>{"use strict";var vn=["nodebuffer","arraybuffer","fragments"],Sn=typeof Blob<"u";Sn&&vn.push("blob");xn.exports={BINARY_TYPES:vn,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Sn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var ut=v((xd,Vt)=>{"use strict";var{EMPTY_BUFFER:Rh}=fe(),Ys=Buffer[Symbol.species];function Mh(i,e){if(i.length===0)return Rh;if(i.length===1)return i[0];let t=Buffer.allocUnsafe(e),s=0;for(let r=0;r<i.length;r++){let n=i[r];t.set(n,s),s+=n.length}return s<e?new Ys(t.buffer,t.byteOffset,s):t}function En(i,e,t,s,r){for(let n=0;n<r;n++)t[s+n]=i[n]^e[n&3]}function On(i,e){for(let t=0;t<i.length;t++)i[t]^=e[t&3]}function Nh(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function Ks(i){if(Ks.readOnly=!0,Buffer.isBuffer(i))return i;let e;return i instanceof ArrayBuffer?e=new Ys(i):ArrayBuffer.isView(i)?e=new Ys(i.buffer,i.byteOffset,i.byteLength):(e=Buffer.from(i),Ks.readOnly=!1),e}Vt.exports={concat:Mh,mask:En,toArrayBuffer:Nh,toBuffer:Ks,unmask:On};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");Vt.exports.mask=function(e,t,s,r,n){n<48?En(e,t,s,r,n):i.mask(e,t,s,r,n)},Vt.exports.unmask=function(e,t){e.length<32?On(e,t):i.unmask(e,t)}}catch{}});var An=v((Ed,kn)=>{"use strict";var Cn=Symbol("kDone"),Xs=Symbol("kRun"),Js=class{constructor(e){this[Cn]=()=>{this.pending--,this[Xs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Xs]()}[Xs](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Cn])}}};kn.exports=Js});var ct=v((Od,Nn)=>{"use strict";var ht=require("zlib"),Tn=ut(),Ph=An(),{kStatusCode:Rn}=fe(),Lh=Buffer[Symbol.species],Fh=Buffer.from([0,0,255,255]),zt=Symbol("permessage-deflate"),de=Symbol("total-length"),lt=Symbol("callback"),we=Symbol("buffers"),Ht=Symbol("error"),Gt,Zs=class{constructor(e,t,s){if(this._maxPayload=s|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,!Gt){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Gt=new Ph(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[lt];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,s=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(!s)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(s.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?s.client_max_window_bits=t.clientMaxWindowBits:(s.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}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(s=>{let r=t[s];if(r.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(r=r[0],s==="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 "${s}": ${r}`);r=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else if(s==="server_max_window_bits"){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${s}": ${r}`);r=n}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else throw new Error(`Unknown parameter "${s}"`);t[s]=r})}),e}decompress(e,t,s){Gt.add(r=>{this._decompress(e,t,(n,o)=>{r(),s(n,o)})})}compress(e,t,s){Gt.add(r=>{this._compress(e,t,(n,o)=>{r(),s(n,o)})})}_decompress(e,t,s){let r=this._isServer?"client":"server";if(!this._inflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?ht.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=ht.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[zt]=this,this._inflate[de]=0,this._inflate[we]=[],this._inflate.on("error",Dh),this._inflate.on("data",Mn)}this._inflate[lt]=s,this._inflate.write(e),t&&this._inflate.write(Fh),this._inflate.flush(()=>{let n=this._inflate[Ht];if(n){this._inflate.close(),this._inflate=null,s(n);return}let o=Tn.concat(this._inflate[we],this._inflate[de]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[de]=0,this._inflate[we]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),s(null,o)})}_compress(e,t,s){let r=this._isServer?"server":"client";if(!this._deflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?ht.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=ht.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[de]=0,this._deflate[we]=[],this._deflate.on("data",Ih)}this._deflate[lt]=s,this._deflate.write(e),this._deflate.flush(ht.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Tn.concat(this._deflate[we],this._deflate[de]);t&&(n=new Lh(n.buffer,n.byteOffset,n.length-4)),this._deflate[lt]=null,this._deflate[de]=0,this._deflate[we]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),s(null,n)})}};Nn.exports=Zs;function Ih(i){this[we].push(i),this[de]+=i.length}function Mn(i){if(this[de]+=i.length,this[zt]._maxPayload<1||this[de]<=this[zt]._maxPayload){this[we].push(i);return}this[Ht]=new RangeError("Max payload size exceeded"),this[Ht].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ht][Rn]=1009,this.removeListener("data",Mn),this.reset()}function Dh(i){this[zt]._inflate=null,i[Rn]=1007,this[lt](i)}});var Be=v((Cd,Yt)=>{"use strict";var{isUtf8:Pn}=require("buffer"),{hasBlob:$h}=fe(),Bh=[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 Wh(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function Qs(i){let e=i.length,t=0;for(;t<e;)if(!(i[t]&128))t++;else if((i[t]&224)===192){if(t+1===e||(i[t+1]&192)!==128||(i[t]&254)===192)return!1;t+=2}else if((i[t]&240)===224){if(t+2>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||i[t]===224&&(i[t+1]&224)===128||i[t]===237&&(i[t+1]&224)===160)return!1;t+=3}else if((i[t]&248)===240){if(t+3>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||(i[t+3]&192)!==128||i[t]===240&&(i[t+1]&240)===128||i[t]===244&&i[t+1]>143||i[t]>244)return!1;t+=4}else return!1;return!0}function jh(i){return $h&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&(i[Symbol.toStringTag]==="Blob"||i[Symbol.toStringTag]==="File")}Yt.exports={isBlob:jh,isValidStatusCode:Wh,isValidUTF8:Qs,tokenChars:Bh};if(Pn)Yt.exports.isValidUTF8=function(i){return i.length<24?Qs(i):Pn(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");Yt.exports.isValidUTF8=function(e){return e.length<32?Qs(e):i(e)}}catch{}});var ri=v((kd,Wn)=>{"use strict";var{Writable:Uh}=require("stream"),Ln=ct(),{BINARY_TYPES:qh,EMPTY_BUFFER:Fn,kStatusCode:Vh,kWebSocket:Gh}=fe(),{concat:ei,toArrayBuffer:Hh,unmask:zh}=ut(),{isValidStatusCode:Yh,isValidUTF8:In}=Be(),Kt=Buffer[Symbol.species],Y=0,Dn=1,$n=2,Bn=3,ti=4,si=5,Xt=6,ii=class extends Uh{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||qh[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Gh]=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=Y}_write(e,t,s){if(this._opcode===8&&this._state==Y)return s();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=new Kt(s.buffer,s.byteOffset+e,s.length-e),new Kt(s.buffer,s.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],r=t.length-e;e>=s.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),r),this._buffers[0]=new Kt(s.buffer,s.byteOffset+e,s.length-e)),e-=s.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Y:this.getInfo(e);break;case Dn:this.getPayloadLength16(e);break;case $n:this.getPayloadLength64(e);break;case Bn:this.getMask();break;case ti:this.getData(e);break;case si:case Xt: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 s=(t[0]&64)===64;if(s&&!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(s){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=s}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(s){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=$n: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),s=t.readUInt32BE(0);if(s>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=s*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=Bn:this._state=ti}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ti}getData(e){let t=Fn;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]&&zh(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=si,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===Y&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Y;return}let t=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=ei(s,t):this._binaryType==="arraybuffer"?r=Hh(ei(s,t)):this._binaryType==="blob"?r=new Blob(s):r=s,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit("message",r,!0),this._state=Y,this.startLoop(e)}))}else{let r=ei(s,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===si||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit("message",r,!1),this._state=Y,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fn),this.end();else{let s=e.readUInt16BE(0);if(!Yh(s)){let n=this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let r=new Kt(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",s,r),this.end()}this._state=Y;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Y,this.startLoop(t)}))}createError(e,t,s,r,n){this._loop=!1,this._errored=!0;let o=new e(s?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[Vh]=r,o}};Wn.exports=ii});var ai=v((Td,qn)=>{"use strict";var{Duplex:Ad}=require("stream"),{randomFillSync:Kh}=require("crypto"),jn=ct(),{EMPTY_BUFFER:Xh,kWebSocket:Jh,NOOP:Zh}=fe(),{isBlob:We,isValidStatusCode:Qh}=Be(),{mask:Un,toBuffer:ke}=ut(),K=Symbol("kByteLength"),el=Buffer.alloc(4),Jt=8*1024,Ae,je=Jt,se=0,tl=1,sl=2,ni=class i{constructor(e,t,s){this._extensions=t||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=se,this.onerror=Zh,this[Jh]=void 0}static frame(e,t){let s,r=!1,n=2,o=!1;t.mask&&(s=t.maskBuffer||el,t.generateMask?t.generateMask(s):(je===Jt&&(Ae===void 0&&(Ae=Buffer.alloc(Jt)),Kh(Ae,0,Jt),je=0),s[0]=Ae[je++],s[1]=Ae[je++],s[2]=Ae[je++],s[3]=Ae[je++]),o=(s[0]|s[1]|s[2]|s[3])===0,n=6);let u;typeof e=="string"?(!t.mask||o)&&t[K]!==void 0?u=t[K]:(e=Buffer.from(e),u=e.length):(u=e.length,r=t.mask&&t.readOnly&&!o);let a=u;u>=65536?(n+=8,a=127):u>125&&(n+=2,a=126);let h=Buffer.allocUnsafe(r?u+n:n);return h[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(h[0]|=64),h[1]=a,a===126?h.writeUInt16BE(u,2):a===127&&(h[2]=h[3]=0,h.writeUIntBE(u,4,6)),t.mask?(h[1]|=128,h[n-4]=s[0],h[n-3]=s[1],h[n-2]=s[2],h[n-1]=s[3],o?[h,e]:r?(Un(e,s,h,n,u),[h]):(Un(e,s,e,0,u),[h,e])):[h,e]}close(e,t,s,r){let n;if(e===void 0)n=Xh;else{if(typeof e!="number"||!Qh(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 u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+u),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[K]:n.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==se?this.enqueue([this.dispatch,n,!1,o,r]):this.sendFrame(i.frame(n,o),r)}ping(e,t,s){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):We(e)?(r=e.size,n=!1):(e=ke(e),r=e.length,n=ke.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[K]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==se?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(i.frame(e,o),s)}pong(e,t,s){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):We(e)?(r=e.size,n=!1):(e=ke(e),r=e.length,n=ke.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[K]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==se?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(i.frame(e,o),s)}send(e,t,s){let r=this._extensions[jn.extensionName],n=t.binary?2:1,o=t.compress,u,a;typeof e=="string"?(u=Buffer.byteLength(e),a=!1):We(e)?(u=e.size,a=!1):(e=ke(e),u=e.length,a=ke.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=u>=r._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[K]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,this._compress,h,s]):this.getBlobData(e,this._compress,h,s):this._state!==se?this.enqueue([this.dispatch,e,this._compress,h,s]):this.dispatch(e,this._compress,h,s)}getBlobData(e,t,s,r){this._bufferedBytes+=s[K],this._state=sl,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(oi,this,u,r);return}this._bufferedBytes-=s[K];let o=ke(n);t?this.dispatch(o,t,s,r):(this._state=se,this.sendFrame(i.frame(o,s),r),this.dequeue())}).catch(n=>{process.nextTick(il,this,n,r)})}dispatch(e,t,s,r){if(!t){this.sendFrame(i.frame(e,s),r);return}let n=this._extensions[jn.extensionName];this._bufferedBytes+=s[K],this._state=tl,n.compress(e,s.fin,(o,u)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");oi(this,a,r);return}this._bufferedBytes-=s[K],this._state=se,s.readOnly=!1,this.sendFrame(i.frame(u,s),r),this.dequeue()})}dequeue(){for(;this._state===se&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][K],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][K],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)}};qn.exports=ni;function oi(i,e,t){typeof t=="function"&&t(e);for(let s=0;s<i._queue.length;s++){let r=i._queue[s],n=r[r.length-1];typeof n=="function"&&n(e)}}function il(i,e,t){oi(i,e,t),i.onerror(e)}});var Zn=v((Rd,Jn)=>{"use strict";var{kForOnEventAttribute:ft,kListener:ui}=fe(),Vn=Symbol("kCode"),Gn=Symbol("kData"),Hn=Symbol("kError"),zn=Symbol("kMessage"),Yn=Symbol("kReason"),Ue=Symbol("kTarget"),Kn=Symbol("kType"),Xn=Symbol("kWasClean"),pe=class{constructor(e){this[Ue]=null,this[Kn]=e}get target(){return this[Ue]}get type(){return this[Kn]}};Object.defineProperty(pe.prototype,"target",{enumerable:!0});Object.defineProperty(pe.prototype,"type",{enumerable:!0});var Te=class extends pe{constructor(e,t={}){super(e),this[Vn]=t.code===void 0?0:t.code,this[Yn]=t.reason===void 0?"":t.reason,this[Xn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Vn]}get reason(){return this[Yn]}get wasClean(){return this[Xn]}};Object.defineProperty(Te.prototype,"code",{enumerable:!0});Object.defineProperty(Te.prototype,"reason",{enumerable:!0});Object.defineProperty(Te.prototype,"wasClean",{enumerable:!0});var qe=class extends pe{constructor(e,t={}){super(e),this[Hn]=t.error===void 0?null:t.error,this[zn]=t.message===void 0?"":t.message}get error(){return this[Hn]}get message(){return this[zn]}};Object.defineProperty(qe.prototype,"error",{enumerable:!0});Object.defineProperty(qe.prototype,"message",{enumerable:!0});var dt=class extends pe{constructor(e,t={}){super(e),this[Gn]=t.data===void 0?null:t.data}get data(){return this[Gn]}};Object.defineProperty(dt.prototype,"data",{enumerable:!0});var rl={addEventListener(i,e,t={}){for(let r of this.listeners(i))if(!t[ft]&&r[ui]===e&&!r[ft])return;let s;if(i==="message")s=function(n,o){let u=new dt("message",{data:o?n:n.toString()});u[Ue]=this,Zt(e,this,u)};else if(i==="close")s=function(n,o){let u=new Te("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[Ue]=this,Zt(e,this,u)};else if(i==="error")s=function(n){let o=new qe("error",{error:n,message:n.message});o[Ue]=this,Zt(e,this,o)};else if(i==="open")s=function(){let n=new pe("open");n[Ue]=this,Zt(e,this,n)};else return;s[ft]=!!t[ft],s[ui]=e,t.once?this.once(i,s):this.on(i,s)},removeEventListener(i,e){for(let t of this.listeners(i))if(t[ui]===e&&!t[ft]){this.removeListener(i,t);break}}};Jn.exports={CloseEvent:Te,ErrorEvent:qe,Event:pe,EventTarget:rl,MessageEvent:dt};function Zt(i,e,t){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,t):i.call(e,t)}});var hi=v((Md,Qn)=>{"use strict";var{tokenChars:pt}=Be();function ue(i,e,t){i[e]===void 0?i[e]=[t]:i[e].push(t)}function nl(i){let e=Object.create(null),t=Object.create(null),s=!1,r=!1,n=!1,o,u,a=-1,h=-1,l=-1,c=0;for(;c<i.length;c++)if(h=i.charCodeAt(c),o===void 0)if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(c!==0&&(h===32||h===9))l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=i.slice(a,l);h===44?(ue(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===void 0)if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(h===32||h===9)l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),ue(t,i.slice(a,l),!0),h===44&&(ue(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(h===61&&a!==-1&&l===-1)u=i.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(r){if(pt[h]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:s||(s=!0),r=!1}else if(n)if(pt[h]===1)a===-1&&(a=c);else if(h===34&&a!==-1)n=!1,l=c;else if(h===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===34&&i.charCodeAt(c-1)===61)n=!0;else if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(a!==-1&&(h===32||h===9))l===-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=i.slice(a,l);s&&(p=p.replace(/\\/g,""),s=!1),ue(t,u,p),h===44&&(ue(e,o,t),t=Object.create(null),o=void 0),u=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||h===32||h===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=i.slice(a,l);return o===void 0?ue(e,d,t):(u===void 0?ue(t,d,!0):s?ue(t,u,d.replace(/\\/g,"")):ue(t,u,d),ue(e,o,t)),e}function ol(i){return Object.keys(i).map(e=>{let t=i[e];return Array.isArray(t)||(t=[t]),t.map(s=>[e].concat(Object.keys(s).map(r=>{let n=s[r];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?r:`${r}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Qn.exports={format:ol,parse:nl}});var pi=v((Ld,co)=>{"use strict";var al=require("events"),ul=require("https"),hl=require("http"),so=require("net"),ll=require("tls"),{randomBytes:cl,createHash:fl}=require("crypto"),{Duplex:Nd,Readable:Pd}=require("stream"),{URL:li}=require("url"),ye=ct(),dl=ri(),pl=ai(),{isBlob:ml}=Be(),{BINARY_TYPES:eo,EMPTY_BUFFER:Qt,GUID:gl,kForOnEventAttribute:ci,kListener:bl,kStatusCode:_l,kWebSocket:M,NOOP:io}=fe(),{EventTarget:{addEventListener:wl,removeEventListener:yl}}=Zn(),{format:vl,parse:Sl}=hi(),{toBuffer:xl}=ut(),El=30*1e3,ro=Symbol("kAborted"),fi=[8,13],me=["CONNECTING","OPEN","CLOSING","CLOSED"],Ol=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,O=class i extends al{constructor(e,t,s){super(),this._binaryType=eo[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Qt,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.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?(s=t,t=[]):t=[t]),no(this,e,t,s)):(this._autoPong=s.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){eo.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,s){let r=new dl({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation}),n=new pl(e,this._extensions,s.generateMask);this._receiver=r,this._sender=n,this._socket=e,r[M]=this,n[M]=this,e[M]=this,r.on("conclude",Al),r.on("drain",Tl),r.on("error",Rl),r.on("message",Ml),r.on("ping",Nl),r.on("pong",Pl),n.onerror=Ll,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",uo),e.on("data",ts),e.on("end",ho),e.on("error",lo),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ye.extensionName]&&this._extensions[ye.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){V(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(e,t,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ao(this)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Qt,t,s)}pong(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Qt,t,s)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(s=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ye.extensionName]||(r.compress=!1),this._sender.send(e||Qt,r,s)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){V(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(O,"CONNECTING",{enumerable:!0,value:me.indexOf("CONNECTING")});Object.defineProperty(O.prototype,"CONNECTING",{enumerable:!0,value:me.indexOf("CONNECTING")});Object.defineProperty(O,"OPEN",{enumerable:!0,value:me.indexOf("OPEN")});Object.defineProperty(O.prototype,"OPEN",{enumerable:!0,value:me.indexOf("OPEN")});Object.defineProperty(O,"CLOSING",{enumerable:!0,value:me.indexOf("CLOSING")});Object.defineProperty(O.prototype,"CLOSING",{enumerable:!0,value:me.indexOf("CLOSING")});Object.defineProperty(O,"CLOSED",{enumerable:!0,value:me.indexOf("CLOSED")});Object.defineProperty(O.prototype,"CLOSED",{enumerable:!0,value:me.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(O.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(O.prototype,`on${i}`,{enumerable:!0,get(){for(let e of this.listeners(i))if(e[ci])return e[bl];return null},set(e){for(let t of this.listeners(i))if(t[ci]){this.removeListener(i,t);break}typeof e=="function"&&this.addEventListener(i,e,{[ci]:!0})}})});O.prototype.addEventListener=wl;O.prototype.removeEventListener=yl;co.exports=O;function no(i,e,t,s){let r={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:fi[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=r.autoPong,!fi.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${fi.join(", ")})`);let n;if(e instanceof li)n=e;else try{n=new li(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),i._url=n.href;let o=n.protocol==="wss:",u=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!u?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!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(i._redirects===0)throw f;es(i,f);return}let h=o?443:80,l=cl(16).toString("base64"),c=o?ul.request:hl.request,d=new Set,p;if(r.createConnection=r.createConnection||(o?kl:Cl),r.defaultPort=r.defaultPort||h,r.port=n.port||h,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 ye(r.perMessageDeflate!==!0?r.perMessageDeflate:{},!1,r.maxPayload),r.headers["Sec-WebSocket-Extensions"]=vl({[ye.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!Ol.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}`),u){let f=r.path.split(":");r.socketPath=f[0],r.path=f[1]}let m;if(r.followRedirects){if(i._redirects===0){i._originalIpc=u,i._originalSecure=o,i._originalHostOrSocketPath=u?r.socketPath:n.host;let f=s&&s.headers;if(s={...s,headers:{}},f)for(let[b,g]of Object.entries(f))s.headers[b.toLowerCase()]=g}else if(i.listenerCount("redirect")===0){let f=u?i._originalIpc?r.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:n.host===i._originalHostOrSocketPath;(!f||i._originalSecure&&!o)&&(delete r.headers.authorization,delete r.headers.cookie,f||delete r.headers.host,r.auth=void 0)}r.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),m=i._req=c(r),i._redirects&&i.emit("redirect",i.url,m)}else m=i._req=c(r);r.timeout&&m.on("timeout",()=>{V(i,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[ro]||(m=i._req=null,es(i,f))}),m.on("response",f=>{let b=f.headers.location,g=f.statusCode;if(b&&r.followRedirects&&g>=300&&g<400){if(++i._redirects>r.maxRedirects){V(i,m,"Maximum redirects exceeded");return}m.abort();let w;try{w=new li(b,e)}catch{let y=new SyntaxError(`Invalid URL: ${b}`);es(i,y);return}no(i,w,t,s)}else i.emit("unexpected-response",m,f)||V(i,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,b,g)=>{if(i.emit("upgrade",f),i.readyState!==O.CONNECTING)return;m=i._req=null;let w=f.headers.upgrade;if(w===void 0||w.toLowerCase()!=="websocket"){V(i,b,"Invalid Upgrade header");return}let S=fl("sha1").update(l+gl).digest("base64");if(f.headers["sec-websocket-accept"]!==S){V(i,b,"Invalid Sec-WebSocket-Accept header");return}let y=f.headers["sec-websocket-protocol"],x;if(y!==void 0?d.size?d.has(y)||(x="Server sent an invalid subprotocol"):x="Server sent a subprotocol but none was requested":d.size&&(x="Server sent no subprotocol"),x){V(i,b,x);return}y&&(i._protocol=y);let E=f.headers["sec-websocket-extensions"];if(E!==void 0){if(!p){V(i,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=Sl(E)}catch{V(i,b,"Invalid Sec-WebSocket-Extensions header");return}let z=Object.keys(F);if(z.length!==1||z[0]!==ye.extensionName){V(i,b,"Server indicated an extension that was not requested");return}try{p.accept(F[ye.extensionName])}catch{V(i,b,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[ye.extensionName]=p}i.setSocket(b,g,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(m,i):m.end()}function es(i,e){i._readyState=O.CLOSING,i._errorEmitted=!0,i.emit("error",e),i.emitClose()}function Cl(i){return i.path=i.socketPath,so.connect(i)}function kl(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=so.isIP(i.host)?"":i.host),ll.connect(i)}function V(i,e,t){i._readyState=O.CLOSING;let s=new Error(t);Error.captureStackTrace(s,V),e.setHeader?(e[ro]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(es,i,s)):(e.destroy(s),e.once("error",i.emit.bind(i,"error")),e.once("close",i.emitClose.bind(i)))}function di(i,e,t){if(e){let s=ml(e)?e.size:xl(e).length;i._socket?i._sender._bufferedBytes+=s:i._bufferedAmount+=s}if(t){let s=new Error(`WebSocket is not open: readyState ${i.readyState} (${me[i.readyState]})`);process.nextTick(t,s)}}function Al(i,e){let t=this[M];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=i,t._socket[M]!==void 0&&(t._socket.removeListener("data",ts),process.nextTick(oo,t._socket),i===1005?t.close():t.close(i,e))}function Tl(){let i=this[M];i.isPaused||i._socket.resume()}function Rl(i){let e=this[M];e._socket[M]!==void 0&&(e._socket.removeListener("data",ts),process.nextTick(oo,e._socket),e.close(i[_l])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i))}function to(){this[M].emitClose()}function Ml(i,e){this[M].emit("message",i,e)}function Nl(i){let e=this[M];e._autoPong&&e.pong(i,!this._isServer,io),e.emit("ping",i)}function Pl(i){this[M].emit("pong",i)}function oo(i){i.resume()}function Ll(i){let e=this[M];e.readyState!==O.CLOSED&&(e.readyState===O.OPEN&&(e._readyState=O.CLOSING,ao(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i)))}function ao(i){i._closeTimer=setTimeout(i._socket.destroy.bind(i._socket),El)}function uo(){let i=this[M];this.removeListener("close",uo),this.removeListener("data",ts),this.removeListener("end",ho),i._readyState=O.CLOSING;let e;!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&(e=i._socket.read())!==null&&i._receiver.write(e),i._receiver.end(),this[M]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",to),i._receiver.on("finish",to))}function ts(i){this[M]._receiver.write(i)||this.pause()}function ho(){let i=this[M];i._readyState=O.CLOSING,i._receiver.end(),this.end()}function lo(){let i=this[M];this.removeListener("error",lo),this.on("error",io),i&&(i._readyState=O.CLOSING,this.destroy())}});var po=v((Fd,fo)=>{"use strict";var{tokenChars:Fl}=Be();function Il(i){let e=new Set,t=-1,s=-1,r=0;for(r;r<i.length;r++){let o=i.charCodeAt(r);if(s===-1&&Fl[o]===1)t===-1&&(t=r);else if(r!==0&&(o===32||o===9))s===-1&&t!==-1&&(s=r);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${r}`);s===-1&&(s=r);let u=i.slice(t,s);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=s=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(t===-1||s!==-1)throw new SyntaxError("Unexpected end of input");let n=i.slice(t,r);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}fo.exports={parse:Il}});var vo=v((Dd,yo)=>{"use strict";var Dl=require("events"),ss=require("http"),{Duplex:Id}=require("stream"),{createHash:$l}=require("crypto"),mo=hi(),Re=ct(),Bl=po(),Wl=pi(),{GUID:jl,kWebSocket:Ul}=fe(),ql=/^[+/0-9A-Za-z]{22}==$/,go=0,bo=1,wo=2,mi=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:Wl,...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=ss.createServer((s,r)=>{let n=ss.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 s=this.emit.bind(this,"connection");this._removeListeners=Vl(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,n,o)=>{this.handleUpgrade(r,n,o,s)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=go}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===wo){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(mt,this);return}if(e&&this.once("close",e),this._state!==bo)if(this._state=bo,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(mt,this):process.nextTick(mt,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{mt(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,s,r){t.on("error",_o);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Me(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Me(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!ql.test(n)){Me(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){Me(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){gt(t,400);return}let a=e.headers["sec-websocket-protocol"],h=new Set;if(a!==void 0)try{h=Bl.parse(a)}catch{Me(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 Re(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=mo.parse(l);p[Re.extensionName]&&(d.accept(p[Re.extensionName]),c[Re.extensionName]=d)}catch{Me(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${u===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 gt(t,m||401,f,b);this.completeUpgrade(c,n,h,e,t,s,r)});return}if(!this.options.verifyClient(d))return gt(t,401)}this.completeUpgrade(c,n,h,e,t,s,r)}completeUpgrade(e,t,s,r,n,o,u){if(!n.readable||!n.writable)return n.destroy();if(n[Ul])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>go)return gt(n,503);let h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${$l("sha1").update(t+jl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(s.size){let c=this.options.handleProtocols?this.options.handleProtocols(s,r):s.values().next().value;c&&(h.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[Re.extensionName]){let c=e[Re.extensionName].params,d=mo.format({[Re.extensionName]:[c]});h.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",h,r),n.write(h.concat(`\r
|
|
8
|
+
${m}`),s?r.reset(m):m}function Ch(i,e,t,s={}){if(!fn){fn=!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),mn(i,{start:{column:t,line:e}},s)}});var yn=v((vd,wn)=>{"use strict";var{Duplex:kh}=require("stream");function bn(i){i.emit("close")}function Ah(){!this.destroyed&&this._writableState.finished&&this.destroy()}function _n(i){this.removeListener("error",_n),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function Th(i,e){let t=!0,s=new kh({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(n,o){let u=!o&&s._readableState.objectMode?n.toString():n;s.push(u)||i.pause()}),i.once("error",function(n){s.destroyed||(t=!1,s.destroy(n))}),i.once("close",function(){s.destroyed||s.push(null)}),s._destroy=function(r,n){if(i.readyState===i.CLOSED){n(r),process.nextTick(bn,s);return}let o=!1;i.once("error",function(a){o=!0,n(a)}),i.once("close",function(){o||n(r),process.nextTick(bn,s)}),t&&i.terminate()},s._final=function(r){if(i.readyState===i.CONNECTING){i.once("open",function(){s._final(r)});return}i._socket!==null&&(i._socket._writableState.finished?(r(),s._readableState.endEmitted&&s.destroy()):(i._socket.once("finish",function(){r()}),i.close()))},s._read=function(){i.isPaused&&i.resume()},s._write=function(r,n,o){if(i.readyState===i.CONNECTING){i.once("open",function(){s._write(r,n,o)});return}i.send(r,o)},s.on("end",Ah),s.on("error",_n),s}wn.exports=Th});var fe=v((xd,Sn)=>{"use strict";var vn=["nodebuffer","arraybuffer","fragments"],xn=typeof Blob<"u";xn&&vn.push("blob");Sn.exports={BINARY_TYPES:vn,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:xn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var ut=v((Sd,Vt)=>{"use strict";var{EMPTY_BUFFER:Rh}=fe(),Ys=Buffer[Symbol.species];function Mh(i,e){if(i.length===0)return Rh;if(i.length===1)return i[0];let t=Buffer.allocUnsafe(e),s=0;for(let r=0;r<i.length;r++){let n=i[r];t.set(n,s),s+=n.length}return s<e?new Ys(t.buffer,t.byteOffset,s):t}function En(i,e,t,s,r){for(let n=0;n<r;n++)t[s+n]=i[n]^e[n&3]}function On(i,e){for(let t=0;t<i.length;t++)i[t]^=e[t&3]}function Nh(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function Ks(i){if(Ks.readOnly=!0,Buffer.isBuffer(i))return i;let e;return i instanceof ArrayBuffer?e=new Ys(i):ArrayBuffer.isView(i)?e=new Ys(i.buffer,i.byteOffset,i.byteLength):(e=Buffer.from(i),Ks.readOnly=!1),e}Vt.exports={concat:Mh,mask:En,toArrayBuffer:Nh,toBuffer:Ks,unmask:On};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");Vt.exports.mask=function(e,t,s,r,n){n<48?En(e,t,s,r,n):i.mask(e,t,s,r,n)},Vt.exports.unmask=function(e,t){e.length<32?On(e,t):i.unmask(e,t)}}catch{}});var An=v((Ed,kn)=>{"use strict";var Cn=Symbol("kDone"),Xs=Symbol("kRun"),Js=class{constructor(e){this[Cn]=()=>{this.pending--,this[Xs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Xs]()}[Xs](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Cn])}}};kn.exports=Js});var ct=v((Od,Nn)=>{"use strict";var ht=require("zlib"),Tn=ut(),Ph=An(),{kStatusCode:Rn}=fe(),Lh=Buffer[Symbol.species],Fh=Buffer.from([0,0,255,255]),zt=Symbol("permessage-deflate"),de=Symbol("total-length"),lt=Symbol("callback"),we=Symbol("buffers"),Ht=Symbol("error"),Gt,Zs=class{constructor(e,t,s){if(this._maxPayload=s|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,!Gt){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Gt=new Ph(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[lt];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,s=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(!s)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(s.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?s.client_max_window_bits=t.clientMaxWindowBits:(s.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}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(s=>{let r=t[s];if(r.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(r=r[0],s==="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 "${s}": ${r}`);r=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else if(s==="server_max_window_bits"){let n=+r;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${s}": ${r}`);r=n}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else throw new Error(`Unknown parameter "${s}"`);t[s]=r})}),e}decompress(e,t,s){Gt.add(r=>{this._decompress(e,t,(n,o)=>{r(),s(n,o)})})}compress(e,t,s){Gt.add(r=>{this._compress(e,t,(n,o)=>{r(),s(n,o)})})}_decompress(e,t,s){let r=this._isServer?"client":"server";if(!this._inflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?ht.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=ht.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[zt]=this,this._inflate[de]=0,this._inflate[we]=[],this._inflate.on("error",Dh),this._inflate.on("data",Mn)}this._inflate[lt]=s,this._inflate.write(e),t&&this._inflate.write(Fh),this._inflate.flush(()=>{let n=this._inflate[Ht];if(n){this._inflate.close(),this._inflate=null,s(n);return}let o=Tn.concat(this._inflate[we],this._inflate[de]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[de]=0,this._inflate[we]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),s(null,o)})}_compress(e,t,s){let r=this._isServer?"server":"client";if(!this._deflate){let n=`${r}_max_window_bits`,o=typeof this.params[n]!="number"?ht.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=ht.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[de]=0,this._deflate[we]=[],this._deflate.on("data",Ih)}this._deflate[lt]=s,this._deflate.write(e),this._deflate.flush(ht.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Tn.concat(this._deflate[we],this._deflate[de]);t&&(n=new Lh(n.buffer,n.byteOffset,n.length-4)),this._deflate[lt]=null,this._deflate[de]=0,this._deflate[we]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),s(null,n)})}};Nn.exports=Zs;function Ih(i){this[we].push(i),this[de]+=i.length}function Mn(i){if(this[de]+=i.length,this[zt]._maxPayload<1||this[de]<=this[zt]._maxPayload){this[we].push(i);return}this[Ht]=new RangeError("Max payload size exceeded"),this[Ht].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ht][Rn]=1009,this.removeListener("data",Mn),this.reset()}function Dh(i){this[zt]._inflate=null,i[Rn]=1007,this[lt](i)}});var $e=v((Cd,Yt)=>{"use strict";var{isUtf8:Pn}=require("buffer"),{hasBlob:Bh}=fe(),$h=[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 Wh(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function Qs(i){let e=i.length,t=0;for(;t<e;)if(!(i[t]&128))t++;else if((i[t]&224)===192){if(t+1===e||(i[t+1]&192)!==128||(i[t]&254)===192)return!1;t+=2}else if((i[t]&240)===224){if(t+2>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||i[t]===224&&(i[t+1]&224)===128||i[t]===237&&(i[t+1]&224)===160)return!1;t+=3}else if((i[t]&248)===240){if(t+3>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||(i[t+3]&192)!==128||i[t]===240&&(i[t+1]&240)===128||i[t]===244&&i[t+1]>143||i[t]>244)return!1;t+=4}else return!1;return!0}function jh(i){return Bh&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&(i[Symbol.toStringTag]==="Blob"||i[Symbol.toStringTag]==="File")}Yt.exports={isBlob:jh,isValidStatusCode:Wh,isValidUTF8:Qs,tokenChars:$h};if(Pn)Yt.exports.isValidUTF8=function(i){return i.length<24?Qs(i):Pn(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");Yt.exports.isValidUTF8=function(e){return e.length<32?Qs(e):i(e)}}catch{}});var ri=v((kd,Wn)=>{"use strict";var{Writable:Uh}=require("stream"),Ln=ct(),{BINARY_TYPES:qh,EMPTY_BUFFER:Fn,kStatusCode:Vh,kWebSocket:Gh}=fe(),{concat:ei,toArrayBuffer:Hh,unmask:zh}=ut(),{isValidStatusCode:Yh,isValidUTF8:In}=$e(),Kt=Buffer[Symbol.species],Y=0,Dn=1,Bn=2,$n=3,ti=4,si=5,Xt=6,ii=class extends Uh{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||qh[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Gh]=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=Y}_write(e,t,s){if(this._opcode===8&&this._state==Y)return s();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=new Kt(s.buffer,s.byteOffset+e,s.length-e),new Kt(s.buffer,s.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],r=t.length-e;e>=s.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),r),this._buffers[0]=new Kt(s.buffer,s.byteOffset+e,s.length-e)),e-=s.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Y:this.getInfo(e);break;case Dn:this.getPayloadLength16(e);break;case Bn:this.getPayloadLength64(e);break;case $n:this.getMask();break;case ti:this.getData(e);break;case si:case Xt: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 s=(t[0]&64)===64;if(s&&!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(s){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=s}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(s){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=Bn: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),s=t.readUInt32BE(0);if(s>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=s*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=$n:this._state=ti}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ti}getData(e){let t=Fn;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]&&zh(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=si,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===Y&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Y;return}let t=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=ei(s,t):this._binaryType==="arraybuffer"?r=Hh(ei(s,t)):this._binaryType==="blob"?r=new Blob(s):r=s,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit("message",r,!0),this._state=Y,this.startLoop(e)}))}else{let r=ei(s,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===si||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit("message",r,!1),this._state=Y,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fn),this.end();else{let s=e.readUInt16BE(0);if(!Yh(s)){let n=this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let r=new Kt(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",s,r),this.end()}this._state=Y;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Y):(this._state=Xt,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Y,this.startLoop(t)}))}createError(e,t,s,r,n){this._loop=!1,this._errored=!0;let o=new e(s?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[Vh]=r,o}};Wn.exports=ii});var ai=v((Td,qn)=>{"use strict";var{Duplex:Ad}=require("stream"),{randomFillSync:Kh}=require("crypto"),jn=ct(),{EMPTY_BUFFER:Xh,kWebSocket:Jh,NOOP:Zh}=fe(),{isBlob:We,isValidStatusCode:Qh}=$e(),{mask:Un,toBuffer:ke}=ut(),K=Symbol("kByteLength"),el=Buffer.alloc(4),Jt=8*1024,Ae,je=Jt,se=0,tl=1,sl=2,ni=class i{constructor(e,t,s){this._extensions=t||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=se,this.onerror=Zh,this[Jh]=void 0}static frame(e,t){let s,r=!1,n=2,o=!1;t.mask&&(s=t.maskBuffer||el,t.generateMask?t.generateMask(s):(je===Jt&&(Ae===void 0&&(Ae=Buffer.alloc(Jt)),Kh(Ae,0,Jt),je=0),s[0]=Ae[je++],s[1]=Ae[je++],s[2]=Ae[je++],s[3]=Ae[je++]),o=(s[0]|s[1]|s[2]|s[3])===0,n=6);let u;typeof e=="string"?(!t.mask||o)&&t[K]!==void 0?u=t[K]:(e=Buffer.from(e),u=e.length):(u=e.length,r=t.mask&&t.readOnly&&!o);let a=u;u>=65536?(n+=8,a=127):u>125&&(n+=2,a=126);let h=Buffer.allocUnsafe(r?u+n:n);return h[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(h[0]|=64),h[1]=a,a===126?h.writeUInt16BE(u,2):a===127&&(h[2]=h[3]=0,h.writeUIntBE(u,4,6)),t.mask?(h[1]|=128,h[n-4]=s[0],h[n-3]=s[1],h[n-2]=s[2],h[n-1]=s[3],o?[h,e]:r?(Un(e,s,h,n,u),[h]):(Un(e,s,e,0,u),[h,e])):[h,e]}close(e,t,s,r){let n;if(e===void 0)n=Xh;else{if(typeof e!="number"||!Qh(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 u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+u),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[K]:n.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==se?this.enqueue([this.dispatch,n,!1,o,r]):this.sendFrame(i.frame(n,o),r)}ping(e,t,s){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):We(e)?(r=e.size,n=!1):(e=ke(e),r=e.length,n=ke.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[K]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==se?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(i.frame(e,o),s)}pong(e,t,s){let r,n;if(typeof e=="string"?(r=Buffer.byteLength(e),n=!1):We(e)?(r=e.size,n=!1):(e=ke(e),r=e.length,n=ke.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[K]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==se?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(i.frame(e,o),s)}send(e,t,s){let r=this._extensions[jn.extensionName],n=t.binary?2:1,o=t.compress,u,a;typeof e=="string"?(u=Buffer.byteLength(e),a=!1):We(e)?(u=e.size,a=!1):(e=ke(e),u=e.length,a=ke.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=u>=r._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[K]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};We(e)?this._state!==se?this.enqueue([this.getBlobData,e,this._compress,h,s]):this.getBlobData(e,this._compress,h,s):this._state!==se?this.enqueue([this.dispatch,e,this._compress,h,s]):this.dispatch(e,this._compress,h,s)}getBlobData(e,t,s,r){this._bufferedBytes+=s[K],this._state=sl,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(oi,this,u,r);return}this._bufferedBytes-=s[K];let o=ke(n);t?this.dispatch(o,t,s,r):(this._state=se,this.sendFrame(i.frame(o,s),r),this.dequeue())}).catch(n=>{process.nextTick(il,this,n,r)})}dispatch(e,t,s,r){if(!t){this.sendFrame(i.frame(e,s),r);return}let n=this._extensions[jn.extensionName];this._bufferedBytes+=s[K],this._state=tl,n.compress(e,s.fin,(o,u)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");oi(this,a,r);return}this._bufferedBytes-=s[K],this._state=se,s.readOnly=!1,this.sendFrame(i.frame(u,s),r),this.dequeue()})}dequeue(){for(;this._state===se&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][K],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][K],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)}};qn.exports=ni;function oi(i,e,t){typeof t=="function"&&t(e);for(let s=0;s<i._queue.length;s++){let r=i._queue[s],n=r[r.length-1];typeof n=="function"&&n(e)}}function il(i,e,t){oi(i,e,t),i.onerror(e)}});var Zn=v((Rd,Jn)=>{"use strict";var{kForOnEventAttribute:ft,kListener:ui}=fe(),Vn=Symbol("kCode"),Gn=Symbol("kData"),Hn=Symbol("kError"),zn=Symbol("kMessage"),Yn=Symbol("kReason"),Ue=Symbol("kTarget"),Kn=Symbol("kType"),Xn=Symbol("kWasClean"),pe=class{constructor(e){this[Ue]=null,this[Kn]=e}get target(){return this[Ue]}get type(){return this[Kn]}};Object.defineProperty(pe.prototype,"target",{enumerable:!0});Object.defineProperty(pe.prototype,"type",{enumerable:!0});var Te=class extends pe{constructor(e,t={}){super(e),this[Vn]=t.code===void 0?0:t.code,this[Yn]=t.reason===void 0?"":t.reason,this[Xn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Vn]}get reason(){return this[Yn]}get wasClean(){return this[Xn]}};Object.defineProperty(Te.prototype,"code",{enumerable:!0});Object.defineProperty(Te.prototype,"reason",{enumerable:!0});Object.defineProperty(Te.prototype,"wasClean",{enumerable:!0});var qe=class extends pe{constructor(e,t={}){super(e),this[Hn]=t.error===void 0?null:t.error,this[zn]=t.message===void 0?"":t.message}get error(){return this[Hn]}get message(){return this[zn]}};Object.defineProperty(qe.prototype,"error",{enumerable:!0});Object.defineProperty(qe.prototype,"message",{enumerable:!0});var dt=class extends pe{constructor(e,t={}){super(e),this[Gn]=t.data===void 0?null:t.data}get data(){return this[Gn]}};Object.defineProperty(dt.prototype,"data",{enumerable:!0});var rl={addEventListener(i,e,t={}){for(let r of this.listeners(i))if(!t[ft]&&r[ui]===e&&!r[ft])return;let s;if(i==="message")s=function(n,o){let u=new dt("message",{data:o?n:n.toString()});u[Ue]=this,Zt(e,this,u)};else if(i==="close")s=function(n,o){let u=new Te("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[Ue]=this,Zt(e,this,u)};else if(i==="error")s=function(n){let o=new qe("error",{error:n,message:n.message});o[Ue]=this,Zt(e,this,o)};else if(i==="open")s=function(){let n=new pe("open");n[Ue]=this,Zt(e,this,n)};else return;s[ft]=!!t[ft],s[ui]=e,t.once?this.once(i,s):this.on(i,s)},removeEventListener(i,e){for(let t of this.listeners(i))if(t[ui]===e&&!t[ft]){this.removeListener(i,t);break}}};Jn.exports={CloseEvent:Te,ErrorEvent:qe,Event:pe,EventTarget:rl,MessageEvent:dt};function Zt(i,e,t){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,t):i.call(e,t)}});var hi=v((Md,Qn)=>{"use strict";var{tokenChars:pt}=$e();function ue(i,e,t){i[e]===void 0?i[e]=[t]:i[e].push(t)}function nl(i){let e=Object.create(null),t=Object.create(null),s=!1,r=!1,n=!1,o,u,a=-1,h=-1,l=-1,c=0;for(;c<i.length;c++)if(h=i.charCodeAt(c),o===void 0)if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(c!==0&&(h===32||h===9))l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=i.slice(a,l);h===44?(ue(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===void 0)if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(h===32||h===9)l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),ue(t,i.slice(a,l),!0),h===44&&(ue(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(h===61&&a!==-1&&l===-1)u=i.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(r){if(pt[h]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:s||(s=!0),r=!1}else if(n)if(pt[h]===1)a===-1&&(a=c);else if(h===34&&a!==-1)n=!1,l=c;else if(h===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===34&&i.charCodeAt(c-1)===61)n=!0;else if(l===-1&&pt[h]===1)a===-1&&(a=c);else if(a!==-1&&(h===32||h===9))l===-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=i.slice(a,l);s&&(p=p.replace(/\\/g,""),s=!1),ue(t,u,p),h===44&&(ue(e,o,t),t=Object.create(null),o=void 0),u=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||h===32||h===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=i.slice(a,l);return o===void 0?ue(e,d,t):(u===void 0?ue(t,d,!0):s?ue(t,u,d.replace(/\\/g,"")):ue(t,u,d),ue(e,o,t)),e}function ol(i){return Object.keys(i).map(e=>{let t=i[e];return Array.isArray(t)||(t=[t]),t.map(s=>[e].concat(Object.keys(s).map(r=>{let n=s[r];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?r:`${r}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Qn.exports={format:ol,parse:nl}});var pi=v((Ld,co)=>{"use strict";var al=require("events"),ul=require("https"),hl=require("http"),so=require("net"),ll=require("tls"),{randomBytes:cl,createHash:fl}=require("crypto"),{Duplex:Nd,Readable:Pd}=require("stream"),{URL:li}=require("url"),ye=ct(),dl=ri(),pl=ai(),{isBlob:ml}=$e(),{BINARY_TYPES:eo,EMPTY_BUFFER:Qt,GUID:gl,kForOnEventAttribute:ci,kListener:bl,kStatusCode:_l,kWebSocket:M,NOOP:io}=fe(),{EventTarget:{addEventListener:wl,removeEventListener:yl}}=Zn(),{format:vl,parse:xl}=hi(),{toBuffer:Sl}=ut(),El=30*1e3,ro=Symbol("kAborted"),fi=[8,13],me=["CONNECTING","OPEN","CLOSING","CLOSED"],Ol=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,O=class i extends al{constructor(e,t,s){super(),this._binaryType=eo[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Qt,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.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?(s=t,t=[]):t=[t]),no(this,e,t,s)):(this._autoPong=s.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){eo.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,s){let r=new dl({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation}),n=new pl(e,this._extensions,s.generateMask);this._receiver=r,this._sender=n,this._socket=e,r[M]=this,n[M]=this,e[M]=this,r.on("conclude",Al),r.on("drain",Tl),r.on("error",Rl),r.on("message",Ml),r.on("ping",Nl),r.on("pong",Pl),n.onerror=Ll,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",uo),e.on("data",ts),e.on("end",ho),e.on("error",lo),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ye.extensionName]&&this._extensions[ye.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){V(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(e,t,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ao(this)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Qt,t,s)}pong(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=t=void 0):typeof t=="function"&&(s=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Qt,t,s)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(s=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){di(this,e,s);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ye.extensionName]||(r.compress=!1),this._sender.send(e||Qt,r,s)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){V(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(O,"CONNECTING",{enumerable:!0,value:me.indexOf("CONNECTING")});Object.defineProperty(O.prototype,"CONNECTING",{enumerable:!0,value:me.indexOf("CONNECTING")});Object.defineProperty(O,"OPEN",{enumerable:!0,value:me.indexOf("OPEN")});Object.defineProperty(O.prototype,"OPEN",{enumerable:!0,value:me.indexOf("OPEN")});Object.defineProperty(O,"CLOSING",{enumerable:!0,value:me.indexOf("CLOSING")});Object.defineProperty(O.prototype,"CLOSING",{enumerable:!0,value:me.indexOf("CLOSING")});Object.defineProperty(O,"CLOSED",{enumerable:!0,value:me.indexOf("CLOSED")});Object.defineProperty(O.prototype,"CLOSED",{enumerable:!0,value:me.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(O.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(O.prototype,`on${i}`,{enumerable:!0,get(){for(let e of this.listeners(i))if(e[ci])return e[bl];return null},set(e){for(let t of this.listeners(i))if(t[ci]){this.removeListener(i,t);break}typeof e=="function"&&this.addEventListener(i,e,{[ci]:!0})}})});O.prototype.addEventListener=wl;O.prototype.removeEventListener=yl;co.exports=O;function no(i,e,t,s){let r={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:fi[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=r.autoPong,!fi.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${fi.join(", ")})`);let n;if(e instanceof li)n=e;else try{n=new li(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),i._url=n.href;let o=n.protocol==="wss:",u=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!u?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!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(i._redirects===0)throw f;es(i,f);return}let h=o?443:80,l=cl(16).toString("base64"),c=o?ul.request:hl.request,d=new Set,p;if(r.createConnection=r.createConnection||(o?kl:Cl),r.defaultPort=r.defaultPort||h,r.port=n.port||h,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 ye(r.perMessageDeflate!==!0?r.perMessageDeflate:{},!1,r.maxPayload),r.headers["Sec-WebSocket-Extensions"]=vl({[ye.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!Ol.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}`),u){let f=r.path.split(":");r.socketPath=f[0],r.path=f[1]}let m;if(r.followRedirects){if(i._redirects===0){i._originalIpc=u,i._originalSecure=o,i._originalHostOrSocketPath=u?r.socketPath:n.host;let f=s&&s.headers;if(s={...s,headers:{}},f)for(let[b,g]of Object.entries(f))s.headers[b.toLowerCase()]=g}else if(i.listenerCount("redirect")===0){let f=u?i._originalIpc?r.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:n.host===i._originalHostOrSocketPath;(!f||i._originalSecure&&!o)&&(delete r.headers.authorization,delete r.headers.cookie,f||delete r.headers.host,r.auth=void 0)}r.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),m=i._req=c(r),i._redirects&&i.emit("redirect",i.url,m)}else m=i._req=c(r);r.timeout&&m.on("timeout",()=>{V(i,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[ro]||(m=i._req=null,es(i,f))}),m.on("response",f=>{let b=f.headers.location,g=f.statusCode;if(b&&r.followRedirects&&g>=300&&g<400){if(++i._redirects>r.maxRedirects){V(i,m,"Maximum redirects exceeded");return}m.abort();let w;try{w=new li(b,e)}catch{let y=new SyntaxError(`Invalid URL: ${b}`);es(i,y);return}no(i,w,t,s)}else i.emit("unexpected-response",m,f)||V(i,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,b,g)=>{if(i.emit("upgrade",f),i.readyState!==O.CONNECTING)return;m=i._req=null;let w=f.headers.upgrade;if(w===void 0||w.toLowerCase()!=="websocket"){V(i,b,"Invalid Upgrade header");return}let x=fl("sha1").update(l+gl).digest("base64");if(f.headers["sec-websocket-accept"]!==x){V(i,b,"Invalid Sec-WebSocket-Accept header");return}let y=f.headers["sec-websocket-protocol"],S;if(y!==void 0?d.size?d.has(y)||(S="Server sent an invalid subprotocol"):S="Server sent a subprotocol but none was requested":d.size&&(S="Server sent no subprotocol"),S){V(i,b,S);return}y&&(i._protocol=y);let E=f.headers["sec-websocket-extensions"];if(E!==void 0){if(!p){V(i,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=xl(E)}catch{V(i,b,"Invalid Sec-WebSocket-Extensions header");return}let z=Object.keys(F);if(z.length!==1||z[0]!==ye.extensionName){V(i,b,"Server indicated an extension that was not requested");return}try{p.accept(F[ye.extensionName])}catch{V(i,b,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[ye.extensionName]=p}i.setSocket(b,g,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(m,i):m.end()}function es(i,e){i._readyState=O.CLOSING,i._errorEmitted=!0,i.emit("error",e),i.emitClose()}function Cl(i){return i.path=i.socketPath,so.connect(i)}function kl(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=so.isIP(i.host)?"":i.host),ll.connect(i)}function V(i,e,t){i._readyState=O.CLOSING;let s=new Error(t);Error.captureStackTrace(s,V),e.setHeader?(e[ro]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(es,i,s)):(e.destroy(s),e.once("error",i.emit.bind(i,"error")),e.once("close",i.emitClose.bind(i)))}function di(i,e,t){if(e){let s=ml(e)?e.size:Sl(e).length;i._socket?i._sender._bufferedBytes+=s:i._bufferedAmount+=s}if(t){let s=new Error(`WebSocket is not open: readyState ${i.readyState} (${me[i.readyState]})`);process.nextTick(t,s)}}function Al(i,e){let t=this[M];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=i,t._socket[M]!==void 0&&(t._socket.removeListener("data",ts),process.nextTick(oo,t._socket),i===1005?t.close():t.close(i,e))}function Tl(){let i=this[M];i.isPaused||i._socket.resume()}function Rl(i){let e=this[M];e._socket[M]!==void 0&&(e._socket.removeListener("data",ts),process.nextTick(oo,e._socket),e.close(i[_l])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i))}function to(){this[M].emitClose()}function Ml(i,e){this[M].emit("message",i,e)}function Nl(i){let e=this[M];e._autoPong&&e.pong(i,!this._isServer,io),e.emit("ping",i)}function Pl(i){this[M].emit("pong",i)}function oo(i){i.resume()}function Ll(i){let e=this[M];e.readyState!==O.CLOSED&&(e.readyState===O.OPEN&&(e._readyState=O.CLOSING,ao(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i)))}function ao(i){i._closeTimer=setTimeout(i._socket.destroy.bind(i._socket),El)}function uo(){let i=this[M];this.removeListener("close",uo),this.removeListener("data",ts),this.removeListener("end",ho),i._readyState=O.CLOSING;let e;!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&(e=i._socket.read())!==null&&i._receiver.write(e),i._receiver.end(),this[M]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",to),i._receiver.on("finish",to))}function ts(i){this[M]._receiver.write(i)||this.pause()}function ho(){let i=this[M];i._readyState=O.CLOSING,i._receiver.end(),this.end()}function lo(){let i=this[M];this.removeListener("error",lo),this.on("error",io),i&&(i._readyState=O.CLOSING,this.destroy())}});var po=v((Fd,fo)=>{"use strict";var{tokenChars:Fl}=$e();function Il(i){let e=new Set,t=-1,s=-1,r=0;for(r;r<i.length;r++){let o=i.charCodeAt(r);if(s===-1&&Fl[o]===1)t===-1&&(t=r);else if(r!==0&&(o===32||o===9))s===-1&&t!==-1&&(s=r);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${r}`);s===-1&&(s=r);let u=i.slice(t,s);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=s=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(t===-1||s!==-1)throw new SyntaxError("Unexpected end of input");let n=i.slice(t,r);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}fo.exports={parse:Il}});var vo=v((Dd,yo)=>{"use strict";var Dl=require("events"),ss=require("http"),{Duplex:Id}=require("stream"),{createHash:Bl}=require("crypto"),mo=hi(),Re=ct(),$l=po(),Wl=pi(),{GUID:jl,kWebSocket:Ul}=fe(),ql=/^[+/0-9A-Za-z]{22}==$/,go=0,bo=1,wo=2,mi=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:Wl,...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=ss.createServer((s,r)=>{let n=ss.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 s=this.emit.bind(this,"connection");this._removeListeners=Vl(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,n,o)=>{this.handleUpgrade(r,n,o,s)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=go}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===wo){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(mt,this);return}if(e&&this.once("close",e),this._state!==bo)if(this._state=bo,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(mt,this):process.nextTick(mt,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{mt(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,s,r){t.on("error",_o);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Me(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Me(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!ql.test(n)){Me(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){Me(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){gt(t,400);return}let a=e.headers["sec-websocket-protocol"],h=new Set;if(a!==void 0)try{h=$l.parse(a)}catch{Me(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 Re(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=mo.parse(l);p[Re.extensionName]&&(d.accept(p[Re.extensionName]),c[Re.extensionName]=d)}catch{Me(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${u===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 gt(t,m||401,f,b);this.completeUpgrade(c,n,h,e,t,s,r)});return}if(!this.options.verifyClient(d))return gt(t,401)}this.completeUpgrade(c,n,h,e,t,s,r)}completeUpgrade(e,t,s,r,n,o,u){if(!n.readable||!n.writable)return n.destroy();if(n[Ul])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>go)return gt(n,503);let h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Bl("sha1").update(t+jl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(s.size){let c=this.options.handleProtocols?this.options.handleProtocols(s,r):s.values().next().value;c&&(h.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[Re.extensionName]){let c=e[Re.extensionName].params,d=mo.format({[Re.extensionName]:[c]});h.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",h,r),n.write(h.concat(`\r
|
|
9
9
|
`).join(`\r
|
|
10
10
|
`)),n.removeListener("error",_o),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(mt,this)})),u(l,r)}};yo.exports=mi;function Vl(i,e){for(let t of Object.keys(e))i.on(t,e[t]);return function(){for(let s of Object.keys(e))i.removeListener(s,e[s])}}function mt(i){i._state=wo,i.emit("close")}function _o(){this.destroy()}function gt(i,e,t,s){t=t||ss.STATUS_CODES[e],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...s},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${e} ${ss.STATUS_CODES[e]}\r
|
|
11
11
|
`+Object.keys(s).map(r=>`${r}: ${s[r]}`).join(`\r
|
|
12
12
|
`)+`\r
|
|
13
13
|
\r
|
|
14
|
-
`+t)}function Me(i,e,t,s,r){if(i.listenerCount("wsClientError")){let n=new Error(r);Error.captureStackTrace(n,Me),i.emit("wsClientError",n,t,e)}else gt(t,s,r)}});var Oo=v((
|
|
14
|
+
`+t)}function Me(i,e,t,s,r){if(i.listenerCount("wsClientError")){let n=new Error(r);Error.captureStackTrace(n,Me),i.emit("wsClientError",n,t,e)}else gt(t,s,r)}});var Oo=v(($d,Eo)=>{"use strict";function Yl(i){return i>=55296&&i<=56319}function Kl(i){return i>=56320&&i<=57343}Eo.exports=function(e,t,s){if(typeof t!="string")throw new Error("Input must be string");for(var r=t.length,n=0,o,u,a=0;a<r;a+=1){if(o=t.charCodeAt(a),u=t[a],Yl(o)&&Kl(t.charCodeAt(a+1))&&(a+=1,u+=t[a]),n+=e(u),n===s)return t.slice(0,a+1);if(n>s)return t.slice(0,a-u.length+1)}return t}});var ko=v((Wd,Co)=>{"use strict";var Xl=Oo(),Jl=Buffer.byteLength.bind(Buffer);Co.exports=Xl.bind(null,Jl)});var Ro=v((jd,To)=>{"use strict";var Zl=ko(),Ql=/[\/\?<>\\:\*\|"]/g,ec=/[\x00-\x1f\x80-\x9f]/g,tc=/^\.+$/,sc=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,ic=/[\. ]+$/;function Ao(i,e){if(typeof i!="string")throw new Error("Input must be string");var t=i.replace(Ql,e).replace(ec,e).replace(tc,e).replace(sc,e).replace(ic,e);return Zl(t,255)}To.exports=function(i,e){var t=e&&e.replacement||"",s=Ao(i,t);return t===""?s:Ao(s,"")}});var bt=v(_i=>{var is=class extends Error{constructor(e,t,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},bi=class extends is{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};_i.CommanderError=is;_i.InvalidArgumentError=bi});var rs=v(yi=>{var{InvalidArgumentError:rc}=bt(),wi=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,s)=>{if(!this.argChoices.includes(t))throw new rc(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,s):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function nc(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}yi.Argument=wi;yi.humanReadableArgName=nc});var xi=v(Mo=>{var{humanReadableArgName:oc}=rs(),vi=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),s=e._getHelpCommand();return s&&!s._hidden&&t.push(s),this.sortSubcommands&&t.sort((r,n)=>r.name().localeCompare(n.name())),t}compareOptions(e,t){let s=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return s(e).localeCompare(s(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),s=e._getHelpOption();if(s&&!s.hidden){let r=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!r&&!n?t.push(s):s.long&&!n?t.push(e.createOption(s.long,s.description)):s.short&&!r&&t.push(e.createOption(s.short,s.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let s=e.parent;s;s=s.parent){let r=s.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(s=>oc(s)).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((s,r)=>Math.max(s,t.subcommandTerm(r).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((s,r)=>Math.max(s,t.optionTerm(r).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((s,r)=>Math.max(s,t.optionTerm(r).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((s,r)=>Math.max(s,t.argumentTerm(r).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let s="";for(let r=e.parent;r;r=r.parent)s=r.name()+" "+s;return s+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(s=>JSON.stringify(s)).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(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let s=`(${t.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,t){let s=t.padWidth(e,t),r=t.helpWidth||80,n=2,o=2;function u(m,f){if(f){let b=`${m.padEnd(s+o)}${f}`;return t.wrap(b,r-n,s+o)}return m}function a(m){return m.join(`
|
|
15
15
|
`).replace(/^/gm," ".repeat(n))}let h=[`Usage: ${t.commandUsage(e)}`,""],l=t.commandDescription(e);l.length>0&&(h=h.concat([t.wrap(l,r,0),""]));let c=t.visibleArguments(e).map(m=>u(t.argumentTerm(m),t.argumentDescription(m)));c.length>0&&(h=h.concat(["Arguments:",a(c),""]));let d=t.visibleOptions(e).map(m=>u(t.optionTerm(m),t.optionDescription(m)));if(d.length>0&&(h=h.concat(["Options:",a(d),""])),this.showGlobalOptions){let m=t.visibleGlobalOptions(e).map(f=>u(t.optionTerm(f),t.optionDescription(f)));m.length>0&&(h=h.concat(["Global Options:",a(m),""]))}let p=t.visibleCommands(e).map(m=>u(t.subcommandTerm(m),t.subcommandDescription(m)));return p.length>0&&(h=h.concat(["Commands:",a(p),""])),h.join(`
|
|
16
16
|
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,s,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 u=t-s;if(u<r)return e;let a=e.slice(0,s),h=e.slice(s).replace(`\r
|
|
17
17
|
`,`
|
|
18
18
|
`),l=" ".repeat(s),d="\\s\u200B",p=new RegExp(`
|
|
19
19
|
|.{1,${u-1}}([${d}]|$)|[^${d}]+?([${d}]|$)`,"g"),m=h.match(p)||[];return a+m.map((f,b)=>f===`
|
|
20
20
|
`?"":(b>0?l:"")+f.trimEnd()).join(`
|
|
21
|
-
`)}};Mo.Help=vi});var Ci=v(Oi=>{var{InvalidArgumentError:ac}=bt(),
|
|
21
|
+
`)}};Mo.Help=vi});var Ci=v(Oi=>{var{InvalidArgumentError:ac}=bt(),Si=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 s=hc(e);this.short=s.shortFlag,this.long=s.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,s)=>{if(!this.argChoices.includes(t))throw new ac(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,s):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return uc(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ei=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,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s)})}valueFromOption(e,t){let s=t.attributeName();if(!this.dualOptions.has(s))return!0;let r=this.negativeOptions.get(s).presetArg,n=r!==void 0?r:!1;return t.negate===(n===e)}};function uc(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function hc(i){let e,t,s=i.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(e=s.shift()),t=s.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}Oi.Option=Si;Oi.DualOptions=Ei});var Po=v(No=>{function lc(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let s=0;s<=i.length;s++)t[s]=[s];for(let s=0;s<=e.length;s++)t[0][s]=s;for(let s=1;s<=e.length;s++)for(let r=1;r<=i.length;r++){let n=1;i[r-1]===e[s-1]?n=0:n=1,t[r][s]=Math.min(t[r-1][s]+1,t[r][s-1]+1,t[r-1][s-1]+n),r>1&&s>1&&i[r-1]===e[s-2]&&i[r-2]===e[s-1]&&(t[r][s]=Math.min(t[r][s],t[r-2][s-2]+1))}return t[i.length][e.length]}function cc(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let s=[],r=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let u=lc(i,o),a=Math.max(i.length,o.length);(a-u)/a>n&&(u<r?(r=u,s=[o]):u===r&&s.push(o))}),s.sort((o,u)=>o.localeCompare(u)),t&&(s=s.map(o=>`--${o}`)),s.length>1?`
|
|
22
22
|
(Did you mean one of ${s.join(", ")}?)`:s.length===1?`
|
|
23
|
-
(Did you mean ${s[0]}?)`:""}No.suggestSimilar=cc});var
|
|
23
|
+
(Did you mean ${s[0]}?)`:""}No.suggestSimilar=cc});var Bo=v(Do=>{var fc=require("node:events").EventEmitter,ki=require("node:child_process"),ge=require("node:path"),Ai=require("node:fs"),k=require("node:process"),{Argument:dc,humanReadableArgName:pc}=rs(),{CommanderError:Ti}=bt(),{Help:mc}=xi(),{Option:Lo,DualOptions:gc}=Ci(),{suggestSimilar:Fo}=Po(),Ri=class i extends fc{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=>k.stdout.write(t),writeErr:t=>k.stderr.write(t),getOutHelpWidth:()=>k.stdout.isTTY?k.stdout.columns:void 0,getErrHelpWidth:()=>k.stderr.isTTY?k.stderr.columns:void 0,outputError:(t,s)=>s(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,s){let r=t,n=s;typeof r=="object"&&r!==null&&(n=r,r=null),n=n||{};let[,o,u]=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,u&&a.arguments(u),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(e){return new i(e)}createHelp(){return Object.assign(new mc,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
24
24
|
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new dc(e,t)}argument(e,t,s,r){let n=this.createArgument(e,t);return typeof s=="function"?n.default(r).argParser(s):n.default(s),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[,s,r]=e.match(/([^ ]+) *(.*)/),n=t??"display help for command",o=this.createCommand(s);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 s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
25
25
|
Expecting one of '${s.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,s){this._exitCallback&&this._exitCallback(new Ti(e,t,s)),k.exit(e)}action(e){let t=s=>{let r=this.registeredArguments.length,n=s.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 Lo(e,t)}_callParseArg(e,t,s,r){try{return e.parseArg(t,s)}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 s=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 '${s}'
|
|
26
26
|
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),s=t(e).find(r=>this._findCommand(r));if(s){let r=t(this._findCommand(s)).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(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let r=(n,o,u)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(s);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(s,n,u)};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,s,r,n){if(typeof t=="object"&&t instanceof Lo)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,s);if(o.makeOptionMandatory(!!e.mandatory),typeof r=="function")o.default(n).argParser(r);else if(r instanceof RegExp){let u=r;r=(a,h)=>{let l=u.exec(a);return l?l[0]:h},o.default(n).argParser(r)}else o.default(r);return this.addOption(o)}option(e,t,s,r){return this._optionEx({},e,t,s,r)}requiredOption(e,t,s,r){return this._optionEx({mandatory:!0},e,t,s,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,s){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(e)!==void 0&&(t=s.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=k.versions)!=null&&r.electron&&(t.from="electron");let n=k.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(t.from="eval")}e===void 0&&(e=k.argv),this.rawArgs=e.slice();let s;switch(t.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":k.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;case"eval":s=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",s}parse(e,t){let s=this._prepareUserArgs(e,t);return this._parseCommand([],s),this}async parseAsync(e,t){let s=this._prepareUserArgs(e,t);return await this._parseCommand([],s),this}_executeSubCommand(e,t){t=t.slice();let s=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,c){let d=ge.resolve(l,c);if(Ai.existsSync(d))return d;if(r.includes(ge.extname(c)))return;let p=r.find(m=>Ai.existsSync(`${d}${m}`));if(p)return`${d}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=Ai.realpathSync(this._scriptPath)}catch{l=this._scriptPath}u=ge.resolve(ge.dirname(l),u)}if(u){let l=n(u,o);if(!l&&!e._executableFile&&this._scriptPath){let c=ge.basename(this._scriptPath,ge.extname(this._scriptPath));c!==this._name&&(l=n(u,`${c}-${e._name}`))}o=l||o}s=r.includes(ge.extname(o));let a;k.platform!=="win32"?s?(t.unshift(o),t=Io(k.execArgv).concat(t),a=ki.spawn(k.argv[0],t,{stdio:"inherit"})):a=ki.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=Io(k.execArgv).concat(t),a=ki.spawn(k.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{k.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let h=this._exitCallback;a.on("close",l=>{l=l??1,h?h(new Ti(l,"commander.executeSubCommandAsync","(close)")):k.exit(l)}),a.on("error",l=>{if(l.code==="ENOENT"){let c=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",d=`'${o}' does not exist
|
|
@@ -32,6 +32,6 @@ Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
32
32
|
`),this.outputHelp({error:!0}));let s=t||{},r=s.exitCode||1,n=s.code||"commander.error";this._exit(r,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in k.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()}`,k.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new gc(this.options),t=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&t(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,s.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 s=o=>{let u=o.attributeName(),a=this.getOptionValue(u),h=this.options.find(c=>c.negate&&u===c.attributeName()),l=this.options.find(c=>!c.negate&&u===c.attributeName());return h&&(h.presetArg===void 0&&a===!1||h.presetArg!==void 0&&a===h.presetArg)?h:l||o},r=o=>{let u=s(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.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(u=>u.long).map(u=>u.long);r=r.concat(o),n=n.parent}while(n&&!n._enablePositionalOptions);t=Fo(e,r)}let s=`error: unknown option '${e}'${t}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,s=t===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${s} 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=Fo(e,r)}let s=`error: unknown command '${e}'${t}`;this.error(s,{code:"commander.unknownCommand"})}version(e,t,s){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",s=s||"output the version number";let r=this.createOption(t,s);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
33
33
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var 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 s=(r=this.parent)==null?void 0:r._findCommand(e);if(s){let n=[s.name()].concat(s.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(s=>pc(s));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=ge.basename(e,ge.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},s;return t.error?s=r=>this._outputConfiguration.writeErr(r):s=r=>this._outputConfiguration.writeOut(r),t.write=e.write||s,t.command=this,t}outputHelp(e){var n;let t;typeof e=="function"&&(t=e,e=void 0);let s=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let r=this.helpInformation(s);if(t&&(r=t(r),typeof r!="string"&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(r),(n=this._getHelpOption())!=null&&n.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",s),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",s))}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=k.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
34
34
|
Expecting one of '${s.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}
|
|
35
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Io(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,s="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]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],s=n[3],r=n[4]),t&&r!=="0"?`${t}=${s}:${parseInt(r)+1}`:e})}Do.Command=Ri});var Uo=v(X=>{var{Argument:Bo}=rs(),{Command:Mi}=$o(),{CommanderError:bc,InvalidArgumentError:Wo}=bt(),{Help:_c}=Si(),{Option:jo}=Ci();X.program=new Mi;X.createCommand=i=>new Mi(i);X.createOption=(i,e)=>new jo(i,e);X.createArgument=(i,e)=>new Bo(i,e);X.Command=Mi;X.Option=jo;X.Argument=Bo;X.Help=_c;X.CommanderError=bc;X.InvalidArgumentError=Wo;X.InvalidOptionArgumentError=Wo});var Pi=v((op,Ho)=>{"use strict";var Go=require("fs"),Ni;function wc(){try{return Go.statSync("/.dockerenv"),!0}catch{return!1}}function yc(){try{return Go.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Ho.exports=()=>(Ni===void 0&&(Ni=wc()||yc()),Ni)});var Ko=v((ap,Li)=>{"use strict";var vc=require("os"),Sc=require("fs"),zo=Pi(),Yo=()=>{if(process.platform!=="linux")return!1;if(vc.release().toLowerCase().includes("microsoft"))return!zo();try{return Sc.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!zo():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Li.exports=Yo:Li.exports=Yo()});var Jo=v((up,Xo)=>{"use strict";Xo.exports=(i,e,t)=>{let s=r=>Object.defineProperty(i,e,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let r=t();return s(r),r},set(r){s(r)}}),i}});var ra=v((hp,ia)=>{var xc=require("path"),Ec=require("child_process"),{promises:os,constants:sa}=require("fs"),ns=Ko(),Oc=Pi(),Ii=Jo(),Zo=xc.join(__dirname,"xdg-open"),{platform:Ve,arch:Qo}=process,Cc=()=>{try{return os.statSync("/run/.containerenv"),!0}catch{return!1}},Fi;function kc(){return Fi===void 0&&(Fi=Cc()||Oc()),Fi}var Ac=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",s=!1;try{await os.access(t,sa.F_OK),s=!0}catch{}if(!s)return i;let r=await os.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):i}})(),ea=async(i,e)=>{let t;for(let s of i)try{return await e(s)}catch(r){t=r}throw t},as=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return ea(i.app,u=>as({...i,app:u}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return ea(e,u=>as({...i,app:{name:u,arguments:t}}));let s,r=[],n={};if(Ve==="darwin")s="open",i.wait&&r.push("--wait-apps"),i.background&&r.push("--background"),i.newInstance&&r.push("--new"),e&&r.push("-a",e);else if(Ve==="win32"||ns&&!kc()&&!e){let u=await Ac();s=ns?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,r.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),ns||(n.windowsVerbatimArguments=!0);let a=["Start"];i.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&a.push(`"${i.target}"`),t.length>0&&(t=t.map(h=>`"\`"${h}\`""`),a.push(t.join(","))),i.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)s=e;else{let u=!__dirname||__dirname==="/",a=!1;try{await os.access(Zo,sa.X_OK),a=!0}catch{}s=process.versions.electron||Ve==="android"||u||!a?"xdg-open":Zo}t.length>0&&r.push(...t),i.wait||(n.stdio="ignore",n.detached=!0)}i.target&&r.push(i.target),Ve==="darwin"&&t.length>0&&r.push("--args",...t);let o=Ec.spawn(s,r,n);return i.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",h=>{if(!i.allowNonzeroExitCode&&h>0){a(new Error(`Exited with code ${h}`));return}u(o)})}):(o.unref(),o)},Di=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return as({...e,target:i})},Tc=(i,e)=>{if(typeof i!="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 as({...e,app:{name:i,arguments:t}})};function ta(i){if(typeof i=="string"||Array.isArray(i))return i;let{[Qo]:e}=i;if(!e)throw new Error(`${Qo} is not supported`);return e}function $i({[Ve]:i},{wsl:e}){if(e&&ns)return ta(e);if(!i)throw new Error(`${Ve} is not supported`);return ta(i)}var us={};Ii(us,"chrome",()=>$i({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"]}}));Ii(us,"firefox",()=>$i({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Ii(us,"edge",()=>$i({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Di.apps=us;Di.openApp=Tc;ia.exports=Di});var ha=v((lp,ua)=>{"use strict";ua.exports=oa;function oa(i,e,t){i instanceof RegExp&&(i=na(i,t)),e instanceof RegExp&&(e=na(e,t));var s=aa(i,e,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+i.length,s[1]),post:t.slice(s[1]+e.length)}}function na(i,e){var t=e.match(i);return t?t[0]:null}oa.range=aa;function aa(i,e,t){var s,r,n,o,u,a=t.indexOf(i),h=t.indexOf(e,a+1),l=a;if(a>=0&&h>0){if(i===e)return[a,h];for(s=[],n=t.length;l>=0&&!u;)l==a?(s.push(l),a=t.indexOf(i,l+1)):s.length==1?u=[s.pop(),h]:(r=s.pop(),r<n&&(n=r,o=h),h=t.indexOf(e,l+1)),l=a<h&&a>=0?a:h;s.length&&(u=[n,o])}return u}});var ba=v((cp,ga)=>{var la=ha();ga.exports=Nc;var ca="\0SLASH"+Math.random()+"\0",fa="\0OPEN"+Math.random()+"\0",Wi="\0CLOSE"+Math.random()+"\0",da="\0COMMA"+Math.random()+"\0",pa="\0PERIOD"+Math.random()+"\0";function Bi(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Rc(i){return i.split("\\\\").join(ca).split("\\{").join(fa).split("\\}").join(Wi).split("\\,").join(da).split("\\.").join(pa)}function Mc(i){return i.split(ca).join("\\").split(fa).join("{").split(Wi).join("}").split(da).join(",").split(pa).join(".")}function ma(i){if(!i)return[""];var e=[],t=la("{","}",i);if(!t)return i.split(",");var s=t.pre,r=t.body,n=t.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var u=ma(n);return n.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),e.push.apply(e,o),e}function Nc(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),_t(Rc(i),!0).map(Mc)):[]}function Pc(i){return"{"+i+"}"}function Lc(i){return/^-?0\d/.test(i)}function Fc(i,e){return i<=e}function Ic(i,e){return i>=e}function _t(i,e){var t=[],s=la("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?_t(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var u=r+"{"+s.body+"}"+n[o];t.push(u)}else{var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=a||h,c=s.body.indexOf(",")>=0;if(!l&&!c)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+Wi+s.post,_t(i)):[i];var d;if(l)d=s.body.split(/\.\./);else if(d=ma(s.body),d.length===1&&(d=_t(d[0],!1).map(Pc),d.length===1))return n.map(function(Le){return s.pre+d[0]+Le});var p;if(l){var m=Bi(d[0]),f=Bi(d[1]),b=Math.max(d[0].length,d[1].length),g=d.length==3?Math.abs(Bi(d[2])):1,w=Fc,S=f<m;S&&(g*=-1,w=Ic);var y=d.some(Lc);p=[];for(var x=m;w(x,f);x+=g){var E;if(h)E=String.fromCharCode(x),E==="\\"&&(E="");else if(E=String(x),y){var F=b-E.length;if(F>0){var z=new Array(F+1).join("0");x<0?E="-"+z+E.slice(1):E=z+E}}p.push(E)}}else{p=[];for(var W=0;W<d.length;W++)p.push.apply(p,_t(d[W],!1))}for(var W=0;W<p.length;W++)for(var o=0;o<n.length;o++){var u=r+p[W]+n[o];(!e||l||u)&&t.push(u)}}return t}});var ed={};xu(ed,{StackUtils:()=>pu.default,WebSocket:()=>xo,WebSocketServer:()=>gi.default,codeFrameColumns:()=>mu.codeFrameColumns,findUpSync:()=>lu,glob:()=>Cs,open:()=>bu.default,program:()=>Vo,sanitize:()=>gu.default,supportsColor:()=>du});module.exports=Eu(ed);var pu=T(dr()),mu=T(gn());var Gl=T(yn(),1),Hl=T(ri(),1),zl=T(ai(),1),So=T(pi(),1),gi=T(vo(),1);var xo=So.default;var gu=T(Ro());var qo=T(Uo(),1),{program:Vo,createCommand:Kd,createArgument:Xd,createOption:Jd,CommanderError:Zd,InvalidArgumentError:Qd,InvalidOptionArgumentError:ep,Command:tp,Argument:sp,Option:ip,Help:rp}=qo.default;var bu=T(ra());var Oa=T(ba(),1);var wt=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.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]},yt=i=>i.replace(/[[\]\\-]/g,"\\$&"),$c=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_a=i=>i.join(""),wa=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=t+1,o=!1,u=!1,a=!1,h=!1,l=t,c="";e:for(;n<i.length;){let f=i.charAt(n);if((f==="!"||f==="^")&&n===t+1){h=!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,w,S]]of Object.entries(Dc))if(i.startsWith(b,n)){if(c)return["$.",!1,i.length-t,!0];n+=b.length,S?r.push(g):s.push(g),u=u||w;continue e}}if(a=!1,c){f>c?s.push(yt(c)+"-"+yt(f)):f===c&&s.push(yt(f)),c="",n++;continue}if(i.startsWith("-]",n+1)){s.push(yt(f+"-")),n+=2;continue}if(i.startsWith("-",n+1)){c=f,n+=2;continue}s.push(yt(f)),n++}if(l<n)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!h){let f=s[0].length===2?s[0].slice(-1):s[0];return[$c(f),!1,l-t,!1]}let d="["+(h?"^":"")+_a(s)+"]",p="["+(h?"":"^")+_a(r)+"]";return[s.length&&r.length?"("+d+"|"+p+")":s.length?d:p,u,l-t,!0]};var ie=(i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Bc=new Set(["!","?","+","*","@"]),ya=i=>Bc.has(i),Wc="(?!(?:^|/)\\.\\.?(?:$|/))",hs="(?!\\.)",jc=new Set(["[","."]),Uc=new Set(["..","."]),qc=new Set("().*{}+?[]^$\\!"),Vc=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ji="[^/]",va=ji+"*?",Sa=ji+"+?",Ge=class i{type;#e;#t;#n=!1;#i=[];#o;#y;#h;#c=!1;#a;#u;#r=!1;constructor(e,t,s={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?s:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#c&&this.#h.push(this),this.#y=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#u=this.#i.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.#h.pop();){if(e.type!=="!")continue;let t=e,s=t.#o;for(;s;){for(let r=t.#y+1;!s.type&&r<s.#i.length;r++)for(let n of e.#i){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#i[r])}t=s,s=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof i&&t.#o===this))throw new Error("invalid part: "+t);this.#i.push(t)}}toJSON(){var t;let e=this.type===null?this.#i.slice().map(s=>typeof s=="string"?s:s.toJSON()):[this.type,...this.#i.map(s=>s.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.#y===0)return!0;let e=this.#o;for(let s=0;s<this.#y;s++){let r=e.#i[s];if(!(r instanceof i&&r.type==="!"))return!1}return!0}isEnd(){var t,s,r;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((s=this.#o)!=null&&s.isEnd()))return!1;if(!this.type)return(r=this.#o)==null?void 0:r.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#y===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new i(this.type,e);for(let s of this.#i)t.copyIn(s);return t}static#b(e,t,s,r){let n=!1,o=!1,u=-1,a=!1;if(t.type===null){let p=s,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===u+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===u+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,u=p,a=!1,m+=f;continue}if(!r.noext&&ya(f)&&e.charAt(p)==="("){t.push(m),m="";let b=new i(f,t);p=i.#b(e,b,p,r),t.push(b);continue}m+=f}return t.push(m),p}let h=s+1,l=new i(null,t),c=[],d="";for(;h<e.length;){let p=e.charAt(h++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){h===u+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(h===u+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,u=h,a=!1,d+=p;continue}if(ya(p)&&e.charAt(h)==="("){l.push(d),d="";let m=new i(p,l);l.push(m),h=i.#b(e,m,h,r);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new i(null,t);continue}if(p===")")return d===""&&t.#i.length===0&&(t.#r=!0),l.push(d),d="",t.push(...c,l),h;d+=p}return t.type=null,t.#t=void 0,t.#i=[e.substring(s-1)],h}static fromGlob(e,t={}){let s=new i(null,void 0,t);return i.#b(e,s,0,t),s}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,s,r,n]=this.toRegExpSource();if(!(r||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let u=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,u),{_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 h=this.isStart()&&this.isEnd(),l=this.#i.map(m=>{let[f,b,g,w]=typeof m=="string"?i.#f(m,this.#t,h):m.toRegExpSource(e);return this.#t=this.#t||g,this.#n=this.#n||w,f}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Uc.has(this.#i[0]))){let f=jc,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?Wc:g?hs:""}let d="";return this.isEnd()&&this.#e.#c&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,ie(l),this.#t=!!this.#t,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#i=[h],this.type=null,this.#t=void 0,[h,ie(this.toString()),!1,!1]}let o=!s||e||t||!hs?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let u="";if(this.type==="!"&&this.#r)u=(this.isStart()&&!t?hs:"")+Sa;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?hs:"")+va+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;u=r+n+h}return[u,ie(n),this.#t=!!this.#t,this.#n]}#d(e){return this.#i.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,s}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,s=!1){let r=!1,n="",o=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(r){r=!1,n+=(qc.has(a)?"\\":"")+a;continue}if(a==="\\"){u===e.length-1?n+="\\\\":r=!0;continue}if(a==="["){let[h,l,c,d]=wa(e,u);if(c){n+=h,o=o||l,u+=c-1,t=t||d;continue}}if(a==="*"){s&&e==="*"?n+=Sa:n+=va,t=!0;continue}if(a==="?"){n+=ji,t=!0;continue}n+=Vc(a)}return[n,ie(e),!!t,o]}};var He=(i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var U=(i,e,t={})=>(wt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new G(e,t).match(i)),Gc=/^\*+([^+@!?\*\[\(]*)$/,Hc=i=>e=>!e.startsWith(".")&&e.endsWith(i),zc=i=>e=>e.endsWith(i),Yc=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Kc=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Xc=/^\*+\.\*+$/,Jc=i=>!i.startsWith(".")&&i.includes("."),Zc=i=>i!=="."&&i!==".."&&i.includes("."),Qc=/^\.\*+$/,ef=i=>i!=="."&&i!==".."&&i.startsWith("."),tf=/^\*+$/,sf=i=>i.length!==0&&!i.startsWith("."),rf=i=>i.length!==0&&i!=="."&&i!=="..",nf=/^\?+([^+@!?\*\[\(]*)?$/,of=([i,e=""])=>{let t=Ca([i]);return e?(e=e.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(e)):t},af=([i,e=""])=>{let t=ka([i]);return e?(e=e.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(e)):t},uf=([i,e=""])=>{let t=ka([i]);return e?s=>t(s)&&s.endsWith(e):t},hf=([i,e=""])=>{let t=Ca([i]);return e?s=>t(s)&&s.endsWith(e):t},Ca=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},ka=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Aa=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xa={win32:{sep:"\\"},posix:{sep:"/"}},lf=Aa==="win32"?xa.win32.sep:xa.posix.sep;U.sep=lf;var I=Symbol("globstar **");U.GLOBSTAR=I;var cf="[^/]",ff=cf+"*?",df="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",pf="(?:(?!(?:\\/|^)\\.).)*?",mf=(i,e={})=>t=>U(t,i,e);U.filter=mf;var J=(i,e={})=>Object.assign({},i,e),gf=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return U;let e=U;return Object.assign((s,r,n={})=>e(s,r,J(i,n)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,J(i,n))}static defaults(r){return e.defaults(J(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,n,o={}){super(r,n,J(i,o))}static fromGlob(r,n={}){return e.AST.fromGlob(r,J(i,n))}},unescape:(s,r={})=>e.unescape(s,J(i,r)),escape:(s,r={})=>e.escape(s,J(i,r)),filter:(s,r={})=>e.filter(s,J(i,r)),defaults:s=>e.defaults(J(i,s)),makeRe:(s,r={})=>e.makeRe(s,J(i,r)),braceExpand:(s,r={})=>e.braceExpand(s,J(i,r)),match:(s,r,n={})=>e.match(s,r,J(i,n)),sep:e.sep,GLOBSTAR:I})};U.defaults=gf;var Ta=(i,e={})=>(wt(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,Oa.default)(i));U.braceExpand=Ta;var bf=(i,e={})=>new G(i,e).makeRe();U.makeRe=bf;var _f=(i,e,t={})=>{let s=new G(e,t);return i=i.filter(r=>s.match(r)),s.options.nonull&&!i.length&&i.push(e),i};U.match=_f;var Ea=/[?*]|[+@!]\(.*?\)|\[|\]/,wf=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){wt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Aa,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 s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!Ea.test(n[2]))&&!Ea.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(h)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 s=0;s<e.length;s++)for(let r=0;r<e[s].length;r++)e[s][r]==="**"&&(e[s][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 s=-1;for(;(s=t.indexOf("**",s+1))!==-1;){let r=s;for(;t[r+1]==="**";)r++;r!==s&&t.splice(s,r-s)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((s,r)=>{let n=s[s.length-1];return r==="**"&&n==="**"?s:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(r),s)},[]),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 s=0;for(;(s=e.indexOf("..",s+1))!==-1;){let r=e[s-1];r&&r!=="."&&r!==".."&&r!=="**"&&(t=!0,e.splice(s-1,2),s-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let s of e){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let o=r;for(;s[o+1]==="**";)o++;o>r&&s.splice(r+1,o-r);let u=s[r+1],a=s[r+2],h=s[r+3];if(u!==".."||!a||a==="."||a===".."||!h||h==="."||h==="..")continue;t=!0,s.splice(r,1);let l=s.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let u=s[o];o===1&&u===""&&s[0]===""||(u==="."||u==="")&&(t=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(t=!0,s.pop())}let n=0;for(;(n=s.indexOf("..",n+1))!==-1;){let o=s[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&s[n+1]==="**"?["."]:[];s.splice(n-1,2,...a),s.length===0&&s.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let s=t+1;s<e.length;s++){let r=this.partsMatch(e[t],e[s],!this.preserveMultipleSlashes);if(r){e[t]=[],e[s]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,s=!1){let r=0,n=0,o=[],u="";for(;r<e.length&&n<t.length;)if(e[r]===t[n])o.push(u==="b"?t[n]:e[r]),r++,n++;else if(s&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(s&&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(u==="b")return!1;u="a",o.push(e[r]),r++,n++}else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(u==="a")return!1;u="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,s=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,s++;s&&(this.pattern=e.slice(s)),this.negate=t}matchOne(e,t,s=!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]),w=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),S=b?3:f?0:void 0,y=w?3:g?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[x,E]=[e[S],t[y]];x.toLowerCase()===E.toLowerCase()&&(t[y]=x,y>S?t=t.slice(y):S>y&&(e=e.slice(S)))}}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,u=0,a=e.length,h=t.length;o<a&&u<h;o++,u++){this.debug("matchOne loop");var l=t[u],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===I){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=u+1;if(p===h){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
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Io(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,s="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]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],s=n[3],r=n[4]),t&&r!=="0"?`${t}=${s}:${parseInt(r)+1}`:e})}Do.Command=Ri});var Uo=v(X=>{var{Argument:$o}=rs(),{Command:Mi}=Bo(),{CommanderError:bc,InvalidArgumentError:Wo}=bt(),{Help:_c}=xi(),{Option:jo}=Ci();X.program=new Mi;X.createCommand=i=>new Mi(i);X.createOption=(i,e)=>new jo(i,e);X.createArgument=(i,e)=>new $o(i,e);X.Command=Mi;X.Option=jo;X.Argument=$o;X.Help=_c;X.CommanderError=bc;X.InvalidArgumentError=Wo;X.InvalidOptionArgumentError=Wo});var Pi=v((op,Ho)=>{"use strict";var Go=require("fs"),Ni;function wc(){try{return Go.statSync("/.dockerenv"),!0}catch{return!1}}function yc(){try{return Go.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Ho.exports=()=>(Ni===void 0&&(Ni=wc()||yc()),Ni)});var Ko=v((ap,Li)=>{"use strict";var vc=require("os"),xc=require("fs"),zo=Pi(),Yo=()=>{if(process.platform!=="linux")return!1;if(vc.release().toLowerCase().includes("microsoft"))return!zo();try{return xc.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!zo():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Li.exports=Yo:Li.exports=Yo()});var Jo=v((up,Xo)=>{"use strict";Xo.exports=(i,e,t)=>{let s=r=>Object.defineProperty(i,e,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let r=t();return s(r),r},set(r){s(r)}}),i}});var ra=v((hp,ia)=>{var Sc=require("path"),Ec=require("child_process"),{promises:os,constants:sa}=require("fs"),ns=Ko(),Oc=Pi(),Ii=Jo(),Zo=Sc.join(__dirname,"xdg-open"),{platform:Ve,arch:Qo}=process,Cc=()=>{try{return os.statSync("/run/.containerenv"),!0}catch{return!1}},Fi;function kc(){return Fi===void 0&&(Fi=Cc()||Oc()),Fi}var Ac=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",s=!1;try{await os.access(t,sa.F_OK),s=!0}catch{}if(!s)return i;let r=await os.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):i}})(),ea=async(i,e)=>{let t;for(let s of i)try{return await e(s)}catch(r){t=r}throw t},as=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return ea(i.app,u=>as({...i,app:u}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return ea(e,u=>as({...i,app:{name:u,arguments:t}}));let s,r=[],n={};if(Ve==="darwin")s="open",i.wait&&r.push("--wait-apps"),i.background&&r.push("--background"),i.newInstance&&r.push("--new"),e&&r.push("-a",e);else if(Ve==="win32"||ns&&!kc()&&!e){let u=await Ac();s=ns?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,r.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),ns||(n.windowsVerbatimArguments=!0);let a=["Start"];i.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&a.push(`"${i.target}"`),t.length>0&&(t=t.map(h=>`"\`"${h}\`""`),a.push(t.join(","))),i.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)s=e;else{let u=!__dirname||__dirname==="/",a=!1;try{await os.access(Zo,sa.X_OK),a=!0}catch{}s=process.versions.electron||Ve==="android"||u||!a?"xdg-open":Zo}t.length>0&&r.push(...t),i.wait||(n.stdio="ignore",n.detached=!0)}i.target&&r.push(i.target),Ve==="darwin"&&t.length>0&&r.push("--args",...t);let o=Ec.spawn(s,r,n);return i.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",h=>{if(!i.allowNonzeroExitCode&&h>0){a(new Error(`Exited with code ${h}`));return}u(o)})}):(o.unref(),o)},Di=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return as({...e,target:i})},Tc=(i,e)=>{if(typeof i!="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 as({...e,app:{name:i,arguments:t}})};function ta(i){if(typeof i=="string"||Array.isArray(i))return i;let{[Qo]:e}=i;if(!e)throw new Error(`${Qo} is not supported`);return e}function Bi({[Ve]:i},{wsl:e}){if(e&&ns)return ta(e);if(!i)throw new Error(`${Ve} is not supported`);return ta(i)}var us={};Ii(us,"chrome",()=>Bi({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"]}}));Ii(us,"firefox",()=>Bi({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Ii(us,"edge",()=>Bi({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Di.apps=us;Di.openApp=Tc;ia.exports=Di});var ha=v((lp,ua)=>{"use strict";ua.exports=oa;function oa(i,e,t){i instanceof RegExp&&(i=na(i,t)),e instanceof RegExp&&(e=na(e,t));var s=aa(i,e,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+i.length,s[1]),post:t.slice(s[1]+e.length)}}function na(i,e){var t=e.match(i);return t?t[0]:null}oa.range=aa;function aa(i,e,t){var s,r,n,o,u,a=t.indexOf(i),h=t.indexOf(e,a+1),l=a;if(a>=0&&h>0){if(i===e)return[a,h];for(s=[],n=t.length;l>=0&&!u;)l==a?(s.push(l),a=t.indexOf(i,l+1)):s.length==1?u=[s.pop(),h]:(r=s.pop(),r<n&&(n=r,o=h),h=t.indexOf(e,l+1)),l=a<h&&a>=0?a:h;s.length&&(u=[n,o])}return u}});var ba=v((cp,ga)=>{var la=ha();ga.exports=Nc;var ca="\0SLASH"+Math.random()+"\0",fa="\0OPEN"+Math.random()+"\0",Wi="\0CLOSE"+Math.random()+"\0",da="\0COMMA"+Math.random()+"\0",pa="\0PERIOD"+Math.random()+"\0";function $i(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Rc(i){return i.split("\\\\").join(ca).split("\\{").join(fa).split("\\}").join(Wi).split("\\,").join(da).split("\\.").join(pa)}function Mc(i){return i.split(ca).join("\\").split(fa).join("{").split(Wi).join("}").split(da).join(",").split(pa).join(".")}function ma(i){if(!i)return[""];var e=[],t=la("{","}",i);if(!t)return i.split(",");var s=t.pre,r=t.body,n=t.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var u=ma(n);return n.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),e.push.apply(e,o),e}function Nc(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),_t(Rc(i),!0).map(Mc)):[]}function Pc(i){return"{"+i+"}"}function Lc(i){return/^-?0\d/.test(i)}function Fc(i,e){return i<=e}function Ic(i,e){return i>=e}function _t(i,e){var t=[],s=la("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?_t(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var u=r+"{"+s.body+"}"+n[o];t.push(u)}else{var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=a||h,c=s.body.indexOf(",")>=0;if(!l&&!c)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+Wi+s.post,_t(i)):[i];var d;if(l)d=s.body.split(/\.\./);else if(d=ma(s.body),d.length===1&&(d=_t(d[0],!1).map(Pc),d.length===1))return n.map(function(Le){return s.pre+d[0]+Le});var p;if(l){var m=$i(d[0]),f=$i(d[1]),b=Math.max(d[0].length,d[1].length),g=d.length==3?Math.abs($i(d[2])):1,w=Fc,x=f<m;x&&(g*=-1,w=Ic);var y=d.some(Lc);p=[];for(var S=m;w(S,f);S+=g){var E;if(h)E=String.fromCharCode(S),E==="\\"&&(E="");else if(E=String(S),y){var F=b-E.length;if(F>0){var z=new Array(F+1).join("0");S<0?E="-"+z+E.slice(1):E=z+E}}p.push(E)}}else{p=[];for(var W=0;W<d.length;W++)p.push.apply(p,_t(d[W],!1))}for(var W=0;W<p.length;W++)for(var o=0;o<n.length;o++){var u=r+p[W]+n[o];(!e||l||u)&&t.push(u)}}return t}});var ed={};Su(ed,{StackUtils:()=>pu.default,WebSocket:()=>So,WebSocketServer:()=>gi.default,codeFrameColumns:()=>mu.codeFrameColumns,findUpSync:()=>lu,glob:()=>Cs,open:()=>bu.default,program:()=>Vo,sanitize:()=>gu.default,supportsColor:()=>du});module.exports=Eu(ed);var pu=T(dr()),mu=T(gn());var Gl=T(yn(),1),Hl=T(ri(),1),zl=T(ai(),1),xo=T(pi(),1),gi=T(vo(),1);var So=xo.default;var gu=T(Ro());var qo=T(Uo(),1),{program:Vo,createCommand:Kd,createArgument:Xd,createOption:Jd,CommanderError:Zd,InvalidArgumentError:Qd,InvalidOptionArgumentError:ep,Command:tp,Argument:sp,Option:ip,Help:rp}=qo.default;var bu=T(ra());var Oa=T(ba(),1);var wt=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.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]},yt=i=>i.replace(/[[\]\\-]/g,"\\$&"),Bc=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_a=i=>i.join(""),wa=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=t+1,o=!1,u=!1,a=!1,h=!1,l=t,c="";e:for(;n<i.length;){let f=i.charAt(n);if((f==="!"||f==="^")&&n===t+1){h=!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,w,x]]of Object.entries(Dc))if(i.startsWith(b,n)){if(c)return["$.",!1,i.length-t,!0];n+=b.length,x?r.push(g):s.push(g),u=u||w;continue e}}if(a=!1,c){f>c?s.push(yt(c)+"-"+yt(f)):f===c&&s.push(yt(f)),c="",n++;continue}if(i.startsWith("-]",n+1)){s.push(yt(f+"-")),n+=2;continue}if(i.startsWith("-",n+1)){c=f,n+=2;continue}s.push(yt(f)),n++}if(l<n)return["",!1,0,!1];if(!s.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!h){let f=s[0].length===2?s[0].slice(-1):s[0];return[Bc(f),!1,l-t,!1]}let d="["+(h?"^":"")+_a(s)+"]",p="["+(h?"":"^")+_a(r)+"]";return[s.length&&r.length?"("+d+"|"+p+")":s.length?d:p,u,l-t,!0]};var ie=(i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var $c=new Set(["!","?","+","*","@"]),ya=i=>$c.has(i),Wc="(?!(?:^|/)\\.\\.?(?:$|/))",hs="(?!\\.)",jc=new Set(["[","."]),Uc=new Set(["..","."]),qc=new Set("().*{}+?[]^$\\!"),Vc=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ji="[^/]",va=ji+"*?",xa=ji+"+?",Ge=class i{type;#e;#t;#n=!1;#i=[];#o;#y;#h;#c=!1;#a;#u;#r=!1;constructor(e,t,s={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?s:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#c&&this.#h.push(this),this.#y=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#u=this.#i.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.#h.pop();){if(e.type!=="!")continue;let t=e,s=t.#o;for(;s;){for(let r=t.#y+1;!s.type&&r<s.#i.length;r++)for(let n of e.#i){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#i[r])}t=s,s=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof i&&t.#o===this))throw new Error("invalid part: "+t);this.#i.push(t)}}toJSON(){var t;let e=this.type===null?this.#i.slice().map(s=>typeof s=="string"?s:s.toJSON()):[this.type,...this.#i.map(s=>s.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.#y===0)return!0;let e=this.#o;for(let s=0;s<this.#y;s++){let r=e.#i[s];if(!(r instanceof i&&r.type==="!"))return!1}return!0}isEnd(){var t,s,r;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((s=this.#o)!=null&&s.isEnd()))return!1;if(!this.type)return(r=this.#o)==null?void 0:r.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#y===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new i(this.type,e);for(let s of this.#i)t.copyIn(s);return t}static#b(e,t,s,r){let n=!1,o=!1,u=-1,a=!1;if(t.type===null){let p=s,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===u+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===u+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,u=p,a=!1,m+=f;continue}if(!r.noext&&ya(f)&&e.charAt(p)==="("){t.push(m),m="";let b=new i(f,t);p=i.#b(e,b,p,r),t.push(b);continue}m+=f}return t.push(m),p}let h=s+1,l=new i(null,t),c=[],d="";for(;h<e.length;){let p=e.charAt(h++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){h===u+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(h===u+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,u=h,a=!1,d+=p;continue}if(ya(p)&&e.charAt(h)==="("){l.push(d),d="";let m=new i(p,l);l.push(m),h=i.#b(e,m,h,r);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new i(null,t);continue}if(p===")")return d===""&&t.#i.length===0&&(t.#r=!0),l.push(d),d="",t.push(...c,l),h;d+=p}return t.type=null,t.#t=void 0,t.#i=[e.substring(s-1)],h}static fromGlob(e,t={}){let s=new i(null,void 0,t);return i.#b(e,s,0,t),s}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,s,r,n]=this.toRegExpSource();if(!(r||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let u=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,u),{_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 h=this.isStart()&&this.isEnd(),l=this.#i.map(m=>{let[f,b,g,w]=typeof m=="string"?i.#f(m,this.#t,h):m.toRegExpSource(e);return this.#t=this.#t||g,this.#n=this.#n||w,f}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Uc.has(this.#i[0]))){let f=jc,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?Wc:g?hs:""}let d="";return this.isEnd()&&this.#e.#c&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,ie(l),this.#t=!!this.#t,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#i=[h],this.type=null,this.#t=void 0,[h,ie(this.toString()),!1,!1]}let o=!s||e||t||!hs?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let u="";if(this.type==="!"&&this.#r)u=(this.isStart()&&!t?hs:"")+xa;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?hs:"")+va+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;u=r+n+h}return[u,ie(n),this.#t=!!this.#t,this.#n]}#d(e){return this.#i.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,s}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,s=!1){let r=!1,n="",o=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(r){r=!1,n+=(qc.has(a)?"\\":"")+a;continue}if(a==="\\"){u===e.length-1?n+="\\\\":r=!0;continue}if(a==="["){let[h,l,c,d]=wa(e,u);if(c){n+=h,o=o||l,u+=c-1,t=t||d;continue}}if(a==="*"){s&&e==="*"?n+=xa:n+=va,t=!0;continue}if(a==="?"){n+=ji,t=!0;continue}n+=Vc(a)}return[n,ie(e),!!t,o]}};var He=(i,{windowsPathsNoEscape:e=!1}={})=>e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var U=(i,e,t={})=>(wt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new G(e,t).match(i)),Gc=/^\*+([^+@!?\*\[\(]*)$/,Hc=i=>e=>!e.startsWith(".")&&e.endsWith(i),zc=i=>e=>e.endsWith(i),Yc=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Kc=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Xc=/^\*+\.\*+$/,Jc=i=>!i.startsWith(".")&&i.includes("."),Zc=i=>i!=="."&&i!==".."&&i.includes("."),Qc=/^\.\*+$/,ef=i=>i!=="."&&i!==".."&&i.startsWith("."),tf=/^\*+$/,sf=i=>i.length!==0&&!i.startsWith("."),rf=i=>i.length!==0&&i!=="."&&i!=="..",nf=/^\?+([^+@!?\*\[\(]*)?$/,of=([i,e=""])=>{let t=Ca([i]);return e?(e=e.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(e)):t},af=([i,e=""])=>{let t=ka([i]);return e?(e=e.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(e)):t},uf=([i,e=""])=>{let t=ka([i]);return e?s=>t(s)&&s.endsWith(e):t},hf=([i,e=""])=>{let t=Ca([i]);return e?s=>t(s)&&s.endsWith(e):t},Ca=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},ka=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Aa=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Sa={win32:{sep:"\\"},posix:{sep:"/"}},lf=Aa==="win32"?Sa.win32.sep:Sa.posix.sep;U.sep=lf;var I=Symbol("globstar **");U.GLOBSTAR=I;var cf="[^/]",ff=cf+"*?",df="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",pf="(?:(?!(?:\\/|^)\\.).)*?",mf=(i,e={})=>t=>U(t,i,e);U.filter=mf;var J=(i,e={})=>Object.assign({},i,e),gf=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return U;let e=U;return Object.assign((s,r,n={})=>e(s,r,J(i,n)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,J(i,n))}static defaults(r){return e.defaults(J(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,n,o={}){super(r,n,J(i,o))}static fromGlob(r,n={}){return e.AST.fromGlob(r,J(i,n))}},unescape:(s,r={})=>e.unescape(s,J(i,r)),escape:(s,r={})=>e.escape(s,J(i,r)),filter:(s,r={})=>e.filter(s,J(i,r)),defaults:s=>e.defaults(J(i,s)),makeRe:(s,r={})=>e.makeRe(s,J(i,r)),braceExpand:(s,r={})=>e.braceExpand(s,J(i,r)),match:(s,r,n={})=>e.match(s,r,J(i,n)),sep:e.sep,GLOBSTAR:I})};U.defaults=gf;var Ta=(i,e={})=>(wt(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,Oa.default)(i));U.braceExpand=Ta;var bf=(i,e={})=>new G(i,e).makeRe();U.makeRe=bf;var _f=(i,e,t={})=>{let s=new G(e,t);return i=i.filter(r=>s.match(r)),s.options.nonull&&!i.length&&i.push(e),i};U.match=_f;var Ea=/[?*]|[+@!]\(.*?\)|\[|\]/,wf=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){wt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Aa,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 s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!Ea.test(n[2]))&&!Ea.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(h)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 s=0;s<e.length;s++)for(let r=0;r<e[s].length;r++)e[s][r]==="**"&&(e[s][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 s=-1;for(;(s=t.indexOf("**",s+1))!==-1;){let r=s;for(;t[r+1]==="**";)r++;r!==s&&t.splice(s,r-s)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((s,r)=>{let n=s[s.length-1];return r==="**"&&n==="**"?s:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(r),s)},[]),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 s=0;for(;(s=e.indexOf("..",s+1))!==-1;){let r=e[s-1];r&&r!=="."&&r!==".."&&r!=="**"&&(t=!0,e.splice(s-1,2),s-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let s of e){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let o=r;for(;s[o+1]==="**";)o++;o>r&&s.splice(r+1,o-r);let u=s[r+1],a=s[r+2],h=s[r+3];if(u!==".."||!a||a==="."||a===".."||!h||h==="."||h==="..")continue;t=!0,s.splice(r,1);let l=s.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let u=s[o];o===1&&u===""&&s[0]===""||(u==="."||u==="")&&(t=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(t=!0,s.pop())}let n=0;for(;(n=s.indexOf("..",n+1))!==-1;){let o=s[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&s[n+1]==="**"?["."]:[];s.splice(n-1,2,...a),s.length===0&&s.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let s=t+1;s<e.length;s++){let r=this.partsMatch(e[t],e[s],!this.preserveMultipleSlashes);if(r){e[t]=[],e[s]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,s=!1){let r=0,n=0,o=[],u="";for(;r<e.length&&n<t.length;)if(e[r]===t[n])o.push(u==="b"?t[n]:e[r]),r++,n++;else if(s&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(s&&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(u==="b")return!1;u="a",o.push(e[r]),r++,n++}else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(u==="a")return!1;u="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,s=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,s++;s&&(this.pattern=e.slice(s)),this.negate=t}matchOne(e,t,s=!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]),w=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),x=b?3:f?0:void 0,y=w?3:g?0:void 0;if(typeof x=="number"&&typeof y=="number"){let[S,E]=[e[x],t[y]];S.toLowerCase()===E.toLowerCase()&&(t[y]=S,y>x?t=t.slice(y):x>y&&(e=e.slice(x)))}}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,u=0,a=e.length,h=t.length;o<a&&u<h;o++,u++){this.debug("matchOne loop");var l=t[u],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===I){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=u+1;if(p===h){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(`
|
|
36
36
|
globstar while`,e,d,t,p,m),this.matchOne(e.slice(d),t.slice(p),s))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!!(s&&(this.debug(`
|
|
37
|
-
>>> 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&&u===h)return!0;if(o===a)return s;if(u===h)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Ta(this.pattern,this.options)}parse(e){wt(e);let t=this.options;if(e==="**")return I;if(e==="")return"";let s,r=null;(s=e.match(tf))?r=t.dot?rf:sf:(s=e.match(Gc))?r=(t.nocase?t.dot?Kc:Yc:t.dot?zc:Hc)(s[1]):(s=e.match(nf))?r=(t.nocase?t.dot?af:of:t.dot?uf:hf)(s):(s=e.match(Xc))?r=t.dot?Zc:Jc:(s=e.match(Qc))&&(r=ef);let n=Ge.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,s=t.noglobstar?ff:t.dot?df:pf,r=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let h=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))r.add(c);return typeof l=="string"?wf(l):l===I?I:l._src});return h.forEach((l,c)=>{let d=h[c+1],p=h[c-1];l!==I||p===I||(p===void 0?d!==void 0&&d!==I?h[c+1]="(?:\\/|"+s+"\\/)?"+d:h[c]=s:d===void 0?h[c-1]=p+"(?:\\/|"+s+")?":d!==I&&(h[c-1]=p+"(?:\\/|\\/"+s+"\\/)"+d,h[c+1]=I))}),h.filter(l=>l!==I).join("/")}).join("|"),[o,u]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+u+"$",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 s=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 u=r.length-2;!o&&u>=0;u--)o=r[u];for(let u=0;u<n.length;u++){let a=n[u],h=r;if(s.matchBase&&a.length===1&&(h=[o]),this.matchOne(h,a,t))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return U.defaults(e).Minimatch}};U.AST=Ge;U.Minimatch=G;U.escape=He;U.unescape=ie;var eu=require("node:url");var ze=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Na=new Set,Ui=typeof process=="object"&&process?process:{},Pa=(i,e,t,s)=>{typeof Ui.emitWarning=="function"?Ui.emitWarning(i,e,t,s):console.error(`[${t}] ${e}: ${i}`)},ls=globalThis.AbortController,Ra=globalThis.AbortSignal,Ma;if(typeof ls>"u"){Ra=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,r){this._onabort.push(r)}},ls=class{constructor(){e()}signal=new Ra;abort(s){var r,n;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let o of this.signal._onabort)o(s);(n=(r=this.signal).onabort)==null||n.call(r,s)}}};let i=((Ma=Ui.env)==null?void 0:Ma.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{i&&(i=!1,Pa("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 yf=i=>!Na.has(i),Mp=Symbol("type"),ve=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),La=i=>ve(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Ye:null:null,Ye=class extends Array{constructor(e){super(e),this.fill(0)}},qi=class i{heap;length;static#e=!1;static create(e){let t=La(e);if(!t)return[];i.#e=!0;let s=new i(e,t);return i.#e=!1,s}constructor(e,t){if(!i.#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]}},vt=class i{#e;#t;#n;#i;#o;#y;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#c;#a;#u;#r;#g;#b;#d;#f;#x;#m;#E;#O;#w;#v;#S;#p;static unsafeExposeInternals(e){return{starts:e.#O,ttls:e.#w,sizes:e.#E,keyMap:e.#a,keyList:e.#u,valList:e.#r,next:e.#g,prev:e.#b,get head(){return e.#d},get tail(){return e.#f},free:e.#x,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,s,r,n)=>e.#$(t,s,r,n),moveToTail:t=>e.#W(t),indexes:t=>e.#k(t),rindexes:t=>e.#A(t),isStale:t=>e.#_(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#h}get fetchMethod(){return this.#o}get memoMethod(){return this.#y}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:b,memoMethod:g,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:x,ignoreFetchAbort:E}=e;if(t!==0&&!ve(t))throw new TypeError("max option must be a nonnegative integer");let F=t?La(t):Array;if(!F)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.#y=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.#u=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new F(t),this.#b=new F(t),this.#d=0,this.#f=0,this.#x=qi.create(t),this.#h=0,this.#c=0,typeof h=="function"&&(this.#n=h),typeof l=="function"?(this.#i=l,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#v=!!this.#n,this.#p=!!this.#i,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#t!==0&&!ve(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!ve(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=ve(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!ve(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#T()}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 z="LRU_CACHE_UNBOUNDED";yf(z)&&(Na.add(z),Pa("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,i))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#T(){let e=new Ye(this.#e),t=new Ye(this.#e);this.#w=e,this.#O=t,this.#N=(n,o,u=ze.now())=>{if(t[n]=o!==0?u:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#_(n)&&this.#M(this.#u[n],"expire")},o+1);a.unref&&a.unref()}},this.#C=n=>{t[n]=e[n]!==0?ze.now():0},this.#s=(n,o)=>{if(e[o]){let u=e[o],a=t[o];if(!u||!a)return;n.ttl=u,n.start=a,n.now=s||r();let h=n.now-a;n.remainingTTL=u-h}};let s=0,r=()=>{let n=ze.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=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 u=e[o],a=t[o];if(!u||!a)return 1/0;let h=(s||r())-a;return u-h},this.#_=n=>{let o=t[n],u=e[n];return!!u&&!!o&&(s||r())-o>u}}#C=()=>{};#s=()=>{};#N=()=>{};#_=()=>!1;#R(){let e=new Ye(this.#e);this.#c=0,this.#E=e,this.#P=t=>{this.#c-=e[t],e[t]=0},this.#F=(t,s,r,n)=>{if(this.#l(s))return 0;if(!ve(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,t),!ve(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.#L=(t,s,r)=>{if(e[t]=s,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#D(!0)}this.#c+=e[t],r&&(r.entrySize=s,r.totalCalculatedSize=this.#c)}}#P=e=>{};#L=(e,t,s)=>{};#F=(e,t,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#f;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#d));)t=this.#b[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#d;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#f));)t=this.#g[t]}#I(e){return e!==void 0&&this.#a.get(this.#u[e])===e}*entries(){for(let e of this.#k())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*rentries(){for(let e of this.#A())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*keys(){for(let e of this.#k()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*values(){for(let e of this.#k())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#A())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 s of this.#k()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#u[s],this))return this.get(this.#u[s],t)}}forEach(e,t=this){for(let s of this.#k()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#u[s],this)}}rforEach(e,t=this){for(let s of this.#A()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#u[s],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#_(t)&&(this.#M(this.#u[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let s=this.#r[t],r=this.#l(s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(this.#w&&this.#O){let o=this.#w[t],u=this.#O[t];if(o&&u){let a=o-(ze.now()-u);n.ttl=a,n.start=Date.now()}}return this.#E&&(n.size=this.#E[t]),n}dump(){let e=[];for(let t of this.#k({allowStale:!0})){let s=this.#u[t],r=this.#r[t],n=this.#l(r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#w&&this.#O){o.ttl=this.#w[t];let u=ze.now()-this.#O[t];o.start=Math.floor(Date.now()-u)}this.#E&&(o.size=this.#E[t]),e.unshift([s,o])}return e}load(e){this.clear();for(let[t,s]of e){if(s.start){let r=Date.now()-s.start;s.start=ze.now()-r}this.set(t,s.value,s)}}set(e,t,s={}){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:u=this.sizeCalculation,status:a}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,l=this.#F(e,t,s.size||0,u);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#M(e,"set"),this;let c=this.#h===0?void 0:this.#a.get(e);if(c===void 0)c=this.#h===0?this.#f:this.#x.length!==0?this.#x.pop():this.#h===this.#e?this.#D(!1):this.#h,this.#u[c]=e,this.#r[c]=t,this.#a.set(e,c),this.#g[this.#f]=c,this.#b[c]=this.#f,this.#f=c,this.#h++,this.#L(c,l,a),a&&(a.set="add"),h=!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:w}=g;w!==void 0&&!o&&(this.#v&&((d=this.#n)==null||d.call(this,w,e,"set")),this.#p&&((p=this.#m)==null||p.push([w,e,"set"])))}else o||(this.#v&&((m=this.#n)==null||m.call(this,g,e,"set")),this.#p&&((f=this.#m)==null||f.push([g,e,"set"])));if(this.#P(c),this.#L(c,l,a),this.#r[c]=t,a){a.set="replace";let w=g&&this.#l(g)?g.__staleWhileFetching:g;w!==void 0&&(a.oldValue=w)}}else a&&(a.set="update")}if(r!==0&&!this.#w&&this.#T(),this.#w&&(h||this.#N(c,r,n),a&&this.#s(a,c)),!o&&this.#p&&this.#m){let g=this.#m,w;for(;w=g==null?void 0:g.shift();)(b=this.#i)==null||b.call(this,...w)}return this}pop(){var e;try{for(;this.#h;){let t=this.#r[this.#d];if(this.#D(!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,s;for(;s=t==null?void 0:t.shift();)(e=this.#i)==null||e.call(this,...s)}}}#D(e){var n,o;let t=this.#d,s=this.#u[t],r=this.#r[t];return this.#S&&this.#l(r)?r.__abortController.abort(new Error("evicted")):(this.#v||this.#p)&&(this.#v&&((n=this.#n)==null||n.call(this,r,s,"evict")),this.#p&&((o=this.#m)==null||o.push([r,s,"evict"]))),this.#P(t),e&&(this.#u[t]=void 0,this.#r[t]=void 0,this.#x.push(t)),this.#h===1?(this.#d=this.#f=0,this.#x.length=0):this.#d=this.#g[t],this.#a.delete(s),this.#h--,t}has(e,t={}){let{updateAgeOnHas:s=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.#_(n))r&&(r.has="stale",this.#s(r,n));else return s&&this.#C(n),r&&(r.has="hit",this.#s(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:s=this.allowStale}=t,r=this.#a.get(e);if(r===void 0||!s&&this.#_(r))return;let n=this.#r[r];return this.#l(n)?n.__staleWhileFetching:n}#$(e,t,s,r){let n=t===void 0?void 0:this.#r[t];if(this.#l(n))return n;let o=new ls,{signal:u}=s;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:r},h=(f,b=!1)=>{let{aborted:g}=o.signal,w=s.ignoreFetchAbort&&f!==void 0;if(s.status&&(g&&!b?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,w&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!w&&!b)return c(o.signal.reason);let S=p;return this.#r[t]===p&&(f===void 0?S.__staleWhileFetching?this.#r[t]=S.__staleWhileFetching:this.#M(e,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=f),c(f)),c=f=>{let{aborted:b}=o.signal,g=b&&s.allowStaleOnFetchAbort,w=g||s.allowStaleOnFetchRejection,S=w||s.noDeleteOnFetchRejection,y=p;if(this.#r[t]===p&&(!S||y.__staleWhileFetching===void 0?this.#M(e,"fetch"):g||(this.#r[t]=y.__staleWhileFetching)),w)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw f},d=(f,b)=>{var w;let g=(w=this.#o)==null?void 0:w.call(this,e,n,a);g&&g instanceof Promise&&g.then(S=>f(S===void 0?void 0:S),b),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(f(void 0),s.allowStaleOnFetchAbort&&(f=S=>h(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(d).then(h,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 ls}async fetch(e,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:a=0,sizeCalculation:h=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:w}=t;if(!this.#S)return g&&(g.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:g});let S={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:u,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:w},y=this.#a.get(e);if(y===void 0){g&&(g.fetch="miss");let x=this.#$(e,y,S,f);return x.__returned=x}else{let x=this.#r[y];if(this.#l(x)){let Le=s&&x.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Le&&(g.returnedStale=!0)),Le?x.__staleWhileFetching:x.__returned=x}let E=this.#_(y);if(!b&&!E)return g&&(g.fetch="hit"),this.#W(y),r&&this.#C(y),g&&this.#s(g,y),x;let F=this.#$(e,y,S,f),W=F.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=E?"stale":"refresh",W&&E&&(g.returnedStale=!0)),W?F.__staleWhileFetching:F.__returned=F}}async forceFetch(e,t={}){let s=await this.fetch(e,t);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,t={}){let s=this.#y;if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=t,u=this.get(e,o);if(!n&&u!==void 0)return u;let a=s(e,u,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,u=this.#a.get(e);if(u!==void 0){let a=this.#r[u],h=this.#l(a);return o&&this.#s(o,u),this.#_(u)?(o&&(o.get="stale"),h?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(n||this.#M(e,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),h?a.__staleWhileFetching:(this.#W(u),r&&this.#C(u),a))}else o&&(o.get="miss")}#B(e,t){this.#b[t]=e,this.#g[e]=t}#W(e){e!==this.#f&&(e===this.#d?this.#d=this.#g[e]:this.#B(this.#b[e],this.#g[e]),this.#B(this.#f,e),this.#f=e)}delete(e){return this.#M(e,"delete")}#M(e,t){var r,n,o,u;let s=!1;if(this.#h!==0){let a=this.#a.get(e);if(a!==void 0)if(s=!0,this.#h===1)this.#j(t);else{this.#P(a);let h=this.#r[a];if(this.#l(h)?h.__abortController.abort(new Error("deleted")):(this.#v||this.#p)&&(this.#v&&((r=this.#n)==null||r.call(this,h,e,t)),this.#p&&((n=this.#m)==null||n.push([h,e,t]))),this.#a.delete(e),this.#u[a]=void 0,this.#r[a]=void 0,a===this.#f)this.#f=this.#b[a];else if(a===this.#d)this.#d=this.#g[a];else{let l=this.#b[a];this.#g[l]=this.#g[a];let c=this.#g[a];this.#b[c]=this.#b[a]}this.#h--,this.#x.push(a)}}if(this.#p&&((o=this.#m)!=null&&o.length)){let a=this.#m,h;for(;h=a==null?void 0:a.shift();)(u=this.#i)==null||u.call(this,...h)}return s}clear(){return this.#j("delete")}#j(e){var t,s,r;for(let n of this.#A({allowStale:!0})){let o=this.#r[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let u=this.#u[n];this.#v&&((t=this.#n)==null||t.call(this,o,u,e)),this.#p&&((s=this.#m)==null||s.push([o,u,e]))}}if(this.#a.clear(),this.#r.fill(void 0),this.#u.fill(void 0),this.#w&&this.#O&&(this.#w.fill(0),this.#O.fill(0)),this.#E&&this.#E.fill(0),this.#d=0,this.#f=0,this.#x.length=0,this.#c=0,this.#h=0,this.#p&&this.#m){let n=this.#m,o;for(;o=n==null?void 0:n.shift();)(r=this.#i)==null||r.call(this,...o)}}};var Je=require("node:path"),Va=require("node:url"),ce=require("fs"),Rf=T(require("node:fs"),1),Ee=require("node:fs/promises");var bs=require("node:events"),Xi=T(require("node:stream"),1),Ba=require("node:string_decoder"),Fa=typeof process=="object"&&process?process:{stdout:null,stderr:null},vf=i=>!!i&&typeof i=="object"&&(i instanceof xe||i instanceof Xi.default||Sf(i)||xf(i)),Sf=i=>!!i&&typeof i=="object"&&i instanceof bs.EventEmitter&&typeof i.pipe=="function"&&i.pipe!==Xi.default.Writable.prototype.pipe,xf=i=>!!i&&typeof i=="object"&&i instanceof bs.EventEmitter&&typeof i.write=="function"&&typeof i.end=="function",be=Symbol("EOF"),_e=Symbol("maybeEmitEnd"),Se=Symbol("emittedEnd"),cs=Symbol("emittingEnd"),St=Symbol("emittedError"),fs=Symbol("closed"),Ia=Symbol("read"),ds=Symbol("flush"),Da=Symbol("flushChunk"),re=Symbol("encoding"),Ke=Symbol("decoder"),N=Symbol("flowing"),xt=Symbol("paused"),Xe=Symbol("resume"),P=Symbol("buffer"),q=Symbol("pipes"),L=Symbol("bufferLength"),Vi=Symbol("bufferPush"),ps=Symbol("bufferShift"),$=Symbol("objectMode"),A=Symbol("destroyed"),Gi=Symbol("error"),Hi=Symbol("emitData"),$a=Symbol("emitEnd"),zi=Symbol("emitEnd2"),he=Symbol("async"),Yi=Symbol("abort"),ms=Symbol("aborted"),Et=Symbol("signal"),Ne=Symbol("dataListeners"),H=Symbol("discarded"),Ot=i=>Promise.resolve().then(i),Ef=i=>i(),Of=i=>i==="end"||i==="finish"||i==="prefinish",Cf=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,kf=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),gs=class{src;dest;opts;ondrain;constructor(e,t,s){this.src=e,this.dest=t,this.opts=s,this.ondrain=()=>e[Xe](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ki=class extends gs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,s){super(e,t,s),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},Af=i=>!!i.objectMode,Tf=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",xe=class extends bs.EventEmitter{[N]=!1;[xt]=!1;[q]=[];[P]=[];[$];[re];[he];[Ke];[be]=!1;[Se]=!1;[cs]=!1;[fs]=!1;[St]=null;[L]=0;[A]=!1;[Et];[ms]=!1;[Ne]=0;[H]=!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");Af(t)?(this[$]=!0,this[re]=null):Tf(t)?(this[re]=t.encoding,this[$]=!1):(this[$]=!1,this[re]=null),this[he]=!!t.async,this[Ke]=this[re]?new Ba.StringDecoder(this[re]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[q]});let{signal:s}=t;s&&(this[Et]=s,s.aborted?this[Yi]():s.addEventListener("abort",()=>this[Yi]()))}get bufferLength(){return this[L]}get encoding(){return this[re]}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[$]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[he]}set async(e){this[he]=this[he]||!!e}[Yi](){var e,t;this[ms]=!0,this.emit("abort",(e=this[Et])==null?void 0:e.reason),this.destroy((t=this[Et])==null?void 0:t.reason)}get aborted(){return this[ms]}set aborted(e){}write(e,t,s){var n;if(this[ms])return!1;if(this[be])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(s=t,t="utf8"),t||(t="utf8");let r=this[he]?Ot:Ef;if(!this[$]&&!Buffer.isBuffer(e)){if(kf(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Cf(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[$]?(this[N]&&this[L]!==0&&this[ds](!0),this[N]?this.emit("data",e):this[Vi](e),this[L]!==0&&this.emit("readable"),s&&r(s),this[N]):e.length?(typeof e=="string"&&!(t===this[re]&&!((n=this[Ke])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[re]&&(e=this[Ke].write(e)),this[N]&&this[L]!==0&&this[ds](!0),this[N]?this.emit("data",e):this[Vi](e),this[L]!==0&&this.emit("readable"),s&&r(s),this[N]):(this[L]!==0&&this.emit("readable"),s&&r(s),this[N])}read(e){if(this[A])return null;if(this[H]=!1,this[L]===0||e===0||e&&e>this[L])return this[_e](),null;this[$]&&(e=null),this[P].length>1&&!this[$]&&(this[P]=[this[re]?this[P].join(""):Buffer.concat(this[P],this[L])]);let t=this[Ia](e||null,this[P][0]);return this[_e](),t}[Ia](e,t){if(this[$])this[ps]();else{let s=t;e===s.length||e===null?this[ps]():typeof s=="string"?(this[P][0]=s.slice(e),t=s.slice(0,e),this[L]-=e):(this[P][0]=s.subarray(e),t=s.subarray(0,e),this[L]-=e)}return this.emit("data",t),!this[P].length&&!this[be]&&this.emit("drain"),t}end(e,t,s){return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t="utf8"),e!==void 0&&this.write(e,t),s&&this.once("end",s),this[be]=!0,this.writable=!1,(this[N]||!this[xt])&&this[_e](),this}[Xe](){this[A]||(!this[Ne]&&!this[q].length&&(this[H]=!0),this[xt]=!1,this[N]=!0,this.emit("resume"),this[P].length?this[ds]():this[be]?this[_e]():this.emit("drain"))}resume(){return this[Xe]()}pause(){this[N]=!1,this[xt]=!0,this[H]=!1}get destroyed(){return this[A]}get flowing(){return this[N]}get paused(){return this[xt]}[Vi](e){this[$]?this[L]+=1:this[L]+=e.length,this[P].push(e)}[ps](){return this[$]?this[L]-=1:this[L]-=this[P][0].length,this[P].shift()}[ds](e=!1){do;while(this[Da](this[ps]())&&this[P].length);!e&&!this[P].length&&!this[be]&&this.emit("drain")}[Da](e){return this.emit("data",e),this[N]}pipe(e,t){if(this[A])return e;this[H]=!1;let s=this[Se];return t=t||{},e===Fa.stdout||e===Fa.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,s?t.end&&e.end():(this[q].push(t.proxyErrors?new Ki(this,e,t):new gs(this,e,t)),this[he]?Ot(()=>this[Xe]()):this[Xe]()),e}unpipe(e){let t=this[q].find(s=>s.dest===e);t&&(this[q].length===1?(this[N]&&this[Ne]===0&&(this[N]=!1),this[q]=[]):this[q].splice(this[q].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let s=super.on(e,t);if(e==="data")this[H]=!1,this[Ne]++,!this[q].length&&!this[N]&&this[Xe]();else if(e==="readable"&&this[L]!==0)super.emit("readable");else if(Of(e)&&this[Se])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[St]){let r=t;this[he]?Ot(()=>r.call(this,this[St])):r.call(this,this[St])}return s}removeListener(e,t){return this.off(e,t)}off(e,t){let s=super.off(e,t);return e==="data"&&(this[Ne]=this.listeners("data").length,this[Ne]===0&&!this[H]&&!this[q].length&&(this[N]=!1)),s}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ne]=0,!this[H]&&!this[q].length&&(this[N]=!1)),t}get emittedEnd(){return this[Se]}[_e](){!this[cs]&&!this[Se]&&!this[A]&&this[P].length===0&&this[be]&&(this[cs]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fs]&&this.emit("close"),this[cs]=!1)}emit(e,...t){let s=t[0];if(e!=="error"&&e!=="close"&&e!==A&&this[A])return!1;if(e==="data")return!this[$]&&!s?!1:this[he]?(Ot(()=>this[Hi](s)),!0):this[Hi](s);if(e==="end")return this[$a]();if(e==="close"){if(this[fs]=!0,!this[Se]&&!this[A])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[St]=s,super.emit(Gi,s);let n=!this[Et]||this.listeners("error").length?super.emit("error",s):!1;return this[_e](),n}else if(e==="resume"){let n=super.emit("resume");return this[_e](),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[_e](),r}[Hi](e){for(let s of this[q])s.dest.write(e)===!1&&this.pause();let t=this[H]?!1:super.emit("data",e);return this[_e](),t}[$a](){return this[Se]?!1:(this[Se]=!0,this.readable=!1,this[he]?(Ot(()=>this[zi]()),!0):this[zi]())}[zi](){if(this[Ke]){let t=this[Ke].end();if(t){for(let s of this[q])s.dest.write(t);this[H]||super.emit("data",t)}}for(let t of this[q])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[$]||(e.dataLength=0);let t=this.promise();return this.on("data",s=>{e.push(s),this[$]||(e.dataLength+=s.length)}),await t,e}async concat(){if(this[$])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[re]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(A,()=>t(new Error("stream destroyed"))),this.on("error",s=>t(s)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[H]=!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[be])return t();let n,o,u=c=>{this.off("data",a),this.off("end",h),this.off(A,l),t(),o(c)},a=c=>{this.off("error",u),this.off("end",h),this.off(A,l),this.pause(),n({value:c,done:!!this[be]})},h=()=>{this.off("error",u),this.off("data",a),this.off(A,l),t(),n({done:!0,value:void 0})},l=()=>u(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(A,l),this.once("error",u),this.once("end",h),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[H]=!1;let e=!1,t=()=>(this.pause(),this.off(Gi,t),this.off(A,t),this.off("end",t),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(Gi,t),this.once(A,t),{next:s,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[A])return e?this.emit("error",e):this.emit(A),this;this[A]=!0,this[H]=!0,this[P].length=0,this[L]=0;let t=this;return typeof t.close=="function"&&!this[fs]&&t.close(),e?this.emit("error",e):this.emit(A),this}static get isStream(){return vf}};var Mf=ce.realpathSync.native,kt={lstatSync:ce.lstatSync,readdir:ce.readdir,readdirSync:ce.readdirSync,readlinkSync:ce.readlinkSync,realpathSync:Mf,promises:{lstat:Ee.lstat,readdir:Ee.readdir,readlink:Ee.readlink,realpath:Ee.realpath}},Ga=i=>!i||i===kt||i===Rf?kt:{...kt,...i,promises:{...kt.promises,...i.promises||{}}},Ha=/^\\\\\?\\([a-z]:)\\?$/i,Nf=i=>i.replace(/\//g,"\\").replace(Ha,"$1\\"),Pf=/[\\\/]/,Q=0,za=1,Ya=2,le=4,Ka=6,Xa=8,Pe=10,Ja=12,Z=15,Ct=~Z,Ji=16,Wa=32,At=64,ne=128,_s=256,ys=512,ja=At|ne|ys,Lf=1023,Zi=i=>i.isFile()?Xa:i.isDirectory()?le:i.isSymbolicLink()?Pe:i.isCharacterDevice()?Ya:i.isBlockDevice()?Ka:i.isSocket()?Ja:i.isFIFO()?za:Q,Ua=new Map,Tt=i=>{let e=Ua.get(i);if(e)return e;let t=i.normalize("NFKD");return Ua.set(i,t),t},qa=new Map,ws=i=>{let e=qa.get(i);if(e)return e;let t=Tt(i.toLowerCase());return qa.set(i,t),t},vs=class extends vt{constructor(){super({max:256})}},Qi=class extends vt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Za=Symbol("PathScurry setAsCwd"),B=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#y;get gid(){return this.#y}#h;get rdev(){return this.#h}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#u;get size(){return this.#u}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#b;get mtimeMs(){return this.#b}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#x;get atime(){return this.#x}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#O;get birthtime(){return this.#O}#w;#v;#S;#p;#T;#C;#s;#N;#_;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,s,r,n,o,u){this.name=e,this.#w=n?ws(e):Tt(e),this.#s=t&Lf,this.nocase=n,this.roots=r,this.root=s||this,this.#N=o,this.#S=u.fullpath,this.#T=u.relative,this.#C=u.relativePosix,this.parent=u.parent,this.parent?this.#e=this.parent.#e:this.#e=Ga(u.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#N}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#P(r):this.#P(r)}#P(e){let t=this;for(let s of e)t=t.child(s);return t}children(){let e=this.#N.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#N.set(this,t),this.#s&=~Ji,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let s=this.children(),r=this.nocase?ws(e):Tt(e);for(let a of s)if(a.#w===r)return a;let n=this.parent?this.sep:"",o=this.#S?this.#S+n+e:void 0,u=this.newChild(e,Q,{...t,parent:this,fullpath:o});return this.canReaddir()||(u.#s|=ne),s.push(u),u}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let s=t.relative();return s+(!s||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.fullpathPosix();let s=t.relativePosix();return s+(!s||!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(),s=t+(!t||!e.parent?"":"/")+this.name;return this.#p=s}isUnknown(){return(this.#s&Z)===Q}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.#s&Z)===Xa}isDirectory(){return(this.#s&Z)===le}isCharacterDevice(){return(this.#s&Z)===Ya}isBlockDevice(){return(this.#s&Z)===Ka}isFIFO(){return(this.#s&Z)===za}isSocket(){return(this.#s&Z)===Ja}isSymbolicLink(){return(this.#s&Pe)===Pe}lstatCached(){return this.#s&Wa?this:void 0}readlinkCached(){return this.#_}realpathCached(){return this.#R}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#_)return!0;if(!this.parent)return!1;let e=this.#s&Z;return!(e!==Q&&e!==Pe||this.#s&_s||this.#s&ne)}calledReaddir(){return!!(this.#s&Ji)}isENOENT(){return!!(this.#s&ne)}isNamed(e){return this.nocase?this.#w===ws(e):this.#w===Tt(e)}async readlink(){var t;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let s=await this.#e.promises.readlink(this.fullpath()),r=(t=await this.parent.realpath())==null?void 0:t.resolve(s);if(r)return this.#_=r}catch(s){this.#l(s.code);return}}readlinkSync(){var t;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let s=this.#e.readlinkSync(this.fullpath()),r=(t=this.parent.realpathSync())==null?void 0:t.resolve(s);if(r)return this.#_=r}catch(s){this.#l(s.code);return}}#L(e){this.#s|=Ji;for(let t=e.provisional;t<e.length;t++){let s=e[t];s&&s.#F()}}#F(){this.#s&ne||(this.#s=(this.#s|ne)&Ct,this.#k())}#k(){let e=this.children();e.provisional=0;for(let t of e)t.#F()}#A(){this.#s|=ys,this.#I()}#I(){if(this.#s&At)return;let e=this.#s;(e&Z)===le&&(e&=Ct),this.#s=e|At,this.#k()}#D(e=""){e==="ENOTDIR"||e==="EPERM"?this.#I():e==="ENOENT"?this.#F():this.children().provisional=0}#$(e=""){e==="ENOTDIR"?this.parent.#I():e==="ENOENT"&&this.#F()}#l(e=""){let t=this.#s;t|=_s,e==="ENOENT"&&(t|=ne),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Ct),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#I()}#B(e,t){return this.#M(e,t)||this.#W(e,t)}#W(e,t){let s=Zi(e),r=this.newChild(e.name,s,{parent:this}),n=r.#s&Z;return n!==le&&n!==Pe&&n!==Q&&(r.#s|=At),t.unshift(r),t.provisional++,r}#M(e,t){for(let s=t.provisional;s<t.length;s++){let r=t[s];if((this.nocase?ws(e.name):Tt(e.name))===r.#w)return this.#j(e,r,s,t)}}#j(e,t,s,r){let n=t.name;return t.#s=t.#s&Ct|Zi(e),n!==e.name&&(t.name=e.name),s!==r.provisional&&(s===r.length-1?r.pop():r.splice(s,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#s&ne))try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#$(e.code)}}lstatSync(){if(!(this.#s&ne))try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#$(e.code)}}#G(e){let{atime:t,atimeMs:s,birthtime:r,birthtimeMs:n,blksize:o,blocks:u,ctime:a,ctimeMs:h,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:b,rdev:g,size:w,uid:S}=e;this.#x=t,this.#g=s,this.#O=r,this.#f=n,this.#c=o,this.#r=u,this.#E=a,this.#d=h,this.#t=l,this.#y=c,this.#a=d,this.#n=p,this.#m=m,this.#b=f,this.#i=b,this.#h=g,this.#u=w,this.#o=S;let y=Zi(e);this.#s=this.#s&Ct|y|Wa,y!==Q&&y!==le&&y!==Pe&&(this.#s|=At)}#q=[];#V=!1;#H(e){this.#V=!1;let t=this.#q.slice();this.#q.length=0,t.forEach(s=>s(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let s=this.children();if(this.calledReaddir()){let n=s.slice(0,s.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#q.push(e),this.#V)return;this.#V=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(n,o)=>{if(n)this.#D(n.code),s.provisional=0;else{for(let u of o)this.#B(u,s);this.#L(s)}this.#H(s.slice(0,s.provisional))})}#U;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.#U)await this.#U;else{let s=()=>{};this.#U=new Promise(r=>s=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#B(r,e);this.#L(e)}catch(r){this.#D(r.code),e.provisional=0}this.#U=void 0,s()}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 s of this.#e.readdirSync(t,{withFileTypes:!0}))this.#B(s,e);this.#L(e)}catch(s){this.#D(s.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&ja)return!1;let e=Z&this.#s;return e===Q||e===le||e===Pe}shouldWalk(e,t){return(this.#s&le)===le&&!(this.#s&ja)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#R)return this.#R;if(!((ys|_s|ne)&this.#s))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#R=this.resolve(e)}catch{this.#A()}}realpathSync(){if(this.#R)return this.#R;if(!((ys|_s|ne)&this.#s))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#A()}}[Za](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),s=[],r=this;for(;r&&r.parent;)t.add(r),r.#T=s.join(this.sep),r.#C=s.join("/"),r=r.parent,s.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#T=void 0,r.#C=void 0,r=r.parent}},Ss=class i extends B{sep="\\";splitSep=Pf;constructor(e,t=Q,s,r,n,o,u){super(e,t,s,r,n,o,u)}newChild(e,t=Q,s={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(e){return Je.win32.parse(e).root}getRoot(e){if(e=Nf(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,s]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=s;return this.roots[e]=new Ze(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ha,"$1\\"),e===t}},xs=class i extends B{splitSep="/";sep="/";constructor(e,t=Q,s,r,n,o,u){super(e,t,s,r,n,o,u)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,s={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Es=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#i;constructor(e=process.cwd(),t,s,{nocase:r,childrenCacheSize:n=16*1024,fs:o=kt}={}){this.#i=Ga(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Va.fileURLToPath)(e));let u=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#e=new vs,this.#t=new vs,this.#n=new Qi(n);let a=u.substring(this.rootPath.length).split(s);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.#i),this.roots[this.rootPath]=this.root;let h=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;h=h.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=h}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 s=this.#e.get(t);if(s!==void 0)return s;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 s=this.#t.get(t);if(s!==void 0)return s;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 B||(t=e,e=this.cwd);let{withFileTypes:s}=t;if(e.canReaddir()){let r=await e.readdir();return s?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 B||(t=e,e=this.cwd);let{withFileTypes:s=!0}=t;return e.canReaddir()?s?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 B||(t=e.withFileTypes,e=this.cwd);let s=await e.readlink();return t?s:s==null?void 0:s.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e.withFileTypes,e=this.cwd);let s=e.readlinkSync();return t?s:s==null?void 0:s.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e.withFileTypes,e=this.cwd);let s=await e.realpath();return t?s:s==null?void 0:s.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e.withFileTypes,e=this.cwd);let s=e.realpathSync();return t?s:s==null?void 0:s.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(s?e:e.fullpath());let a=new Set,h=(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))&&u.push(s?g:g.fullpath()),r&&g.isSymbolicLink()?g.realpath().then(w=>w!=null&&w.isUnknown()?w.lstat():w).then(w=>w!=null&&w.shouldWalk(a,o)?h(w,b):b()):g.shouldWalk(a,o)?h(g,b):b()},!0)},l=e;return new Promise((c,d)=>{h(l,p=>{if(p)return d(p);c(u)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(s?e:e.fullpath());let a=new Set([e]);for(let h of a){let l=h.readdirSync();for(let c of l){(!n||n(c))&&u.push(s?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 u}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(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 B||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield s?e:e.fullpath());let u=new Set([e]);for(let a of u){let h=a.readdirSync();for(let l of h){(!n||n(l))&&(yield s?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(r&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(u,o)&&u.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=new xe({objectMode:!0});(!n||n(e))&&u.write(s?e:e.fullpath());let a=new Set,h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=(b,g,w=!1)=>{if(b)return u.emit("error",b);if(r&&!w){let S=[];for(let y of g)y.isSymbolicLink()&&S.push(y.realpath().then(x=>x!=null&&x.isUnknown()?x.lstat():x));if(S.length){Promise.all(S).then(()=>m(null,g,!0));return}}for(let S of g)S&&(!n||n(S))&&(u.write(s?S:S.fullpath())||(d=!0));l--;for(let S of g){let y=S.realpathCached()||S;y.shouldWalk(a,o)&&h.push(y)}d&&!u.flowing?u.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),u}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof B||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=new xe({objectMode:!0}),a=new Set;(!n||n(e))&&u.write(s?e:e.fullpath());let h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(u.write(s?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)&&h.push(b)}}d&&!u.flowing&&u.once("drain",c)};return c(),u}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Za](t)}},Ze=class extends Es{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:s=!0}=t;super(e,Je.win32,"\\",{...t,nocase:s}),this.nocase=s;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return Je.win32.parse(e).root.toUpperCase()}newRoot(e){return new Ss(this.rootPath,le,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Qe=class extends Es{sep="/";constructor(e=process.cwd(),t={}){let{nocase:s=!1}=t;super(e,Je.posix,"/",{...t,nocase:s}),this.nocase=s}parseRootPath(e){return"/"}newRoot(e){return new xs(this.rootPath,le,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rt=class extends Qe{constructor(e=process.cwd(),t={}){let{nocase:s=!0}=t;super(e,{...t,nocase:s})}},Ip=process.platform==="win32"?Ss:xs,Qa=process.platform==="win32"?Ze:process.platform==="darwin"?Rt:Qe;var Ff=i=>i.length>=1,If=i=>i.length>=1,et=class i{#e;#t;#n;length;#i;#o;#y;#h;#c;#a;#u=!0;constructor(e,t,s,r){if(!Ff(e))throw new TypeError("empty pattern list");if(!If(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,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#n=s,this.#i=r,this.#n===0){if(this.isUNC()){let[n,o,u,a,...h]=this.#e,[l,c,d,p,...m]=this.#t;h[0]===""&&(h.shift(),m.shift());let f=[n,o,u,a,""].join("/"),b=[l,c,d,p,""].join("/");this.#e=[f,...h],this.#t=[b,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[u,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let h=n+"/",l=u+"/";this.#e=[h,...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]===I}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#y=this.#y||(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 i(this.#e,this.#t,this.#n+1,this.#i),this.#o.#a=this.#a,this.#o.#c=this.#c,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#i==="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.#h!==void 0?this.#h:this.#h=this.#i==="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.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var Df=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",tt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:s,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:s,noext:r,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let u of e)this.add(u)}add(e){let t=new G(e,this.mmopts);for(let s=0;s<t.set.length;s++){let r=t.set[s],n=t.globParts[s];if(!r||!n)throw new Error("invalid pattern object");for(;r[0]==="."&&n[0]===".";)r.shift(),n.shift();let o=new et(r,n,0,this.platform),u=new G(o.globString(),this.mmopts),a=n[n.length-1]==="**",h=o.isAbsolute();h?this.absolute.push(u):this.relative.push(u),a&&(h?this.absoluteChildren.push(u):this.relativeChildren.push(u))}}ignored(e){let t=e.fullpath(),s=`${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(s))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",s=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(s))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}};var er=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){var s;return(s=this.store.get(e.fullpath()))==null?void 0:s.has(t.globString())}storeWalked(e,t){let s=e.fullpath(),r=this.store.get(s);r?r.add(t.globString()):this.store.set(s,new Set([t.globString()]))}},tr=class{store=new Map;add(e,t,s){let r=(t?2:0)|(s?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)])}},sr=class{store=new Map;add(e,t){if(!e.canReaddir())return;let s=this.store.get(e);s?s.find(r=>r.globString()===t.globString())||s.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())}},Mt=class i{hasWalkedCache;matches=new tr;subwalks=new sr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new er}processPatterns(e,t){this.patterns=t;let s=t.map(r=>[e,r]);for(let[r,n]of s){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),u=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,h,l=!1;for(;typeof(a=n.pattern())=="string"&&(h=n.rest());)r=r.resolve(a),n=h,l=!0;if(a=n.pattern(),h=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),u,c);continue}else if(a===I){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let c=h==null?void 0:h.pattern(),d=h==null?void 0:h.rest();if(!h||(c===""||c===".")&&!d)this.matches.add(r,u,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,u,!0)}}else a instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let s=this.subwalks.get(e),r=this.child();for(let n of t)for(let o of s){let u=o.isAbsolute(),a=o.pattern(),h=o.rest();a===I?r.testGlobstar(n,o,h,u):a instanceof RegExp?r.testRegExp(n,a,h,u):r.testString(n,a,h,u)}return r}testGlobstar(e,t,s,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()&&(s&&t.checkFollowGlobstar()?this.subwalks.add(e,s):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),s){let n=s.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,s.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,s)}else n instanceof RegExp&&this.testRegExp(e,n,s.rest(),r)}}testRegExp(e,t,s,r){t.test(e.name)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}testString(e,t,s,r){e.isNamed(t)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}};var $f=(i,e)=>typeof i=="string"?new tt([i],e):Array.isArray(i)?new tt(i,e):i,Os=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,s){if(this.patterns=e,this.path=t,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#t=$f(s.ignore??[],s),!this.includeChildMatches&&typeof this.#t.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){var t,s;return this.seen.has(e)||!!((s=(t=this.#t)==null?void 0:t.ignored)!=null&&s.call(t,e))}#o(e){var t,s;return!!((s=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&s.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 s;if(this.opts.realpath){if(s=e.realpathCached()||await e.realpath(),!s)return;e=s}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 s;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()||!((s=e.realpathCached())!=null&&s.isDirectory()))&&!this.#i(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=e.realpathCached()||e.realpathSync(),!s)return;e=s}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.#i(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let s=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(s){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+r)}else{let o=this.opts.posix?e.relativePosix():e.relative(),u=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?u+o+r:"."+r)}}async match(e,t,s){let r=await this.matchCheck(e,s);r&&this.matchFinish(r,t)}matchSync(e,t,s){let r=this.matchCheckSync(e,s);r&&this.matchFinish(r,t)}walkCB(e,t,s){var r;(r=this.signal)!=null&&r.aborted&&s(),this.walkCB2(e,t,new Mt(this.opts),s)}walkCB2(e,t,s,r){var u;if(this.#o(e))return r();if((u=this.signal)!=null&&u.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,s,r));return}s.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,h,l]of s.matches.entries())this.#i(a)||(n++,this.match(a,h,l).then(()=>o()));for(let a of s.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirCached();a.calledReaddir()?this.walkCB3(a,h,s,o):a.readdirCB((l,c)=>this.walkCB3(a,c,s,o),!0)}o()}walkCB3(e,t,s,r){s=s.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[u,a,h]of s.matches.entries())this.#i(u)||(n++,this.match(u,a,h).then(()=>o()));for(let[u,a]of s.subwalks.entries())n++,this.walkCB2(u,a,s.child(),o);o()}walkCBSync(e,t,s){var r;(r=this.signal)!=null&&r.aborted&&s(),this.walkCB2Sync(e,t,new Mt(this.opts),s)}walkCB2Sync(e,t,s,r){var u;if(this.#o(e))return r();if((u=this.signal)!=null&&u.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,s,r));return}s.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,h,l]of s.matches.entries())this.#i(a)||this.matchSync(a,h,l);for(let a of s.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirSync();this.walkCB3Sync(a,h,s,o)}o()}walkCB3Sync(e,t,s,r){s=s.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[u,a,h]of s.matches.entries())this.#i(u)||this.matchSync(u,a,h);for(let[u,a]of s.subwalks.entries())n++,this.walkCB2Sync(u,a,s.child(),o);o()}},Nt=class extends Os{matches=new Set;constructor(e,t,s){super(e,t,s)}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,s)=>{this.walkCB(this.path,this.patterns,()=>{var r;(r=this.signal)!=null&&r.aborted?s(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}},Pt=class extends Os{results;constructor(e,t,s){super(e,t,s),this.results=new xe({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 Bf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",oe=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,eu.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||Bf,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"?Ze:t.platform==="darwin"?Rt:t.platform?Qe:Qa;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,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 G(a,r)),[o,u]=n.reduce((a,h)=>(a[0].push(...h.set),a[1].push(...h.globParts),a),[[],[]]);this.patterns=o.map((a,h)=>{let l=u[h];if(!l)throw new Error("invalid pattern object");return new et(a,l,0,this.platform)})}async walk(){return[...await new Nt(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 Nt(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 Pt(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 Pt(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 ir=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new G(t,e).hasMagic())return!0;return!1};function ks(i,e={}){return new oe(i,e).streamSync()}function su(i,e={}){return new oe(i,e).stream()}function iu(i,e={}){return new oe(i,e).walkSync()}async function tu(i,e={}){return new oe(i,e).walk()}function As(i,e={}){return new oe(i,e).iterateSync()}function ru(i,e={}){return new oe(i,e).iterate()}var Wf=ks,jf=Object.assign(su,{sync:ks}),Uf=As,qf=Object.assign(ru,{sync:As}),Vf=Object.assign(iu,{stream:ks,iterate:As}),Cs=Object.assign(tu,{glob:tu,globSync:iu,sync:Vf,globStream:su,stream:jf,globStreamSync:ks,streamSync:Wf,globIterate:ru,iterate:qf,globIterateSync:As,iterateSync:Uf,Glob:oe,hasMagic:ir,escape:He,unescape:ie});Cs.glob=Cs;var st=T(require("node:path"),1);var nu=T(require("node:process"),1),ou=T(require("node:path"),1),Ts=T(require("node:fs"),1),au=require("node:url");var uu={directory:"isDirectory",file:"isFile"};function Gf(i){if(!Object.hasOwnProperty.call(uu,i))throw new Error(`Invalid type specified: ${i}`)}var Hf=(i,e)=>e[uu[i]](),zf=i=>i instanceof URL?(0,au.fileURLToPath)(i):i;function rr(i,{cwd:e=nu.default.cwd(),type:t="file",allowSymlinks:s=!0}={}){Gf(t),e=zf(e);let r=s?Ts.default.statSync:Ts.default.lstatSync;for(let n of i)try{let o=r(ou.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if(Hf(t,o))return n}catch{}}var hu=require("node:url");function nr(i){return i instanceof URL?(0,hu.fileURLToPath)(i):i}var Yf=Symbol("findUpStop");function Kf(i,e={}){let t=st.default.resolve(nr(e.cwd)??""),{root:s}=st.default.parse(t),r=st.default.resolve(t,nr(e.stopAt)??s),n=e.limit??Number.POSITIVE_INFINITY,o=[i].flat(),u=h=>{if(typeof i!="function")return rr(o,h);let l=i(h.cwd);return typeof l=="string"?rr([l],h):l},a=[];for(;;){let h=u({...e,cwd:t});if(h===Yf||(h&&a.push(st.default.resolve(t,h)),t===r||a.length>=n))break;t=st.default.dirname(t)}return a}function lu(i,e={}){return Kf(i,{...e,limit:1})[0]}var Ms=T(require("node:process"),1),fu=T(require("node:os"),1),or=T(require("node:tty"),1);function ee(i,e=globalThis.Deno?globalThis.Deno.args:Ms.default.argv){let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1||s<r)}var{env:C}=Ms.default,Rs;ee("no-color")||ee("no-colors")||ee("color=false")||ee("color=never")?Rs=0:(ee("color")||ee("colors")||ee("color=true")||ee("color=always"))&&(Rs=1);function Xf(){if("FORCE_COLOR"in C)return C.FORCE_COLOR==="true"?1:C.FORCE_COLOR==="false"?0:C.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(C.FORCE_COLOR,10),3)}function Jf(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Zf(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=Xf();s!==void 0&&(Rs=s);let r=t?Rs:s;if(r===0)return 0;if(t){if(ee("color=16m")||ee("color=full")||ee("color=truecolor"))return 3;if(ee("color=256"))return 2}if("TF_BUILD"in C&&"AGENT_NAME"in C)return 1;if(i&&!e&&r===void 0)return 0;let n=r||0;if(C.TERM==="dumb")return n;if(Ms.default.platform==="win32"){let o=fu.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in C)return"GITHUB_ACTIONS"in C||"GITEA_ACTIONS"in C?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in C)||C.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in C)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION)?1:0;if(C.COLORTERM==="truecolor"||C.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in C){let o=Number.parseInt((C.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(C.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||"COLORTERM"in C?1:n}function cu(i,e={}){let t=Zf(i,{streamIsTTY:i&&i.isTTY,...e});return Jf(t)}var Qf={stdout:cu({isTTY:or.default.isatty(1)}),stderr:cu({isTTY:or.default.isatty(2)})},du=Qf;0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});
|
|
37
|
+
>>> 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&&u===h)return!0;if(o===a)return s;if(u===h)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Ta(this.pattern,this.options)}parse(e){wt(e);let t=this.options;if(e==="**")return I;if(e==="")return"";let s,r=null;(s=e.match(tf))?r=t.dot?rf:sf:(s=e.match(Gc))?r=(t.nocase?t.dot?Kc:Yc:t.dot?zc:Hc)(s[1]):(s=e.match(nf))?r=(t.nocase?t.dot?af:of:t.dot?uf:hf)(s):(s=e.match(Xc))?r=t.dot?Zc:Jc:(s=e.match(Qc))&&(r=ef);let n=Ge.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,s=t.noglobstar?ff:t.dot?df:pf,r=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let h=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))r.add(c);return typeof l=="string"?wf(l):l===I?I:l._src});return h.forEach((l,c)=>{let d=h[c+1],p=h[c-1];l!==I||p===I||(p===void 0?d!==void 0&&d!==I?h[c+1]="(?:\\/|"+s+"\\/)?"+d:h[c]=s:d===void 0?h[c-1]=p+"(?:\\/|"+s+")?":d!==I&&(h[c-1]=p+"(?:\\/|\\/"+s+"\\/)"+d,h[c+1]=I))}),h.filter(l=>l!==I).join("/")}).join("|"),[o,u]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+u+"$",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 s=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 u=r.length-2;!o&&u>=0;u--)o=r[u];for(let u=0;u<n.length;u++){let a=n[u],h=r;if(s.matchBase&&a.length===1&&(h=[o]),this.matchOne(h,a,t))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return U.defaults(e).Minimatch}};U.AST=Ge;U.Minimatch=G;U.escape=He;U.unescape=ie;var eu=require("node:url");var ze=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Na=new Set,Ui=typeof process=="object"&&process?process:{},Pa=(i,e,t,s)=>{typeof Ui.emitWarning=="function"?Ui.emitWarning(i,e,t,s):console.error(`[${t}] ${e}: ${i}`)},ls=globalThis.AbortController,Ra=globalThis.AbortSignal,Ma;if(typeof ls>"u"){Ra=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,r){this._onabort.push(r)}},ls=class{constructor(){e()}signal=new Ra;abort(s){var r,n;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let o of this.signal._onabort)o(s);(n=(r=this.signal).onabort)==null||n.call(r,s)}}};let i=((Ma=Ui.env)==null?void 0:Ma.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{i&&(i=!1,Pa("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 yf=i=>!Na.has(i),Mp=Symbol("type"),ve=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),La=i=>ve(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Ye:null:null,Ye=class extends Array{constructor(e){super(e),this.fill(0)}},qi=class i{heap;length;static#e=!1;static create(e){let t=La(e);if(!t)return[];i.#e=!0;let s=new i(e,t);return i.#e=!1,s}constructor(e,t){if(!i.#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]}},vt=class i{#e;#t;#n;#i;#o;#y;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#c;#a;#u;#r;#g;#b;#d;#f;#S;#m;#E;#O;#w;#v;#x;#p;static unsafeExposeInternals(e){return{starts:e.#O,ttls:e.#w,sizes:e.#E,keyMap:e.#a,keyList:e.#u,valList:e.#r,next:e.#g,prev:e.#b,get head(){return e.#d},get tail(){return e.#f},free:e.#S,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,s,r,n)=>e.#B(t,s,r,n),moveToTail:t=>e.#W(t),indexes:t=>e.#k(t),rindexes:t=>e.#A(t),isStale:t=>e.#_(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#h}get fetchMethod(){return this.#o}get memoMethod(){return this.#y}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:b,memoMethod:g,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:S,ignoreFetchAbort:E}=e;if(t!==0&&!ve(t))throw new TypeError("max option must be a nonnegative integer");let F=t?La(t):Array;if(!F)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.#y=g,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=b,this.#x=!!b,this.#a=new Map,this.#u=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new F(t),this.#b=new F(t),this.#d=0,this.#f=0,this.#S=qi.create(t),this.#h=0,this.#c=0,typeof h=="function"&&(this.#n=h),typeof l=="function"?(this.#i=l,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#v=!!this.#n,this.#p=!!this.#i,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#t!==0&&!ve(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!ve(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=ve(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!ve(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#T()}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 z="LRU_CACHE_UNBOUNDED";yf(z)&&(Na.add(z),Pa("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,i))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#T(){let e=new Ye(this.#e),t=new Ye(this.#e);this.#w=e,this.#O=t,this.#N=(n,o,u=ze.now())=>{if(t[n]=o!==0?u:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#_(n)&&this.#M(this.#u[n],"expire")},o+1);a.unref&&a.unref()}},this.#C=n=>{t[n]=e[n]!==0?ze.now():0},this.#s=(n,o)=>{if(e[o]){let u=e[o],a=t[o];if(!u||!a)return;n.ttl=u,n.start=a,n.now=s||r();let h=n.now-a;n.remainingTTL=u-h}};let s=0,r=()=>{let n=ze.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=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 u=e[o],a=t[o];if(!u||!a)return 1/0;let h=(s||r())-a;return u-h},this.#_=n=>{let o=t[n],u=e[n];return!!u&&!!o&&(s||r())-o>u}}#C=()=>{};#s=()=>{};#N=()=>{};#_=()=>!1;#R(){let e=new Ye(this.#e);this.#c=0,this.#E=e,this.#P=t=>{this.#c-=e[t],e[t]=0},this.#F=(t,s,r,n)=>{if(this.#l(s))return 0;if(!ve(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,t),!ve(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.#L=(t,s,r)=>{if(e[t]=s,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#D(!0)}this.#c+=e[t],r&&(r.entrySize=s,r.totalCalculatedSize=this.#c)}}#P=e=>{};#L=(e,t,s)=>{};#F=(e,t,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#f;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#d));)t=this.#b[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#d;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#f));)t=this.#g[t]}#I(e){return e!==void 0&&this.#a.get(this.#u[e])===e}*entries(){for(let e of this.#k())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*rentries(){for(let e of this.#A())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*keys(){for(let e of this.#k()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*values(){for(let e of this.#k())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#A())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 s of this.#k()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#u[s],this))return this.get(this.#u[s],t)}}forEach(e,t=this){for(let s of this.#k()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#u[s],this)}}rforEach(e,t=this){for(let s of this.#A()){let r=this.#r[s],n=this.#l(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#u[s],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#_(t)&&(this.#M(this.#u[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let s=this.#r[t],r=this.#l(s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(this.#w&&this.#O){let o=this.#w[t],u=this.#O[t];if(o&&u){let a=o-(ze.now()-u);n.ttl=a,n.start=Date.now()}}return this.#E&&(n.size=this.#E[t]),n}dump(){let e=[];for(let t of this.#k({allowStale:!0})){let s=this.#u[t],r=this.#r[t],n=this.#l(r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#w&&this.#O){o.ttl=this.#w[t];let u=ze.now()-this.#O[t];o.start=Math.floor(Date.now()-u)}this.#E&&(o.size=this.#E[t]),e.unshift([s,o])}return e}load(e){this.clear();for(let[t,s]of e){if(s.start){let r=Date.now()-s.start;s.start=ze.now()-r}this.set(t,s.value,s)}}set(e,t,s={}){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:u=this.sizeCalculation,status:a}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,l=this.#F(e,t,s.size||0,u);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#M(e,"set"),this;let c=this.#h===0?void 0:this.#a.get(e);if(c===void 0)c=this.#h===0?this.#f:this.#S.length!==0?this.#S.pop():this.#h===this.#e?this.#D(!1):this.#h,this.#u[c]=e,this.#r[c]=t,this.#a.set(e,c),this.#g[this.#f]=c,this.#b[c]=this.#f,this.#f=c,this.#h++,this.#L(c,l,a),a&&(a.set="add"),h=!1;else{this.#W(c);let g=this.#r[c];if(t!==g){if(this.#x&&this.#l(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:w}=g;w!==void 0&&!o&&(this.#v&&((d=this.#n)==null||d.call(this,w,e,"set")),this.#p&&((p=this.#m)==null||p.push([w,e,"set"])))}else o||(this.#v&&((m=this.#n)==null||m.call(this,g,e,"set")),this.#p&&((f=this.#m)==null||f.push([g,e,"set"])));if(this.#P(c),this.#L(c,l,a),this.#r[c]=t,a){a.set="replace";let w=g&&this.#l(g)?g.__staleWhileFetching:g;w!==void 0&&(a.oldValue=w)}}else a&&(a.set="update")}if(r!==0&&!this.#w&&this.#T(),this.#w&&(h||this.#N(c,r,n),a&&this.#s(a,c)),!o&&this.#p&&this.#m){let g=this.#m,w;for(;w=g==null?void 0:g.shift();)(b=this.#i)==null||b.call(this,...w)}return this}pop(){var e;try{for(;this.#h;){let t=this.#r[this.#d];if(this.#D(!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,s;for(;s=t==null?void 0:t.shift();)(e=this.#i)==null||e.call(this,...s)}}}#D(e){var n,o;let t=this.#d,s=this.#u[t],r=this.#r[t];return this.#x&&this.#l(r)?r.__abortController.abort(new Error("evicted")):(this.#v||this.#p)&&(this.#v&&((n=this.#n)==null||n.call(this,r,s,"evict")),this.#p&&((o=this.#m)==null||o.push([r,s,"evict"]))),this.#P(t),e&&(this.#u[t]=void 0,this.#r[t]=void 0,this.#S.push(t)),this.#h===1?(this.#d=this.#f=0,this.#S.length=0):this.#d=this.#g[t],this.#a.delete(s),this.#h--,t}has(e,t={}){let{updateAgeOnHas:s=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.#_(n))r&&(r.has="stale",this.#s(r,n));else return s&&this.#C(n),r&&(r.has="hit",this.#s(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:s=this.allowStale}=t,r=this.#a.get(e);if(r===void 0||!s&&this.#_(r))return;let n=this.#r[r];return this.#l(n)?n.__staleWhileFetching:n}#B(e,t,s,r){let n=t===void 0?void 0:this.#r[t];if(this.#l(n))return n;let o=new ls,{signal:u}=s;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:r},h=(f,b=!1)=>{let{aborted:g}=o.signal,w=s.ignoreFetchAbort&&f!==void 0;if(s.status&&(g&&!b?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,w&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!w&&!b)return c(o.signal.reason);let x=p;return this.#r[t]===p&&(f===void 0?x.__staleWhileFetching?this.#r[t]=x.__staleWhileFetching:this.#M(e,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=f),c(f)),c=f=>{let{aborted:b}=o.signal,g=b&&s.allowStaleOnFetchAbort,w=g||s.allowStaleOnFetchRejection,x=w||s.noDeleteOnFetchRejection,y=p;if(this.#r[t]===p&&(!x||y.__staleWhileFetching===void 0?this.#M(e,"fetch"):g||(this.#r[t]=y.__staleWhileFetching)),w)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw f},d=(f,b)=>{var w;let g=(w=this.#o)==null?void 0:w.call(this,e,n,a);g&&g instanceof Promise&&g.then(x=>f(x===void 0?void 0:x),b),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(f(void 0),s.allowStaleOnFetchAbort&&(f=x=>h(x,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(d).then(h,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.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ls}async fetch(e,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:a=0,sizeCalculation:h=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:w}=t;if(!this.#x)return g&&(g.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:g});let x={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:u,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:w},y=this.#a.get(e);if(y===void 0){g&&(g.fetch="miss");let S=this.#B(e,y,x,f);return S.__returned=S}else{let S=this.#r[y];if(this.#l(S)){let Le=s&&S.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Le&&(g.returnedStale=!0)),Le?S.__staleWhileFetching:S.__returned=S}let E=this.#_(y);if(!b&&!E)return g&&(g.fetch="hit"),this.#W(y),r&&this.#C(y),g&&this.#s(g,y),S;let F=this.#B(e,y,x,f),W=F.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=E?"stale":"refresh",W&&E&&(g.returnedStale=!0)),W?F.__staleWhileFetching:F.__returned=F}}async forceFetch(e,t={}){let s=await this.fetch(e,t);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,t={}){let s=this.#y;if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=t,u=this.get(e,o);if(!n&&u!==void 0)return u;let a=s(e,u,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,u=this.#a.get(e);if(u!==void 0){let a=this.#r[u],h=this.#l(a);return o&&this.#s(o,u),this.#_(u)?(o&&(o.get="stale"),h?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(n||this.#M(e,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),h?a.__staleWhileFetching:(this.#W(u),r&&this.#C(u),a))}else o&&(o.get="miss")}#$(e,t){this.#b[t]=e,this.#g[e]=t}#W(e){e!==this.#f&&(e===this.#d?this.#d=this.#g[e]:this.#$(this.#b[e],this.#g[e]),this.#$(this.#f,e),this.#f=e)}delete(e){return this.#M(e,"delete")}#M(e,t){var r,n,o,u;let s=!1;if(this.#h!==0){let a=this.#a.get(e);if(a!==void 0)if(s=!0,this.#h===1)this.#j(t);else{this.#P(a);let h=this.#r[a];if(this.#l(h)?h.__abortController.abort(new Error("deleted")):(this.#v||this.#p)&&(this.#v&&((r=this.#n)==null||r.call(this,h,e,t)),this.#p&&((n=this.#m)==null||n.push([h,e,t]))),this.#a.delete(e),this.#u[a]=void 0,this.#r[a]=void 0,a===this.#f)this.#f=this.#b[a];else if(a===this.#d)this.#d=this.#g[a];else{let l=this.#b[a];this.#g[l]=this.#g[a];let c=this.#g[a];this.#b[c]=this.#b[a]}this.#h--,this.#S.push(a)}}if(this.#p&&((o=this.#m)!=null&&o.length)){let a=this.#m,h;for(;h=a==null?void 0:a.shift();)(u=this.#i)==null||u.call(this,...h)}return s}clear(){return this.#j("delete")}#j(e){var t,s,r;for(let n of this.#A({allowStale:!0})){let o=this.#r[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let u=this.#u[n];this.#v&&((t=this.#n)==null||t.call(this,o,u,e)),this.#p&&((s=this.#m)==null||s.push([o,u,e]))}}if(this.#a.clear(),this.#r.fill(void 0),this.#u.fill(void 0),this.#w&&this.#O&&(this.#w.fill(0),this.#O.fill(0)),this.#E&&this.#E.fill(0),this.#d=0,this.#f=0,this.#S.length=0,this.#c=0,this.#h=0,this.#p&&this.#m){let n=this.#m,o;for(;o=n==null?void 0:n.shift();)(r=this.#i)==null||r.call(this,...o)}}};var Je=require("node:path"),Va=require("node:url"),ce=require("fs"),Rf=T(require("node:fs"),1),Ee=require("node:fs/promises");var bs=require("node:events"),Xi=T(require("node:stream"),1),$a=require("node:string_decoder"),Fa=typeof process=="object"&&process?process:{stdout:null,stderr:null},vf=i=>!!i&&typeof i=="object"&&(i instanceof Se||i instanceof Xi.default||xf(i)||Sf(i)),xf=i=>!!i&&typeof i=="object"&&i instanceof bs.EventEmitter&&typeof i.pipe=="function"&&i.pipe!==Xi.default.Writable.prototype.pipe,Sf=i=>!!i&&typeof i=="object"&&i instanceof bs.EventEmitter&&typeof i.write=="function"&&typeof i.end=="function",be=Symbol("EOF"),_e=Symbol("maybeEmitEnd"),xe=Symbol("emittedEnd"),cs=Symbol("emittingEnd"),xt=Symbol("emittedError"),fs=Symbol("closed"),Ia=Symbol("read"),ds=Symbol("flush"),Da=Symbol("flushChunk"),re=Symbol("encoding"),Ke=Symbol("decoder"),N=Symbol("flowing"),St=Symbol("paused"),Xe=Symbol("resume"),P=Symbol("buffer"),q=Symbol("pipes"),L=Symbol("bufferLength"),Vi=Symbol("bufferPush"),ps=Symbol("bufferShift"),B=Symbol("objectMode"),A=Symbol("destroyed"),Gi=Symbol("error"),Hi=Symbol("emitData"),Ba=Symbol("emitEnd"),zi=Symbol("emitEnd2"),he=Symbol("async"),Yi=Symbol("abort"),ms=Symbol("aborted"),Et=Symbol("signal"),Ne=Symbol("dataListeners"),H=Symbol("discarded"),Ot=i=>Promise.resolve().then(i),Ef=i=>i(),Of=i=>i==="end"||i==="finish"||i==="prefinish",Cf=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,kf=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),gs=class{src;dest;opts;ondrain;constructor(e,t,s){this.src=e,this.dest=t,this.opts=s,this.ondrain=()=>e[Xe](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ki=class extends gs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,s){super(e,t,s),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},Af=i=>!!i.objectMode,Tf=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",Se=class extends bs.EventEmitter{[N]=!1;[St]=!1;[q]=[];[P]=[];[B];[re];[he];[Ke];[be]=!1;[xe]=!1;[cs]=!1;[fs]=!1;[xt]=null;[L]=0;[A]=!1;[Et];[ms]=!1;[Ne]=0;[H]=!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");Af(t)?(this[B]=!0,this[re]=null):Tf(t)?(this[re]=t.encoding,this[B]=!1):(this[B]=!1,this[re]=null),this[he]=!!t.async,this[Ke]=this[re]?new $a.StringDecoder(this[re]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[q]});let{signal:s}=t;s&&(this[Et]=s,s.aborted?this[Yi]():s.addEventListener("abort",()=>this[Yi]()))}get bufferLength(){return this[L]}get encoding(){return this[re]}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[B]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[he]}set async(e){this[he]=this[he]||!!e}[Yi](){var e,t;this[ms]=!0,this.emit("abort",(e=this[Et])==null?void 0:e.reason),this.destroy((t=this[Et])==null?void 0:t.reason)}get aborted(){return this[ms]}set aborted(e){}write(e,t,s){var n;if(this[ms])return!1;if(this[be])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(s=t,t="utf8"),t||(t="utf8");let r=this[he]?Ot:Ef;if(!this[B]&&!Buffer.isBuffer(e)){if(kf(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Cf(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[B]?(this[N]&&this[L]!==0&&this[ds](!0),this[N]?this.emit("data",e):this[Vi](e),this[L]!==0&&this.emit("readable"),s&&r(s),this[N]):e.length?(typeof e=="string"&&!(t===this[re]&&!((n=this[Ke])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[re]&&(e=this[Ke].write(e)),this[N]&&this[L]!==0&&this[ds](!0),this[N]?this.emit("data",e):this[Vi](e),this[L]!==0&&this.emit("readable"),s&&r(s),this[N]):(this[L]!==0&&this.emit("readable"),s&&r(s),this[N])}read(e){if(this[A])return null;if(this[H]=!1,this[L]===0||e===0||e&&e>this[L])return this[_e](),null;this[B]&&(e=null),this[P].length>1&&!this[B]&&(this[P]=[this[re]?this[P].join(""):Buffer.concat(this[P],this[L])]);let t=this[Ia](e||null,this[P][0]);return this[_e](),t}[Ia](e,t){if(this[B])this[ps]();else{let s=t;e===s.length||e===null?this[ps]():typeof s=="string"?(this[P][0]=s.slice(e),t=s.slice(0,e),this[L]-=e):(this[P][0]=s.subarray(e),t=s.subarray(0,e),this[L]-=e)}return this.emit("data",t),!this[P].length&&!this[be]&&this.emit("drain"),t}end(e,t,s){return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t="utf8"),e!==void 0&&this.write(e,t),s&&this.once("end",s),this[be]=!0,this.writable=!1,(this[N]||!this[St])&&this[_e](),this}[Xe](){this[A]||(!this[Ne]&&!this[q].length&&(this[H]=!0),this[St]=!1,this[N]=!0,this.emit("resume"),this[P].length?this[ds]():this[be]?this[_e]():this.emit("drain"))}resume(){return this[Xe]()}pause(){this[N]=!1,this[St]=!0,this[H]=!1}get destroyed(){return this[A]}get flowing(){return this[N]}get paused(){return this[St]}[Vi](e){this[B]?this[L]+=1:this[L]+=e.length,this[P].push(e)}[ps](){return this[B]?this[L]-=1:this[L]-=this[P][0].length,this[P].shift()}[ds](e=!1){do;while(this[Da](this[ps]())&&this[P].length);!e&&!this[P].length&&!this[be]&&this.emit("drain")}[Da](e){return this.emit("data",e),this[N]}pipe(e,t){if(this[A])return e;this[H]=!1;let s=this[xe];return t=t||{},e===Fa.stdout||e===Fa.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,s?t.end&&e.end():(this[q].push(t.proxyErrors?new Ki(this,e,t):new gs(this,e,t)),this[he]?Ot(()=>this[Xe]()):this[Xe]()),e}unpipe(e){let t=this[q].find(s=>s.dest===e);t&&(this[q].length===1?(this[N]&&this[Ne]===0&&(this[N]=!1),this[q]=[]):this[q].splice(this[q].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let s=super.on(e,t);if(e==="data")this[H]=!1,this[Ne]++,!this[q].length&&!this[N]&&this[Xe]();else if(e==="readable"&&this[L]!==0)super.emit("readable");else if(Of(e)&&this[xe])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[xt]){let r=t;this[he]?Ot(()=>r.call(this,this[xt])):r.call(this,this[xt])}return s}removeListener(e,t){return this.off(e,t)}off(e,t){let s=super.off(e,t);return e==="data"&&(this[Ne]=this.listeners("data").length,this[Ne]===0&&!this[H]&&!this[q].length&&(this[N]=!1)),s}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ne]=0,!this[H]&&!this[q].length&&(this[N]=!1)),t}get emittedEnd(){return this[xe]}[_e](){!this[cs]&&!this[xe]&&!this[A]&&this[P].length===0&&this[be]&&(this[cs]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fs]&&this.emit("close"),this[cs]=!1)}emit(e,...t){let s=t[0];if(e!=="error"&&e!=="close"&&e!==A&&this[A])return!1;if(e==="data")return!this[B]&&!s?!1:this[he]?(Ot(()=>this[Hi](s)),!0):this[Hi](s);if(e==="end")return this[Ba]();if(e==="close"){if(this[fs]=!0,!this[xe]&&!this[A])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[xt]=s,super.emit(Gi,s);let n=!this[Et]||this.listeners("error").length?super.emit("error",s):!1;return this[_e](),n}else if(e==="resume"){let n=super.emit("resume");return this[_e](),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[_e](),r}[Hi](e){for(let s of this[q])s.dest.write(e)===!1&&this.pause();let t=this[H]?!1:super.emit("data",e);return this[_e](),t}[Ba](){return this[xe]?!1:(this[xe]=!0,this.readable=!1,this[he]?(Ot(()=>this[zi]()),!0):this[zi]())}[zi](){if(this[Ke]){let t=this[Ke].end();if(t){for(let s of this[q])s.dest.write(t);this[H]||super.emit("data",t)}}for(let t of this[q])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[B]||(e.dataLength=0);let t=this.promise();return this.on("data",s=>{e.push(s),this[B]||(e.dataLength+=s.length)}),await t,e}async concat(){if(this[B])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[re]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(A,()=>t(new Error("stream destroyed"))),this.on("error",s=>t(s)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[H]=!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[be])return t();let n,o,u=c=>{this.off("data",a),this.off("end",h),this.off(A,l),t(),o(c)},a=c=>{this.off("error",u),this.off("end",h),this.off(A,l),this.pause(),n({value:c,done:!!this[be]})},h=()=>{this.off("error",u),this.off("data",a),this.off(A,l),t(),n({done:!0,value:void 0})},l=()=>u(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(A,l),this.once("error",u),this.once("end",h),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[H]=!1;let e=!1,t=()=>(this.pause(),this.off(Gi,t),this.off(A,t),this.off("end",t),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(Gi,t),this.once(A,t),{next:s,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[A])return e?this.emit("error",e):this.emit(A),this;this[A]=!0,this[H]=!0,this[P].length=0,this[L]=0;let t=this;return typeof t.close=="function"&&!this[fs]&&t.close(),e?this.emit("error",e):this.emit(A),this}static get isStream(){return vf}};var Mf=ce.realpathSync.native,kt={lstatSync:ce.lstatSync,readdir:ce.readdir,readdirSync:ce.readdirSync,readlinkSync:ce.readlinkSync,realpathSync:Mf,promises:{lstat:Ee.lstat,readdir:Ee.readdir,readlink:Ee.readlink,realpath:Ee.realpath}},Ga=i=>!i||i===kt||i===Rf?kt:{...kt,...i,promises:{...kt.promises,...i.promises||{}}},Ha=/^\\\\\?\\([a-z]:)\\?$/i,Nf=i=>i.replace(/\//g,"\\").replace(Ha,"$1\\"),Pf=/[\\\/]/,Q=0,za=1,Ya=2,le=4,Ka=6,Xa=8,Pe=10,Ja=12,Z=15,Ct=~Z,Ji=16,Wa=32,At=64,ne=128,_s=256,ys=512,ja=At|ne|ys,Lf=1023,Zi=i=>i.isFile()?Xa:i.isDirectory()?le:i.isSymbolicLink()?Pe:i.isCharacterDevice()?Ya:i.isBlockDevice()?Ka:i.isSocket()?Ja:i.isFIFO()?za:Q,Ua=new Map,Tt=i=>{let e=Ua.get(i);if(e)return e;let t=i.normalize("NFKD");return Ua.set(i,t),t},qa=new Map,ws=i=>{let e=qa.get(i);if(e)return e;let t=Tt(i.toLowerCase());return qa.set(i,t),t},vs=class extends vt{constructor(){super({max:256})}},Qi=class extends vt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Za=Symbol("PathScurry setAsCwd"),$=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#y;get gid(){return this.#y}#h;get rdev(){return this.#h}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#u;get size(){return this.#u}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#b;get mtimeMs(){return this.#b}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#S;get atime(){return this.#S}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#O;get birthtime(){return this.#O}#w;#v;#x;#p;#T;#C;#s;#N;#_;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,s,r,n,o,u){this.name=e,this.#w=n?ws(e):Tt(e),this.#s=t&Lf,this.nocase=n,this.roots=r,this.root=s||this,this.#N=o,this.#x=u.fullpath,this.#T=u.relative,this.#C=u.relativePosix,this.parent=u.parent,this.parent?this.#e=this.parent.#e:this.#e=Ga(u.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#N}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#P(r):this.#P(r)}#P(e){let t=this;for(let s of e)t=t.child(s);return t}children(){let e=this.#N.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#N.set(this,t),this.#s&=~Ji,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let s=this.children(),r=this.nocase?ws(e):Tt(e);for(let a of s)if(a.#w===r)return a;let n=this.parent?this.sep:"",o=this.#x?this.#x+n+e:void 0,u=this.newChild(e,Q,{...t,parent:this,fullpath:o});return this.canReaddir()||(u.#s|=ne),s.push(u),u}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let s=t.relative();return s+(!s||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.fullpathPosix();let s=t.relativePosix();return s+(!s||!t.parent?"":"/")+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#x=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(),s=t+(!t||!e.parent?"":"/")+this.name;return this.#p=s}isUnknown(){return(this.#s&Z)===Q}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.#s&Z)===Xa}isDirectory(){return(this.#s&Z)===le}isCharacterDevice(){return(this.#s&Z)===Ya}isBlockDevice(){return(this.#s&Z)===Ka}isFIFO(){return(this.#s&Z)===za}isSocket(){return(this.#s&Z)===Ja}isSymbolicLink(){return(this.#s&Pe)===Pe}lstatCached(){return this.#s&Wa?this:void 0}readlinkCached(){return this.#_}realpathCached(){return this.#R}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#_)return!0;if(!this.parent)return!1;let e=this.#s&Z;return!(e!==Q&&e!==Pe||this.#s&_s||this.#s&ne)}calledReaddir(){return!!(this.#s&Ji)}isENOENT(){return!!(this.#s&ne)}isNamed(e){return this.nocase?this.#w===ws(e):this.#w===Tt(e)}async readlink(){var t;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let s=await this.#e.promises.readlink(this.fullpath()),r=(t=await this.parent.realpath())==null?void 0:t.resolve(s);if(r)return this.#_=r}catch(s){this.#l(s.code);return}}readlinkSync(){var t;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let s=this.#e.readlinkSync(this.fullpath()),r=(t=this.parent.realpathSync())==null?void 0:t.resolve(s);if(r)return this.#_=r}catch(s){this.#l(s.code);return}}#L(e){this.#s|=Ji;for(let t=e.provisional;t<e.length;t++){let s=e[t];s&&s.#F()}}#F(){this.#s&ne||(this.#s=(this.#s|ne)&Ct,this.#k())}#k(){let e=this.children();e.provisional=0;for(let t of e)t.#F()}#A(){this.#s|=ys,this.#I()}#I(){if(this.#s&At)return;let e=this.#s;(e&Z)===le&&(e&=Ct),this.#s=e|At,this.#k()}#D(e=""){e==="ENOTDIR"||e==="EPERM"?this.#I():e==="ENOENT"?this.#F():this.children().provisional=0}#B(e=""){e==="ENOTDIR"?this.parent.#I():e==="ENOENT"&&this.#F()}#l(e=""){let t=this.#s;t|=_s,e==="ENOENT"&&(t|=ne),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Ct),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#I()}#$(e,t){return this.#M(e,t)||this.#W(e,t)}#W(e,t){let s=Zi(e),r=this.newChild(e.name,s,{parent:this}),n=r.#s&Z;return n!==le&&n!==Pe&&n!==Q&&(r.#s|=At),t.unshift(r),t.provisional++,r}#M(e,t){for(let s=t.provisional;s<t.length;s++){let r=t[s];if((this.nocase?ws(e.name):Tt(e.name))===r.#w)return this.#j(e,r,s,t)}}#j(e,t,s,r){let n=t.name;return t.#s=t.#s&Ct|Zi(e),n!==e.name&&(t.name=e.name),s!==r.provisional&&(s===r.length-1?r.pop():r.splice(s,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#s&ne))try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#B(e.code)}}lstatSync(){if(!(this.#s&ne))try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#B(e.code)}}#G(e){let{atime:t,atimeMs:s,birthtime:r,birthtimeMs:n,blksize:o,blocks:u,ctime:a,ctimeMs:h,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:b,rdev:g,size:w,uid:x}=e;this.#S=t,this.#g=s,this.#O=r,this.#f=n,this.#c=o,this.#r=u,this.#E=a,this.#d=h,this.#t=l,this.#y=c,this.#a=d,this.#n=p,this.#m=m,this.#b=f,this.#i=b,this.#h=g,this.#u=w,this.#o=x;let y=Zi(e);this.#s=this.#s&Ct|y|Wa,y!==Q&&y!==le&&y!==Pe&&(this.#s|=At)}#q=[];#V=!1;#H(e){this.#V=!1;let t=this.#q.slice();this.#q.length=0,t.forEach(s=>s(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let s=this.children();if(this.calledReaddir()){let n=s.slice(0,s.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#q.push(e),this.#V)return;this.#V=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(n,o)=>{if(n)this.#D(n.code),s.provisional=0;else{for(let u of o)this.#$(u,s);this.#L(s)}this.#H(s.slice(0,s.provisional))})}#U;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.#U)await this.#U;else{let s=()=>{};this.#U=new Promise(r=>s=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#$(r,e);this.#L(e)}catch(r){this.#D(r.code),e.provisional=0}this.#U=void 0,s()}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 s of this.#e.readdirSync(t,{withFileTypes:!0}))this.#$(s,e);this.#L(e)}catch(s){this.#D(s.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&ja)return!1;let e=Z&this.#s;return e===Q||e===le||e===Pe}shouldWalk(e,t){return(this.#s&le)===le&&!(this.#s&ja)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#R)return this.#R;if(!((ys|_s|ne)&this.#s))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#R=this.resolve(e)}catch{this.#A()}}realpathSync(){if(this.#R)return this.#R;if(!((ys|_s|ne)&this.#s))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#A()}}[Za](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),s=[],r=this;for(;r&&r.parent;)t.add(r),r.#T=s.join(this.sep),r.#C=s.join("/"),r=r.parent,s.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#T=void 0,r.#C=void 0,r=r.parent}},xs=class i extends ${sep="\\";splitSep=Pf;constructor(e,t=Q,s,r,n,o,u){super(e,t,s,r,n,o,u)}newChild(e,t=Q,s={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(e){return Je.win32.parse(e).root}getRoot(e){if(e=Nf(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,s]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=s;return this.roots[e]=new Ze(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ha,"$1\\"),e===t}},Ss=class i extends ${splitSep="/";sep="/";constructor(e,t=Q,s,r,n,o,u){super(e,t,s,r,n,o,u)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,s={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Es=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#i;constructor(e=process.cwd(),t,s,{nocase:r,childrenCacheSize:n=16*1024,fs:o=kt}={}){this.#i=Ga(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Va.fileURLToPath)(e));let u=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#e=new vs,this.#t=new vs,this.#n=new Qi(n);let a=u.substring(this.rootPath.length).split(s);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.#i),this.roots[this.rootPath]=this.root;let h=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;h=h.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=h}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 s=this.#e.get(t);if(s!==void 0)return s;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 s=this.#t.get(t);if(s!==void 0)return s;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 $||(t=e,e=this.cwd);let{withFileTypes:s}=t;if(e.canReaddir()){let r=await e.readdir();return s?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 $||(t=e,e=this.cwd);let{withFileTypes:s=!0}=t;return e.canReaddir()?s?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 $||(t=e.withFileTypes,e=this.cwd);let s=await e.readlink();return t?s:s==null?void 0:s.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e.withFileTypes,e=this.cwd);let s=e.readlinkSync();return t?s:s==null?void 0:s.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e.withFileTypes,e=this.cwd);let s=await e.realpath();return t?s:s==null?void 0:s.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e.withFileTypes,e=this.cwd);let s=e.realpathSync();return t?s:s==null?void 0:s.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(s?e:e.fullpath());let a=new Set,h=(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))&&u.push(s?g:g.fullpath()),r&&g.isSymbolicLink()?g.realpath().then(w=>w!=null&&w.isUnknown()?w.lstat():w).then(w=>w!=null&&w.shouldWalk(a,o)?h(w,b):b()):g.shouldWalk(a,o)?h(g,b):b()},!0)},l=e;return new Promise((c,d)=>{h(l,p=>{if(p)return d(p);c(u)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(s?e:e.fullpath());let a=new Set([e]);for(let h of a){let l=h.readdirSync();for(let c of l){(!n||n(c))&&u.push(s?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 u}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(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 $||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield s?e:e.fullpath());let u=new Set([e]);for(let a of u){let h=a.readdirSync();for(let l of h){(!n||n(l))&&(yield s?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(r&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(u,o)&&u.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=new Se({objectMode:!0});(!n||n(e))&&u.write(s?e:e.fullpath());let a=new Set,h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=(b,g,w=!1)=>{if(b)return u.emit("error",b);if(r&&!w){let x=[];for(let y of g)y.isSymbolicLink()&&x.push(y.realpath().then(S=>S!=null&&S.isUnknown()?S.lstat():S));if(x.length){Promise.all(x).then(()=>m(null,g,!0));return}}for(let x of g)x&&(!n||n(x))&&(u.write(s?x:x.fullpath())||(d=!0));l--;for(let x of g){let y=x.realpathCached()||x;y.shouldWalk(a,o)&&h.push(y)}d&&!u.flowing?u.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),u}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof $||(t=e,e=this.cwd);let{withFileTypes:s=!0,follow:r=!1,filter:n,walkFilter:o}=t,u=new Se({objectMode:!0}),a=new Set;(!n||n(e))&&u.write(s?e:e.fullpath());let h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(u.write(s?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)&&h.push(b)}}d&&!u.flowing&&u.once("drain",c)};return c(),u}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Za](t)}},Ze=class extends Es{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:s=!0}=t;super(e,Je.win32,"\\",{...t,nocase:s}),this.nocase=s;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return Je.win32.parse(e).root.toUpperCase()}newRoot(e){return new xs(this.rootPath,le,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Qe=class extends Es{sep="/";constructor(e=process.cwd(),t={}){let{nocase:s=!1}=t;super(e,Je.posix,"/",{...t,nocase:s}),this.nocase=s}parseRootPath(e){return"/"}newRoot(e){return new Ss(this.rootPath,le,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rt=class extends Qe{constructor(e=process.cwd(),t={}){let{nocase:s=!0}=t;super(e,{...t,nocase:s})}},Ip=process.platform==="win32"?xs:Ss,Qa=process.platform==="win32"?Ze:process.platform==="darwin"?Rt:Qe;var Ff=i=>i.length>=1,If=i=>i.length>=1,et=class i{#e;#t;#n;length;#i;#o;#y;#h;#c;#a;#u=!0;constructor(e,t,s,r){if(!Ff(e))throw new TypeError("empty pattern list");if(!If(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,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#n=s,this.#i=r,this.#n===0){if(this.isUNC()){let[n,o,u,a,...h]=this.#e,[l,c,d,p,...m]=this.#t;h[0]===""&&(h.shift(),m.shift());let f=[n,o,u,a,""].join("/"),b=[l,c,d,p,""].join("/");this.#e=[f,...h],this.#t=[b,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[u,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let h=n+"/",l=u+"/";this.#e=[h,...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]===I}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#y=this.#y||(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 i(this.#e,this.#t,this.#n+1,this.#i),this.#o.#a=this.#a,this.#o.#c=this.#c,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#i==="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.#h!==void 0?this.#h:this.#h=this.#i==="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.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var Df=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",tt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:s,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:s,noext:r,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let u of e)this.add(u)}add(e){let t=new G(e,this.mmopts);for(let s=0;s<t.set.length;s++){let r=t.set[s],n=t.globParts[s];if(!r||!n)throw new Error("invalid pattern object");for(;r[0]==="."&&n[0]===".";)r.shift(),n.shift();let o=new et(r,n,0,this.platform),u=new G(o.globString(),this.mmopts),a=n[n.length-1]==="**",h=o.isAbsolute();h?this.absolute.push(u):this.relative.push(u),a&&(h?this.absoluteChildren.push(u):this.relativeChildren.push(u))}}ignored(e){let t=e.fullpath(),s=`${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(s))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",s=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(s))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}};var er=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){var s;return(s=this.store.get(e.fullpath()))==null?void 0:s.has(t.globString())}storeWalked(e,t){let s=e.fullpath(),r=this.store.get(s);r?r.add(t.globString()):this.store.set(s,new Set([t.globString()]))}},tr=class{store=new Map;add(e,t,s){let r=(t?2:0)|(s?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)])}},sr=class{store=new Map;add(e,t){if(!e.canReaddir())return;let s=this.store.get(e);s?s.find(r=>r.globString()===t.globString())||s.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())}},Mt=class i{hasWalkedCache;matches=new tr;subwalks=new sr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new er}processPatterns(e,t){this.patterns=t;let s=t.map(r=>[e,r]);for(let[r,n]of s){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),u=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,h,l=!1;for(;typeof(a=n.pattern())=="string"&&(h=n.rest());)r=r.resolve(a),n=h,l=!0;if(a=n.pattern(),h=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),u,c);continue}else if(a===I){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let c=h==null?void 0:h.pattern(),d=h==null?void 0:h.rest();if(!h||(c===""||c===".")&&!d)this.matches.add(r,u,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,u,!0)}}else a instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let s=this.subwalks.get(e),r=this.child();for(let n of t)for(let o of s){let u=o.isAbsolute(),a=o.pattern(),h=o.rest();a===I?r.testGlobstar(n,o,h,u):a instanceof RegExp?r.testRegExp(n,a,h,u):r.testString(n,a,h,u)}return r}testGlobstar(e,t,s,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()&&(s&&t.checkFollowGlobstar()?this.subwalks.add(e,s):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),s){let n=s.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,s.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,s)}else n instanceof RegExp&&this.testRegExp(e,n,s.rest(),r)}}testRegExp(e,t,s,r){t.test(e.name)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}testString(e,t,s,r){e.isNamed(t)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,!1))}};var Bf=(i,e)=>typeof i=="string"?new tt([i],e):Array.isArray(i)?new tt(i,e):i,Os=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,s){if(this.patterns=e,this.path=t,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#t=Bf(s.ignore??[],s),!this.includeChildMatches&&typeof this.#t.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){var t,s;return this.seen.has(e)||!!((s=(t=this.#t)==null?void 0:t.ignored)!=null&&s.call(t,e))}#o(e){var t,s;return!!((s=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&s.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 s;if(this.opts.realpath){if(s=e.realpathCached()||await e.realpath(),!s)return;e=s}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 s;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()||!((s=e.realpathCached())!=null&&s.isDirectory()))&&!this.#i(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=e.realpathCached()||e.realpathSync(),!s)return;e=s}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.#i(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let s=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(s){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+r)}else{let o=this.opts.posix?e.relativePosix():e.relative(),u=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?u+o+r:"."+r)}}async match(e,t,s){let r=await this.matchCheck(e,s);r&&this.matchFinish(r,t)}matchSync(e,t,s){let r=this.matchCheckSync(e,s);r&&this.matchFinish(r,t)}walkCB(e,t,s){var r;(r=this.signal)!=null&&r.aborted&&s(),this.walkCB2(e,t,new Mt(this.opts),s)}walkCB2(e,t,s,r){var u;if(this.#o(e))return r();if((u=this.signal)!=null&&u.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,s,r));return}s.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,h,l]of s.matches.entries())this.#i(a)||(n++,this.match(a,h,l).then(()=>o()));for(let a of s.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirCached();a.calledReaddir()?this.walkCB3(a,h,s,o):a.readdirCB((l,c)=>this.walkCB3(a,c,s,o),!0)}o()}walkCB3(e,t,s,r){s=s.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[u,a,h]of s.matches.entries())this.#i(u)||(n++,this.match(u,a,h).then(()=>o()));for(let[u,a]of s.subwalks.entries())n++,this.walkCB2(u,a,s.child(),o);o()}walkCBSync(e,t,s){var r;(r=this.signal)!=null&&r.aborted&&s(),this.walkCB2Sync(e,t,new Mt(this.opts),s)}walkCB2Sync(e,t,s,r){var u;if(this.#o(e))return r();if((u=this.signal)!=null&&u.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,s,r));return}s.processPatterns(e,t);let n=1,o=()=>{--n===0&&r()};for(let[a,h,l]of s.matches.entries())this.#i(a)||this.matchSync(a,h,l);for(let a of s.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirSync();this.walkCB3Sync(a,h,s,o)}o()}walkCB3Sync(e,t,s,r){s=s.filterEntries(e,t);let n=1,o=()=>{--n===0&&r()};for(let[u,a,h]of s.matches.entries())this.#i(u)||this.matchSync(u,a,h);for(let[u,a]of s.subwalks.entries())n++,this.walkCB2Sync(u,a,s.child(),o);o()}},Nt=class extends Os{matches=new Set;constructor(e,t,s){super(e,t,s)}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,s)=>{this.walkCB(this.path,this.patterns,()=>{var r;(r=this.signal)!=null&&r.aborted?s(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}},Pt=class extends Os{results;constructor(e,t,s){super(e,t,s),this.results=new Se({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 $f=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",oe=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,eu.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||$f,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"?Ze:t.platform==="darwin"?Rt:t.platform?Qe:Qa;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,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 G(a,r)),[o,u]=n.reduce((a,h)=>(a[0].push(...h.set),a[1].push(...h.globParts),a),[[],[]]);this.patterns=o.map((a,h)=>{let l=u[h];if(!l)throw new Error("invalid pattern object");return new et(a,l,0,this.platform)})}async walk(){return[...await new Nt(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 Nt(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 Pt(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 Pt(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 ir=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new G(t,e).hasMagic())return!0;return!1};function ks(i,e={}){return new oe(i,e).streamSync()}function su(i,e={}){return new oe(i,e).stream()}function iu(i,e={}){return new oe(i,e).walkSync()}async function tu(i,e={}){return new oe(i,e).walk()}function As(i,e={}){return new oe(i,e).iterateSync()}function ru(i,e={}){return new oe(i,e).iterate()}var Wf=ks,jf=Object.assign(su,{sync:ks}),Uf=As,qf=Object.assign(ru,{sync:As}),Vf=Object.assign(iu,{stream:ks,iterate:As}),Cs=Object.assign(tu,{glob:tu,globSync:iu,sync:Vf,globStream:su,stream:jf,globStreamSync:ks,streamSync:Wf,globIterate:ru,iterate:qf,globIterateSync:As,iterateSync:Uf,Glob:oe,hasMagic:ir,escape:He,unescape:ie});Cs.glob=Cs;var st=T(require("node:path"),1);var nu=T(require("node:process"),1),ou=T(require("node:path"),1),Ts=T(require("node:fs"),1),au=require("node:url");var uu={directory:"isDirectory",file:"isFile"};function Gf(i){if(!Object.hasOwnProperty.call(uu,i))throw new Error(`Invalid type specified: ${i}`)}var Hf=(i,e)=>e[uu[i]](),zf=i=>i instanceof URL?(0,au.fileURLToPath)(i):i;function rr(i,{cwd:e=nu.default.cwd(),type:t="file",allowSymlinks:s=!0}={}){Gf(t),e=zf(e);let r=s?Ts.default.statSync:Ts.default.lstatSync;for(let n of i)try{let o=r(ou.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if(Hf(t,o))return n}catch{}}var hu=require("node:url");function nr(i){return i instanceof URL?(0,hu.fileURLToPath)(i):i}var Yf=Symbol("findUpStop");function Kf(i,e={}){let t=st.default.resolve(nr(e.cwd)??""),{root:s}=st.default.parse(t),r=st.default.resolve(t,nr(e.stopAt)??s),n=e.limit??Number.POSITIVE_INFINITY,o=[i].flat(),u=h=>{if(typeof i!="function")return rr(o,h);let l=i(h.cwd);return typeof l=="string"?rr([l],h):l},a=[];for(;;){let h=u({...e,cwd:t});if(h===Yf||(h&&a.push(st.default.resolve(t,h)),t===r||a.length>=n))break;t=st.default.dirname(t)}return a}function lu(i,e={}){return Kf(i,{...e,limit:1})[0]}var Ms=T(require("node:process"),1),fu=T(require("node:os"),1),or=T(require("node:tty"),1);function ee(i,e=globalThis.Deno?globalThis.Deno.args:Ms.default.argv){let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1||s<r)}var{env:C}=Ms.default,Rs;ee("no-color")||ee("no-colors")||ee("color=false")||ee("color=never")?Rs=0:(ee("color")||ee("colors")||ee("color=true")||ee("color=always"))&&(Rs=1);function Xf(){if("FORCE_COLOR"in C)return C.FORCE_COLOR==="true"?1:C.FORCE_COLOR==="false"?0:C.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(C.FORCE_COLOR,10),3)}function Jf(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Zf(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=Xf();s!==void 0&&(Rs=s);let r=t?Rs:s;if(r===0)return 0;if(t){if(ee("color=16m")||ee("color=full")||ee("color=truecolor"))return 3;if(ee("color=256"))return 2}if("TF_BUILD"in C&&"AGENT_NAME"in C)return 1;if(i&&!e&&r===void 0)return 0;let n=r||0;if(C.TERM==="dumb")return n;if(Ms.default.platform==="win32"){let o=fu.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in C)return"GITHUB_ACTIONS"in C||"GITEA_ACTIONS"in C?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in C)||C.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in C)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION)?1:0;if(C.COLORTERM==="truecolor"||C.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in C){let o=Number.parseInt((C.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(C.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||"COLORTERM"in C?1:n}function cu(i,e={}){let t=Zf(i,{streamIsTTY:i&&i.isTTY,...e});return Jf(t)}var Qf={stdout:cu({isTTY:or.default.isatty(1)}),stderr:cu({isTTY:or.default.isatty(2)})},du=Qf;0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});
|