@forsakringskassan/docs-generator 2.36.0 → 2.37.1

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.
@@ -614,7 +614,7 @@ var xmlDecodeTree = new Uint16Array(
614
614
  .map((c) => c.charCodeAt(0)));
615
615
 
616
616
  // Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
617
- var _a$5;
617
+ var _a$6;
618
618
  const decodeMap = new Map([
619
619
  [0, 65533],
620
620
  // C1 Unicode control character reference replacements
@@ -651,7 +651,7 @@ const decodeMap = new Map([
651
651
  */
652
652
  const fromCodePoint$1 =
653
653
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
654
- (_a$5 = String.fromCodePoint) !== null && _a$5 !== void 0 ? _a$5 : function (codePoint) {
654
+ (_a$6 = String.fromCodePoint) !== null && _a$6 !== void 0 ? _a$6 : function (codePoint) {
655
655
  let output = "";
656
656
  if (codePoint > 0xffff) {
657
657
  codePoint -= 0x10000;
@@ -8404,9 +8404,9 @@ MarkdownIt.prototype.renderInline = function (src, env) {
8404
8404
  return this.renderer.render(this.parseInline(src, env), this.options, env)
8405
8405
  };
8406
8406
 
8407
- var Gt$7=(n,t,e)=>{let s=n instanceof RegExp?ce$8(n,e):n,i=t instanceof RegExp?ce$8(t,e):t,r=s!==null&&i!=null&&ss$8(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}},ce$8=(n,t)=>{let e=t.match(n);return e?e[0]:null},ss$8=(n,t,e)=>{let s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),f=a;if(a>=0&&l>0){if(n===t)return [a,l];for(s=[],r=e.length;f>=0&&!h;){if(f===a)s.push(f),a=e.indexOf(n,f+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l]);}else i=s.pop(),i!==void 0&&i<r&&(r=i,o=l),l=e.indexOf(t,f+1);f=a<l&&a>=0?a:l;}s.length&&o!==void 0&&(h=[r,o]);}return h};var fe$9="\0SLASH"+Math.random()+"\0",ue$a="\0OPEN"+Math.random()+"\0",qt$a="\0CLOSE"+Math.random()+"\0",de$9="\0COMMA"+Math.random()+"\0",pe$7="\0PERIOD"+Math.random()+"\0",is$7=new RegExp(fe$9,"g"),rs$7=new RegExp(ue$a,"g"),ns$7=new RegExp(qt$a,"g"),os$5=new RegExp(de$9,"g"),hs$7=new RegExp(pe$7,"g"),as$7=/\\\\/g,ls$6=/\\{/g,cs$4=/\\}/g,fs$7=/\\,/g,us$7=/\\./g,ds$6=1e5;function Ht$a(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function ps$6(n){return n.replace(as$7,fe$9).replace(ls$6,ue$a).replace(cs$4,qt$a).replace(fs$7,de$9).replace(us$7,pe$7)}function ms$7(n){return n.replace(is$7,"\\").replace(rs$7,"{").replace(ns$7,"}").replace(os$5,",").replace(hs$7,".")}function me$b(n){if(!n)return [""];let t=[],e=Gt$7("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,o=s.split(",");o[o.length-1]+="{"+i+"}";let h=me$b(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function ge$a(n,t={}){if(!n)return [];let{max:e=ds$6}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht$9(ps$6(n),e,true).map(ms$7)}function gs$5(n){return "{"+n+"}"}function ws$6(n){return /^-?0\d/.test(n)}function ys$7(n,t){return n<=t}function bs$7(n,t){return n>=t}function ht$9(n,t,e){let s=[],i=Gt$7("{","}",n);if(!i)return [n];let r=i.pre,o=i.post.length?ht$9(i.post,t,false):[""];if(/\$$/.test(i.pre))for(let h=0;h<o.length&&h<t;h++){let a=r+"{"+i.body+"}"+o[h];s.push(a);}else {let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=h||a,f=i.body.indexOf(",")>=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+qt$a+i.post,ht$9(n,t,true)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=me$b(i.body),c.length===1&&c[0]!==void 0&&(c=ht$9(c[0],t,false).map(gs$5),c.length===1))return o.map(u=>i.pre+c[0]+u);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=Ht$a(c[0]),m=Ht$a(c[1]),p=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Ht$a(c[2])):1,g=ys$7;m<u&&(w*=-1,g=bs$7);let E=c.some(ws$6);d=[];for(let y=u;g(y,m);y+=w){let b;if(a)b=String.fromCharCode(y),b==="\\"&&(b="");else if(b=String(y),E){let z=p-b.length;if(z>0){let $=new Array(z+1).join("0");y<0?b="-"+$+b.slice(1):b=$+b;}}d.push(b);}}else {d=[];for(let u=0;u<c.length;u++)d.push.apply(d,ht$9(c[u],t,false));}for(let u=0;u<d.length;u++)for(let m=0;m<o.length&&s.length<t;m++){let p=r+d[u]+o[m];(!e||l||p)&&s.push(p);}}return s}var at$a=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ss$7={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x00-\\x7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]},lt$7=n=>n.replace(/[[\]\\-]/g,"\\$&"),Es$7=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we$8=n=>n.join(""),ye$b=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=false,h=false,a=false,l=false,f=e,c="";t:for(;r<n.length;){let p=n.charAt(r);if((p==="!"||p==="^")&&r===e+1){l=true,r++;continue}if(p==="]"&&o&&!a){f=r+1;break}if(o=true,p==="\\"&&!a){a=true,r++;continue}if(p==="["&&!a){for(let[w,[g,S,E]]of Object.entries(Ss$7))if(n.startsWith(w,r)){if(c)return ["$.",false,n.length-e,true];r+=w.length,E?i.push(g):s.push(g),h=h||S;continue t}}if(a=false,c){p>c?s.push(lt$7(c)+"-"+lt$7(p)):p===c&&s.push(lt$7(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(lt$7(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(lt$7(p)),r++;}if(f<r)return ["",false,0,false];if(!s.length&&!i.length)return ["$.",false,n.length-e,true];if(i.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let p=s[0].length===2?s[0].slice(-1):s[0];return [Es$7(p),false,f-e,false]}let d="["+(l?"^":"")+we$8(s)+"]",u="["+(l?"":"^")+we$8(i)+"]";return [s.length&&i.length?"("+d+"|"+u+")":s.length?d:u,h,f-e,true]};var W$9=(n,{windowsPathsNoEscape:t=false,magicalBraces:e=true}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var xs$6=new Set(["!","?","+","*","@"]),be$9=n=>xs$6.has(n),vs$7="(?!(?:^|/)\\.\\.?(?:$|/))",Ct$b="(?!\\.)",Cs$5=new Set(["[","."]),Ts$4=new Set(["..","."]),As$7=new Set("().*{}+?[]^$\\!"),ks$7=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kt$8="[^/]",Se$a=Kt$8+"*?",Ee$8=Kt$8+"+?",Q$9=class n{type;#t;#s;#n=false;#r=[];#o;#S;#w;#c=false;#h;#u;#f=false;constructor(t,e,s={}){this.type=t,t&&(this.#s=true),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#o?this.#o.#r.length:0;}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=true;return this.#s}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=true;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&i<s.#r.length;i++)for(let r of t.#r){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#r[i]);}e=s,s=e.#o;}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof n&&e.#o===this))throw new Error("invalid part: "+e);this.#r.push(e);}}toJSON(){let t=this.type===null?this.#r.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return true;if(!this.#o?.isStart())return false;if(this.#S===0)return true;let t=this.#o;for(let e=0;e<this.#S;e++){let s=t.#r[e];if(!(s instanceof n&&s.type==="!"))return false}return true}isEnd(){if(this.#t===this||this.#o?.type==="!")return true;if(!this.#o?.isEnd())return false;if(!this.type)return this.#o?.isEnd();let t=this.#o?this.#o.#r.length:0;return this.#S===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this));}clone(t){let e=new n(this.type,t);for(let s of this.#r)e.copyIn(s);return e}static#i(t,e,s,i){let r=false,o=false,h=-1,a=false;if(e.type===null){let u=s,m="";for(;u<t.length;){let p=t.charAt(u++);if(r||p==="\\"){r=!r,m+=p;continue}if(o){u===h+1?(p==="^"||p==="!")&&(a=true):p==="]"&&!(u===h+2&&a)&&(o=false),m+=p;continue}else if(p==="["){o=true,h=u,a=false,m+=p;continue}if(!i.noext&&be$9(p)&&t.charAt(u)==="("){e.push(m),m="";let w=new n(p,e);u=n.#i(t,w,u,i),e.push(w);continue}m+=p;}return e.push(m),u}let l=s+1,f=new n(null,e),c=[],d="";for(;l<t.length;){let u=t.charAt(l++);if(r||u==="\\"){r=!r,d+=u;continue}if(o){l===h+1?(u==="^"||u==="!")&&(a=true):u==="]"&&!(l===h+2&&a)&&(o=false),d+=u;continue}else if(u==="["){o=true,h=l,a=false,d+=u;continue}if(be$9(u)&&t.charAt(l)==="("){f.push(d),d="";let m=new n(u,f);f.push(m),l=n.#i(t,m,l,i);continue}if(u==="|"){f.push(d),d="",c.push(f),f=new n(null,e);continue}if(u===")")return d===""&&e.#r.length===0&&(e.#f=true),f.push(d),d="",e.push(...c,f),l;d+=u;}return e.type=null,e.#s=void 0,e.#r=[t.substring(s-1)],l}static fromGlob(t,e={}){let s=new n(null,void 0,e);return n.#i(t,s,0,e),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,s,i,r]=this.toRegExpSource();if(!(i||this.#s||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let h=(this.#h.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,h),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){let e=t??!!this.#h.dot;if(this.#t===this&&this.#a(),!this.type){let a=this.isStart()&&this.isEnd()&&!this.#r.some(u=>typeof u!="string"),l=this.#r.map(u=>{let[m,p,w,g]=typeof u=="string"?n.#E(u,this.#s,a):u.toRegExpSource(t);return this.#s=this.#s||w,this.#n=this.#n||g,m}).join(""),f="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Ts$4.has(this.#r[0]))){let m=Cs$5,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),w=!e&&!t&&m.has(l.charAt(0));f=p?vs$7:w?Ct$b:"";}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[f+l+c,W$9(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,W$9(this.toString()),false,false]}let o=!s||t||e||!Ct$b?"":this.#d(true);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#f)h=(this.isStart()&&!e?Ct$b:"")+Ee$8;else {let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ct$b:"")+Se$a+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a;}return [h,W$9(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#E(t,e,s=false){let i=false,r="",o=false;for(let h=0;h<t.length;h++){let a=t.charAt(h);if(i){i=false,r+=(As$7.has(a)?"\\":"")+a;continue}if(a==="\\"){h===t.length-1?r+="\\\\":i=true;continue}if(a==="["){let[l,f,c,d]=ye$b(t,h);if(c){r+=l,o=o||f,h+=c-1,e=e||d;continue}}if(a==="*"){r+=s&&t==="*"?Ee$8:Se$a,e=true;continue}if(a==="?"){r+=Kt$8,e=true;continue}r+=ks$7(a);}return [r,W$9(t),!!e,o]}};var tt$a=(n,{windowsPathsNoEscape:t=false,magicalBraces:e=false}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O$5=(n,t,e={})=>(at$a(t),!e.nocomment&&t.charAt(0)==="#"?false:new D$4(t,e).match(n)),Rs$8=/^\*+([^+@!?\*\[\(]*)$/,Os$6=n=>t=>!t.startsWith(".")&&t.endsWith(n),Fs$8=n=>t=>t.endsWith(n),Ds$6=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ms$7=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ns$6=/^\*+\.\*+$/,_s$5=n=>!n.startsWith(".")&&n.includes("."),Ls$6=n=>n!=="."&&n!==".."&&n.includes("."),Ws$7=/^\.\*+$/,Ps$8=n=>n!=="."&&n!==".."&&n.startsWith("."),js$8=/^\*+$/,Is$7=n=>n.length!==0&&!n.startsWith("."),zs$7=n=>n.length!==0&&n!=="."&&n!=="..",Bs$9=/^\?+([^+@!?\*\[\(]*)?$/,Us$8=([n,t=""])=>{let e=Ce$9([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},$s$8=([n,t=""])=>{let e=Te$8([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Gs$7=([n,t=""])=>{let e=Te$8([n]);return t?s=>e(s)&&s.endsWith(t):e},Hs$8=([n,t=""])=>{let e=Ce$9([n]);return t?s=>e(s)&&s.endsWith(t):e},Ce$9=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Te$8=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ae$a=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xe$9={win32:{sep:"\\"},posix:{sep:"/"}},qs$8=Ae$a==="win32"?xe$9.win32.sep:xe$9.posix.sep;O$5.sep=qs$8;var A$7=Symbol("globstar **");O$5.GLOBSTAR=A$7;var Ks$7="[^/]",Vs$6=Ks$7+"*?",Ys$8="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Xs$7="(?:(?!(?:\\/|^)\\.).)*?",Js$9=(n,t={})=>e=>O$5(e,n,t);O$5.filter=Js$9;var N$7=(n,t={})=>Object.assign({},n,t),Zs$a=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O$5;let t=O$5;return Object.assign((s,i,r={})=>t(s,i,N$7(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,N$7(n,r));}static defaults(i){return t.defaults(N$7(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,N$7(n,o));}static fromGlob(i,r={}){return t.AST.fromGlob(i,N$7(n,r))}},unescape:(s,i={})=>t.unescape(s,N$7(n,i)),escape:(s,i={})=>t.escape(s,N$7(n,i)),filter:(s,i={})=>t.filter(s,N$7(n,i)),defaults:s=>t.defaults(N$7(n,s)),makeRe:(s,i={})=>t.makeRe(s,N$7(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,N$7(n,i)),match:(s,i,r={})=>t.match(s,i,N$7(n,r)),sep:t.sep,GLOBSTAR:A$7})};O$5.defaults=Zs$a;var ke$a=(n,t={})=>(at$a(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ge$a(n,{max:t.braceExpandMax}));O$5.braceExpand=ke$a;var Qs$8=(n,t={})=>new D$4(n,t).makeRe();O$5.makeRe=Qs$8;var ti$9=(n,t,e={})=>{let s=new D$4(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O$5.match=ti$9;var ve$a=/[?*]|[+@!]\(.*?\)|\[|\]/,ei$9=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D$4=class D{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at$a(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ae$a,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===false,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=false,this.nonegate=!!e.nonegate,this.comment=false,this.empty=false,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make();}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return true;for(let t of this.set)for(let e of t)if(typeof e!="string")return true;return false}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ve$a.test(r[2]))&&!ve$a.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return [...r.slice(0,4),...r.slice(4).map(f=>this.parse(f))];if(l)return [r[0],...r.slice(1).map(f=>this.parse(f))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(false)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?");}this.debug(this.pattern,this.set);}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let i=0;i<t[s].length;i++)t[s][i]==="**"&&(t[s][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s);}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=false;do{if(e=false,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=true,t.splice(i,1),i--);}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=true,t.pop());}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let i=t[s-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=true,t.splice(s-1,2),s-=2);}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=false;do{e=false;for(let s of t){let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let o=i;for(;s[o+1]==="**";)o++;o>i&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=true,s.splice(i,1);let f=s.slice(0);f[i]="**",t.push(f),i--;}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let h=s[o];o===1&&h===""&&s[0]===""||(h==="."||h==="")&&(e=true,s.splice(o,1),o--);}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=true,s.pop());}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let o=s[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=true;let a=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...a),s.length===0&&s.push(""),r-=2;}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[],t[s]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=false){let i=0,r=0,o=[],h="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(h==="b"?e[r]:t[i]),i++,r++;else if(s&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(s&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(h==="b")return false;h="a",o.push(t[i]),i++,r++;}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(h==="a")return false;h="b",o.push(e[r]),i++,r++;}else return false;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=false,s=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e;}matchOne(t,e,s=false){let i=this.options;if(this.isWindows){let p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),E=w?3:p?0:void 0,y=S?3:g?0:void 0;if(typeof E=="number"&&typeof y=="number"){let[b,z]=[t[E],e[y]];b.toLowerCase()===z.toLowerCase()&&(e[y]=b,y>E?e=e.slice(y):E>y&&(t=t.slice(E)));}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o<a&&h<l;o++,h++){this.debug("matchOne loop");var f=e[h],c=t[o];if(this.debug(e,f,c),f===false)return false;if(f===A$7){this.debug("GLOBSTAR",[e,f,c]);var d=o,u=h+1;if(u===l){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return false;return true}for(;d<a;){var m=t[d];if(this.debug(`
8408
- globstar while`,t,d,e,u,m),this.matchOne(t.slice(d),e.slice(u),s))return this.debug("globstar found match!",d,a,m),true;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,d,e,u);break}this.debug("globstar swallow a segment, and continue"),d++;}return !!(s&&(this.debug(`
8409
- >>> no match, partial?`,t,d,e,u),d===a))}let p;if(typeof f=="string"?(p=c===f,this.debug("string match",f,c,p)):(p=f.test(c),this.debug("pattern match",f,c,p)),!p)return false}if(o===a&&h===l)return true;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke$a(this.pattern,this.options)}parse(t){at$a(t);let e=this.options;if(t==="**")return A$7;if(t==="")return "";let s,i=null;(s=t.match(js$8))?i=e.dot?zs$7:Is$7:(s=t.match(Rs$8))?i=(e.nocase?e.dot?Ms$7:Ds$6:e.dot?Fs$8:Os$6)(s[1]):(s=t.match(Bs$9))?i=(e.nocase?e.dot?$s$8:Us$8:e.dot?Gs$7:Hs$8)(s):(s=t.match(Ns$6))?i=e.dot?Ls$6:_s$5:(s=t.match(Ws$7))&&(i=Ps$8);let r=Q$9.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;let t=this.set;if(!t.length)return this.regexp=false,this.regexp;let e=this.options,s=e.noglobstar?Vs$6:e.dot?Ys$8:Xs$7,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei$9(c):c===A$7?A$7:c._src});l.forEach((c,d)=>{let u=l[d+1],m=l[d-1];c!==A$7||m===A$7||(m===void 0?u!==void 0&&u!==A$7?l[d+1]="(?:\\/|"+s+"\\/)?"+u:l[d]=s:u===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":u!==A$7&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+u,l[d+1]=A$7));});let f=l.filter(c=>c!==A$7);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return "(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""));}catch{this.regexp=false;}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return false;if(this.empty)return t==="";if(t==="/"&&e)return true;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h<r.length;h++){let a=r[h],l=i;if(s.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,e))return s.flipNegate?true:!this.negate}return s.flipNegate?false:this.negate}static defaults(t){return O$5.defaults(t).Minimatch}};O$5.AST=Q$9;O$5.Minimatch=D$4;O$5.escape=tt$a;O$5.unescape=W$9;var si$9=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oe$a=new Set,Vt$a=typeof process=="object"&&process?process:{},Fe$9=(n,t,e,s)=>{typeof Vt$a.emitWarning=="function"?Vt$a.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`);},At$b=globalThis.AbortController,Re$a=globalThis.AbortSignal;if(typeof At$b>"u"){Re$a=class{onabort;_onabort=[];reason;aborted=false;addEventListener(e,s){this._onabort.push(s);}},At$b=class{constructor(){t();}signal=new Re$a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=true;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e);}}};let n=Vt$a.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=false,Fe$9("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",t));};}var ii$9=n=>!Oe$a.has(n);var q$a=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De$a=n=>q$a(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt$b:null:null,Tt$b=class Tt extends Array{constructor(n){super(n),this.fill(0);}},ri$9=class ct{heap;length;static#t=false;static create(t){let e=De$a(t);if(!e)return [];ct.#t=true;let s=new ct(t,e);return ct.#t=false,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0;}push(t){this.heap[this.length++]=t;}pop(){return this.heap[--this.length]}},ft$9=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return {starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:u,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si$9,e!==0&&!q$a(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De$a(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!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(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri$9.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof f=="function"&&(this.#r=f),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q$a(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q$a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G();}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q$a(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q$a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M();}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii$9($t)&&(Oe$a.add($t),Fe$9("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me));}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt$b(this.#t),e=new Tt$b(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire");},h+1);l.unref&&l.unref(),s[o]=l;}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0;},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let f=o.now-l;o.remainingTTL=a-f;}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let f=(i||r())-l;return a-f},this.#v=o=>{let h=e[o],a=t[o];return !!a&&!!h&&(i||r())-h>a};}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>false;#G(){let t=new Tt$b(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0;},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q$a(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q$a(i))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 i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(true);}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u);};}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e];}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e];}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}purgeStale(){let t=false;for(let e of this.#D({allowStale:true}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=true);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now();}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:true})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h);}this.#C&&(o.size=this.#C[e]),t.unshift([s,o]);}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i;}this.set(e,s.value,s);}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,f=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=true),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(false):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,f,a),a&&(a.set="add"),l=false,this.#_&&this.#r?.(e,t,"add");else {this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=d;u!==void 0&&!o&&(this.#x&&this.#n?.(u,t,"set"),this.#e&&this.#m?.push([u,t,"set"]));}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,f,a),this.#i[c]=e,a){a.set="replace";let u=d&&this.#l(d)?d.__staleWhileFetching:d;u!==void 0&&(a.oldValue=u);}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace");}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,u;for(;u=d?.shift();)this.#o?.(...u);}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e);}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return false;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),true}else i&&(i.has="miss");return false}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At$b,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=false)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=true,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),g&&!S&&!w)return c(o.signal.reason,E);let y=u,b=this.#i[e];return (b===u||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(t,p,a.options))),p},f=p=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=p),c(p,false)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=u;if(this.#i[e]===u&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,true)));});};s.status&&(s.status.fetchDispatched=true);let u=new Promise(d).then(l,f),m=Object.assign(u,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At$b}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=false,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:u,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else {let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=true)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=true)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=true),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=true),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss");}#$(t,e){this.#E[e]=t,this.#d[t]=e;}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t);}delete(t){return this.#O(t,"delete")}#O(t,e){let s=false;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=true,this.#h===1)this.#H(e);else {this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else {let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i];}this.#h--,this.#R.push(i);}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r);}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:true})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else {let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t]);}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0);}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s);}}};var Ne$9=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi$9=n=>!!n&&typeof n=="object"&&(n instanceof V$a||n instanceof Pe$9||hi$a(n)||ai$9(n)),hi$a=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.pipe=="function"&&n.pipe!==Pe$9.Writable.prototype.pipe,ai$9=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.write=="function"&&typeof n.end=="function",G$9=Symbol("EOF"),H$9=Symbol("maybeEmitEnd"),K$a=Symbol("emittedEnd"),kt$b=Symbol("emittingEnd"),ut$9=Symbol("emittedError"),Rt$a=Symbol("closed"),_e$a=Symbol("read"),Ot$b=Symbol("flush"),Le$a=Symbol("flushChunk"),P$7=Symbol("encoding"),et$a=Symbol("decoder"),v$7=Symbol("flowing"),dt$7=Symbol("paused"),st$7=Symbol("resume"),C$7=Symbol("buffer"),F$9=Symbol("pipes"),T$5=Symbol("bufferLength"),Yt$7=Symbol("bufferPush"),Ft$a=Symbol("bufferShift"),k$7=Symbol("objectMode"),x$7=Symbol("destroyed"),Xt$a=Symbol("error"),Jt$8=Symbol("emitData"),We$a=Symbol("emitEnd"),Zt$a=Symbol("emitEnd2"),B$6=Symbol("async"),Qt$9=Symbol("abort"),Dt$9=Symbol("aborted"),pt$9=Symbol("signal"),Y$6=Symbol("dataListeners"),M$8=Symbol("discarded"),mt$9=n=>Promise.resolve().then(n),li$9=n=>n(),ci$9=n=>n==="end"||n==="finish"||n==="prefinish",fi$a=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui$a=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt$b=class Mt{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st$7](),this.dest.on("drain",this.ondrain);}unpipe(){this.dest.removeListener("drain",this.ondrain);}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end();}},te$b=class te extends Mt$b{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe();}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors);}},di$a=n=>!!n.objectMode,pi$a=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V$a=class V extends EventEmitter$1{[v$7]=false;[dt$7]=false;[F$9]=[];[C$7]=[];[k$7];[P$7];[B$6];[et$a];[G$9]=false;[K$a]=false;[kt$b]=false;[Rt$a]=false;[ut$9]=null;[T$5]=0;[x$7]=false;[pt$9];[Dt$9]=false;[Y$6]=0;[M$8]=false;writable=true;readable=true;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di$a(e)?(this[k$7]=true,this[P$7]=null):pi$a(e)?(this[P$7]=e.encoding,this[k$7]=false):(this[k$7]=false,this[P$7]=null),this[B$6]=!!e.async,this[et$a]=this[P$7]?new StringDecoder(this[P$7]):null,e&&e.debugExposeBuffer===true&&Object.defineProperty(this,"buffer",{get:()=>this[C$7]}),e&&e.debugExposePipes===true&&Object.defineProperty(this,"pipes",{get:()=>this[F$9]});let{signal:s}=e;s&&(this[pt$9]=s,s.aborted?this[Qt$9]():s.addEventListener("abort",()=>this[Qt$9]()));}get bufferLength(){return this[T$5]}get encoding(){return this[P$7]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k$7]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B$6]}set async(t){this[B$6]=this[B$6]||!!t;}[Qt$9](){this[Dt$9]=true,this.emit("abort",this[pt$9]?.reason),this.destroy(this[pt$9]?.reason);}get aborted(){return this[Dt$9]}set aborted(t){}write(t,e,s){if(this[Dt$9])return false;if(this[G$9])throw new Error("write after end");if(this[x$7])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),true;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B$6]?mt$9:li$9;if(!this[k$7]&&!Buffer.isBuffer(t)){if(ui$a(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi$a(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k$7]?(this[v$7]&&this[T$5]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$7](t),this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7]):t.length?(typeof t=="string"&&!(e===this[P$7]&&!this[et$a]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P$7]&&(t=this[et$a].write(t)),this[v$7]&&this[T$5]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$7](t),this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7]):(this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7])}read(t){if(this[x$7])return null;if(this[M$8]=false,this[T$5]===0||t===0||t&&t>this[T$5])return this[H$9](),null;this[k$7]&&(t=null),this[C$7].length>1&&!this[k$7]&&(this[C$7]=[this[P$7]?this[C$7].join(""):Buffer.concat(this[C$7],this[T$5])]);let e=this[_e$a](t||null,this[C$7][0]);return this[H$9](),e}[_e$a](t,e){if(this[k$7])this[Ft$a]();else {let s=e;t===s.length||t===null?this[Ft$a]():typeof s=="string"?(this[C$7][0]=s.slice(t),e=s.slice(0,t),this[T$5]-=t):(this[C$7][0]=s.subarray(t),e=s.subarray(0,t),this[T$5]-=t);}return this.emit("data",e),!this[C$7].length&&!this[G$9]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G$9]=true,this.writable=false,(this[v$7]||!this[dt$7])&&this[H$9](),this}[st$7](){this[x$7]||(!this[Y$6]&&!this[F$9].length&&(this[M$8]=true),this[dt$7]=false,this[v$7]=true,this.emit("resume"),this[C$7].length?this[Ot$b]():this[G$9]?this[H$9]():this.emit("drain"));}resume(){return this[st$7]()}pause(){this[v$7]=false,this[dt$7]=true,this[M$8]=false;}get destroyed(){return this[x$7]}get flowing(){return this[v$7]}get paused(){return this[dt$7]}[Yt$7](t){this[k$7]?this[T$5]+=1:this[T$5]+=t.length,this[C$7].push(t);}[Ft$a](){return this[k$7]?this[T$5]-=1:this[T$5]-=this[C$7][0].length,this[C$7].shift()}[Ot$b](t=false){do;while(this[Le$a](this[Ft$a]())&&this[C$7].length);!t&&!this[C$7].length&&!this[G$9]&&this.emit("drain");}[Le$a](t){return this.emit("data",t),this[v$7]}pipe(t,e){if(this[x$7])return t;this[M$8]=false;let s=this[K$a];return e=e||{},t===Ne$9.stdout||t===Ne$9.stderr?e.end=false:e.end=e.end!==false,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F$9].push(e.proxyErrors?new te$b(this,t,e):new Mt$b(this,t,e)),this[B$6]?mt$9(()=>this[st$7]()):this[st$7]()),t}unpipe(t){let e=this[F$9].find(s=>s.dest===t);e&&(this[F$9].length===1?(this[v$7]&&this[Y$6]===0&&(this[v$7]=false),this[F$9]=[]):this[F$9].splice(this[F$9].indexOf(e),1),e.unpipe());}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M$8]=false,this[Y$6]++,!this[F$9].length&&!this[v$7]&&this[st$7]();else if(t==="readable"&&this[T$5]!==0)super.emit("readable");else if(ci$9(t)&&this[K$a])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut$9]){let i=e;this[B$6]?mt$9(()=>i.call(this,this[ut$9])):i.call(this,this[ut$9]);}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y$6]=this.listeners("data").length,this[Y$6]===0&&!this[M$8]&&!this[F$9].length&&(this[v$7]=false)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return (t==="data"||t===void 0)&&(this[Y$6]=0,!this[M$8]&&!this[F$9].length&&(this[v$7]=false)),e}get emittedEnd(){return this[K$a]}[H$9](){!this[kt$b]&&!this[K$a]&&!this[x$7]&&this[C$7].length===0&&this[G$9]&&(this[kt$b]=true,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt$a]&&this.emit("close"),this[kt$b]=false);}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x$7&&this[x$7])return false;if(t==="data")return !this[k$7]&&!s?false:this[B$6]?(mt$9(()=>this[Jt$8](s)),true):this[Jt$8](s);if(t==="end")return this[We$a]();if(t==="close"){if(this[Rt$a]=true,!this[K$a]&&!this[x$7])return false;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut$9]=s,super.emit(Xt$a,s);let r=!this[pt$9]||this.listeners("error").length?super.emit("error",s):false;return this[H$9](),r}else if(t==="resume"){let r=super.emit("resume");return this[H$9](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H$9](),i}[Jt$8](t){for(let s of this[F$9])s.dest.write(t)===false&&this.pause();let e=this[M$8]?false:super.emit("data",t);return this[H$9](),e}[We$a](){return this[K$a]?false:(this[K$a]=true,this.readable=false,this[B$6]?(mt$9(()=>this[Zt$a]()),true):this[Zt$a]())}[Zt$a](){if(this[et$a]){let e=this[et$a].end();if(e){for(let s of this[F$9])s.dest.write(e);this[M$8]||super.emit("data",e);}}for(let e of this[F$9])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k$7]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k$7]||(t.dataLength+=s.length);}),await e,t}async concat(){if(this[k$7])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P$7]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x$7,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t());})}[Symbol.asyncIterator](){this[M$8]=false;let t=false,e=async()=>(this.pause(),t=true,{value:void 0,done:true});return {next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:false,value:i});if(this[G$9])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x$7,f),e(),o(c);},a=c=>{this.off("error",h),this.off("end",l),this.off(x$7,f),this.pause(),r({value:c,done:!!this[G$9]});},l=()=>{this.off("error",h),this.off("data",a),this.off(x$7,f),e(),r({done:true,value:void 0});},f=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x$7,f),this.once("error",h),this.once("end",l),this.once("data",a);})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[M$8]=false;let t=false,e=()=>(this.pause(),this.off(Xt$a,e),this.off(x$7,e),this.off("end",e),t=true,{done:true,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:false,value:i}};return this.once("end",e),this.once(Xt$a,e),this.once(x$7,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[x$7])return t?this.emit("error",t):this.emit(x$7),this;this[x$7]=true,this[M$8]=true,this[C$7].length=0,this[T$5]=0;let e=this;return typeof e.close=="function"&&!this[Rt$a]&&e.close(),t?this.emit("error",t):this.emit(x$7),this}static get isStream(){return oi$9}};var vi$a=realpathSync.native,wt$a={lstatSync:lstatSync,readdir:readdir$1,readdirSync:readdirSync,readlinkSync:readlinkSync,realpathSync:vi$a,promises:{lstat:lstat,readdir:readdir,readlink:readlink,realpath:realpath}},Ue$9=n=>!n||n===wt$a||n===fs$8?wt$a:{...wt$a,...n,promises:{...wt$a.promises,...n.promises||{}}},$e$a=/^\\\\\?\\([a-z]:)\\?$/i,Ri$7=n=>n.replace(/\//g,"\\").replace($e$a,"$1\\"),Oi$8=/[\\\/]/,L$8=0,Ge$a=1,He$9=2,U$8=4,qe$a=6,Ke$b=8,X$a=10,Ve$8=12,_$8=15,gt$9=~_$8,se$a=16,je$a=32,yt$9=64,j$8=128,Nt$b=256,Lt$9=512,Ie$a=yt$9|j$8|Lt$9,Fi$7=1023,ie$a=n=>n.isFile()?Ke$b:n.isDirectory()?U$8:n.isSymbolicLink()?X$a:n.isCharacterDevice()?He$9:n.isBlockDevice()?qe$a:n.isSocket()?Ve$8:n.isFIFO()?Ge$a:L$8,ze$a=new ft$9({max:2**12}),bt$c=n=>{let t=ze$a.get(n);if(t)return t;let e=n.normalize("NFKD");return ze$a.set(n,e),e},Be$9=new ft$9({max:2**12}),_t$8=n=>{let t=Be$9.get(n);if(t)return t;let e=bt$c(n.toLowerCase());return Be$9.set(n,e),e},Wt$9=class Wt extends ft$9{constructor(){super({max:256});}},ne$9=class ne extends ft$9{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1});}},Ye$9=Symbol("PathScurry setAsCwd"),R$9=class R{name;root;roots;parent;nocase;isCWD=false;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return (this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L$8,s,i,r,o,h){this.name=t,this.#C=r?_t$8(t):bt$c(t),this.#e=e&Fi$7,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue$9(h.fs);}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se$a,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t$8(t):bt$c(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L$8,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j$8),s.push(h),h}relative(){if(this.isCWD)return "";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return "";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return /^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return (this.#e&_$8)===L$8}isType(t){return this[`is${t}`]()}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.#e&_$8)===Ke$b}isDirectory(){return (this.#e&_$8)===U$8}isCharacterDevice(){return (this.#e&_$8)===He$9}isBlockDevice(){return (this.#e&_$8)===qe$a}isFIFO(){return (this.#e&_$8)===Ge$a}isSocket(){return (this.#e&_$8)===Ve$8}isSymbolicLink(){return (this.#e&X$a)===X$a}lstatCached(){return this.#e&je$a?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return true;if(!this.parent)return false;let t=this.#e&_$8;return !(t!==L$8&&t!==X$a||this.#e&Nt$b||this.#e&j$8)}calledReaddir(){return !!(this.#e&se$a)}isENOENT(){return !!(this.#e&j$8)}isNamed(t){return this.nocase?this.#C===_t$8(t):this.#C===bt$c(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se$a;for(let e=t.provisional;e<t.length;e++){let s=t[e];s&&s.#v();}}#v(){this.#e&j$8||(this.#e=(this.#e|j$8)&gt$9,this.#G());}#G(){let t=this.children();t.provisional=0;for(let e of t)e.#v();}#P(){this.#e|=Lt$9,this.#L();}#L(){if(this.#e&yt$9)return;let t=this.#e;(t&_$8)===U$8&&(t&=gt$9),this.#e=t|yt$9,this.#G();}#I(t=""){t==="ENOTDIR"||t==="EPERM"?this.#L():t==="ENOENT"?this.#v():this.children().provisional=0;}#F(t=""){t==="ENOTDIR"?this.parent.#L():t==="ENOENT"&&this.#v();}#D(t=""){let e=this.#e;e|=Nt$b,t==="ENOENT"&&(e|=j$8),(t==="EINVAL"||t==="UNKNOWN")&&(e&=gt$9),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#L();}#z(t,e){return this.#U(t,e)||this.#B(t,e)}#B(t,e){let s=ie$a(t),i=this.newChild(t.name,s,{parent:this}),r=i.#e&_$8;return r!==U$8&&r!==X$a&&r!==L$8&&(i.#e|=yt$9),e.unshift(i),e.provisional++,i}#U(t,e){for(let s=e.provisional;s<e.length;s++){let i=e[s];if((this.nocase?_t$8(t.name):bt$c(t.name))===i.#C)return this.#l(t,i,s,e)}}#l(t,e,s,i){let r=e.name;return e.#e=e.#e&gt$9|ie$a(t),r!==t.name&&(e.name=t.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if((this.#e&j$8)===0)try{return this.#$(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#F(t.code);}}lstatSync(){if((this.#e&j$8)===0)try{return this.#$(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#F(t.code);}}#$(t){let{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:o,blocks:h,ctime:a,ctimeMs:l,dev:f,gid:c,ino:d,mode:u,mtime:m,mtimeMs:p,nlink:w,rdev:g,size:S,uid:E}=t;this.#b=e,this.#a=s,this.#m=i,this.#E=r,this.#c=o,this.#f=h,this.#R=a,this.#d=l,this.#s=f,this.#S=c,this.#h=d,this.#n=u,this.#p=m,this.#i=p,this.#r=w,this.#w=g,this.#u=S,this.#o=E;let y=ie$a(t);this.#e=this.#e&gt$9|y|je$a,y!==L$8&&y!==U$8&&y!==X$a&&(this.#e|=yt$9);}#W=[];#O=false;#H(t){this.#O=false;let e=this.#W.slice();this.#W.length=0,e.forEach(s=>s(null,t));}readdirCB(t,e=false){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=true;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:true},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else {for(let h of o)this.#z(h,s);this.#j(s);}this.#H(s.slice(0,s.provisional));});}#q;async readdir(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else {let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t);}catch(i){this.#I(i.code),t.provisional=0;}this.#q=void 0,s();}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t);}catch(s){this.#I(s.code),t.provisional=0;}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie$a)return false;let t=_$8&this.#e;return t===L$8||t===U$8||t===X$a}shouldWalk(t,e){return (this.#e&U$8)===U$8&&!(this.#e&Ie$a)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}realpathSync(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}[Ye$9](t){if(t===this)return;t.isCWD=false,this.isCWD=true;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent;}},Pt$b=class n extends R$9{sep="\\";splitSep=Oi$8;constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return win32.parse(t).root}getRoot(t){if(t=Ri$7(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it$8(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e$a,"$1\\"),t===e}},jt$7=class n extends R$9{splitSep="/";sep="/";constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It$a=class It{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt$a}={}){this.#r=Ue$9(o),(t instanceof URL||t.startsWith("file://"))&&(t=fileURLToPath(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt$9,this.#s=new Wt$9,this.#n=new ne$9(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,f=a.length-1,c=e.sep,d=this.rootPath,u=false;for(let m of a){let p=f--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(u?"":c)+m}),u=true;}this.cwd=l;}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return []}readdirSync(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((u,m)=>{if(u)return d(u);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d();};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w();},true);},f=t;return new Promise((c,d)=>{l(f,u=>{if(u)return d(u);c(h);});})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let f=l.readdirSync();for(let c of f){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync();}d.shouldWalk(a,o)&&a.add(d);}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let f of l){(!r||r(f))&&(yield s?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync();}c.shouldWalk(h,o)&&h.add(c);}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$a({objectMode:true});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],f=0,c=()=>{let d=false;for(;!d;){let u=l.shift();if(!u){f===0&&h.end();return}f++,a.add(u);let m=(w,g,S=false)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,true));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=true));f--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y);}d&&!h.flowing?h.once("drain",c):p||c();},p=true;u.readdirCB(m,true),p=false;}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$a({objectMode:true}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],f=0,c=()=>{let d=false;for(;!d;){let u=l.shift();if(!u){f===0&&h.end();return}f++,a.add(u);let m=u.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=true));f--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync();}w.shouldWalk(a,o)&&l.push(w);}}d&&!h.flowing&&h.once("drain",c);};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye$9](e);}},it$8=class it extends It$a{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase;}parseRootPath(t){return win32.parse(t).root.toUpperCase()}newRoot(t){return new Pt$b(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt$b=class rt extends It$a{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=false}=e;super(t,posix,"/",{...e,nocase:s}),this.nocase=s;}parseRootPath(t){return "/"}newRoot(t){return new jt$7(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St$b=class St extends rt$b{constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,{...e,nocase:s});}};process.platform==="win32"?Pt$b:jt$7;var Xe$a=process.platform==="win32"?it$8:process.platform==="darwin"?St$b:rt$b;var Di$7=n=>n.length>=1,Mi$6=n=>n.length>=1,nt$a=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=true;constructor(t,e,s,i){if(!Di$7(t))throw new TypeError("empty pattern list");if(!Mi$6(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[f,c,d,u,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[f,c,d,u,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length;}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",f=h+"/";this.#t=[l,...o],this.#s=[f,...a],this.length=this.#t.length;}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A$7}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return !(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?false:(this.#u=false,true)}};var Ni$8=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot$7=class ot{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=Ni$8}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:true,nonegate:true};for(let h of t)this.add(h);}add(t){let e=new D$4(t,this.mmopts);for(let s=0;s<e.set.length;s++){let i=e.set[s],r=e.globParts[s];if(!i||!r)throw new Error("invalid pattern object");for(;i[0]==="."&&r[0]===".";)i.shift(),r.shift();let o=new nt$a(i,r,0,this.platform),h=new D$4(o.globString(),this.mmopts),a=r[r.length-1]==="**",l=o.isAbsolute();l?this.absolute.push(h):this.relative.push(h),a&&(l?this.absoluteChildren.push(h):this.relativeChildren.push(h));}}ignored(t){let e=t.fullpath(),s=`${e}/`,i=t.relative()||".",r=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(r))return true;for(let o of this.absolute)if(o.match(e)||o.match(s))return true;return false}childrenIgnored(t){let e=t.fullpath()+"/",s=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(s))return true;for(let i of this.absoluteChildren)if(i.match(e))return true;return false}};var oe$9=class n{store;constructor(t=new Map){this.store=t;}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]));}},he$a=class he{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r);}entries(){return [...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},ae$8=class ae{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e]);}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return [...this.store.keys()].filter(t=>t.canReaddir())}},Et$c=class n{hasWalkedCache;matches=new he$a;subwalks=new ae$8;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe$9;}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==false;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else {this.matches.add(i,true,false);continue}}if(i.isENOENT())continue;let a,l,f=false;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,f=true;if(a=r.pattern(),l=r.rest(),f){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r);}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A$7){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let u=i.parent||i;d?this.hasWalkedCache.hasWalked(u,d)||this.subwalks.add(u,d):this.matches.add(u,h,true);}}else a instanceof RegExp&&this.subwalks.add(i,r);}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A$7?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h);}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,false),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s);}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i);}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}};var _i$8=(n,t)=>typeof n=="string"?new ot$7([n],t):Array.isArray(n)?new ot$7(n,t):n,zt$8=class zt{path;patterns;opts;seen=new Set;paused=false;aborted=false;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==false,(s.ignore||!this.includeChildMatches)&&(this.#s=_i$8(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0;}));}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return !!this.#s?.childrenIgnored?.(t)}pause(){this.paused=true;}resume(){if(this.signal?.aborted)return;this.paused=false;let t;for(;!this.paused&&(t=this.#t.shift());)t();}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t());}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat();}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync();}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r);}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i);}else {let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i);}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e);}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e);}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et$c(this.opts),s);}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,f)=>this.walkCB3(h,f,s,o),true);}o();}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o();}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et$c(this.opts),s);}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o);}o();}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o();}},xt$9=class xt extends zt$8{matches=new Set;constructor(t,e,s){super(t,e,s);}matchEmit(t){this.matches.add(t);}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches);});}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt$b=class vt extends zt$8{results;constructor(t,e,s){super(t,e,s),this.results=new V$a({signal:this.signal,objectMode:true}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume());}matchEmit(t){this.results.write(t),this.results.flowing||this.pause();}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end());}):this.walkCB(t,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 Wi$7=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I$7=class I{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(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=fileURLToPath(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==false,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`);}if(this.pattern=t,this.platform=e.platform||Wi$7,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else {let a=e.platform==="win32"?it$8:e.platform==="darwin"?St$b:e.platform?rt$b:Xe$a;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs});}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D$4(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let f=h[l];if(!f)throw new Error("invalid pattern object");return new nt$a(a,f,0,this.platform)});}async walk(){return [...await new xt$9(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 xt$9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new vt$b(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new vt$b(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 le$8=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D$4(e,t).hasMagic())return true;return false};function Bt$8(n,t={}){return new I$7(n,t).streamSync()}function Qe$a(n,t={}){return new I$7(n,t).stream()}function ts$7(n,t={}){return new I$7(n,t).walkSync()}async function Je$a(n,t={}){return new I$7(n,t).walk()}function Ut$a(n,t={}){return new I$7(n,t).iterateSync()}function es$7(n,t={}){return new I$7(n,t).iterate()}var Pi$7=Bt$8,ji$6=Object.assign(Qe$a,{sync:Bt$8}),Ii$7=Ut$a,zi$7=Object.assign(es$7,{sync:Ut$a}),Bi$7=Object.assign(ts$7,{stream:Bt$8,iterate:Ut$a}),Ze$a=Object.assign(Je$a,{glob:Je$a,globSync:ts$7,sync:Bi$7,globStream:Qe$a,stream:ji$6,globStreamSync:Bt$8,streamSync:Pi$7,globIterate:es$7,iterate:zi$7,globIterateSync:Ut$a,iterateSync:Ii$7,Glob:I$7,hasMagic:le$8,escape:tt$a,unescape:W$9});Ze$a.glob=Ze$a;
8407
+ var Gt$7=(n,t,e)=>{let s=n instanceof RegExp?ce$8(n,e):n,i=t instanceof RegExp?ce$8(t,e):t,r=s!==null&&i!=null&&ss$8(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}},ce$8=(n,t)=>{let e=t.match(n);return e?e[0]:null},ss$8=(n,t,e)=>{let s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),u=a;if(a>=0&&l>0){if(n===t)return [a,l];for(s=[],r=e.length;u>=0&&!h;){if(u===a)s.push(u),a=e.indexOf(n,u+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l]);}else i=s.pop(),i!==void 0&&i<r&&(r=i,o=l),l=e.indexOf(t,u+1);u=a<l&&a>=0?a:l;}s.length&&o!==void 0&&(h=[r,o]);}return h};var fe$9="\0SLASH"+Math.random()+"\0",ue$a="\0OPEN"+Math.random()+"\0",qt$a="\0CLOSE"+Math.random()+"\0",de$9="\0COMMA"+Math.random()+"\0",pe$7="\0PERIOD"+Math.random()+"\0",is$7=new RegExp(fe$9,"g"),rs$7=new RegExp(ue$a,"g"),ns$7=new RegExp(qt$a,"g"),os$5=new RegExp(de$9,"g"),hs$7=new RegExp(pe$7,"g"),as$7=/\\\\/g,ls$6=/\\{/g,cs$4=/\\}/g,fs$7=/\\,/g,us$7=/\\./g,ds$6=1e5;function Ht$a(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function ps$6(n){return n.replace(as$7,fe$9).replace(ls$6,ue$a).replace(cs$4,qt$a).replace(fs$7,de$9).replace(us$7,pe$7)}function ms$7(n){return n.replace(is$7,"\\").replace(rs$7,"{").replace(ns$7,"}").replace(os$5,",").replace(hs$7,".")}function me$b(n){if(!n)return [""];let t=[],e=Gt$7("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,o=s.split(",");o[o.length-1]+="{"+i+"}";let h=me$b(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function ge$a(n,t={}){if(!n)return [];let{max:e=ds$6}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht$9(ps$6(n),e,true).map(ms$7)}function gs$5(n){return "{"+n+"}"}function ws$6(n){return /^-?0\d/.test(n)}function ys$7(n,t){return n<=t}function bs$7(n,t){return n>=t}function ht$9(n,t,e){let s=[],i=Gt$7("{","}",n);if(!i)return [n];let r=i.pre,o=i.post.length?ht$9(i.post,t,false):[""];if(/\$$/.test(i.pre))for(let h=0;h<o.length&&h<t;h++){let a=r+"{"+i.body+"}"+o[h];s.push(a);}else {let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=h||a,u=i.body.indexOf(",")>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+qt$a+i.post,ht$9(n,t,true)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=me$b(i.body),c.length===1&&c[0]!==void 0&&(c=ht$9(c[0],t,false).map(gs$5),c.length===1))return o.map(f=>i.pre+c[0]+f);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let f=Ht$a(c[0]),m=Ht$a(c[1]),p=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Ht$a(c[2])):1,g=ys$7;m<f&&(w*=-1,g=bs$7);let E=c.some(ws$6);d=[];for(let y=f;g(y,m);y+=w){let b;if(a)b=String.fromCharCode(y),b==="\\"&&(b="");else if(b=String(y),E){let z=p-b.length;if(z>0){let $=new Array(z+1).join("0");y<0?b="-"+$+b.slice(1):b=$+b;}}d.push(b);}}else {d=[];for(let f=0;f<c.length;f++)d.push.apply(d,ht$9(c[f],t,false));}for(let f=0;f<d.length;f++)for(let m=0;m<o.length&&s.length<t;m++){let p=r+d[f]+o[m];(!e||l||p)&&s.push(p);}}return s}var at$a=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ss$7={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x00-\\x7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]},lt$7=n=>n.replace(/[[\]\\-]/g,"\\$&"),Es$7=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we$8=n=>n.join(""),ye$b=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=false,h=false,a=false,l=false,u=e,c="";t:for(;r<n.length;){let p=n.charAt(r);if((p==="!"||p==="^")&&r===e+1){l=true,r++;continue}if(p==="]"&&o&&!a){u=r+1;break}if(o=true,p==="\\"&&!a){a=true,r++;continue}if(p==="["&&!a){for(let[w,[g,S,E]]of Object.entries(Ss$7))if(n.startsWith(w,r)){if(c)return ["$.",false,n.length-e,true];r+=w.length,E?i.push(g):s.push(g),h=h||S;continue t}}if(a=false,c){p>c?s.push(lt$7(c)+"-"+lt$7(p)):p===c&&s.push(lt$7(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(lt$7(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(lt$7(p)),r++;}if(u<r)return ["",false,0,false];if(!s.length&&!i.length)return ["$.",false,n.length-e,true];if(i.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let p=s[0].length===2?s[0].slice(-1):s[0];return [Es$7(p),false,u-e,false]}let d="["+(l?"^":"")+we$8(s)+"]",f="["+(l?"":"^")+we$8(i)+"]";return [s.length&&i.length?"("+d+"|"+f+")":s.length?d:f,h,u-e,true]};var W$9=(n,{windowsPathsNoEscape:t=false,magicalBraces:e=true}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var xs$6=new Set(["!","?","+","*","@"]),be$9=n=>xs$6.has(n),vs$7="(?!(?:^|/)\\.\\.?(?:$|/))",Ct$b="(?!\\.)",Cs$5=new Set(["[","."]),Ts$4=new Set(["..","."]),As$7=new Set("().*{}+?[]^$\\!"),ks$7=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kt$8="[^/]",Se$a=Kt$8+"*?",Ee$8=Kt$8+"+?",Q$9=class n{type;#t;#s;#n=false;#r=[];#o;#S;#w;#c=false;#h;#u;#f=false;constructor(t,e,s={}){this.type=t,t&&(this.#s=true),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#o?this.#o.#r.length:0;}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=true;return this.#s}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=true;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&i<s.#r.length;i++)for(let r of t.#r){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#r[i]);}e=s,s=e.#o;}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof n&&e.#o===this))throw new Error("invalid part: "+e);this.#r.push(e);}}toJSON(){let t=this.type===null?this.#r.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return true;if(!this.#o?.isStart())return false;if(this.#S===0)return true;let t=this.#o;for(let e=0;e<this.#S;e++){let s=t.#r[e];if(!(s instanceof n&&s.type==="!"))return false}return true}isEnd(){if(this.#t===this||this.#o?.type==="!")return true;if(!this.#o?.isEnd())return false;if(!this.type)return this.#o?.isEnd();let t=this.#o?this.#o.#r.length:0;return this.#S===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this));}clone(t){let e=new n(this.type,t);for(let s of this.#r)e.copyIn(s);return e}static#i(t,e,s,i){let r=false,o=false,h=-1,a=false;if(e.type===null){let f=s,m="";for(;f<t.length;){let p=t.charAt(f++);if(r||p==="\\"){r=!r,m+=p;continue}if(o){f===h+1?(p==="^"||p==="!")&&(a=true):p==="]"&&!(f===h+2&&a)&&(o=false),m+=p;continue}else if(p==="["){o=true,h=f,a=false,m+=p;continue}if(!i.noext&&be$9(p)&&t.charAt(f)==="("){e.push(m),m="";let w=new n(p,e);f=n.#i(t,w,f,i),e.push(w);continue}m+=p;}return e.push(m),f}let l=s+1,u=new n(null,e),c=[],d="";for(;l<t.length;){let f=t.charAt(l++);if(r||f==="\\"){r=!r,d+=f;continue}if(o){l===h+1?(f==="^"||f==="!")&&(a=true):f==="]"&&!(l===h+2&&a)&&(o=false),d+=f;continue}else if(f==="["){o=true,h=l,a=false,d+=f;continue}if(be$9(f)&&t.charAt(l)==="("){u.push(d),d="";let m=new n(f,u);u.push(m),l=n.#i(t,m,l,i);continue}if(f==="|"){u.push(d),d="",c.push(u),u=new n(null,e);continue}if(f===")")return d===""&&e.#r.length===0&&(e.#f=true),u.push(d),d="",e.push(...c,u),l;d+=f;}return e.type=null,e.#s=void 0,e.#r=[t.substring(s-1)],l}static fromGlob(t,e={}){let s=new n(null,void 0,e);return n.#i(t,s,0,e),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,s,i,r]=this.toRegExpSource();if(!(i||this.#s||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let h=(this.#h.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,h),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){let e=t??!!this.#h.dot;if(this.#t===this&&this.#a(),!this.type){let a=this.isStart()&&this.isEnd()&&!this.#r.some(f=>typeof f!="string"),l=this.#r.map(f=>{let[m,p,w,g]=typeof f=="string"?n.#E(f,this.#s,a):f.toRegExpSource(t);return this.#s=this.#s||w,this.#n=this.#n||g,m}).join(""),u="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Ts$4.has(this.#r[0]))){let m=Cs$5,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),w=!e&&!t&&m.has(l.charAt(0));u=p?vs$7:w?Ct$b:"";}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[u+l+c,W$9(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,W$9(this.toString()),false,false]}let o=!s||t||e||!Ct$b?"":this.#d(true);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#f)h=(this.isStart()&&!e?Ct$b:"")+Ee$8;else {let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ct$b:"")+Se$a+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a;}return [h,W$9(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#E(t,e,s=false){let i=false,r="",o=false,h=false;for(let a=0;a<t.length;a++){let l=t.charAt(a);if(i){i=false,r+=(As$7.has(l)?"\\":"")+l;continue}if(l==="*"){if(h)continue;h=true,r+=s&&/^[*]+$/.test(t)?Ee$8:Se$a,e=true;continue}else h=false;if(l==="\\"){a===t.length-1?r+="\\\\":i=true;continue}if(l==="["){let[u,c,d,f]=ye$b(t,a);if(d){r+=u,o=o||c,a+=d-1,e=e||f;continue}}if(l==="?"){r+=Kt$8,e=true;continue}r+=ks$7(l);}return [r,W$9(t),!!e,o]}};var tt$a=(n,{windowsPathsNoEscape:t=false,magicalBraces:e=false}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O$5=(n,t,e={})=>(at$a(t),!e.nocomment&&t.charAt(0)==="#"?false:new D$4(t,e).match(n)),Rs$8=/^\*+([^+@!?\*\[\(]*)$/,Os$6=n=>t=>!t.startsWith(".")&&t.endsWith(n),Fs$8=n=>t=>t.endsWith(n),Ds$6=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ms$7=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ns$6=/^\*+\.\*+$/,_s$5=n=>!n.startsWith(".")&&n.includes("."),Ls$6=n=>n!=="."&&n!==".."&&n.includes("."),Ws$7=/^\.\*+$/,Ps$8=n=>n!=="."&&n!==".."&&n.startsWith("."),js$8=/^\*+$/,Is$7=n=>n.length!==0&&!n.startsWith("."),zs$7=n=>n.length!==0&&n!=="."&&n!=="..",Bs$9=/^\?+([^+@!?\*\[\(]*)?$/,Us$8=([n,t=""])=>{let e=Ce$9([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},$s$8=([n,t=""])=>{let e=Te$8([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Gs$7=([n,t=""])=>{let e=Te$8([n]);return t?s=>e(s)&&s.endsWith(t):e},Hs$8=([n,t=""])=>{let e=Ce$9([n]);return t?s=>e(s)&&s.endsWith(t):e},Ce$9=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Te$8=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ae$a=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xe$9={win32:{sep:"\\"},posix:{sep:"/"}},qs$8=Ae$a==="win32"?xe$9.win32.sep:xe$9.posix.sep;O$5.sep=qs$8;var A$7=Symbol("globstar **");O$5.GLOBSTAR=A$7;var Ks$7="[^/]",Vs$6=Ks$7+"*?",Ys$8="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Xs$7="(?:(?!(?:\\/|^)\\.).)*?",Js$9=(n,t={})=>e=>O$5(e,n,t);O$5.filter=Js$9;var N$7=(n,t={})=>Object.assign({},n,t),Zs$a=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O$5;let t=O$5;return Object.assign((s,i,r={})=>t(s,i,N$7(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,N$7(n,r));}static defaults(i){return t.defaults(N$7(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,N$7(n,o));}static fromGlob(i,r={}){return t.AST.fromGlob(i,N$7(n,r))}},unescape:(s,i={})=>t.unescape(s,N$7(n,i)),escape:(s,i={})=>t.escape(s,N$7(n,i)),filter:(s,i={})=>t.filter(s,N$7(n,i)),defaults:s=>t.defaults(N$7(n,s)),makeRe:(s,i={})=>t.makeRe(s,N$7(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,N$7(n,i)),match:(s,i,r={})=>t.match(s,i,N$7(n,r)),sep:t.sep,GLOBSTAR:A$7})};O$5.defaults=Zs$a;var ke$a=(n,t={})=>(at$a(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ge$a(n,{max:t.braceExpandMax}));O$5.braceExpand=ke$a;var Qs$8=(n,t={})=>new D$4(n,t).makeRe();O$5.makeRe=Qs$8;var ti$9=(n,t,e={})=>{let s=new D$4(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O$5.match=ti$9;var ve$a=/[?*]|[+@!]\(.*?\)|\[|\]/,ei$9=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D$4=class D{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at$a(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ae$a,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===false,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=false,this.nonegate=!!e.nonegate,this.comment=false,this.empty=false,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make();}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return true;for(let t of this.set)for(let e of t)if(typeof e!="string")return true;return false}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ve$a.test(r[2]))&&!ve$a.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return [...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(l)return [r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(false)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?");}this.debug(this.pattern,this.set);}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let i=0;i<t[s].length;i++)t[s][i]==="**"&&(t[s][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s);}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=false;do{if(e=false,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=true,t.splice(i,1),i--);}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=true,t.pop());}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let i=t[s-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=true,t.splice(s-1,2),s-=2);}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=false;do{e=false;for(let s of t){let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let o=i;for(;s[o+1]==="**";)o++;o>i&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=true,s.splice(i,1);let u=s.slice(0);u[i]="**",t.push(u),i--;}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let h=s[o];o===1&&h===""&&s[0]===""||(h==="."||h==="")&&(e=true,s.splice(o,1),o--);}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=true,s.pop());}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let o=s[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=true;let a=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...a),s.length===0&&s.push(""),r-=2;}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[],t[s]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=false){let i=0,r=0,o=[],h="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(h==="b"?e[r]:t[i]),i++,r++;else if(s&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(s&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(h==="b")return false;h="a",o.push(t[i]),i++,r++;}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(h==="a")return false;h="b",o.push(e[r]),i++,r++;}else return false;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=false,s=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e;}matchOne(t,e,s=false){let i=this.options;if(this.isWindows){let p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),E=w?3:p?0:void 0,y=S?3:g?0:void 0;if(typeof E=="number"&&typeof y=="number"){let[b,z]=[t[E],e[y]];b.toLowerCase()===z.toLowerCase()&&(e[y]=b,y>E?e=e.slice(y):E>y&&(t=t.slice(E)));}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o<a&&h<l;o++,h++){this.debug("matchOne loop");var u=e[h],c=t[o];if(this.debug(e,u,c),u===false)return false;if(u===A$7){this.debug("GLOBSTAR",[e,u,c]);var d=o,f=h+1;if(f===l){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return false;return true}for(;d<a;){var m=t[d];if(this.debug(`
8408
+ globstar while`,t,d,e,f,m),this.matchOne(t.slice(d),e.slice(f),s))return this.debug("globstar found match!",d,a,m),true;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,d,e,f);break}this.debug("globstar swallow a segment, and continue"),d++;}return !!(s&&(this.debug(`
8409
+ >>> no match, partial?`,t,d,e,f),d===a))}let p;if(typeof u=="string"?(p=c===u,this.debug("string match",u,c,p)):(p=u.test(c),this.debug("pattern match",u,c,p)),!p)return false}if(o===a&&h===l)return true;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke$a(this.pattern,this.options)}parse(t){at$a(t);let e=this.options;if(t==="**")return A$7;if(t==="")return "";let s,i=null;(s=t.match(js$8))?i=e.dot?zs$7:Is$7:(s=t.match(Rs$8))?i=(e.nocase?e.dot?Ms$7:Ds$6:e.dot?Fs$8:Os$6)(s[1]):(s=t.match(Bs$9))?i=(e.nocase?e.dot?$s$8:Us$8:e.dot?Gs$7:Hs$8)(s):(s=t.match(Ns$6))?i=e.dot?Ls$6:_s$5:(s=t.match(Ws$7))&&(i=Ps$8);let r=Q$9.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;let t=this.set;if(!t.length)return this.regexp=false,this.regexp;let e=this.options,s=e.noglobstar?Vs$6:e.dot?Ys$8:Xs$7,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei$9(c):c===A$7?A$7:c._src});l.forEach((c,d)=>{let f=l[d+1],m=l[d-1];c!==A$7||m===A$7||(m===void 0?f!==void 0&&f!==A$7?l[d+1]="(?:\\/|"+s+"\\/)?"+f:l[d]=s:f===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":f!==A$7&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+f,l[d+1]=A$7));});let u=l.filter(c=>c!==A$7);if(this.partial&&u.length>=1){let c=[];for(let d=1;d<=u.length;d++)c.push(u.slice(0,d).join("/"));return "(?:"+c.join("|")+")"}return u.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""));}catch{this.regexp=false;}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return false;if(this.empty)return t==="";if(t==="/"&&e)return true;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h<r.length;h++){let a=r[h],l=i;if(s.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,e))return s.flipNegate?true:!this.negate}return s.flipNegate?false:this.negate}static defaults(t){return O$5.defaults(t).Minimatch}};O$5.AST=Q$9;O$5.Minimatch=D$4;O$5.escape=tt$a;O$5.unescape=W$9;var si$9=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oe$a=new Set,Vt$a=typeof process=="object"&&process?process:{},Fe$9=(n,t,e,s)=>{typeof Vt$a.emitWarning=="function"?Vt$a.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`);},At$b=globalThis.AbortController,Re$a=globalThis.AbortSignal;if(typeof At$b>"u"){Re$a=class{onabort;_onabort=[];reason;aborted=false;addEventListener(e,s){this._onabort.push(s);}},At$b=class{constructor(){t();}signal=new Re$a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=true;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e);}}};let n=Vt$a.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=false,Fe$9("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",t));};}var ii$9=n=>!Oe$a.has(n);var q$a=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De$a=n=>q$a(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt$b:null:null,Tt$b=class Tt extends Array{constructor(n){super(n),this.fill(0);}},ri$9=class ct{heap;length;static#t=false;static create(t){let e=De$a(t);if(!e)return [];ct.#t=true;let s=new ct(t,e);return ct.#t=false,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0;}push(t){this.heap[this.length++]=t;}pop(){return this.heap[--this.length]}},ft$9=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return {starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si$9,e!==0&&!q$a(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De$a(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!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(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri$9.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof u=="function"&&(this.#r=u),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q$a(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q$a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G();}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q$a(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q$a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M();}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii$9($t)&&(Oe$a.add($t),Fe$9("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me));}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt$b(this.#t),e=new Tt$b(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire");},h+1);l.unref&&l.unref(),s[o]=l;}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0;},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let u=o.now-l;o.remainingTTL=a-u;}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let u=(i||r())-l;return a-u},this.#v=o=>{let h=e[o],a=t[o];return !!a&&!!h&&(i||r())-h>a};}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>false;#G(){let t=new Tt$b(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0;},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q$a(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q$a(i))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 i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(true);}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u);};}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e];}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e];}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}purgeStale(){let t=false;for(let e of this.#D({allowStale:true}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=true);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now();}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:true})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h);}this.#C&&(o.size=this.#C[e]),t.unshift([s,o]);}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i;}this.set(e,s.value,s);}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,u=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=true),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(false):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,u,a),a&&(a.set="add"),l=false,this.#_&&this.#r?.(e,t,"add");else {this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#x&&this.#n?.(f,t,"set"),this.#e&&this.#m?.push([f,t,"set"]));}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,u,a),this.#i[c]=e,a){a.set="replace";let f=d&&this.#l(d)?d.__staleWhileFetching:d;f!==void 0&&(a.oldValue=f);}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace");}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#o?.(...f);}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e);}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return false;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),true}else i&&(i.has="miss");return false}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At$b,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=false)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=true,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),g&&!S&&!w)return c(o.signal.reason,E);let y=f,b=this.#i[e];return (b===f||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(t,p,a.options))),p},u=p=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=p),c(p,false)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=f;if(this.#i[e]===f&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,true)));});};s.status&&(s.status.fetchDispatched=true);let f=new Promise(d).then(l,u),m=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At$b}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=false,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else {let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=true)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=true)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=true),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=true),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss");}#$(t,e){this.#E[e]=t,this.#d[t]=e;}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t);}delete(t){return this.#O(t,"delete")}#O(t,e){let s=false;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=true,this.#h===1)this.#H(e);else {this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else {let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i];}this.#h--,this.#R.push(i);}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r);}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:true})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else {let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t]);}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0);}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s);}}};var Ne$9=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi$9=n=>!!n&&typeof n=="object"&&(n instanceof V$a||n instanceof Pe$9||hi$a(n)||ai$9(n)),hi$a=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.pipe=="function"&&n.pipe!==Pe$9.Writable.prototype.pipe,ai$9=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.write=="function"&&typeof n.end=="function",G$9=Symbol("EOF"),H$9=Symbol("maybeEmitEnd"),K$a=Symbol("emittedEnd"),kt$b=Symbol("emittingEnd"),ut$9=Symbol("emittedError"),Rt$a=Symbol("closed"),_e$a=Symbol("read"),Ot$b=Symbol("flush"),Le$a=Symbol("flushChunk"),P$7=Symbol("encoding"),et$a=Symbol("decoder"),v$7=Symbol("flowing"),dt$7=Symbol("paused"),st$7=Symbol("resume"),C$7=Symbol("buffer"),F$9=Symbol("pipes"),T$5=Symbol("bufferLength"),Yt$7=Symbol("bufferPush"),Ft$a=Symbol("bufferShift"),k$7=Symbol("objectMode"),x$7=Symbol("destroyed"),Xt$a=Symbol("error"),Jt$8=Symbol("emitData"),We$a=Symbol("emitEnd"),Zt$a=Symbol("emitEnd2"),B$6=Symbol("async"),Qt$9=Symbol("abort"),Dt$9=Symbol("aborted"),pt$9=Symbol("signal"),Y$6=Symbol("dataListeners"),M$8=Symbol("discarded"),mt$9=n=>Promise.resolve().then(n),li$9=n=>n(),ci$9=n=>n==="end"||n==="finish"||n==="prefinish",fi$a=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui$a=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt$b=class Mt{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st$7](),this.dest.on("drain",this.ondrain);}unpipe(){this.dest.removeListener("drain",this.ondrain);}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end();}},te$b=class te extends Mt$b{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe();}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors);}},di$a=n=>!!n.objectMode,pi$a=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V$a=class V extends EventEmitter$1{[v$7]=false;[dt$7]=false;[F$9]=[];[C$7]=[];[k$7];[P$7];[B$6];[et$a];[G$9]=false;[K$a]=false;[kt$b]=false;[Rt$a]=false;[ut$9]=null;[T$5]=0;[x$7]=false;[pt$9];[Dt$9]=false;[Y$6]=0;[M$8]=false;writable=true;readable=true;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di$a(e)?(this[k$7]=true,this[P$7]=null):pi$a(e)?(this[P$7]=e.encoding,this[k$7]=false):(this[k$7]=false,this[P$7]=null),this[B$6]=!!e.async,this[et$a]=this[P$7]?new StringDecoder(this[P$7]):null,e&&e.debugExposeBuffer===true&&Object.defineProperty(this,"buffer",{get:()=>this[C$7]}),e&&e.debugExposePipes===true&&Object.defineProperty(this,"pipes",{get:()=>this[F$9]});let{signal:s}=e;s&&(this[pt$9]=s,s.aborted?this[Qt$9]():s.addEventListener("abort",()=>this[Qt$9]()));}get bufferLength(){return this[T$5]}get encoding(){return this[P$7]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k$7]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B$6]}set async(t){this[B$6]=this[B$6]||!!t;}[Qt$9](){this[Dt$9]=true,this.emit("abort",this[pt$9]?.reason),this.destroy(this[pt$9]?.reason);}get aborted(){return this[Dt$9]}set aborted(t){}write(t,e,s){if(this[Dt$9])return false;if(this[G$9])throw new Error("write after end");if(this[x$7])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),true;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B$6]?mt$9:li$9;if(!this[k$7]&&!Buffer.isBuffer(t)){if(ui$a(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi$a(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k$7]?(this[v$7]&&this[T$5]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$7](t),this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7]):t.length?(typeof t=="string"&&!(e===this[P$7]&&!this[et$a]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P$7]&&(t=this[et$a].write(t)),this[v$7]&&this[T$5]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$7](t),this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7]):(this[T$5]!==0&&this.emit("readable"),s&&i(s),this[v$7])}read(t){if(this[x$7])return null;if(this[M$8]=false,this[T$5]===0||t===0||t&&t>this[T$5])return this[H$9](),null;this[k$7]&&(t=null),this[C$7].length>1&&!this[k$7]&&(this[C$7]=[this[P$7]?this[C$7].join(""):Buffer.concat(this[C$7],this[T$5])]);let e=this[_e$a](t||null,this[C$7][0]);return this[H$9](),e}[_e$a](t,e){if(this[k$7])this[Ft$a]();else {let s=e;t===s.length||t===null?this[Ft$a]():typeof s=="string"?(this[C$7][0]=s.slice(t),e=s.slice(0,t),this[T$5]-=t):(this[C$7][0]=s.subarray(t),e=s.subarray(0,t),this[T$5]-=t);}return this.emit("data",e),!this[C$7].length&&!this[G$9]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G$9]=true,this.writable=false,(this[v$7]||!this[dt$7])&&this[H$9](),this}[st$7](){this[x$7]||(!this[Y$6]&&!this[F$9].length&&(this[M$8]=true),this[dt$7]=false,this[v$7]=true,this.emit("resume"),this[C$7].length?this[Ot$b]():this[G$9]?this[H$9]():this.emit("drain"));}resume(){return this[st$7]()}pause(){this[v$7]=false,this[dt$7]=true,this[M$8]=false;}get destroyed(){return this[x$7]}get flowing(){return this[v$7]}get paused(){return this[dt$7]}[Yt$7](t){this[k$7]?this[T$5]+=1:this[T$5]+=t.length,this[C$7].push(t);}[Ft$a](){return this[k$7]?this[T$5]-=1:this[T$5]-=this[C$7][0].length,this[C$7].shift()}[Ot$b](t=false){do;while(this[Le$a](this[Ft$a]())&&this[C$7].length);!t&&!this[C$7].length&&!this[G$9]&&this.emit("drain");}[Le$a](t){return this.emit("data",t),this[v$7]}pipe(t,e){if(this[x$7])return t;this[M$8]=false;let s=this[K$a];return e=e||{},t===Ne$9.stdout||t===Ne$9.stderr?e.end=false:e.end=e.end!==false,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F$9].push(e.proxyErrors?new te$b(this,t,e):new Mt$b(this,t,e)),this[B$6]?mt$9(()=>this[st$7]()):this[st$7]()),t}unpipe(t){let e=this[F$9].find(s=>s.dest===t);e&&(this[F$9].length===1?(this[v$7]&&this[Y$6]===0&&(this[v$7]=false),this[F$9]=[]):this[F$9].splice(this[F$9].indexOf(e),1),e.unpipe());}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M$8]=false,this[Y$6]++,!this[F$9].length&&!this[v$7]&&this[st$7]();else if(t==="readable"&&this[T$5]!==0)super.emit("readable");else if(ci$9(t)&&this[K$a])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut$9]){let i=e;this[B$6]?mt$9(()=>i.call(this,this[ut$9])):i.call(this,this[ut$9]);}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y$6]=this.listeners("data").length,this[Y$6]===0&&!this[M$8]&&!this[F$9].length&&(this[v$7]=false)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return (t==="data"||t===void 0)&&(this[Y$6]=0,!this[M$8]&&!this[F$9].length&&(this[v$7]=false)),e}get emittedEnd(){return this[K$a]}[H$9](){!this[kt$b]&&!this[K$a]&&!this[x$7]&&this[C$7].length===0&&this[G$9]&&(this[kt$b]=true,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt$a]&&this.emit("close"),this[kt$b]=false);}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x$7&&this[x$7])return false;if(t==="data")return !this[k$7]&&!s?false:this[B$6]?(mt$9(()=>this[Jt$8](s)),true):this[Jt$8](s);if(t==="end")return this[We$a]();if(t==="close"){if(this[Rt$a]=true,!this[K$a]&&!this[x$7])return false;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut$9]=s,super.emit(Xt$a,s);let r=!this[pt$9]||this.listeners("error").length?super.emit("error",s):false;return this[H$9](),r}else if(t==="resume"){let r=super.emit("resume");return this[H$9](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H$9](),i}[Jt$8](t){for(let s of this[F$9])s.dest.write(t)===false&&this.pause();let e=this[M$8]?false:super.emit("data",t);return this[H$9](),e}[We$a](){return this[K$a]?false:(this[K$a]=true,this.readable=false,this[B$6]?(mt$9(()=>this[Zt$a]()),true):this[Zt$a]())}[Zt$a](){if(this[et$a]){let e=this[et$a].end();if(e){for(let s of this[F$9])s.dest.write(e);this[M$8]||super.emit("data",e);}}for(let e of this[F$9])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k$7]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k$7]||(t.dataLength+=s.length);}),await e,t}async concat(){if(this[k$7])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P$7]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x$7,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t());})}[Symbol.asyncIterator](){this[M$8]=false;let t=false,e=async()=>(this.pause(),t=true,{value:void 0,done:true});return {next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:false,value:i});if(this[G$9])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x$7,u),e(),o(c);},a=c=>{this.off("error",h),this.off("end",l),this.off(x$7,u),this.pause(),r({value:c,done:!!this[G$9]});},l=()=>{this.off("error",h),this.off("data",a),this.off(x$7,u),e(),r({done:true,value:void 0});},u=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x$7,u),this.once("error",h),this.once("end",l),this.once("data",a);})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[M$8]=false;let t=false,e=()=>(this.pause(),this.off(Xt$a,e),this.off(x$7,e),this.off("end",e),t=true,{done:true,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:false,value:i}};return this.once("end",e),this.once(Xt$a,e),this.once(x$7,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[x$7])return t?this.emit("error",t):this.emit(x$7),this;this[x$7]=true,this[M$8]=true,this[C$7].length=0,this[T$5]=0;let e=this;return typeof e.close=="function"&&!this[Rt$a]&&e.close(),t?this.emit("error",t):this.emit(x$7),this}static get isStream(){return oi$9}};var vi$a=realpathSync.native,wt$a={lstatSync:lstatSync,readdir:readdir$1,readdirSync:readdirSync,readlinkSync:readlinkSync,realpathSync:vi$a,promises:{lstat:lstat,readdir:readdir,readlink:readlink,realpath:realpath}},Ue$9=n=>!n||n===wt$a||n===fs$8?wt$a:{...wt$a,...n,promises:{...wt$a.promises,...n.promises||{}}},$e$a=/^\\\\\?\\([a-z]:)\\?$/i,Ri$7=n=>n.replace(/\//g,"\\").replace($e$a,"$1\\"),Oi$8=/[\\\/]/,L$8=0,Ge$a=1,He$9=2,U$8=4,qe$a=6,Ke$b=8,X$a=10,Ve$8=12,_$8=15,gt$9=~_$8,se$a=16,je$a=32,yt$9=64,j$8=128,Nt$b=256,Lt$9=512,Ie$a=yt$9|j$8|Lt$9,Fi$7=1023,ie$a=n=>n.isFile()?Ke$b:n.isDirectory()?U$8:n.isSymbolicLink()?X$a:n.isCharacterDevice()?He$9:n.isBlockDevice()?qe$a:n.isSocket()?Ve$8:n.isFIFO()?Ge$a:L$8,ze$a=new ft$9({max:2**12}),bt$c=n=>{let t=ze$a.get(n);if(t)return t;let e=n.normalize("NFKD");return ze$a.set(n,e),e},Be$9=new ft$9({max:2**12}),_t$8=n=>{let t=Be$9.get(n);if(t)return t;let e=bt$c(n.toLowerCase());return Be$9.set(n,e),e},Wt$9=class Wt extends ft$9{constructor(){super({max:256});}},ne$9=class ne extends ft$9{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1});}},Ye$9=Symbol("PathScurry setAsCwd"),R$9=class R{name;root;roots;parent;nocase;isCWD=false;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return (this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L$8,s,i,r,o,h){this.name=t,this.#C=r?_t$8(t):bt$c(t),this.#e=e&Fi$7,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue$9(h.fs);}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se$a,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t$8(t):bt$c(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L$8,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j$8),s.push(h),h}relative(){if(this.isCWD)return "";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return "";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return /^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return (this.#e&_$8)===L$8}isType(t){return this[`is${t}`]()}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.#e&_$8)===Ke$b}isDirectory(){return (this.#e&_$8)===U$8}isCharacterDevice(){return (this.#e&_$8)===He$9}isBlockDevice(){return (this.#e&_$8)===qe$a}isFIFO(){return (this.#e&_$8)===Ge$a}isSocket(){return (this.#e&_$8)===Ve$8}isSymbolicLink(){return (this.#e&X$a)===X$a}lstatCached(){return this.#e&je$a?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return true;if(!this.parent)return false;let t=this.#e&_$8;return !(t!==L$8&&t!==X$a||this.#e&Nt$b||this.#e&j$8)}calledReaddir(){return !!(this.#e&se$a)}isENOENT(){return !!(this.#e&j$8)}isNamed(t){return this.nocase?this.#C===_t$8(t):this.#C===bt$c(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se$a;for(let e=t.provisional;e<t.length;e++){let s=t[e];s&&s.#v();}}#v(){this.#e&j$8||(this.#e=(this.#e|j$8)&gt$9,this.#G());}#G(){let t=this.children();t.provisional=0;for(let e of t)e.#v();}#P(){this.#e|=Lt$9,this.#L();}#L(){if(this.#e&yt$9)return;let t=this.#e;(t&_$8)===U$8&&(t&=gt$9),this.#e=t|yt$9,this.#G();}#I(t=""){t==="ENOTDIR"||t==="EPERM"?this.#L():t==="ENOENT"?this.#v():this.children().provisional=0;}#F(t=""){t==="ENOTDIR"?this.parent.#L():t==="ENOENT"&&this.#v();}#D(t=""){let e=this.#e;e|=Nt$b,t==="ENOENT"&&(e|=j$8),(t==="EINVAL"||t==="UNKNOWN")&&(e&=gt$9),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#L();}#z(t,e){return this.#U(t,e)||this.#B(t,e)}#B(t,e){let s=ie$a(t),i=this.newChild(t.name,s,{parent:this}),r=i.#e&_$8;return r!==U$8&&r!==X$a&&r!==L$8&&(i.#e|=yt$9),e.unshift(i),e.provisional++,i}#U(t,e){for(let s=e.provisional;s<e.length;s++){let i=e[s];if((this.nocase?_t$8(t.name):bt$c(t.name))===i.#C)return this.#l(t,i,s,e)}}#l(t,e,s,i){let r=e.name;return e.#e=e.#e&gt$9|ie$a(t),r!==t.name&&(e.name=t.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if((this.#e&j$8)===0)try{return this.#$(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#F(t.code);}}lstatSync(){if((this.#e&j$8)===0)try{return this.#$(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#F(t.code);}}#$(t){let{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:o,blocks:h,ctime:a,ctimeMs:l,dev:u,gid:c,ino:d,mode:f,mtime:m,mtimeMs:p,nlink:w,rdev:g,size:S,uid:E}=t;this.#b=e,this.#a=s,this.#m=i,this.#E=r,this.#c=o,this.#f=h,this.#R=a,this.#d=l,this.#s=u,this.#S=c,this.#h=d,this.#n=f,this.#p=m,this.#i=p,this.#r=w,this.#w=g,this.#u=S,this.#o=E;let y=ie$a(t);this.#e=this.#e&gt$9|y|je$a,y!==L$8&&y!==U$8&&y!==X$a&&(this.#e|=yt$9);}#W=[];#O=false;#H(t){this.#O=false;let e=this.#W.slice();this.#W.length=0,e.forEach(s=>s(null,t));}readdirCB(t,e=false){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=true;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:true},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else {for(let h of o)this.#z(h,s);this.#j(s);}this.#H(s.slice(0,s.provisional));});}#q;async readdir(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else {let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t);}catch(i){this.#I(i.code),t.provisional=0;}this.#q=void 0,s();}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t);}catch(s){this.#I(s.code),t.provisional=0;}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie$a)return false;let t=_$8&this.#e;return t===L$8||t===U$8||t===X$a}shouldWalk(t,e){return (this.#e&U$8)===U$8&&!(this.#e&Ie$a)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}realpathSync(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}[Ye$9](t){if(t===this)return;t.isCWD=false,this.isCWD=true;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent;}},Pt$b=class n extends R$9{sep="\\";splitSep=Oi$8;constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return win32.parse(t).root}getRoot(t){if(t=Ri$7(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it$8(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e$a,"$1\\"),t===e}},jt$7=class n extends R$9{splitSep="/";sep="/";constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It$a=class It{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt$a}={}){this.#r=Ue$9(o),(t instanceof URL||t.startsWith("file://"))&&(t=fileURLToPath(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt$9,this.#s=new Wt$9,this.#n=new ne$9(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,c=e.sep,d=this.rootPath,f=false;for(let m of a){let p=u--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(f?"":c)+m}),f=true;}this.cwd=l;}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return []}readdirSync(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((f,m)=>{if(f)return d(f);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d();};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w();},true);},u=t;return new Promise((c,d)=>{l(u,f=>{if(f)return d(f);c(h);});})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let u=l.readdirSync();for(let c of u){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync();}d.shouldWalk(a,o)&&a.add(d);}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let u of l){(!r||r(u))&&(yield s?u:u.fullpath());let c=u;if(u.isSymbolicLink()){if(!(i&&(c=u.realpathSync())))continue;c.isUnknown()&&c.lstatSync();}c.shouldWalk(h,o)&&h.add(c);}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$a({objectMode:true});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],u=0,c=()=>{let d=false;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=(w,g,S=false)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,true));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=true));u--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y);}d&&!h.flowing?h.once("drain",c):p||c();},p=true;f.readdirCB(m,true),p=false;}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$a({objectMode:true}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],u=0,c=()=>{let d=false;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=f.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=true));u--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync();}w.shouldWalk(a,o)&&l.push(w);}}d&&!h.flowing&&h.once("drain",c);};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye$9](e);}},it$8=class it extends It$a{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase;}parseRootPath(t){return win32.parse(t).root.toUpperCase()}newRoot(t){return new Pt$b(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt$b=class rt extends It$a{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=false}=e;super(t,posix,"/",{...e,nocase:s}),this.nocase=s;}parseRootPath(t){return "/"}newRoot(t){return new jt$7(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St$b=class St extends rt$b{constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,{...e,nocase:s});}};process.platform==="win32"?Pt$b:jt$7;var Xe$a=process.platform==="win32"?it$8:process.platform==="darwin"?St$b:rt$b;var Di$7=n=>n.length>=1,Mi$6=n=>n.length>=1,Ni$8=Symbol.for("nodejs.util.inspect.custom"),nt$a=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=true;constructor(t,e,s,i){if(!Di$7(t))throw new TypeError("empty pattern list");if(!Mi$6(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[u,c,d,f,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[u,c,d,f,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length;}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",u=h+"/";this.#t=[l,...o],this.#s=[u,...a],this.length=this.#t.length;}}}[Ni$8](){return "Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A$7}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return !(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?false:(this.#u=false,true)}};var _i$8=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot$7=class ot{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=_i$8}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:true,nonegate:true};for(let h of t)this.add(h);}add(t){let e=new D$4(t,this.mmopts);for(let s=0;s<e.set.length;s++){let i=e.set[s],r=e.globParts[s];if(!i||!r)throw new Error("invalid pattern object");for(;i[0]==="."&&r[0]===".";)i.shift(),r.shift();let o=new nt$a(i,r,0,this.platform),h=new D$4(o.globString(),this.mmopts),a=r[r.length-1]==="**",l=o.isAbsolute();l?this.absolute.push(h):this.relative.push(h),a&&(l?this.absoluteChildren.push(h):this.relativeChildren.push(h));}}ignored(t){let e=t.fullpath(),s=`${e}/`,i=t.relative()||".",r=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(r))return true;for(let o of this.absolute)if(o.match(e)||o.match(s))return true;return false}childrenIgnored(t){let e=t.fullpath()+"/",s=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(s))return true;for(let i of this.absoluteChildren)if(i.match(e))return true;return false}};var oe$9=class n{store;constructor(t=new Map){this.store=t;}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]));}},he$a=class he{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r);}entries(){return [...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},ae$8=class ae{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e]);}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return [...this.store.keys()].filter(t=>t.canReaddir())}},Et$c=class n{hasWalkedCache;matches=new he$a;subwalks=new ae$8;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe$9;}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==false;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else {this.matches.add(i,true,false);continue}}if(i.isENOENT())continue;let a,l,u=false;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,u=true;if(a=r.pattern(),l=r.rest(),u){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r);}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A$7){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let f=i.parent||i;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,h,true);}}else a instanceof RegExp&&this.subwalks.add(i,r);}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A$7?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h);}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,false),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s);}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i);}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}};var Li$7=(n,t)=>typeof n=="string"?new ot$7([n],t):Array.isArray(n)?new ot$7(n,t):n,zt$8=class zt{path;patterns;opts;seen=new Set;paused=false;aborted=false;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==false,(s.ignore||!this.includeChildMatches)&&(this.#s=Li$7(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0;}));}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return !!this.#s?.childrenIgnored?.(t)}pause(){this.paused=true;}resume(){if(this.signal?.aborted)return;this.paused=false;let t;for(;!this.paused&&(t=this.#t.shift());)t();}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t());}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat();}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync();}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r);}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i);}else {let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i);}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e);}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e);}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et$c(this.opts),s);}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,u)=>this.walkCB3(h,u,s,o),true);}o();}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o();}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et$c(this.opts),s);}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o);}o();}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o();}},xt$9=class xt extends zt$8{matches=new Set;constructor(t,e,s){super(t,e,s);}matchEmit(t){this.matches.add(t);}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches);});}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt$b=class vt extends zt$8{results;constructor(t,e,s){super(t,e,s),this.results=new V$a({signal:this.signal,objectMode:true}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume());}matchEmit(t){this.results.write(t),this.results.flowing||this.pause();}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end());}):this.walkCB(t,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 Pi$7=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I$7=class I{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(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=fileURLToPath(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==false,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`);}if(this.pattern=t,this.platform=e.platform||Pi$7,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else {let a=e.platform==="win32"?it$8:e.platform==="darwin"?St$b:e.platform?rt$b:Xe$a;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs});}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D$4(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let u=h[l];if(!u)throw new Error("invalid pattern object");return new nt$a(a,u,0,this.platform)});}async walk(){return [...await new xt$9(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 xt$9(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new vt$b(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new vt$b(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 le$8=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D$4(e,t).hasMagic())return true;return false};function Bt$8(n,t={}){return new I$7(n,t).streamSync()}function Qe$a(n,t={}){return new I$7(n,t).stream()}function ts$7(n,t={}){return new I$7(n,t).walkSync()}async function Je$a(n,t={}){return new I$7(n,t).walk()}function Ut$a(n,t={}){return new I$7(n,t).iterateSync()}function es$7(n,t={}){return new I$7(n,t).iterate()}var ji$6=Bt$8,Ii$7=Object.assign(Qe$a,{sync:Bt$8}),zi$7=Ut$a,Bi$7=Object.assign(es$7,{sync:Ut$a}),Ui$7=Object.assign(ts$7,{stream:Bt$8,iterate:Ut$a}),Ze$a=Object.assign(Je$a,{glob:Je$a,globSync:ts$7,sync:Ui$7,globStream:Qe$a,stream:Ii$7,globStreamSync:Bt$8,streamSync:ji$6,globIterate:es$7,iterate:Bi$7,globIterateSync:Ut$a,iterateSync:zi$7,Glob:I$7,hasMagic:le$8,escape:tt$a,unescape:W$9});Ze$a.glob=Ze$a;
8410
8410
 
8411
8411
  const balanced = (a, b, str) => {
8412
8412
  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
@@ -8846,8 +8846,110 @@ const unescape$1 = (s, { windowsPathsNoEscape = false, magicalBraces = true, } =
8846
8846
  };
8847
8847
 
8848
8848
  // parse a single path portion
8849
+ var _a$5;
8849
8850
  const types = new Set(['!', '?', '+', '*', '@']);
8850
8851
  const isExtglobType = (c) => types.has(c);
8852
+ const isExtglobAST = (c) => isExtglobType(c.type);
8853
+ // Map of which extglob types can adopt the children of a nested extglob
8854
+ //
8855
+ // anything but ! can adopt a matching type:
8856
+ // +(a|+(b|c)|d) => +(a|b|c|d)
8857
+ // *(a|*(b|c)|d) => *(a|b|c|d)
8858
+ // @(a|@(b|c)|d) => @(a|b|c|d)
8859
+ // ?(a|?(b|c)|d) => ?(a|b|c|d)
8860
+ //
8861
+ // * can adopt anything, because 0 or repetition is allowed
8862
+ // *(a|?(b|c)|d) => *(a|b|c|d)
8863
+ // *(a|+(b|c)|d) => *(a|b|c|d)
8864
+ // *(a|@(b|c)|d) => *(a|b|c|d)
8865
+ //
8866
+ // + can adopt @, because 1 or repetition is allowed
8867
+ // +(a|@(b|c)|d) => +(a|b|c|d)
8868
+ //
8869
+ // + and @ CANNOT adopt *, because 0 would be allowed
8870
+ // +(a|*(b|c)|d) => would match "", on *(b|c)
8871
+ // @(a|*(b|c)|d) => would match "", on *(b|c)
8872
+ //
8873
+ // + and @ CANNOT adopt ?, because 0 would be allowed
8874
+ // +(a|?(b|c)|d) => would match "", on ?(b|c)
8875
+ // @(a|?(b|c)|d) => would match "", on ?(b|c)
8876
+ //
8877
+ // ? can adopt @, because 0 or 1 is allowed
8878
+ // ?(a|@(b|c)|d) => ?(a|b|c|d)
8879
+ //
8880
+ // ? and @ CANNOT adopt * or +, because >1 would be allowed
8881
+ // ?(a|*(b|c)|d) => would match bbb on *(b|c)
8882
+ // @(a|*(b|c)|d) => would match bbb on *(b|c)
8883
+ // ?(a|+(b|c)|d) => would match bbb on +(b|c)
8884
+ // @(a|+(b|c)|d) => would match bbb on +(b|c)
8885
+ //
8886
+ // ! CANNOT adopt ! (nothing else can either)
8887
+ // !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)
8888
+ //
8889
+ // ! can adopt @
8890
+ // !(a|@(b|c)|d) => !(a|b|c|d)
8891
+ //
8892
+ // ! CANNOT adopt *
8893
+ // !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
8894
+ //
8895
+ // ! CANNOT adopt +
8896
+ // !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
8897
+ //
8898
+ // ! CANNOT adopt ?
8899
+ // x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match "x"
8900
+ const adoptionMap = new Map([
8901
+ ['!', ['@']],
8902
+ ['?', ['?', '@']],
8903
+ ['@', ['@']],
8904
+ ['*', ['*', '+', '?', '@']],
8905
+ ['+', ['+', '@']],
8906
+ ]);
8907
+ // nested extglobs that can be adopted in, but with the addition of
8908
+ // a blank '' element.
8909
+ const adoptionWithSpaceMap = new Map([
8910
+ ['!', ['?']],
8911
+ ['@', ['?']],
8912
+ ['+', ['?', '*']],
8913
+ ]);
8914
+ // union of the previous two maps
8915
+ const adoptionAnyMap = new Map([
8916
+ ['!', ['?', '@']],
8917
+ ['?', ['?', '@']],
8918
+ ['@', ['?', '@']],
8919
+ ['*', ['*', '+', '?', '@']],
8920
+ ['+', ['+', '@', '?', '*']],
8921
+ ]);
8922
+ // Extglobs that can take over their parent if they are the only child
8923
+ // the key is parent, value maps child to resulting extglob parent type
8924
+ // '@' is omitted because it's a special case. An `@` extglob with a single
8925
+ // member can always be usurped by that subpattern.
8926
+ const usurpMap = new Map([
8927
+ ['!', new Map([['!', '@']])],
8928
+ [
8929
+ '?',
8930
+ new Map([
8931
+ ['*', '*'],
8932
+ ['+', '*'],
8933
+ ]),
8934
+ ],
8935
+ [
8936
+ '@',
8937
+ new Map([
8938
+ ['!', '!'],
8939
+ ['?', '?'],
8940
+ ['@', '@'],
8941
+ ['*', '*'],
8942
+ ['+', '+'],
8943
+ ]),
8944
+ ],
8945
+ [
8946
+ '+',
8947
+ new Map([
8948
+ ['?', '*'],
8949
+ ['*', '*'],
8950
+ ]),
8951
+ ],
8952
+ ]);
8851
8953
  // Patterns that get prepended to bind to the start of either the
8852
8954
  // entire string, or just a single path portion, to prevent dots
8853
8955
  // and/or traversal patterns, when needed.
@@ -8871,6 +8973,7 @@ const star$1 = qmark$1 + '*?';
8871
8973
  const starNoEmpty = qmark$1 + '+?';
8872
8974
  // remove the \ chars that we added if we end up doing a nonmagic compare
8873
8975
  // const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
8976
+ let ID = 0;
8874
8977
  class AST {
8875
8978
  type;
8876
8979
  #root;
@@ -8886,6 +8989,22 @@ class AST {
8886
8989
  // set to true if it's an extglob with no children
8887
8990
  // (which really means one child of '')
8888
8991
  #emptyExt = false;
8992
+ id = ++ID;
8993
+ get depth() {
8994
+ return (this.#parent?.depth ?? -1) + 1;
8995
+ }
8996
+ [Symbol.for('nodejs.util.inspect.custom')]() {
8997
+ return {
8998
+ '@@type': 'AST',
8999
+ id: this.id,
9000
+ type: this.type,
9001
+ root: this.#root.id,
9002
+ parent: this.#parent?.id,
9003
+ depth: this.depth,
9004
+ partsLength: this.#parts.length,
9005
+ parts: this.#parts,
9006
+ };
9007
+ }
8889
9008
  constructor(type, parent, options = {}) {
8890
9009
  this.type = type;
8891
9010
  // extglobs are inherently magical
@@ -8965,7 +9084,7 @@ class AST {
8965
9084
  continue;
8966
9085
  /* c8 ignore start */
8967
9086
  if (typeof p !== 'string' &&
8968
- !(p instanceof AST && p.#parent === this)) {
9087
+ !(p instanceof _a$5 && p.#parent === this)) {
8969
9088
  throw new Error('invalid part: ' + p);
8970
9089
  }
8971
9090
  /* c8 ignore stop */
@@ -8999,7 +9118,7 @@ class AST {
8999
9118
  const p = this.#parent;
9000
9119
  for (let i = 0; i < this.#parentIndex; i++) {
9001
9120
  const pp = p.#parts[i];
9002
- if (!(pp instanceof AST && pp.type === '!')) {
9121
+ if (!(pp instanceof _a$5 && pp.type === '!')) {
9003
9122
  return false;
9004
9123
  }
9005
9124
  }
@@ -9027,13 +9146,14 @@ class AST {
9027
9146
  this.push(part.clone(this));
9028
9147
  }
9029
9148
  clone(parent) {
9030
- const c = new AST(this.type, parent);
9149
+ const c = new _a$5(this.type, parent);
9031
9150
  for (const p of this.#parts) {
9032
9151
  c.copyIn(p);
9033
9152
  }
9034
9153
  return c;
9035
9154
  }
9036
- static #parseAST(str, ast, pos, opt) {
9155
+ static #parseAST(str, ast, pos, opt, extDepth) {
9156
+ const maxDepth = opt.maxExtglobRecursion ?? 2;
9037
9157
  let escaping = false;
9038
9158
  let inBrace = false;
9039
9159
  let braceStart = -1;
@@ -9070,11 +9190,17 @@ class AST {
9070
9190
  acc += c;
9071
9191
  continue;
9072
9192
  }
9073
- if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
9193
+ // we don't have to check for adoption here, because that's
9194
+ // done at the other recursion point.
9195
+ const doRecurse = !opt.noext &&
9196
+ isExtglobType(c) &&
9197
+ str.charAt(i) === '(' &&
9198
+ extDepth <= maxDepth;
9199
+ if (doRecurse) {
9074
9200
  ast.push(acc);
9075
9201
  acc = '';
9076
- const ext = new AST(c, ast);
9077
- i = AST.#parseAST(str, ext, i, opt);
9202
+ const ext = new _a$5(c, ast);
9203
+ i = _a$5.#parseAST(str, ext, i, opt, extDepth + 1);
9078
9204
  ast.push(ext);
9079
9205
  continue;
9080
9206
  }
@@ -9086,7 +9212,7 @@ class AST {
9086
9212
  // some kind of extglob, pos is at the (
9087
9213
  // find the next | or )
9088
9214
  let i = pos + 1;
9089
- let part = new AST(null, ast);
9215
+ let part = new _a$5(null, ast);
9090
9216
  const parts = [];
9091
9217
  let acc = '';
9092
9218
  while (i < str.length) {
@@ -9117,19 +9243,26 @@ class AST {
9117
9243
  acc += c;
9118
9244
  continue;
9119
9245
  }
9120
- if (isExtglobType(c) && str.charAt(i) === '(') {
9246
+ const doRecurse = !opt.noext &&
9247
+ isExtglobType(c) &&
9248
+ str.charAt(i) === '(' &&
9249
+ /* c8 ignore start - the maxDepth is sufficient here */
9250
+ (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)));
9251
+ /* c8 ignore stop */
9252
+ if (doRecurse) {
9253
+ const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
9121
9254
  part.push(acc);
9122
9255
  acc = '';
9123
- const ext = new AST(c, part);
9256
+ const ext = new _a$5(c, part);
9124
9257
  part.push(ext);
9125
- i = AST.#parseAST(str, ext, i, opt);
9258
+ i = _a$5.#parseAST(str, ext, i, opt, extDepth + depthAdd);
9126
9259
  continue;
9127
9260
  }
9128
9261
  if (c === '|') {
9129
9262
  part.push(acc);
9130
9263
  acc = '';
9131
9264
  parts.push(part);
9132
- part = new AST(null, ast);
9265
+ part = new _a$5(null, ast);
9133
9266
  continue;
9134
9267
  }
9135
9268
  if (c === ')') {
@@ -9151,9 +9284,82 @@ class AST {
9151
9284
  ast.#parts = [str.substring(pos - 1)];
9152
9285
  return i;
9153
9286
  }
9287
+ #canAdoptWithSpace(child) {
9288
+ return this.#canAdopt(child, adoptionWithSpaceMap);
9289
+ }
9290
+ #canAdopt(child, map = adoptionMap) {
9291
+ if (!child ||
9292
+ typeof child !== 'object' ||
9293
+ child.type !== null ||
9294
+ child.#parts.length !== 1 ||
9295
+ this.type === null) {
9296
+ return false;
9297
+ }
9298
+ const gc = child.#parts[0];
9299
+ if (!gc || typeof gc !== 'object' || gc.type === null) {
9300
+ return false;
9301
+ }
9302
+ return this.#canAdoptType(gc.type, map);
9303
+ }
9304
+ #canAdoptType(c, map = adoptionAnyMap) {
9305
+ return !!map.get(this.type)?.includes(c);
9306
+ }
9307
+ #adoptWithSpace(child, index) {
9308
+ const gc = child.#parts[0];
9309
+ const blank = new _a$5(null, gc, this.options);
9310
+ blank.#parts.push('');
9311
+ gc.push(blank);
9312
+ this.#adopt(child, index);
9313
+ }
9314
+ #adopt(child, index) {
9315
+ const gc = child.#parts[0];
9316
+ this.#parts.splice(index, 1, ...gc.#parts);
9317
+ for (const p of gc.#parts) {
9318
+ if (typeof p === 'object')
9319
+ p.#parent = this;
9320
+ }
9321
+ this.#toString = undefined;
9322
+ }
9323
+ #canUsurpType(c) {
9324
+ const m = usurpMap.get(this.type);
9325
+ return !!(m?.has(c));
9326
+ }
9327
+ #canUsurp(child) {
9328
+ if (!child ||
9329
+ typeof child !== 'object' ||
9330
+ child.type !== null ||
9331
+ child.#parts.length !== 1 ||
9332
+ this.type === null ||
9333
+ this.#parts.length !== 1) {
9334
+ return false;
9335
+ }
9336
+ const gc = child.#parts[0];
9337
+ if (!gc || typeof gc !== 'object' || gc.type === null) {
9338
+ return false;
9339
+ }
9340
+ return this.#canUsurpType(gc.type);
9341
+ }
9342
+ #usurp(child) {
9343
+ const m = usurpMap.get(this.type);
9344
+ const gc = child.#parts[0];
9345
+ const nt = m?.get(gc.type);
9346
+ /* c8 ignore start - impossible */
9347
+ if (!nt)
9348
+ return false;
9349
+ /* c8 ignore stop */
9350
+ this.#parts = gc.#parts;
9351
+ for (const p of this.#parts) {
9352
+ if (typeof p === 'object') {
9353
+ p.#parent = this;
9354
+ }
9355
+ }
9356
+ this.type = nt;
9357
+ this.#toString = undefined;
9358
+ this.#emptyExt = false;
9359
+ }
9154
9360
  static fromGlob(pattern, options = {}) {
9155
- const ast = new AST(null, undefined, options);
9156
- AST.#parseAST(pattern, ast, 0, options);
9361
+ const ast = new _a$5(null, undefined, options);
9362
+ _a$5.#parseAST(pattern, ast, 0, options, 0);
9157
9363
  return ast;
9158
9364
  }
9159
9365
  // returns the regular expression if there's magic, or the unescaped
@@ -9257,16 +9463,18 @@ class AST {
9257
9463
  // or start or whatever) and prepend ^ or / at the Regexp construction.
9258
9464
  toRegExpSource(allowDot) {
9259
9465
  const dot = allowDot ?? !!this.#options.dot;
9260
- if (this.#root === this)
9466
+ if (this.#root === this) {
9467
+ this.#flatten();
9261
9468
  this.#fillNegs();
9262
- if (!this.type) {
9469
+ }
9470
+ if (!isExtglobAST(this)) {
9263
9471
  const noEmpty = this.isStart() &&
9264
9472
  this.isEnd() &&
9265
9473
  !this.#parts.some(s => typeof s !== 'string');
9266
9474
  const src = this.#parts
9267
9475
  .map(p => {
9268
9476
  const [re, _, hasMagic, uflag] = typeof p === 'string' ?
9269
- AST.#parseGlob(p, this.#hasMagic, noEmpty)
9477
+ _a$5.#parseGlob(p, this.#hasMagic, noEmpty)
9270
9478
  : p.toRegExpSource(allowDot);
9271
9479
  this.#hasMagic = this.#hasMagic || hasMagic;
9272
9480
  this.#uflag = this.#uflag || uflag;
@@ -9328,12 +9536,12 @@ class AST {
9328
9536
  // invalid extglob, has to at least be *something* present, if it's
9329
9537
  // the entire path portion.
9330
9538
  const s = this.toString();
9331
- this.#parts = [s];
9332
- this.type = null;
9333
- this.#hasMagic = undefined;
9539
+ const me = this;
9540
+ me.#parts = [s];
9541
+ me.type = null;
9542
+ me.#hasMagic = undefined;
9334
9543
  return [s, unescape$1(this.toString()), false, false];
9335
9544
  }
9336
- // XXX abstract out this map method
9337
9545
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ?
9338
9546
  ''
9339
9547
  : this.#partsToRegExp(true);
@@ -9369,6 +9577,42 @@ class AST {
9369
9577
  this.#uflag,
9370
9578
  ];
9371
9579
  }
9580
+ #flatten() {
9581
+ if (!isExtglobAST(this)) {
9582
+ for (const p of this.#parts) {
9583
+ if (typeof p === 'object') {
9584
+ p.#flatten();
9585
+ }
9586
+ }
9587
+ }
9588
+ else {
9589
+ // do up to 10 passes to flatten as much as possible
9590
+ let iterations = 0;
9591
+ let done = false;
9592
+ do {
9593
+ done = true;
9594
+ for (let i = 0; i < this.#parts.length; i++) {
9595
+ const c = this.#parts[i];
9596
+ if (typeof c === 'object') {
9597
+ c.#flatten();
9598
+ if (this.#canAdopt(c)) {
9599
+ done = false;
9600
+ this.#adopt(c, i);
9601
+ }
9602
+ else if (this.#canAdoptWithSpace(c)) {
9603
+ done = false;
9604
+ this.#adoptWithSpace(c, i);
9605
+ }
9606
+ else if (this.#canUsurp(c)) {
9607
+ done = false;
9608
+ this.#usurp(c);
9609
+ }
9610
+ }
9611
+ }
9612
+ } while (!done && ++iterations < 10);
9613
+ }
9614
+ this.#toString = undefined;
9615
+ }
9372
9616
  #partsToRegExp(dot) {
9373
9617
  return this.#parts
9374
9618
  .map(p => {
@@ -9439,6 +9683,7 @@ class AST {
9439
9683
  return [re, unescape$1(glob), !!hasMagic, uflag];
9440
9684
  }
9441
9685
  }
9686
+ _a$5 = AST;
9442
9687
 
9443
9688
  /**
9444
9689
  * Escape all magic characters in a glob pattern.
@@ -9656,11 +9901,13 @@ class Minimatch {
9656
9901
  isWindows;
9657
9902
  platform;
9658
9903
  windowsNoMagicRoot;
9904
+ maxGlobstarRecursion;
9659
9905
  regexp;
9660
9906
  constructor(pattern, options = {}) {
9661
9907
  assertValidPattern(pattern);
9662
9908
  options = options || {};
9663
9909
  this.options = options;
9910
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
9664
9911
  this.pattern = pattern;
9665
9912
  this.platform = options.platform || defaultPlatform;
9666
9913
  this.isWindows = this.platform === 'win32';
@@ -10065,7 +10312,8 @@ class Minimatch {
10065
10312
  // out of pattern, then that's fine, as long as all
10066
10313
  // the parts match.
10067
10314
  matchOne(file, pattern, partial = false) {
10068
- const options = this.options;
10315
+ let fileStartIndex = 0;
10316
+ let patternStartIndex = 0;
10069
10317
  // UNC paths like //?/X:/... can match X:/... and vice versa
10070
10318
  // Drive letters in absolute drive or unc paths are always compared
10071
10319
  // case-insensitively.
@@ -10094,14 +10342,11 @@ class Minimatch {
10094
10342
  file[fdi],
10095
10343
  pattern[pdi],
10096
10344
  ];
10345
+ // start matching at the drive letter index of each
10097
10346
  if (fd.toLowerCase() === pd.toLowerCase()) {
10098
10347
  pattern[pdi] = fd;
10099
- if (pdi > fdi) {
10100
- pattern = pattern.slice(pdi);
10101
- }
10102
- else if (fdi > pdi) {
10103
- file = file.slice(fdi);
10104
- }
10348
+ patternStartIndex = pdi;
10349
+ fileStartIndex = fdi;
10105
10350
  }
10106
10351
  }
10107
10352
  }
@@ -10111,99 +10356,185 @@ class Minimatch {
10111
10356
  if (optimizationLevel >= 2) {
10112
10357
  file = this.levelTwoFileOptimize(file);
10113
10358
  }
10114
- this.debug('matchOne', this, { file, pattern });
10115
- this.debug('matchOne', file.length, pattern.length);
10116
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
10359
+ if (pattern.includes(GLOBSTAR)) {
10360
+ return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
10361
+ }
10362
+ return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
10363
+ }
10364
+ #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
10365
+ // split the pattern into head, tail, and middle of ** delimited parts
10366
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
10367
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
10368
+ // split the pattern up into globstar-delimited sections
10369
+ // the tail has to be at the end, and the others just have
10370
+ // to be found in order from the head.
10371
+ const [head, body, tail] = partial ? [
10372
+ pattern.slice(patternIndex, firstgs),
10373
+ pattern.slice(firstgs + 1),
10374
+ [],
10375
+ ] : [
10376
+ pattern.slice(patternIndex, firstgs),
10377
+ pattern.slice(firstgs + 1, lastgs),
10378
+ pattern.slice(lastgs + 1),
10379
+ ];
10380
+ // check the head, from the current file/pattern index.
10381
+ if (head.length) {
10382
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
10383
+ if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
10384
+ return false;
10385
+ }
10386
+ fileIndex += head.length;
10387
+ patternIndex += head.length;
10388
+ }
10389
+ // now we know the head matches!
10390
+ // if the last portion is not empty, it MUST match the end
10391
+ // check the tail
10392
+ let fileTailMatch = 0;
10393
+ if (tail.length) {
10394
+ // if head + tail > file, then we cannot possibly match
10395
+ if (tail.length + fileIndex > file.length)
10396
+ return false;
10397
+ // try to match the tail
10398
+ let tailStart = file.length - tail.length;
10399
+ if (this.#matchOne(file, tail, partial, tailStart, 0)) {
10400
+ fileTailMatch = tail.length;
10401
+ }
10402
+ else {
10403
+ // affordance for stuff like a/**/* matching a/b/
10404
+ // if the last file portion is '', and there's more to the pattern
10405
+ // then try without the '' bit.
10406
+ if (file[file.length - 1] !== '' ||
10407
+ fileIndex + tail.length === file.length) {
10408
+ return false;
10409
+ }
10410
+ tailStart--;
10411
+ if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
10412
+ return false;
10413
+ }
10414
+ fileTailMatch = tail.length + 1;
10415
+ }
10416
+ }
10417
+ // now we know the tail matches!
10418
+ // the middle is zero or more portions wrapped in **, possibly
10419
+ // containing more ** sections.
10420
+ // so a/**/b/**/c/**/d has become **/b/**/c/**
10421
+ // if it's empty, it means a/**/b, just verify we have no bad dots
10422
+ // if there's no tail, so it ends on /**, then we must have *something*
10423
+ // after the head, or it's not a matc
10424
+ if (!body.length) {
10425
+ let sawSome = !!fileTailMatch;
10426
+ for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
10427
+ const f = String(file[i]);
10428
+ sawSome = true;
10429
+ if (f === '.' ||
10430
+ f === '..' ||
10431
+ (!this.options.dot && f.startsWith('.'))) {
10432
+ return false;
10433
+ }
10434
+ }
10435
+ // in partial mode, we just need to get past all file parts
10436
+ return partial || sawSome;
10437
+ }
10438
+ // now we know that there's one or more body sections, which can
10439
+ // be matched anywhere from the 0 index (because the head was pruned)
10440
+ // through to the length-fileTailMatch index.
10441
+ // split the body up into sections, and note the minimum index it can
10442
+ // be found at (start with the length of all previous segments)
10443
+ // [section, before, after]
10444
+ const bodySegments = [[[], 0]];
10445
+ let currentBody = bodySegments[0];
10446
+ let nonGsParts = 0;
10447
+ const nonGsPartsSums = [0];
10448
+ for (const b of body) {
10449
+ if (b === GLOBSTAR) {
10450
+ nonGsPartsSums.push(nonGsParts);
10451
+ currentBody = [[], 0];
10452
+ bodySegments.push(currentBody);
10453
+ }
10454
+ else {
10455
+ currentBody[0].push(b);
10456
+ nonGsParts++;
10457
+ }
10458
+ }
10459
+ let i = bodySegments.length - 1;
10460
+ const fileLength = file.length - fileTailMatch;
10461
+ for (const b of bodySegments) {
10462
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
10463
+ }
10464
+ return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
10465
+ }
10466
+ // return false for "nope, not matching"
10467
+ // return null for "not matching, cannot keep trying"
10468
+ #matchGlobStarBodySections(file,
10469
+ // pattern section, last possible position for it
10470
+ bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
10471
+ // take the first body segment, and walk from fileIndex to its "after"
10472
+ // value at the end
10473
+ // If it doesn't match at that position, we increment, until we hit
10474
+ // that final possible position, and give up.
10475
+ // If it does match, then advance and try to rest.
10476
+ // If any of them fail we keep walking forward.
10477
+ // this is still a bit recursively painful, but it's more constrained
10478
+ // than previous implementations, because we never test something that
10479
+ // can't possibly be a valid matching condition.
10480
+ const bs = bodySegments[bodyIndex];
10481
+ if (!bs) {
10482
+ // just make sure that there's no bad dots
10483
+ for (let i = fileIndex; i < file.length; i++) {
10484
+ sawTail = true;
10485
+ const f = file[i];
10486
+ if (f === '.' ||
10487
+ f === '..' ||
10488
+ (!this.options.dot && f.startsWith('.'))) {
10489
+ return false;
10490
+ }
10491
+ }
10492
+ return sawTail;
10493
+ }
10494
+ // have a non-globstar body section to test
10495
+ const [body, after] = bs;
10496
+ while (fileIndex <= after) {
10497
+ const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
10498
+ // if limit exceeded, no match. intentional false negative,
10499
+ // acceptable break in correctness for security.
10500
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
10501
+ // match! see if the rest match. if so, we're done!
10502
+ const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
10503
+ if (sub !== false) {
10504
+ return sub;
10505
+ }
10506
+ }
10507
+ const f = file[fileIndex];
10508
+ if (f === '.' ||
10509
+ f === '..' ||
10510
+ (!this.options.dot && f.startsWith('.'))) {
10511
+ return false;
10512
+ }
10513
+ fileIndex++;
10514
+ }
10515
+ // walked off. no point continuing
10516
+ return partial || null;
10517
+ }
10518
+ #matchOne(file, pattern, partial, fileIndex, patternIndex) {
10519
+ let fi;
10520
+ let pi;
10521
+ let pl;
10522
+ let fl;
10523
+ for (fi = fileIndex,
10524
+ pi = patternIndex,
10525
+ fl = file.length,
10526
+ pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
10117
10527
  this.debug('matchOne loop');
10118
- var p = pattern[pi];
10119
- var f = file[fi];
10528
+ let p = pattern[pi];
10529
+ let f = file[fi];
10120
10530
  this.debug(pattern, p, f);
10121
10531
  // should be impossible.
10122
10532
  // some invalid regexp stuff in the set.
10123
10533
  /* c8 ignore start */
10124
- if (p === false) {
10534
+ if (p === false || p === GLOBSTAR) {
10125
10535
  return false;
10126
10536
  }
10127
10537
  /* c8 ignore stop */
10128
- if (p === GLOBSTAR) {
10129
- this.debug('GLOBSTAR', [pattern, p, f]);
10130
- // "**"
10131
- // a/**/b/**/c would match the following:
10132
- // a/b/x/y/z/c
10133
- // a/x/y/z/b/c
10134
- // a/b/x/b/x/c
10135
- // a/b/c
10136
- // To do this, take the rest of the pattern after
10137
- // the **, and see if it would match the file remainder.
10138
- // If so, return success.
10139
- // If not, the ** "swallows" a segment, and try again.
10140
- // This is recursively awful.
10141
- //
10142
- // a/**/b/**/c matching a/b/x/y/z/c
10143
- // - a matches a
10144
- // - doublestar
10145
- // - matchOne(b/x/y/z/c, b/**/c)
10146
- // - b matches b
10147
- // - doublestar
10148
- // - matchOne(x/y/z/c, c) -> no
10149
- // - matchOne(y/z/c, c) -> no
10150
- // - matchOne(z/c, c) -> no
10151
- // - matchOne(c, c) yes, hit
10152
- var fr = fi;
10153
- var pr = pi + 1;
10154
- if (pr === pl) {
10155
- this.debug('** at the end');
10156
- // a ** at the end will just swallow the rest.
10157
- // We have found a match.
10158
- // however, it will not swallow /.x, unless
10159
- // options.dot is set.
10160
- // . and .. are *never* matched by **, for explosively
10161
- // exponential reasons.
10162
- for (; fi < fl; fi++) {
10163
- if (file[fi] === '.' ||
10164
- file[fi] === '..' ||
10165
- (!options.dot && file[fi].charAt(0) === '.'))
10166
- return false;
10167
- }
10168
- return true;
10169
- }
10170
- // ok, let's see if we can swallow whatever we can.
10171
- while (fr < fl) {
10172
- var swallowee = file[fr];
10173
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
10174
- // XXX remove this slice. Just pass the start index.
10175
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
10176
- this.debug('globstar found match!', fr, fl, swallowee);
10177
- // found a match.
10178
- return true;
10179
- }
10180
- else {
10181
- // can't swallow "." or ".." ever.
10182
- // can only swallow ".foo" when explicitly asked.
10183
- if (swallowee === '.' ||
10184
- swallowee === '..' ||
10185
- (!options.dot && swallowee.charAt(0) === '.')) {
10186
- this.debug('dot detected!', file, fr, pattern, pr);
10187
- break;
10188
- }
10189
- // ** swallows a segment, and continue.
10190
- this.debug('globstar swallow a segment, and continue');
10191
- fr++;
10192
- }
10193
- }
10194
- // no match was found.
10195
- // However, in partial mode, we can't say this is necessarily over.
10196
- /* c8 ignore start */
10197
- if (partial) {
10198
- // ran out of file
10199
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
10200
- if (fr === fl) {
10201
- return true;
10202
- }
10203
- }
10204
- /* c8 ignore stop */
10205
- return false;
10206
- }
10207
10538
  // something other than **
10208
10539
  // non-magic patterns just have to match exactly
10209
10540
  // patterns with magic have been turned into regexps.
@@ -20545,13 +20876,21 @@ const bindMemberFunctions = inst => {
20545
20876
  }
20546
20877
  });
20547
20878
  };
20548
- let supportNoticeShown = false;
20879
+ const SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';
20880
+ const getSupportNoticeShown = () => typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY];
20881
+ const setSupportNoticeShown = () => {
20882
+ if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;
20883
+ };
20549
20884
  const usesLocize = inst => {
20550
20885
  if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;
20551
20886
  if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;
20552
20887
  if (inst?.options?.backend?.backends) {
20553
20888
  if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;
20554
20889
  }
20890
+ if (inst?.options?.backend?.projectId) return true;
20891
+ if (inst?.options?.backend?.backendOptions) {
20892
+ if (inst.options.backend.backendOptions.some(b => b?.projectId)) return true;
20893
+ }
20555
20894
  return false;
20556
20895
  };
20557
20896
  class I18n extends EventEmitter {
@@ -20606,9 +20945,9 @@ class I18n extends EventEmitter {
20606
20945
  if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
20607
20946
  this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
20608
20947
  }
20609
- if (this.options.showSupportNotice !== false && !usesLocize(this) && !supportNoticeShown) {
20948
+ if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {
20610
20949
  if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
20611
- supportNoticeShown = true;
20950
+ setSupportNoticeShown();
20612
20951
  }
20613
20952
  const createClassOnDemand = ClassOrObject => {
20614
20953
  if (!ClassOrObject) return null;
@@ -71843,4 +72182,4 @@ var typescript = /*#__PURE__*/Object.freeze({
71843
72182
  });
71844
72183
 
71845
72184
  export { HighlightJS as H, MarkdownIt as M, Ze$a as Z, resolveConfig as a, createTwoFilesPatch$1 as b, createSyncFn as c, dedent$1 as d, deflist_plugin as e, format2 as f, closest as g, distance as h, fm$2 as i, isCI as j, moduleImporter as k, cliProgress as l, minimatch as m, tinylr as n, createInstance as o, fse as p, inter as q, runAsWorker as r, ts$7 as t, watch$1 as w };
71846
- //# sourceMappingURL=vendor-BVmnvb-f.mjs.map
72185
+ //# sourceMappingURL=vendor-Bk5vSW_n.mjs.map