glob.js 84 KB

1
  1. (()=>{var t={505:t=>{"use strict";function e(t,e,r){t instanceof RegExp&&(t=s(t,r)),e instanceof RegExp&&(e=s(e,r));var n=i(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function s(t,e){var s=e.match(t);return s?s[0]:null}function i(t,e,s){var i,r,n,o,h,a=s.indexOf(t),l=s.indexOf(e,a+1),c=a;if(a>=0&&l>0){if(t===e)return[a,l];for(i=[],n=s.length;c>=0&&!h;)c==a?(i.push(c),a=s.indexOf(t,c+1)):1==i.length?h=[i.pop(),l]:((r=i.pop())<n&&(n=r,o=l),l=s.indexOf(e,c+1)),c=a<l&&a>=0?a:l;i.length&&(h=[n,o])}return h}t.exports=e,e.range=i},928:(t,e,s)=>{var i=s(505);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return m(function(t){return t.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(h).split("\\.").join(a)}(t),!0).map(c)};var r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",h="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function c(t){return t.split(r).join("\\").split(n).join("{").split(o).join("}").split(h).join(",").split(a).join(".")}function p(t){if(!t)return[""];var e=[],s=i("{","}",t);if(!s)return t.split(",");var r=s.pre,n=s.body,o=s.post,h=r.split(",");h[h.length-1]+="{"+n+"}";var a=p(o);return o.length&&(h[h.length-1]+=a.shift(),h.push.apply(h,a)),e.push.apply(e,h),e}function d(t){return"{"+t+"}"}function u(t){return/^-?0\d/.test(t)}function f(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var s=[],r=i("{","}",t);if(!r)return[t];var n=r.pre,h=r.post.length?m(r.post,!1):[""];if(/\$$/.test(r.pre))for(var a=0;a<h.length;a++){var c=n+"{"+r.body+"}"+h[a];s.push(c)}else{var y,w,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),v=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),S=b||v,k=r.body.indexOf(",")>=0;if(!S&&!k)return r.post.match(/,.*\}/)?m(t=r.pre+"{"+r.body+o+r.post):[t];if(S)y=r.body.split(/\.\./);else if(1===(y=p(r.body)).length&&1===(y=m(y[0],!1).map(d)).length)return h.map((function(t){return r.pre+y[0]+t}));if(S){var x=l(y[0]),E=l(y[1]),L=Math.max(y[0].length,y[1].length),T=3==y.length?Math.abs(l(y[2])):1,C=f;E<x&&(T*=-1,C=g);var M=y.some(u);w=[];for(var A=x;C(A,E);A+=T){var O;if(v)"\\"===(O=String.fromCharCode(A))&&(O="");else if(O=String(A),M){var P=L-O.length;if(P>0){var R=new Array(P+1).join("0");O=A<0?"-"+R+O.slice(1):R+O}}w.push(O)}}else{w=[];for(var F=0;F<y.length;F++)w.push.apply(w,m(y[F],!1))}for(F=0;F<w.length;F++)for(a=0;a<h.length;a++){c=n+w[F]+h[a];(!e||S||c)&&s.push(c)}}return s}},207:(t,e,s)=>{t.exports=s(756)},896:t=>{"use strict";t.exports=require("fs")},474:t=>{"use strict";t.exports=require("events")},24:t=>{"use strict";t.exports=require("fs")},455:t=>{"use strict";t.exports=require("fs/promises")},760:t=>{"use strict";t.exports=require("path")},75:t=>{"use strict";t.exports=require("stream")},193:t=>{"use strict";t.exports=require("string_decoder")},136:t=>{"use strict";t.exports=require("url")},876:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;const i=s(722),r=s(136),n=s(576),o=s(478),h=s(984),a="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class l{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=(0,r.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=!1!==e.includeChildMatches,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof t&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(t=t.map((t=>t.replace(/\\/g,"/")))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map((t=>t.includes("/")?t:`./**/${t}`))}if(this.pattern=t,this.platform=e.platform||a,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,void 0!==e.nocase&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const t="win32"===e.platform?n.PathScurryWin32:"darwin"===e.platform?n.PathScurryDarwin:e.platform?n.PathScurryPosix:n.PathScurry;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s="darwin"===this.platform||"win32"===this.platform,h={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},l=this.pattern.map((t=>new i.Minimatch(t,h))),[c,p]=l.reduce(((t,e)=>(t[0].push(...e.set),t[1].push(...e.globParts),t)),[[],[]]);this.patterns=c.map(((t,e)=>{const s=p[e];if(!s)throw new Error("invalid pattern object");return new o.Pattern(t,s,0,this.platform)}))}async walk(){return[...await new h.GlobWalker(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 h.GlobWalker(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 h.GlobStream(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 h.GlobStream(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()}}e.Glob=l},46:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;const i=s(722);e.hasMagic=(t,e={})=>{Array.isArray(t)||(t=[t]);for(const s of t)if(new i.Minimatch(s,e).hasMagic())return!0;return!1}},972:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;const i=s(722),r=s(478),n="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=n}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(const e of t)this.add(e)}add(t){const e=new i.Minimatch(t,this.mmopts);for(let t=0;t<e.set.length;t++){const s=e.set[t],n=e.globParts[t];if(!s||!n)throw new Error("invalid pattern object");for(;"."===s[0]&&"."===n[0];)s.shift(),n.shift();const o=new r.Pattern(s,n,0,this.platform),h=new i.Minimatch(o.globString(),this.mmopts),a="**"===n[n.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){const e=t.fullpath(),s=`${e}/`,i=t.relative()||".",r=`${i}/`;for(const t of this.relative)if(t.match(i)||t.match(r))return!0;for(const t of this.absolute)if(t.match(e)||t.match(s))return!0;return!1}childrenIgnored(t){const e=t.fullpath()+"/",s=(t.relative()||".")+"/";for(const t of this.relativeChildren)if(t.match(s))return!0;for(const t of this.absoluteChildren)if(t.match(e))return!0;return!1}}},756:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.globIterate=e.globIterateSync=e.globSync=e.globStream=e.globStreamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0;const i=s(722),r=s(876),n=s(46);var o=s(722);Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return o.unescape}});var h=s(876);Object.defineProperty(e,"Glob",{enumerable:!0,get:function(){return h.Glob}});var a=s(46);Object.defineProperty(e,"hasMagic",{enumerable:!0,get:function(){return a.hasMagic}});var l=s(972);function c(t,e={}){return new r.Glob(t,e).streamSync()}function p(t,e={}){return new r.Glob(t,e).stream()}function d(t,e={}){return new r.Glob(t,e).walkSync()}async function u(t,e={}){return new r.Glob(t,e).walk()}function f(t,e={}){return new r.Glob(t,e).iterateSync()}function g(t,e={}){return new r.Glob(t,e).iterate()}Object.defineProperty(e,"Ignore",{enumerable:!0,get:function(){return l.Ignore}}),e.globStreamSync=c,e.globStream=p,e.globSync=d,e.globIterateSync=f,e.globIterate=g,e.streamSync=c,e.stream=Object.assign(p,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(g,{sync:f}),e.sync=Object.assign(d,{stream:c,iterate:f}),e.glob=Object.assign(u,{glob:u,globSync:d,sync:e.sync,globStream:p,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:g,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:r.Glob,hasMagic:n.hasMagic,escape:i.escape,unescape:i.unescape}),e.glob.glob=e.glob},478:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;const i=s(722);class r{#t;#e;#s;length;#i;#r;#n;#o;#h;#a;#l=!0;constructor(t,e,s,i){if(!(t.length>=1))throw new TypeError("empty pattern list");if(!(e.length>=1))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.#e=e,this.#s=s,this.#i=i,0===this.#s)if(this.isUNC()){const[t,e,s,i,...r]=this.#t,[n,o,h,a,...l]=this.#e;""===r[0]&&(r.shift(),l.shift());const c=[t,e,s,i,""].join("/"),p=[n,o,h,a,""].join("/");this.#t=[c,...r],this.#e=[p,...l],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#t,[s,...i]=this.#e;""===e[0]&&(e.shift(),i.shift());const r=t+"/",n=s+"/";this.#t=[r,...e],this.#e=[n,...i],this.length=this.#t.length}}pattern(){return this.#t[this.#s]}isString(){return"string"==typeof this.#t[this.#s]}isGlobstar(){return this.#t[this.#s]===i.GLOBSTAR}isRegExp(){return this.#t[this.#s]instanceof RegExp}globString(){return this.#n=this.#n||(0===this.#s?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return void 0!==this.#r?this.#r:this.hasMore()?(this.#r=new r(this.#t,this.#e,this.#s+1,this.#i),this.#r.#a=this.#a,this.#r.#h=this.#h,this.#r.#o=this.#o,this.#r):this.#r=null}isUNC(){const t=this.#t;return void 0!==this.#h?this.#h:this.#h="win32"===this.#i&&0===this.#s&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){const t=this.#t;return void 0!==this.#o?this.#o:this.#o="win32"===this.#i&&0===this.#s&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#t;return void 0!==this.#a?this.#a:this.#a=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#t[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#s?t:""}checkFollowGlobstar(){return!(0===this.#s||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return!(0===this.#s||!this.isGlobstar()||!this.#l)&&(this.#l=!1,!0)}}e.Pattern=r},800:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;const i=s(722);class r{store;constructor(t=new Map){this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}}e.HasWalkedCache=r;class n{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,void 0===r?i:i&r)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(2&e),!!(1&e)]))}}e.MatchRecord=n;class o{store=new Map;add(t,e){if(!t.canReaddir())return;const s=this.store.get(t);s?s.find((t=>t.globString()===e.globString()))||s.push(e):this.store.set(t,[e])}get(t){const 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()))}}e.SubWalks=o;class h{hasWalkedCache;matches=new n;subwalks=new o;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new r}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root(),r=e.isAbsolute()&&!1!==this.opts.absolute;if(s){t=t.resolve("/"===s&&void 0!==this.opts.root?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,!0,!1);continue}e=i}if(t.isENOENT())continue;let n,o,h=!1;for(;"string"==typeof(n=e.pattern())&&(o=e.rest());){const s=t.resolve(n);t=s,e=o,h=!0}if(n=e.pattern(),o=e.rest(),h){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if("string"!=typeof n)if(n===i.GLOBSTAR){(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar())&&this.subwalks.add(t,e);const s=o?.pattern(),i=o?.rest();if(o&&(""!==s&&"."!==s||i)){if(".."===s){const e=t.parent||t;i?this.hasWalkedCache.hasWalked(e,i)||this.subwalks.add(e,i):this.matches.add(e,r,!0)}}else this.matches.add(t,r,""===s||"."===s)}else n instanceof RegExp&&this.subwalks.add(t,e);else{const e=".."===n||""===n||"."===n;this.matches.add(t.resolve(n),r,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new h(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t),r=this.child();for(const t of e)for(const e of s){const s=e.isAbsolute(),n=e.pattern(),o=e.rest();n===i.GLOBSTAR?r.testGlobstar(t,e,o,s):n instanceof RegExp?r.testRegExp(t,n,o,s):r.testString(t,n,o,s)}return r}testGlobstar(t,e,s,i){if(!this.dot&&t.name.startsWith(".")||(e.hasMore()||this.matches.add(t,i,!1),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){const e=s.pattern();if("string"==typeof e&&".."!==e&&""!==e&&"."!==e)this.testString(t,e,s.rest(),i);else if(".."===e){const e=t.parent||t;this.subwalks.add(e,s)}else e instanceof RegExp&&this.testRegExp(t,e,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}}e.Processor=h},984:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;const i=s(420),r=s(972),n=s(800);class o{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#c=[];#p;#d;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#d=s.posix||"win32"!==s.platform?"/":"\\",this.includeChildMatches=!1!==s.includeChildMatches,(s.ignore||!this.includeChildMatches)&&(this.#p=((t,e)=>"string"==typeof t?new r.Ignore([t],e):Array.isArray(t)?new r.Ignore(t,e):t)(s.ignore??[],s),!this.includeChildMatches&&"function"!=typeof this.#p.add)){throw new Error("cannot ignore child matches, ignore lacks add() method.")}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",(()=>{this.#c.length=0})))}#u(t){return this.seen.has(t)||!!this.#p?.ignored?.(t)}#f(t){return!!this.#p?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let t;for(this.paused=!1;!this.paused&&(t=this.#c.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#c.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}const i=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=await i.realpath();t&&(t.isUnknown()||this.opts.stat)&&await t.lstat()}return this.matchCheckTest(i,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.#u(t)?void 0:t}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}const i=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=i.realpathSync();t&&(t?.isUnknown()||this.opts.stat)&&t.lstatSync()}return this.matchCheckTest(i,e)}matchFinish(t,e){if(this.#u(t))return;if(!this.includeChildMatches&&this.#p?.add){const e=`${t.relativePosix()}/**`;this.#p.add(e)}const s=void 0===this.opts.absolute?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#d:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative(),s=this.opts.dotRelative&&!e.startsWith(".."+this.#d)?"."+this.#d:"";this.matchEmit(e?s+e+i:"."+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new n.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#f(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume((()=>this.walkCB2(t,e,s,i)));s.processPatterns(t,e);let r=1;const n=()=>{0==--r&&i()};for(const[t,e,i]of s.matches.entries())this.#u(t)||(r++,this.match(t,e,i).then((()=>n())));for(const t of s.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;const e=t.readdirCached();t.calledReaddir()?this.walkCB3(t,e,s,n):t.readdirCB(((e,i)=>this.walkCB3(t,i,s,n)),!0)}n()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1;const n=()=>{0==--r&&i()};for(const[t,e,i]of s.matches.entries())this.#u(t)||(r++,this.match(t,e,i).then((()=>n())));for(const[t,e]of s.subwalks.entries())r++,this.walkCB2(t,e,s.child(),n);n()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new n.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#f(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume((()=>this.walkCB2Sync(t,e,s,i)));s.processPatterns(t,e);let r=1;const n=()=>{0==--r&&i()};for(const[t,e,i]of s.matches.entries())this.#u(t)||this.matchSync(t,e,i);for(const t of s.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;r++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,n)}n()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1;const n=()=>{0==--r&&i()};for(const[t,e,i]of s.matches.entries())this.#u(t)||this.matchSync(t,e,i);for(const[t,e]of s.subwalks.entries())r++,this.walkCB2Sync(t,e,s.child(),n);n()}}e.GlobUtil=o;e.GlobWalker=class extends o{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}};e.GlobStream=class extends o{results;constructor(t,e,s){super(t,e,s),this.results=new i.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){const 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}}},96:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;const s="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i=new Set,r="object"==typeof process&&process?process:{},n=(t,e,s,i)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let o=globalThis.AbortController,h=globalThis.AbortSignal;if(void 0===o){h=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},o=class{constructor(){e()}signal=new h;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,n("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const a=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),l=t=>a(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?c:null:null;class c extends Array{constructor(t){super(t),this.fill(0)}}class p{heap;length;static#g=!1;static create(t){const e=l(t);if(!e)return[];p.#g=!0;const s=new p(t,e);return p.#g=!1,s}constructor(t,e){if(!p.#g)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]}}class d{#m;#y;#w;#b;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#k;#x;#E;#L;#T;#C;#M;#A;#O;#P;#R;#F;#_;#z;#D;#j;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#_,sizes:t.#R,keyMap:t.#x,keyList:t.#E,valList:t.#L,next:t.#T,prev:t.#C,get head(){return t.#M},get tail(){return t.#A},free:t.#O,isBackgroundFetch:e=>t.#B(e),backgroundFetch:(e,s,i,r)=>t.#N(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#I(e),rindexes:e=>t.#G(e),isStale:e=>t.#U(e)}}get max(){return this.#m}get maxSize(){return this.#y}get calculatedSize(){return this.#k}get size(){return this.#S}get fetchMethod(){return this.#v}get dispose(){return this.#w}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:s,ttlResolution:r=1,ttlAutopurge:o,updateAgeOnGet:h,updateAgeOnHas:c,allowStale:u,dispose:f,disposeAfter:g,noDisposeOnSet:m,noUpdateTTL:y,maxSize:w=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:S,noDeleteOnFetchRejection:k,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:L,ignoreFetchAbort:T}=t;if(0!==e&&!a(e))throw new TypeError("max option must be a nonnegative integer");const C=e?l(e):Array;if(!C)throw new Error("invalid max value: "+e);if(this.#m=e,this.#y=w,this.maxEntrySize=b||this.#y,this.sizeCalculation=v,this.sizeCalculation){if(!this.#y&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("fetchMethod must be a function if specified");if(this.#v=S,this.#D=!!S,this.#x=new Map,this.#E=new Array(e).fill(void 0),this.#L=new Array(e).fill(void 0),this.#T=new C(e),this.#C=new C(e),this.#M=0,this.#A=0,this.#O=p.create(e),this.#S=0,this.#k=0,"function"==typeof f&&(this.#w=f),"function"==typeof g?(this.#b=g,this.#P=[]):(this.#b=void 0,this.#P=void 0),this.#z=!!this.#w,this.#j=!!this.#b,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!k,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!L,this.ignoreFetchAbort=!!T,0!==this.maxEntrySize){if(0!==this.#y&&!a(this.#y))throw new TypeError("maxSize must be a positive integer if specified");if(!a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!c,this.ttlResolution=a(r)||0===r?r:1,this.ttlAutopurge=!!o,this.ttl=s||0,this.ttl){if(!a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#q()}if(0===this.#m&&0===this.ttl&&0===this.#y)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#m&&!this.#y){const t="LRU_CACHE_UNBOUNDED";if((t=>!i.has(t))(t)){i.add(t);n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,d)}}}getRemainingTTL(t){return this.#x.has(t)?1/0:0}#q(){const t=new c(this.#m),e=new c(this.#m);this.#_=t,this.#F=e,this.#H=(i,r,n=s.now())=>{if(e[i]=0!==r?n:0,t[i]=r,0!==r&&this.ttlAutopurge){const t=setTimeout((()=>{this.#U(i)&&this.delete(this.#E[i])}),r+1);t.unref&&t.unref()}},this.#V=i=>{e[i]=0!==t[i]?s.now():0},this.#Z=(s,n)=>{if(t[n]){const o=t[n],h=e[n];if(!o||!h)return;s.ttl=o,s.start=h,s.now=i||r();const a=s.now-h;s.remainingTTL=o-a}};let i=0;const r=()=>{const t=s.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=s=>{const n=this.#x.get(s);if(void 0===n)return 0;const o=t[n],h=e[n];if(!o||!h)return 1/0;return o-((i||r())-h)},this.#U=s=>{const n=e[s],o=t[s];return!!o&&!!n&&(i||r())-n>o}}#V=()=>{};#Z=()=>{};#H=()=>{};#U=()=>!1;#$(){const t=new c(this.#m);this.#k=0,this.#R=t,this.#J=e=>{this.#k-=t[e],t[e]=0},this.#K=(t,e,s,i)=>{if(this.#B(e))return 0;if(!a(s)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(s=i(e,t),!a(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return s},this.#Y=(e,s,i)=>{if(t[e]=s,this.#y){const s=this.#y-t[e];for(;this.#k>s;)this.#X(!0)}this.#k+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#k)}}#J=t=>{};#Y=(t,e,s)=>{};#K=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#I({allowStale:t=this.allowStale}={}){if(this.#S)for(let e=this.#A;this.#Q(e)&&(!t&&this.#U(e)||(yield e),e!==this.#M);)e=this.#C[e]}*#G({allowStale:t=this.allowStale}={}){if(this.#S)for(let e=this.#M;this.#Q(e)&&(!t&&this.#U(e)||(yield e),e!==this.#A);)e=this.#T[e]}#Q(t){return void 0!==t&&this.#x.get(this.#E[t])===t}*entries(){for(const t of this.#I())void 0===this.#L[t]||void 0===this.#E[t]||this.#B(this.#L[t])||(yield[this.#E[t],this.#L[t]])}*rentries(){for(const t of this.#G())void 0===this.#L[t]||void 0===this.#E[t]||this.#B(this.#L[t])||(yield[this.#E[t],this.#L[t]])}*keys(){for(const t of this.#I()){const e=this.#E[t];void 0===e||this.#B(this.#L[t])||(yield e)}}*rkeys(){for(const t of this.#G()){const e=this.#E[t];void 0===e||this.#B(this.#L[t])||(yield e)}}*values(){for(const t of this.#I()){void 0===this.#L[t]||this.#B(this.#L[t])||(yield this.#L[t])}}*rvalues(){for(const t of this.#G()){void 0===this.#L[t]||this.#B(this.#L[t])||(yield this.#L[t])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#I()){const i=this.#L[s],r=this.#B(i)?i.__staleWhileFetching:i;if(void 0!==r&&t(r,this.#E[s],this))return this.get(this.#E[s],e)}}forEach(t,e=this){for(const s of this.#I()){const i=this.#L[s],r=this.#B(i)?i.__staleWhileFetching:i;void 0!==r&&t.call(e,r,this.#E[s],this)}}rforEach(t,e=this){for(const s of this.#G()){const i=this.#L[s],r=this.#B(i)?i.__staleWhileFetching:i;void 0!==r&&t.call(e,r,this.#E[s],this)}}purgeStale(){let t=!1;for(const e of this.#G({allowStale:!0}))this.#U(e)&&(this.delete(this.#E[e]),t=!0);return t}info(t){const e=this.#x.get(t);if(void 0===e)return;const i=this.#L[e],r=this.#B(i)?i.__staleWhileFetching:i;if(void 0===r)return;const n={value:r};if(this.#_&&this.#F){const t=this.#_[e],i=this.#F[e];if(t&&i){const e=t-(s.now()-i);n.ttl=e,n.start=Date.now()}}return this.#R&&(n.size=this.#R[e]),n}dump(){const t=[];for(const e of this.#I({allowStale:!0})){const i=this.#E[e],r=this.#L[e],n=this.#B(r)?r.__staleWhileFetching:r;if(void 0===n||void 0===i)continue;const o={value:n};if(this.#_&&this.#F){o.ttl=this.#_[e];const t=s.now()-this.#F[e];o.start=Math.floor(Date.now()-t)}this.#R&&(o.size=this.#R[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,s={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:h}=s;let{noUpdateTTL:a=this.noUpdateTTL}=s;const l=this.#K(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.delete(t),this;let c=0===this.#S?void 0:this.#x.get(t);if(void 0===c)c=0===this.#S?this.#A:0!==this.#O.length?this.#O.pop():this.#S===this.#m?this.#X(!1):this.#S,this.#E[c]=t,this.#L[c]=e,this.#x.set(t,c),this.#T[this.#A]=c,this.#C[c]=this.#A,this.#A=c,this.#S++,this.#Y(c,l,h),h&&(h.set="add"),a=!1;else{this.#W(c);const s=this.#L[c];if(e!==s){if(this.#D&&this.#B(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;void 0===e||n||(this.#z&&this.#w?.(e,t,"set"),this.#j&&this.#P?.push([e,t,"set"]))}else n||(this.#z&&this.#w?.(s,t,"set"),this.#j&&this.#P?.push([s,t,"set"]));if(this.#J(c),this.#Y(c,l,h),this.#L[c]=e,h){h.set="replace";const t=s&&this.#B(s)?s.__staleWhileFetching:s;void 0!==t&&(h.oldValue=t)}}else h&&(h.set="update")}if(0===i||this.#_||this.#q(),this.#_&&(a||this.#H(c,i,r),h&&this.#Z(h,c)),!n&&this.#j&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#b?.(...e)}return this}pop(){try{for(;this.#S;){const t=this.#L[this.#M];if(this.#X(!0),this.#B(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#j&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#b?.(...e)}}}#X(t){const e=this.#M,s=this.#E[e],i=this.#L[e];return this.#D&&this.#B(i)?i.__abortController.abort(new Error("evicted")):(this.#z||this.#j)&&(this.#z&&this.#w?.(i,s,"evict"),this.#j&&this.#P?.push([i,s,"evict"])),this.#J(e),t&&(this.#E[e]=void 0,this.#L[e]=void 0,this.#O.push(e)),1===this.#S?(this.#M=this.#A=0,this.#O.length=0):this.#M=this.#T[e],this.#x.delete(s),this.#S--,e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#x.get(t);if(void 0!==r){const t=this.#L[r];if(this.#B(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#U(r))return s&&this.#V(r),i&&(i.has="hit",this.#Z(i,r)),!0;i&&(i.has="stale",this.#Z(i,r))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:s=this.allowStale}=e,i=this.#x.get(t);if(void 0===i||!s&&this.#U(i))return;const r=this.#L[i];return this.#B(r)?r.__staleWhileFetching:r}#N(t,e,s,i){const r=void 0===e?void 0:this.#L[e];if(this.#B(r))return r;const n=new o,{signal:h}=s;h?.addEventListener("abort",(()=>n.abort(h.reason)),{signal:n.signal});const a={signal:n.signal,options:s,context:i},l=(i,r=!1)=>{const{aborted:o}=n.signal,h=s.ignoreFetchAbort&&void 0!==i;if(s.status&&(o&&!r?(s.status.fetchAborted=!0,s.status.fetchError=n.signal.reason,h&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),o&&!h&&!r)return c(n.signal.reason);const l=p;return this.#L[e]===p&&(void 0===i?l.__staleWhileFetching?this.#L[e]=l.__staleWhileFetching:this.delete(t):(s.status&&(s.status.fetchUpdated=!0),this.set(t,i,a.options))),i},c=i=>{const{aborted:r}=n.signal,o=r&&s.allowStaleOnFetchAbort,h=o||s.allowStaleOnFetchRejection,a=h||s.noDeleteOnFetchRejection,l=p;if(this.#L[e]===p){!a||void 0===l.__staleWhileFetching?this.delete(t):o||(this.#L[e]=l.__staleWhileFetching)}if(h)return s.status&&void 0!==l.__staleWhileFetching&&(s.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw i};s.status&&(s.status.fetchDispatched=!0);const p=new Promise(((e,i)=>{const o=this.#v?.(t,r,a);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),i),n.signal.addEventListener("abort",(()=>{s.ignoreFetchAbort&&!s.allowStaleOnFetchAbort||(e(void 0),s.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))}))})).then(l,(t=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=t),c(t)))),d=Object.assign(p,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===e?(this.set(t,d,{...a.options,status:void 0}),e=this.#x.get(t)):this.#L[e]=d,d}#B(t){if(!this.#D)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof o}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:h=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:m,signal:y}=e;if(!this.#D)return m&&(m.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:m});const w={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:h,sizeCalculation:a,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:u,ignoreFetchAbort:d,status:m,signal:y};let b=this.#x.get(t);if(void 0===b){m&&(m.fetch="miss");const e=this.#N(t,b,w,f);return e.__returned=e}{const e=this.#L[b];if(this.#B(e)){const t=s&&void 0!==e.__staleWhileFetching;return m&&(m.fetch="inflight",t&&(m.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const r=this.#U(b);if(!g&&!r)return m&&(m.fetch="hit"),this.#W(b),i&&this.#V(b),m&&this.#Z(m,b),e;const n=this.#N(t,b,w,f),o=void 0!==n.__staleWhileFetching&&s;return m&&(m.fetch=r?"stale":"refresh",o&&r&&(m.returnedStale=!0)),o?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,o=this.#x.get(t);if(void 0!==o){const e=this.#L[o],h=this.#B(e);return n&&this.#Z(n,o),this.#U(o)?(n&&(n.get="stale"),h?(n&&s&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),s?e.__staleWhileFetching:void 0):(r||this.delete(t),n&&s&&(n.returnedStale=!0),s?e:void 0)):(n&&(n.get="hit"),h?e.__staleWhileFetching:(this.#W(o),i&&this.#V(o),e))}n&&(n.get="miss")}#tt(t,e){this.#C[e]=t,this.#T[t]=e}#W(t){t!==this.#A&&(t===this.#M?this.#M=this.#T[t]:this.#tt(this.#C[t],this.#T[t]),this.#tt(this.#A,t),this.#A=t)}delete(t){let e=!1;if(0!==this.#S){const s=this.#x.get(t);if(void 0!==s)if(e=!0,1===this.#S)this.clear();else{this.#J(s);const e=this.#L[s];if(this.#B(e)?e.__abortController.abort(new Error("deleted")):(this.#z||this.#j)&&(this.#z&&this.#w?.(e,t,"delete"),this.#j&&this.#P?.push([e,t,"delete"])),this.#x.delete(t),this.#E[s]=void 0,this.#L[s]=void 0,s===this.#A)this.#A=this.#C[s];else if(s===this.#M)this.#M=this.#T[s];else{const t=this.#C[s];this.#T[t]=this.#T[s];const e=this.#T[s];this.#C[e]=this.#C[s]}this.#S--,this.#O.push(s)}}if(this.#j&&this.#P?.length){const t=this.#P;let e;for(;e=t?.shift();)this.#b?.(...e)}return e}clear(){for(const t of this.#G({allowStale:!0})){const e=this.#L[t];if(this.#B(e))e.__abortController.abort(new Error("deleted"));else{const s=this.#E[t];this.#z&&this.#w?.(e,s,"delete"),this.#j&&this.#P?.push([e,s,"delete"])}}if(this.#x.clear(),this.#L.fill(void 0),this.#E.fill(void 0),this.#_&&this.#F&&(this.#_.fill(0),this.#F.fill(0)),this.#R&&this.#R.fill(0),this.#M=0,this.#A=0,this.#O.length=0,this.#k=0,this.#S=0,this.#j&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#b?.(...e)}}}e.LRUCache=d},274:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;e.assertValidPattern=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}},674:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;const i=s(843),r=s(116),n=new Set(["!","?","+","*","@"]),o=t=>n.has(t),h="(?!\\.)",a=new Set(["[","."]),l=new Set(["..","."]),c=new Set("().*{}+?[]^$\\!"),p="[^/]",d=p+"*?",u=p+"+?";class f{type;#et;#st;#it=!1;#rt=[];#nt;#ot;#ht;#at=!1;#lt;#ct;#pt=!1;constructor(t,e,s={}){this.type=t,t&&(this.#st=!0),this.#nt=e,this.#et=this.#nt?this.#nt.#et:this,this.#lt=this.#et===this?s:this.#et.#lt,this.#ht=this.#et===this?[]:this.#et.#ht,"!"!==t||this.#et.#at||this.#ht.push(this),this.#ot=this.#nt?this.#nt.#rt.length:0}get hasMagic(){if(void 0!==this.#st)return this.#st;for(const t of this.#rt)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#st=!0;return this.#st}toString(){return void 0!==this.#ct?this.#ct:this.type?this.#ct=this.type+"("+this.#rt.map((t=>String(t))).join("|")+")":this.#ct=this.#rt.map((t=>String(t))).join("")}#dt(){if(this!==this.#et)throw new Error("should only call on root");if(this.#at)return this;let t;for(this.toString(),this.#at=!0;t=this.#ht.pop();){if("!"!==t.type)continue;let e=t,s=e.#nt;for(;s;){for(let i=e.#ot+1;!s.type&&i<s.#rt.length;i++)for(const e of t.#rt){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(s.#rt[i])}e=s,s=e.#nt}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof f&&e.#nt===this))throw new Error("invalid part: "+e);this.#rt.push(e)}}toJSON(){const t=null===this.type?this.#rt.slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...this.#rt.map((t=>t.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#et||this.#et.#at&&"!"===this.#nt?.type)&&t.push({}),t}isStart(){if(this.#et===this)return!0;if(!this.#nt?.isStart())return!1;if(0===this.#ot)return!0;const t=this.#nt;for(let e=0;e<this.#ot;e++){const s=t.#rt[e];if(!(s instanceof f&&"!"===s.type))return!1}return!0}isEnd(){if(this.#et===this)return!0;if("!"===this.#nt?.type)return!0;if(!this.#nt?.isEnd())return!1;if(!this.type)return this.#nt?.isEnd();const t=this.#nt?this.#nt.#rt.length:0;return this.#ot===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new f(this.type,t);for(const t of this.#rt)e.copyIn(t);return e}static#ut(t,e,s,i){let r=!1,n=!1,h=-1,a=!1;if(null===e.type){let l=s,c="";for(;l<t.length;){const s=t.charAt(l++);if(r||"\\"===s)r=!r,c+=s;else if(n)l===h+1?"^"!==s&&"!"!==s||(a=!0):"]"!==s||l===h+2&&a||(n=!1),c+=s;else if("["!==s)if(i.noext||!o(s)||"("!==t.charAt(l))c+=s;else{e.push(c),c="";const r=new f(s,e);l=f.#ut(t,r,l,i),e.push(r)}else n=!0,h=l,a=!1,c+=s}return e.push(c),l}let l=s+1,c=new f(null,e);const p=[];let d="";for(;l<t.length;){const s=t.charAt(l++);if(r||"\\"===s)r=!r,d+=s;else if(n)l===h+1?"^"!==s&&"!"!==s||(a=!0):"]"!==s||l===h+2&&a||(n=!1),d+=s;else if("["!==s)if(o(s)&&"("===t.charAt(l)){c.push(d),d="";const e=new f(s,c);c.push(e),l=f.#ut(t,e,l,i)}else if("|"!==s){if(")"===s)return""===d&&0===e.#rt.length&&(e.#pt=!0),c.push(d),d="",e.push(...p,c),l;d+=s}else c.push(d),d="",p.push(c),c=new f(null,e);else n=!0,h=l,a=!1,d+=s}return e.type=null,e.#st=void 0,e.#rt=[t.substring(s-1)],l}static fromGlob(t,e={}){const s=new f(null,void 0,e);return f.#ut(t,s,0,e),s}toMMPattern(){if(this!==this.#et)return this.#et.toMMPattern();const t=this.toString(),[e,s,i,r]=this.toRegExpSource();if(!(i||this.#st||this.#lt.nocase&&!this.#lt.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;const n=(this.#lt.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,n),{_src:e,_glob:t})}get options(){return this.#lt}toRegExpSource(t){const e=t??!!this.#lt.dot;if(this.#et===this&&this.#dt(),!this.type){const s=this.isStart()&&this.isEnd(),i=this.#rt.map((e=>{const[i,r,n,o]="string"==typeof e?f.#ft(e,this.#st,s):e.toRegExpSource(t);return this.#st=this.#st||n,this.#it=this.#it||o,i})).join("");let n="";if(this.isStart()&&"string"==typeof this.#rt[0]){if(!(1===this.#rt.length&&l.has(this.#rt[0]))){const s=a,r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4)),o=!e&&!t&&s.has(i.charAt(0));n=r?"(?!(?:^|/)\\.\\.?(?:$|/))":o?h:""}}let o="";this.isEnd()&&this.#et.#at&&"!"===this.#nt?.type&&(o="(?:$|\\/)");return[n+i+o,(0,r.unescape)(i),this.#st=!!this.#st,this.#it]}const s="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let n=this.#gt(e);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){const t=this.toString();return this.#rt=[t],this.type=null,this.#st=void 0,[t,(0,r.unescape)(this.toString()),!1,!1]}let o=!s||t||e?"":this.#gt(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let c="";if("!"===this.type&&this.#pt)c=(this.isStart()&&!e?h:"")+u;else{c=i+n+("!"===this.type?"))"+(!this.isStart()||e||t?"":h)+d+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`)}return[c,(0,r.unescape)(n),this.#st=!!this.#st,this.#it]}#gt(t){return this.#rt.map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[s,i,r,n]=e.toRegExpSource(t);return this.#it=this.#it||n,s})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")}static#ft(t,e,s=!1){let n=!1,o="",h=!1;for(let r=0;r<t.length;r++){const a=t.charAt(r);if(n)n=!1,o+=(c.has(a)?"\\":"")+a;else if("\\"!==a){if("["===a){const[s,n,a,l]=(0,i.parseClass)(t,r);if(a){o+=s,h=h||n,r+=a-1,e=e||l;continue}}"*"!==a?"?"!==a?o+=a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(o+=p,e=!0):(o+=s&&"*"===t?u:d,e=!0)}else r===t.length-1?o+="\\\\":n=!0}return[o,(0,r.unescape)(t),!!e,h]}}e.AST=f},843:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;const s={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=t=>t.replace(/[[\]\\-]/g,"\\$&"),r=t=>t.join("");e.parseClass=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const o=[],h=[];let a=n+1,l=!1,c=!1,p=!1,d=!1,u=n,f="";t:for(;a<t.length;){const e=t.charAt(a);if("!"!==e&&"^"!==e||a!==n+1){if("]"===e&&l&&!p){u=a+1;break}if(l=!0,"\\"!==e||p){if("["===e&&!p)for(const[e,[i,r,l]]of Object.entries(s))if(t.startsWith(e,a)){if(f)return["$.",!1,t.length-n,!0];a+=e.length,l?h.push(i):o.push(i),c=c||r;continue t}p=!1,f?(e>f?o.push(i(f)+"-"+i(e)):e===f&&o.push(i(e)),f="",a++):t.startsWith("-]",a+1)?(o.push(i(e+"-")),a+=2):t.startsWith("-",a+1)?(f=e,a+=2):(o.push(i(e)),a++)}else p=!0,a++}else d=!0,a++}if(u<a)return["",!1,0,!1];if(!o.length&&!h.length)return["$.",!1,t.length-n,!0];if(0===h.length&&1===o.length&&/^\\?.$/.test(o[0])&&!d){const t=2===o[0].length?o[0].slice(-1):o[0];return[(g=t,g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var g;const m="["+(d?"^":"")+r(o)+"]",y="["+(d?"":"^")+r(h)+"]";return[o.length&&h.length?"("+m+"|"+y+")":o.length?m:y,c,u-n,!0]}},363:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;e.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},722:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;const r=i(s(928)),n=s(274),o=s(674),h=s(363),a=s(116);e.minimatch=(t,e,s={})=>((0,n.assertValidPattern)(e),!(!s.nocomment&&"#"===e.charAt(0))&&new _(e,s).match(t));const l=/^\*+([^+@!?\*\[\(]*)$/,c=t=>e=>!e.startsWith(".")&&e.endsWith(t),p=t=>e=>e.endsWith(t),d=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),u=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),f=/^\*+\.\*+$/,g=t=>!t.startsWith(".")&&t.includes("."),m=t=>"."!==t&&".."!==t&&t.includes("."),y=/^\.\*+$/,w=t=>"."!==t&&".."!==t&&t.startsWith("."),b=/^\*+$/,v=t=>0!==t.length&&!t.startsWith("."),S=t=>0!==t.length&&"."!==t&&".."!==t,k=/^\?+([^+@!?\*\[\(]*)?$/,x=([t,e=""])=>{const s=C([t]);return e?(e=e.toLowerCase(),t=>s(t)&&t.toLowerCase().endsWith(e)):s},E=([t,e=""])=>{const s=M([t]);return e?(e=e.toLowerCase(),t=>s(t)&&t.toLowerCase().endsWith(e)):s},L=([t,e=""])=>{const s=M([t]);return e?t=>s(t)&&t.endsWith(e):s},T=([t,e=""])=>{const s=C([t]);return e?t=>s(t)&&t.endsWith(e):s},C=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},M=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},A="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",O={sep:"\\"},P={sep:"/"};e.sep="win32"===A?O.sep:P.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;e.filter=(t,s={})=>i=>(0,e.minimatch)(i,t,s),e.minimatch.filter=e.filter;const R=(t,e={})=>Object.assign({},t,e);e.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return e.minimatch;const s=e.minimatch;return Object.assign(((e,i,r={})=>s(e,i,R(t,r))),{Minimatch:class extends s.Minimatch{constructor(e,s={}){super(e,R(t,s))}static defaults(e){return s.defaults(R(t,e)).Minimatch}},AST:class extends s.AST{constructor(e,s,i={}){super(e,s,R(t,i))}static fromGlob(e,i={}){return s.AST.fromGlob(e,R(t,i))}},unescape:(e,i={})=>s.unescape(e,R(t,i)),escape:(e,i={})=>s.escape(e,R(t,i)),filter:(e,i={})=>s.filter(e,R(t,i)),defaults:e=>s.defaults(R(t,e)),makeRe:(e,i={})=>s.makeRe(e,R(t,i)),braceExpand:(e,i={})=>s.braceExpand(e,R(t,i)),match:(e,i,r={})=>s.match(e,i,R(t,r)),sep:s.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults;e.braceExpand=(t,e={})=>((0,n.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,r.default)(t)),e.minimatch.braceExpand=e.braceExpand;e.makeRe=(t,e={})=>new _(t,e).makeRe(),e.minimatch.makeRe=e.makeRe;e.match=(t,e,s={})=>{const i=new _(e,s);return t=t.filter((t=>i.match(t))),i.options.nonull&&!t.length&&t.push(e),t},e.minimatch.match=e.match;const F=/[?*]|[+@!]\(.*?\)|\[|\]/;class _{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,n.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||A,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&F.test(t[2])||F.test(t[3])),s=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(s)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,i),this.set=i.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let s=0;s<t[e].length;s++)"**"===t[e][s]&&(t[e][s]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let s=e;for(;"**"===t[s+1];)s++;s!==e&&t.splice(e,s-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const s=t[t.length-1];return"**"===e&&"**"===s?t:".."===e&&s&&".."!==s&&"."!==s&&"**"!==s?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const i=t[s];1===s&&""===i&&""===t[0]||("."!==i&&""!==i||(e=!0,t.splice(s,1),s--))}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let s=0;for(;-1!==(s=t.indexOf("..",s+1));){const i=t[s-1];i&&"."!==i&&".."!==i&&"**"!==i&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let i=-1;for(;-1!==(i=s.indexOf("**",i+1));){let r=i;for(;"**"===s[r+1];)r++;r>i&&s.splice(i+1,r-i);let n=s[i+1];const o=s[i+2],h=s[i+3];if(".."!==n)continue;if(!o||"."===o||".."===o||!h||"."===h||".."===h)continue;e=!0,s.splice(i,1);const a=s.slice(0);a[i]="**",t.push(a),i--}if(!this.preserveMultipleSlashes){for(let t=1;t<s.length-1;t++){const i=s[t];1===t&&""===i&&""===s[0]||("."!==i&&""!==i||(e=!0,s.splice(t,1),t--))}"."!==s[0]||2!==s.length||"."!==s[1]&&""!==s[1]||(e=!0,s.pop())}let r=0;for(;-1!==(r=s.indexOf("..",r+1));){const t=s[r-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===r&&"**"===s[r+1]?["."]:[];s.splice(r-1,2,...t),0===s.length&&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++){const i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);i&&(t[e]=i,t[s]=[])}return t.filter((t=>t.length))}partsMatch(t,e,s=!1){let i=0,r=0,n=[],o="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])n.push("b"===o?e[r]:t[i]),i++,r++;else if(s&&"**"===t[i]&&e[r]===t[i+1])n.push(t[i]),i++;else if(s&&"**"===e[r]&&t[i]===e[r+1])n.push(e[r]),r++;else if("*"!==t[i]||!e[r]||!this.options.dot&&e[r].startsWith(".")||"**"===e[r]){if("*"!==e[r]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i])return!1;if("a"===o)return!1;o="b",n.push(e[r]),i++,r++}else{if("b"===o)return!1;o="a",n.push(t[i]),i++,r++}return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,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,s,i=!1){const r=this.options;if(this.isWindows){const e="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),i=!e&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),r="string"==typeof s[0]&&/^[a-z]:$/i.test(s[0]),n=i?3:e?0:void 0,o=!r&&""===s[0]&&""===s[1]&&"?"===s[2]&&"string"==typeof s[3]&&/^[a-z]:$/i.test(s[3])?3:r?0:void 0;if("number"==typeof n&&"number"==typeof o){const[e,i]=[t[n],s[o]];e.toLowerCase()===i.toLowerCase()&&(s[o]=e,o>n?s=s.slice(o):n>o&&(t=t.slice(n)))}}const{optimizationLevel:n=1}=this.options;n>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:s}),this.debug("matchOne",t.length,s.length);for(var o=0,h=0,a=t.length,l=s.length;o<a&&h<l;o++,h++){this.debug("matchOne loop");var c=s[h],p=t[o];if(this.debug(s,c,p),!1===c)return!1;if(c===e.GLOBSTAR){this.debug("GLOBSTAR",[s,c,p]);var d=o,u=h+1;if(u===l){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!r.dot&&"."===t[o].charAt(0))return!1;return!0}for(;d<a;){var f=t[d];if(this.debug("\nglobstar while",t,d,s,u,f),this.matchOne(t.slice(d),s.slice(u),i))return this.debug("globstar found match!",d,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,d,s,u);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!i||(this.debug("\n>>> no match, partial?",t,d,s,u),d!==a))}let n;if("string"==typeof c?(n=p===c,this.debug("string match",c,p,n)):(n=c.test(p),this.debug("pattern match",c,p,n)),!n)return!1}if(o===a&&h===l)return!0;if(o===a)return i;if(h===l)return o===a-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,n.assertValidPattern)(t);const s=this.options;if("**"===t)return e.GLOBSTAR;if(""===t)return"";let i,r=null;(i=t.match(b))?r=s.dot?S:v:(i=t.match(l))?r=(s.nocase?s.dot?u:d:s.dot?p:c)(i[1]):(i=t.match(k))?r=(s.nocase?s.dot?E:x:s.dot?L:T)(i):(i=t.match(f))?r=s.dot?m:g:(i=t.match(y))&&(r=w);const h=o.AST.fromGlob(t,this.options).toMMPattern();return r&&"object"==typeof h&&Reflect.defineProperty(h,"test",{value:r}),h}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const s=this.options,i=s.noglobstar?"[^/]*?":s.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(s.nocase?["i"]:[]);let n=t.map((t=>{const s=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))r.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===e.GLOBSTAR?e.GLOBSTAR:t._src}));return s.forEach(((t,r)=>{const n=s[r+1],o=s[r-1];t===e.GLOBSTAR&&o!==e.GLOBSTAR&&(void 0===o?void 0!==n&&n!==e.GLOBSTAR?s[r+1]="(?:\\/|"+i+"\\/)?"+n:s[r]=i:void 0===n?s[r-1]=o+"(?:\\/|"+i+")?":n!==e.GLOBSTAR&&(s[r-1]=o+"(?:\\/|\\/"+i+"\\/)"+n,s[r+1]=e.GLOBSTAR))})),s.filter((t=>t!==e.GLOBSTAR)).join("/")})).join("|");const[o,h]=t.length>1?["(?:",")"]:["",""];n="^"+o+n+h+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch(t){this.regexp=!1}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!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const s=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let n=i[i.length-1];if(!n)for(let t=i.length-2;!n&&t>=0;t--)n=i[t];for(let t=0;t<r.length;t++){const o=r[t];let h=i;s.matchBase&&1===o.length&&(h=[n]);if(this.matchOne(h,o,e))return!!s.flipNegate||!this.negate}return!s.flipNegate&&this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}}e.Minimatch=_;var z=s(674);Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return z.AST}});var D=s(363);Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return D.escape}});var j=s(116);Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return j.unescape}}),e.minimatch.AST=o.AST,e.minimatch.Minimatch=_,e.minimatch.escape=h.escape,e.minimatch.unescape=a.unescape},116:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;e.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},420:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;const r="object"==typeof process&&process?process:{stdout:null,stderr:null},n=s(474),o=i(s(75)),h=s(193);e.isStream=t=>!!t&&"object"==typeof t&&(t instanceof U||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t));e.isReadable=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==o.default.Writable.prototype.pipe;e.isWritable=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end;const a=Symbol("EOF"),l=Symbol("maybeEmitEnd"),c=Symbol("emittedEnd"),p=Symbol("emittingEnd"),d=Symbol("emittedError"),u=Symbol("closed"),f=Symbol("read"),g=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),w=Symbol("decoder"),b=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),k=Symbol("buffer"),x=Symbol("pipes"),E=Symbol("bufferLength"),L=Symbol("bufferPush"),T=Symbol("bufferShift"),C=Symbol("objectMode"),M=Symbol("destroyed"),A=Symbol("error"),O=Symbol("emitData"),P=Symbol("emitEnd"),R=Symbol("emitEnd2"),F=Symbol("async"),_=Symbol("abort"),z=Symbol("aborted"),D=Symbol("signal"),j=Symbol("dataListeners"),B=Symbol("discarded"),N=t=>Promise.resolve().then(t),W=t=>t();class I{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[S](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class G extends I{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class U extends n.EventEmitter{[b]=!1;[v]=!1;[x]=[];[k]=[];[C];[y];[F];[w];[a]=!1;[c]=!1;[p]=!1;[u]=!1;[d]=null;[E]=0;[M]=!1;[D];[z]=!1;[j]=0;[B]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[C]=!0,this[y]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[y]=e.encoding,this[C]=!1):(this[C]=!1,this[y]=null),this[F]=!!e.async,this[w]=this[y]?new h.StringDecoder(this[y]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[k]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[x]});const{signal:s}=e;s&&(this[D]=s,s.aborted?this[_]():s.addEventListener("abort",(()=>this[_]())))}get bufferLength(){return this[E]}get encoding(){return this[y]}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[C]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[F]}set async(t){this[F]=this[F]||!!t}[_](){this[z]=!0,this.emit("abort",this[D]?.reason),this.destroy(this[D]?.reason)}get aborted(){return this[z]}set aborted(t){}write(t,e,s){if(this[z])return!1;if(this[a])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(s=e,e="utf8"),e||(e="utf8");const i=this[F]?N:W;if(!this[C]&&!Buffer.isBuffer(t))if(r=t,!Buffer.isBuffer(r)&&ArrayBuffer.isView(r))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var r;return this[C]?(this[b]&&0!==this[E]&&this[g](!0),this[b]?this.emit("data",t):this[L](t),0!==this[E]&&this.emit("readable"),s&&i(s),this[b]):t.length?("string"!=typeof t||e===this[y]&&!this[w]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[y]&&(t=this[w].write(t)),this[b]&&0!==this[E]&&this[g](!0),this[b]?this.emit("data",t):this[L](t),0!==this[E]&&this.emit("readable"),s&&i(s),this[b]):(0!==this[E]&&this.emit("readable"),s&&i(s),this[b])}read(t){if(this[M])return null;if(this[B]=!1,0===this[E]||0===t||t&&t>this[E])return this[l](),null;this[C]&&(t=null),this[k].length>1&&!this[C]&&(this[k]=[this[y]?this[k].join(""):Buffer.concat(this[k],this[E])]);const e=this[f](t||null,this[k][0]);return this[l](),e}[f](t,e){if(this[C])this[T]();else{const s=e;t===s.length||null===t?this[T]():"string"==typeof s?(this[k][0]=s.slice(t),e=s.slice(0,t),this[E]-=t):(this[k][0]=s.subarray(t),e=s.subarray(0,t),this[E]-=t)}return this.emit("data",e),this[k].length||this[a]||this.emit("drain"),e}end(t,e,s){return"function"==typeof t&&(s=t,t=void 0),"function"==typeof e&&(s=e,e="utf8"),void 0!==t&&this.write(t,e),s&&this.once("end",s),this[a]=!0,this.writable=!1,!this[b]&&this[v]||this[l](),this}[S](){this[M]||(this[j]||this[x].length||(this[B]=!0),this[v]=!1,this[b]=!0,this.emit("resume"),this[k].length?this[g]():this[a]?this[l]():this.emit("drain"))}resume(){return this[S]()}pause(){this[b]=!1,this[v]=!0,this[B]=!1}get destroyed(){return this[M]}get flowing(){return this[b]}get paused(){return this[v]}[L](t){this[C]?this[E]+=1:this[E]+=t.length,this[k].push(t)}[T](){return this[C]?this[E]-=1:this[E]-=this[k][0].length,this[k].shift()}[g](t=!1){do{}while(this[m](this[T]())&&this[k].length);t||this[k].length||this[a]||this.emit("drain")}[m](t){return this.emit("data",t),this[b]}pipe(t,e){if(this[M])return t;this[B]=!1;const s=this[c];return e=e||{},t===r.stdout||t===r.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[x].push(e.proxyErrors?new G(this,t,e):new I(this,t,e)),this[F]?N((()=>this[S]())):this[S]()),t}unpipe(t){const e=this[x].find((e=>e.dest===t));e&&(1===this[x].length?(this[b]&&0===this[j]&&(this[b]=!1),this[x]=[]):this[x].splice(this[x].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if("data"===t)this[B]=!1,this[j]++,this[x].length||this[b]||this[S]();else if("readable"===t&&0!==this[E])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[c])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[d]){const t=e;this[F]?N((()=>t.call(this,this[d]))):t.call(this,this[d])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);return"data"===t&&(this[j]=this.listeners("data").length,0!==this[j]||this[B]||this[x].length||(this[b]=!1)),s}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[j]=0,this[B]||this[x].length||(this[b]=!1)),e}get emittedEnd(){return this[c]}[l](){this[p]||this[c]||this[M]||0!==this[k].length||!this[a]||(this[p]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[u]&&this.emit("close"),this[p]=!1)}emit(t,...e){const s=e[0];if("error"!==t&&"close"!==t&&t!==M&&this[M])return!1;if("data"===t)return!(!this[C]&&!s)&&(this[F]?(N((()=>this[O](s))),!0):this[O](s));if("end"===t)return this[P]();if("close"===t){if(this[u]=!0,!this[c]&&!this[M])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[d]=s,super.emit(A,s);const t=!(this[D]&&!this.listeners("error").length)&&super.emit("error",s);return this[l](),t}if("resume"===t){const t=super.emit("resume");return this[l](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const i=super.emit(t,...e);return this[l](),i}[O](t){for(const e of this[x])!1===e.dest.write(t)&&this.pause();const e=!this[B]&&super.emit("data",t);return this[l](),e}[P](){return!this[c]&&(this[c]=!0,this.readable=!1,this[F]?(N((()=>this[R]())),!0):this[R]())}[R](){if(this[w]){const t=this[w].end();if(t){for(const e of this[x])e.dest.write(t);this[B]||super.emit("data",t)}}for(const t of this[x])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[C]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[C]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[C])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[y]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(M,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[B]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const s=this.read();if(null!==s)return Promise.resolve({done:!1,value:s});if(this[a])return e();let i,r;const n=t=>{this.off("data",o),this.off("end",h),this.off(M,l),e(),r(t)},o=t=>{this.off("error",n),this.off("end",h),this.off(M,l),this.pause(),i({value:t,done:!!this[a]})},h=()=>{this.off("error",n),this.off("data",o),this.off(M,l),e(),i({done:!0,value:void 0})},l=()=>n(new Error("stream destroyed"));return new Promise(((t,e)=>{r=e,i=t,this.once(M,l),this.once("error",n),this.once("end",h),this.once("data",o)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B]=!1;let t=!1;const e=()=>(this.pause(),this.off(A,e),this.off(M,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(A,e),this.once(M,e),{next:()=>{if(t)return e();const s=this.read();return null===s?e():{done:!1,value:s}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[M])return t?this.emit("error",t):this.emit(M),this;this[M]=!0,this[B]=!0,this[k].length=0,this[E]=0;return"function"!=typeof this.close||this[u]||this.close(),t?this.emit("error",t):this.emit(M),this}static get isStream(){return e.isStream}}e.Minipass=U},576:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(e,s);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,r)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&i(e,t,s);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;const o=s(96),h=s(760),a=s(136),l=s(896),c=n(s(24)),p=l.realpathSync.native,d=s(455),u=s(420),f={lstatSync:l.lstatSync,readdir:l.readdir,readdirSync:l.readdirSync,readlinkSync:l.readlinkSync,realpathSync:p,promises:{lstat:d.lstat,readdir:d.readdir,readlink:d.readlink,realpath:d.realpath}},g=t=>t&&t!==f&&t!==c?{...f,...t,promises:{...f.promises,...t.promises||{}}}:f,m=/^\\\\\?\\([a-z]:)\\?$/i,y=/[\\\/]/,w=10,b=15,v=-16,S=128,k=256,x=512,E=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?w:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:t.isFIFO()?1:0,L=new Map,T=t=>{const e=L.get(t);if(e)return e;const s=t.normalize("NFKD");return L.set(t,s),s},C=new Map,M=t=>{const e=C.get(t);if(e)return e;const s=T(t.toLowerCase());return C.set(t,s),s};class A extends o.LRUCache{constructor(){super({max:256})}}e.ResolveCache=A;class O extends o.LRUCache{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}}e.ChildrenCache=O;const P=Symbol("PathScurry setAsCwd");class R{name;root;roots;parent;nocase;isCWD=!1;#mt;#yt;get dev(){return this.#yt}#wt;get mode(){return this.#wt}#bt;get nlink(){return this.#bt}#vt;get uid(){return this.#vt}#St;get gid(){return this.#St}#kt;get rdev(){return this.#kt}#xt;get blksize(){return this.#xt}#Et;get ino(){return this.#Et}#S;get size(){return this.#S}#Lt;get blocks(){return this.#Lt}#Tt;get atimeMs(){return this.#Tt}#Ct;get mtimeMs(){return this.#Ct}#Mt;get ctimeMs(){return this.#Mt}#At;get birthtimeMs(){return this.#At}#Ot;get atime(){return this.#Ot}#Pt;get mtime(){return this.#Pt}#Rt;get ctime(){return this.#Rt}#Ft;get birthtime(){return this.#Ft}#_t;#zt;#Dt;#jt;#Bt;#Nt;#Wt;#It;#Gt;#Ut;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,s,i,r,n,o){this.name=t,this.#_t=r?M(t):T(t),this.#Wt=1023&e,this.nocase=r,this.roots=i,this.root=s||this,this.#It=n,this.#Dt=o.fullpath,this.#Bt=o.relative,this.#Nt=o.relativePosix,this.parent=o.parent,this.parent?this.#mt=this.parent.#mt:this.#mt=g(o.fs)}depth(){return void 0!==this.#zt?this.#zt:this.parent?this.#zt=this.parent.depth()+1:this.#zt=0}childrenCache(){return this.#It}resolve(t){if(!t)return this;const e=this.getRootString(t),s=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#$t(s):this.#$t(s)}#$t(t){let e=this;for(const s of t)e=e.child(s);return e}children(){const t=this.#It.get(this);if(t)return t;const e=Object.assign([],{provisional:0});return this.#It.set(this,e),this.#Wt&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;const s=this.children(),i=this.nocase?M(t):T(t);for(const t of s)if(t.#_t===i)return t;const r=this.parent?this.sep:"",n=this.#Dt?this.#Dt+r+t:void 0,o=this.newChild(t,0,{...e,parent:this,fullpath:n});return this.canReaddir()||(o.#Wt|=S),s.push(o),o}relative(){if(this.isCWD)return"";if(void 0!==this.#Bt)return this.#Bt;const t=this.name,e=this.parent;if(!e)return this.#Bt=this.name;const s=e.relative();return s+(s&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#Nt)return this.#Nt;const t=this.name,e=this.parent;if(!e)return this.#Nt=this.fullpathPosix();const s=e.relativePosix();return s+(s&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#Dt)return this.#Dt;const t=this.name,e=this.parent;if(!e)return this.#Dt=this.name;const s=e.fullpath()+(e.parent?this.sep:"")+t;return this.#Dt=s}fullpathPosix(){if(void 0!==this.#jt)return this.#jt;if("/"===this.sep)return this.#jt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#jt=`//?/${t}`:this.#jt=t}const t=this.parent,e=t.fullpathPosix(),s=e+(e&&t.parent?"/":"")+this.name;return this.#jt=s}isUnknown(){return!(this.#Wt&b)}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 8==(this.#Wt&b)}isDirectory(){return 4==(this.#Wt&b)}isCharacterDevice(){return 2==(this.#Wt&b)}isBlockDevice(){return 6==(this.#Wt&b)}isFIFO(){return 1==(this.#Wt&b)}isSocket(){return 12==(this.#Wt&b)}isSymbolicLink(){return(this.#Wt&w)===w}lstatCached(){return 32&this.#Wt?this:void 0}readlinkCached(){return this.#Gt}realpathCached(){return this.#Ut}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Gt)return!0;if(!this.parent)return!1;const t=this.#Wt&b;return!(0!==t&&t!==w||this.#Wt&k||this.#Wt&S)}calledReaddir(){return!!(16&this.#Wt)}isENOENT(){return!!(this.#Wt&S)}isNamed(t){return this.nocase?this.#_t===M(t):this.#_t===T(t)}async readlink(){const t=this.#Gt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=await this.#mt.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#Gt=e}catch(t){return void this.#qt(t.code)}}readlinkSync(){const t=this.#Gt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=this.#mt.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#Gt=e}catch(t){return void this.#qt(t.code)}}#Ht(t){this.#Wt|=16;for(let e=t.provisional;e<t.length;e++){const s=t[e];s&&s.#Vt()}}#Vt(){this.#Wt&S||(this.#Wt=(this.#Wt|S)&v,this.#Zt())}#Zt(){const t=this.children();t.provisional=0;for(const e of t)e.#Vt()}#Jt(){this.#Wt|=x,this.#Kt()}#Kt(){if(64&this.#Wt)return;let t=this.#Wt;4==(t&b)&&(t&=v),this.#Wt=64|t,this.#Zt()}#Yt(t=""){"ENOTDIR"===t||"EPERM"===t?this.#Kt():"ENOENT"===t?this.#Vt():this.children().provisional=0}#Xt(t=""){if("ENOTDIR"===t){this.parent.#Kt()}else"ENOENT"===t&&this.#Vt()}#qt(t=""){let e=this.#Wt;e|=k,"ENOENT"===t&&(e|=S),"EINVAL"!==t&&"UNKNOWN"!==t||(e&=v),this.#Wt=e,"ENOTDIR"===t&&this.parent&&this.parent.#Kt()}#Qt(t,e){return this.#te(t,e)||this.#ee(t,e)}#ee(t,e){const s=E(t),i=this.newChild(t.name,s,{parent:this}),r=i.#Wt&b;return 4!==r&&r!==w&&0!==r&&(i.#Wt|=64),e.unshift(i),e.provisional++,i}#te(t,e){for(let s=e.provisional;s<e.length;s++){const i=e[s];if((this.nocase?M(t.name):T(t.name))===i.#_t)return this.#se(t,i,s,e)}}#se(t,e,s,i){const r=e.name;return e.#Wt=e.#Wt&v|E(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.#Wt&S))try{return this.#ie(await this.#mt.promises.lstat(this.fullpath())),this}catch(t){this.#Xt(t.code)}}lstatSync(){if(!(this.#Wt&S))try{return this.#ie(this.#mt.lstatSync(this.fullpath())),this}catch(t){this.#Xt(t.code)}}#ie(t){const{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:n,blocks:o,ctime:h,ctimeMs:a,dev:l,gid:c,ino:p,mode:d,mtime:u,mtimeMs:f,nlink:g,rdev:m,size:y,uid:b}=t;this.#Ot=e,this.#Tt=s,this.#Ft=i,this.#At=r,this.#xt=n,this.#Lt=o,this.#Rt=h,this.#Mt=a,this.#yt=l,this.#St=c,this.#Et=p,this.#wt=d,this.#Pt=u,this.#Ct=f,this.#bt=g,this.#kt=m,this.#S=y,this.#vt=b;const S=E(t);this.#Wt=this.#Wt&v|S|32,0!==S&&4!==S&&S!==w&&(this.#Wt|=64)}#re=[];#ne=!1;#oe(t){this.#ne=!1;const e=this.#re.slice();this.#re.length=0,e.forEach((e=>e(null,t)))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask((()=>t(null,[]))));const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);return void(e?t(null,i):queueMicrotask((()=>t(null,i))))}if(this.#re.push(t),this.#ne)return;this.#ne=!0;const i=this.fullpath();this.#mt.readdir(i,{withFileTypes:!0},((t,e)=>{if(t)this.#Yt(t.code),s.provisional=0;else{for(const t of e)this.#Qt(t,s);this.#Ht(s)}this.#oe(s.slice(0,s.provisional))}))}#he;async readdir(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();if(this.#he)await this.#he;else{let s=()=>{};this.#he=new Promise((t=>s=t));try{for(const s of await this.#mt.promises.readdir(e,{withFileTypes:!0}))this.#Qt(s,t);this.#Ht(t)}catch(e){this.#Yt(e.code),t.provisional=0}this.#he=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();try{for(const s of this.#mt.readdirSync(e,{withFileTypes:!0}))this.#Qt(s,t);this.#Ht(t)}catch(e){this.#Yt(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#Wt)return!1;const t=b&this.#Wt;return 0===t||4===t||t===w}shouldWalk(t,e){return!(4&~this.#Wt)&&!(704&this.#Wt)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Ut)return this.#Ut;if(!(896&this.#Wt))try{const t=await this.#mt.promises.realpath(this.fullpath());return this.#Ut=this.resolve(t)}catch(t){this.#Jt()}}realpathSync(){if(this.#Ut)return this.#Ut;if(!(896&this.#Wt))try{const t=this.#mt.realpathSync(this.fullpath());return this.#Ut=this.resolve(t)}catch(t){this.#Jt()}}[P](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;const e=new Set([]);let s=[],i=this;for(;i&&i.parent;)e.add(i),i.#Bt=s.join(this.sep),i.#Nt=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#Bt=void 0,i.#Nt=void 0,i=i.parent}}e.PathBase=R;class F extends R{sep="\\";splitSep=y;constructor(t,e=0,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=0,s={}){return new F(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return h.win32.parse(t).root}getRoot(t){if((t=(t=>t.replace(/\//g,"\\").replace(m,"$1\\"))(t.toUpperCase()))===this.root.name)return this.root;for(const[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new D(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(m,"$1\\"))===e}}e.PathWin32=F;class _ extends R{splitSep="/";sep="/";constructor(t,e=0,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=0,s={}){return new _(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}e.PathPosix=_;class z{root;rootPath;roots;cwd;#ae;#le;#It;nocase;#mt;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16384,fs:n=f}={}){this.#mt=g(n),(t instanceof URL||t.startsWith("file://"))&&(t=(0,a.fileURLToPath)(t));const o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#ae=new A,this.#le=new A,this.#It=new O(r);const h=o.substring(this.rootPath.length).split(s);if(1!==h.length||h[0]||h.pop(),void 0===i)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#mt),this.roots[this.rootPath]=this.root;let l=this.root,c=h.length-1;const p=e.sep;let d=this.rootPath,u=!1;for(const t of h){const e=c--;l=l.child(t,{relative:new Array(e).fill("..").join(p),relativePosix:new Array(e).fill("..").join("/"),fullpath:d+=(u?"":p)+t}),u=!0}this.cwd=l}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#It}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const s=this.#ae.get(e);if(void 0!==s)return s;const i=this.cwd.resolve(e).fullpath();return this.#ae.set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const s=this.#le.get(e);if(void 0!==s)return s;const i=this.cwd.resolve(e).fullpathPosix();return this.#le.set(e,i),i}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s}=e;if(t.canReaddir()){const e=await t.readdir();return s?e:e.map((t=>t.name))}return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map((t=>t.name)):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=[];r&&!r(t)||o.push(s?t:t.fullpath());const h=new Set,a=(t,e)=>{h.add(t),t.readdirCB(((t,l)=>{if(t)return e(t);let c=l.length;if(!c)return e();const p=()=>{0==--c&&e()};for(const t of l)r&&!r(t)||o.push(s?t:t.fullpath()),i&&t.isSymbolicLink()?t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(h,n)?a(t,p):p())):t.shouldWalk(h,n)?a(t,p):p()}),!0)},l=t;return new Promise(((t,e)=>{a(l,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=[];r&&!r(t)||o.push(s?t:t.fullpath());const h=new Set([t]);for(const t of h){const e=t.readdirSync();for(const t of e){r&&!r(t)||o.push(s?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(h,n)&&h.add(e)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e;r&&!r(t)||(yield s?t:t.fullpath());const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){r&&!r(t)||(yield s?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,n)&&o.add(e)}}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=new u.Minipass({objectMode:!0});r&&!r(t)||o.write(s?t:t.fullpath());const h=new Set,a=[t];let l=0;const c=()=>{let t=!1;for(;!t;){const e=a.shift();if(!e)return void(0===l&&o.end());l++,h.add(e);const p=(e,u,f=!1)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u)e.isSymbolicLink()&&t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)));if(t.length)return void Promise.all(t).then((()=>p(null,u,!0)))}for(const e of u)!e||r&&!r(e)||o.write(s?e:e.fullpath())||(t=!0);l--;for(const t of u){const e=t.realpathCached()||t;e.shouldWalk(h,n)&&a.push(e)}t&&!o.flowing?o.once("drain",c):d||c()};let d=!0;e.readdirCB(p,!0),d=!1}};return c(),o}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=new u.Minipass({objectMode:!0}),h=new Set;r&&!r(t)||o.write(s?t:t.fullpath());const a=[t];let l=0;const c=()=>{let t=!1;for(;!t;){const e=a.shift();if(!e)return void(0===l&&o.end());l++,h.add(e);const c=e.readdirSync();for(const e of c)r&&!r(e)||o.write(s?e:e.fullpath())||(t=!0);l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(h,n)&&a.push(e)}}t&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){const e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[P](e)}}e.PathScurryBase=z;class D extends z{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=!0}=e;super(t,h.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return h.win32.parse(t).root.toUpperCase()}newRoot(t){return new F(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}e.PathScurryWin32=D;class j extends z{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=!1}=e;super(t,h.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new _(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}e.PathScurryPosix=j;class B extends j{constructor(t=process.cwd(),e={}){const{nocase:s=!0}=e;super(t,{...e,nocase:s})}}e.PathScurryDarwin=B,e.Path="win32"===process.platform?F:_,e.PathScurry="win32"===process.platform?D:"darwin"===process.platform?B:j}},e={};var s=function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i].call(n.exports,n,n.exports,s),n.exports}(207),i=exports;for(var r in s)i[r]=s[r];s.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();