@holistics/cli-core 0.4.0 → 0.4.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.
package/README.md CHANGED
@@ -8,86 +8,3 @@ The CLI core is using our private packages (such as aml, aml-std, etc...), so to
8
8
  1. We use `bun` to build all the dependencies into a single giant `commands.js` file.
9
9
  2. Publish this file to public npm registry (https://www.npmjs.com/package/@holistics/cli-core)
10
10
  3. The CLI app **directly download and use** the `commands.js` file from the npm registry. Note that it **won't** go through the normal package installation process e.g. `npm install` because it will fail since it cannot access private packages referenced by '@holistics/cli-core'
11
-
12
- ## Publishing for cli-core
13
-
14
- Currently, for other packages, we publish to our private Github registry
15
- We need to change the publish flow to publish to the public npm registry instead.
16
-
17
- We also want to support `npm install` normally for this cli-core package
18
-
19
- This is the current package.json on npmjs.com:
20
- ```
21
- {
22
- "name": "@holistics/cli-core",
23
- "type": "module",
24
- "version": "0.2.9",
25
- "files": [
26
- "dist"
27
- ],
28
- "main": "src/commands.js",
29
- "module": "src/commands.mjs",
30
- "types": "src/commands.d.ts",
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/holistics/holistics-core.git",
34
- "directory": "packages/cli-core"
35
- },
36
- "devDependencies": {
37
- "tsx": "^4.19.3",
38
- "typescript": "^5.6.2",
39
- "@types/js-yaml": "^4.0.5",
40
- "vitest": "^2.1.9",
41
- "@holistics/configs": "0.2.3"
42
- },
43
- "dependencies": {
44
- "@commander-js/extra-typings": "^13.1.0",
45
- "@holistics/aml": "4.0.4",
46
- "@holistics/aml-std": "2.58.0",
47
- "axios": "^1.7.7",
48
- "commander": "13.1.0",
49
- "fast-glob": "^3.3.3",
50
- "form-data": "^4.0.2",
51
- "glob": "^11.0.1",
52
- "js-yaml": "^4.1.0"
53
- },
54
- "scripts": {
55
- "dev": "tsx src/cli.ts",
56
- "build": "bun build src/commands.ts --outdir dist --target node --minify"
57
- }
58
- }
59
- ```
60
-
61
- One idea is to modify the `package.json` (in dist/, after bun build and before publishing to npm) to remove any @holistics packages
62
- Ok, I think we can remove all the dependencies since everything is already bundled into the `commands.js` file.
63
-
64
- Brief about our Circle CI flow (ci_config.template.yml)
65
- - Our CI step uses 2 workflows: build (test) and publish
66
- - Build workflow is handled by turbo_orb.yml.
67
- - Publish workflow is handled by pnpm_orb.yml. For cli-core, the publish step will publish to npmjs.com
68
- - npmjs.com requires a token set at `~/.npmrc` to publish
69
-
70
-
71
- Design the CI flow:
72
- - currently: generate_js_jobs.rb -> publish_js_packages (with proper flags) -> [pnpm_install, turbo_build, pnpm_publish]. This is for our internal private packages
73
- Also, each of our package has a `.holistics_ci.yml` at the root of the package to customize the CI flow.
74
- - for cli-core, there are 2 main differences: build via bun, and publish to npmjs.com
75
- - Option 1: generate .npmrc inside the cli-core package to store the npmjs token, and hope that `pnpm publish` will use it and skip the root Github token.
76
- Pros: reuse the current publish flow
77
- Cons: it's very unclear about the places that the publish flow happens, can mistakenly publish internal packages to npmjs.com
78
- - Option 2: create another job publish_js_packages_to_npmjs.com. Try to use whitelist to include packages that are allowed to publish to npmjs.com to avoid mistakenly publishing internal packages to npmjs.com
79
- - generate_js_jobs.rb -> [publish_js_packages_to_npmjs.com, publish_js_packages] depending on the holistics_ci.yml. If it contains `publish_to_npmjs: true`, then use publish_js_packages_to_npmjs.com, otherwise use publish_js_packages
80
-
81
-
82
- ## Context for Claude
83
- You only need to care about these folders:
84
- - .circleci/
85
- - packages/* (include packages/cli-core)
86
-
87
- The rest of the folders are not relevant to this task.
88
-
89
- The CircleCI flow is using dynamic job: the ci_config.template.yml predefine the jobs and the commands, then the generate_config.rb -> generate_js_jobs.rb generates the actual running jobs on CircleCI.
90
-
91
- ## Tasks
92
- - Implement the new publish to npmjs.com flow in the ci_config.template.yml
93
- - The special build for cli-core is already handled inside that package, here we can only call the build command like the publish_js_packages job
package/dist/commands.js CHANGED
@@ -83,7 +83,7 @@ __p += '`;if(q1)J0+=`' +
83
83
  function print() { __p += __j.call(arguments, '') }
84
84
  `:`;
85
85
  `)+J0+`return __p
86
- }`;var n0=RM(function(){return M1(m,P0+"return "+J0).apply(Z,j)});if(n0.source=J0,w$(n0))throw n0;return n0}function Cg(K){return L1(K).toLowerCase()}function jg(K){return L1(K).toUpperCase()}function Og(K,V,G){if(K=L1(K),K&&(G||V===Z))return cU(K);if(!K||!(V=o3(V)))return K;var M=d4(K),D=d4(V),m=bU(M,D),j=pU(M,D)+1;return v6(M,m,j).join("")}function Rg(K,V,G){if(K=L1(K),K&&(G||V===Z))return K.slice(0,yU(K)+1);if(!K||!(V=o3(V)))return K;var M=d4(K),D=pU(M,d4(V))+1;return v6(M,0,D).join("")}function Sg(K,V,G){if(K=L1(K),K&&(G||V===Z))return K.replace(wY,"");if(!K||!(V=o3(V)))return K;var M=d4(K),D=bU(M,d4(V));return v6(M,D).join("")}function Ig(K,V){var G=v,M=b;if(r1(V)){var D="separator"in V?V.separator:D;G="length"in V?o0(V.length):G,M="omission"in V?o3(V.omission):M}K=L1(K);var m=K.length;if(D5(K)){var j=d4(K);m=j.length}if(G>=m)return K;var I=G-N5(M);if(I<1)return M;var p=j?v6(j,0,I).join(""):K.slice(0,I);if(D===Z)return p+M;if(j)I+=p.length-I;if(F$(D)){if(K.slice(I).search(D)){var t,e=p;if(!D.global)D=fY(D.source,L1(qU.exec(D))+"g");D.lastIndex=0;while(t=D.exec(e))var J0=t.index;p=p.slice(0,J0===Z?I:J0)}}else if(K.indexOf(o3(D),I)!=I){var B0=p.lastIndexOf(D);if(B0>-1)p=p.slice(0,B0)}return p+M}function vg(K){return K=L1(K),K&&hk.test(K)?K.replace(QU,Yb):K}var Ag=j5(function(K,V,G){return K+(G?" ":"")+V.toUpperCase()}),P$=SB("toUpperCase");function OM(K,V,G){if(K=L1(K),V=G?Z:V,V===Z)return xb(K)?zb(K):lc(K);return K.match(V)||[]}var RM=a0(function(K,V){try{return i3(K,Z,V)}catch(G){return w$(G)?G:new h0(G)}}),Eg=n8(function(K,V){return M4(V,function(G){G=B8(G),o8(K,G,B$(K[G],K))}),K});function fg(K){var V=K==null?0:K.length,G=S0();return K=!V?[]:s1(K,function(M){if(typeof M[1]!="function")throw new w4(X);return[G(M[0]),M[1]]}),a0(function(M){var D=-1;while(++D<V){var m=K[D];if(i3(m[0],this,M))return i3(m[1],this,M)}})}function Tg(K){return Yp(D4(K,W))}function L$(K){return function(){return K}}function kg(K,V){return K==null||K!==K?V:K}var cg=vB(),bg=vB(!0);function E3(K){return K}function m$(K){return $B(typeof K=="function"?K:D4(K,W))}function pg(K){return zB(D4(K,W))}function ug(K,V){return VB(K,D4(V,W))}var yg=a0(function(K,V){return function(G){return QZ(G,K,V)}}),hg=a0(function(K,V){return function(G){return QZ(K,G,V)}});function _$(K,V,G){var M=T2(V),D=AQ(V,M);if(G==null&&!(r1(V)&&(D.length||!M.length)))G=V,V=K,K=this,D=AQ(V,T2(V));var m=!(r1(G)&&("chain"in G))||!!G.chain,j=r8(K);return M4(D,function(I){var p=V[I];if(K[I]=p,j)K.prototype[I]=function(){var t=this.__chain__;if(m||t){var e=K(this.__wrapped__),J0=e.__actions__=I3(this.__actions__);return J0.push({func:p,args:arguments,thisArg:K}),e.__chain__=t,e}return p.apply(K,_6([this.value()],arguments))}}),K}function gg(){if(f2._===this)f2._=Bb;return this}function C$(){}function dg(K){return K=o0(K),a0(function(V){return WB(V,K)})}var ig=Q$(s1),lg=Q$(AU),og=Q$(OY);function SM(K){return z$(K)?RY(B8(K)):mp(K)}function sg(K){return function(V){return K==null?Z:D7(K,V)}}var ng=EB(),ag=EB(!0);function j$(){return[]}function O$(){return!1}function rg(){return{}}function tg(){return""}function eg(){return!0}function Zd(K,V){if(K=o0(K),K<1||K>s)return[];var G=t0,M=J3(K,t0);V=S0(V),K-=t0;var D=vY(M,V);while(++G<K)V(G);return D}function xd(K){if(g0(K))return s1(K,B8);return s3(K)?[K]:I3(nB(L1(K)))}function Qd(K){var V=++Gb;return L1(K)+V}var Jd=bQ(function(K,V){return K+V},0),Xd=J$("ceil"),qd=bQ(function(K,V){return K/V},1),Yd=J$("floor");function $d(K){return K&&K.length?vQ(K,E3,hY):Z}function Kd(K,V){return K&&K.length?vQ(K,S0(V,2),hY):Z}function zd(K){return TU(K,E3)}function Vd(K,V){return TU(K,S0(V,2))}function Wd(K){return K&&K.length?vQ(K,E3,lY):Z}function Hd(K,V){return K&&K.length?vQ(K,S0(V,2),lY):Z}var Gd=bQ(function(K,V){return K*V},1),Ud=J$("round"),Bd=bQ(function(K,V){return K-V},0);function Md(K){return K&&K.length?IY(K,E3):0}function wd(K,V){return K&&K.length?IY(K,S0(V,2)):0}if(L.after=py,L.ary=YM,L.assign=jh,L.assignIn=NM,L.assignInWith=rQ,L.assignWith=Oh,L.at=Rh,L.before=$M,L.bind=B$,L.bindAll=Eg,L.bindKey=KM,L.castArray=ry,L.chain=JM,L.chunk=Yu,L.compact=$u,L.concat=Ku,L.cond=fg,L.conforms=Tg,L.constant=L$,L.countBy=My,L.create=Sh,L.curry=zM,L.curryRight=VM,L.debounce=WM,L.defaults=Ih,L.defaultsDeep=vh,L.defer=uy,L.delay=yy,L.difference=zu,L.differenceBy=Vu,L.differenceWith=Wu,L.drop=Hu,L.dropRight=Gu,L.dropRightWhile=Uu,L.dropWhile=Bu,L.fill=Mu,L.filter=Fy,L.flatMap=Py,L.flatMapDeep=Ly,L.flatMapDepth=my,L.flatten=eB,L.flattenDeep=wu,L.flattenDepth=Fu,L.flip=hy,L.flow=cg,L.flowRight=bg,L.fromPairs=Du,L.functions=bh,L.functionsIn=ph,L.groupBy=_y,L.initial=Pu,L.intersection=Lu,L.intersectionBy=mu,L.intersectionWith=_u,L.invert=yh,L.invertBy=hh,L.invokeMap=jy,L.iteratee=m$,L.keyBy=Oy,L.keys=T2,L.keysIn=A3,L.map=iQ,L.mapKeys=dh,L.mapValues=ih,L.matches=pg,L.matchesProperty=ug,L.memoize=oQ,L.merge=lh,L.mergeWith=PM,L.method=yg,L.methodOf=hg,L.mixin=_$,L.negate=sQ,L.nthArg=dg,L.omit=oh,L.omitBy=sh,L.once=gy,L.orderBy=Ry,L.over=ig,L.overArgs=dy,L.overEvery=lg,L.overSome=og,L.partial=M$,L.partialRight=HM,L.partition=Sy,L.pick=nh,L.pickBy=LM,L.property=SM,L.propertyOf=sg,L.pull=Ru,L.pullAll=xM,L.pullAllBy=Su,L.pullAllWith=Iu,L.pullAt=vu,L.range=ng,L.rangeRight=ag,L.rearg=iy,L.reject=Ay,L.remove=Au,L.rest=ly,L.reverse=G$,L.sampleSize=fy,L.set=rh,L.setWith=th,L.shuffle=Ty,L.slice=Eu,L.sortBy=by,L.sortedUniq=uu,L.sortedUniqBy=yu,L.split=Pg,L.spread=oy,L.tail=hu,L.take=gu,L.takeRight=du,L.takeRightWhile=iu,L.takeWhile=lu,L.tap=$y,L.throttle=sy,L.thru=dQ,L.toArray=wM,L.toPairs=mM,L.toPairsIn=_M,L.toPath=xd,L.toPlainObject=DM,L.transform=eh,L.unary=ny,L.union=ou,L.unionBy=su,L.unionWith=nu,L.uniq=au,L.uniqBy=ru,L.uniqWith=tu,L.unset=Zg,L.unzip=U$,L.unzipWith=QM,L.update=xg,L.updateWith=Qg,L.values=S5,L.valuesIn=Jg,L.without=eu,L.words=OM,L.wrap=ay,L.xor=Zy,L.xorBy=xy,L.xorWith=Qy,L.zip=Jy,L.zipObject=Xy,L.zipObjectDeep=qy,L.zipWith=Yy,L.entries=mM,L.entriesIn=_M,L.extend=NM,L.extendWith=rQ,_$(L,L),L.add=Jd,L.attempt=RM,L.camelCase=$g,L.capitalize=CM,L.ceil=Xd,L.clamp=Xg,L.clone=ty,L.cloneDeep=Zh,L.cloneDeepWith=xh,L.cloneWith=ey,L.conformsTo=Qh,L.deburr=jM,L.defaultTo=kg,L.divide=qd,L.endsWith=Kg,L.eq=l4,L.escape=zg,L.escapeRegExp=Vg,L.every=wy,L.find=Dy,L.findIndex=rB,L.findKey=Ah,L.findLast=Ny,L.findLastIndex=tB,L.findLastKey=Eh,L.floor=Yd,L.forEach=XM,L.forEachRight=qM,L.forIn=fh,L.forInRight=Th,L.forOwn=kh,L.forOwnRight=ch,L.get=D$,L.gt=Jh,L.gte=Xh,L.has=uh,L.hasIn=N$,L.head=ZM,L.identity=E3,L.includes=Cy,L.indexOf=Nu,L.inRange=qg,L.invoke=gh,L.isArguments=L7,L.isArray=g0,L.isArrayBuffer=qh,L.isArrayLike=v3,L.isArrayLikeObject=z2,L.isBoolean=Yh,L.isBuffer=A6,L.isDate=$h,L.isElement=Kh,L.isEmpty=zh,L.isEqual=Vh,L.isEqualWith=Wh,L.isError=w$,L.isFinite=Hh,L.isFunction=r8,L.isInteger=GM,L.isLength=nQ,L.isMap=UM,L.isMatch=Gh,L.isMatchWith=Uh,L.isNaN=Bh,L.isNative=Mh,L.isNil=Fh,L.isNull=wh,L.isNumber=BM,L.isObject=r1,L.isObjectLike=Q2,L.isPlainObject=KZ,L.isRegExp=F$,L.isSafeInteger=Dh,L.isSet=MM,L.isString=aQ,L.isSymbol=s3,L.isTypedArray=R5,L.isUndefined=Nh,L.isWeakMap=Ph,L.isWeakSet=Lh,L.join=Cu,L.kebabCase=Wg,L.last=P4,L.lastIndexOf=ju,L.lowerCase=Hg,L.lowerFirst=Gg,L.lt=mh,L.lte=_h,L.max=$d,L.maxBy=Kd,L.mean=zd,L.meanBy=Vd,L.min=Wd,L.minBy=Hd,L.stubArray=j$,L.stubFalse=O$,L.stubObject=rg,L.stubString=tg,L.stubTrue=eg,L.multiply=Gd,L.nth=Ou,L.noConflict=gg,L.noop=C$,L.now=lQ,L.pad=Ug,L.padEnd=Bg,L.padStart=Mg,L.parseInt=wg,L.random=Yg,L.reduce=Iy,L.reduceRight=vy,L.repeat=Fg,L.replace=Dg,L.result=ah,L.round=Ud,L.runInContext=T,L.sample=Ey,L.size=ky,L.snakeCase=Ng,L.some=cy,L.sortedIndex=fu,L.sortedIndexBy=Tu,L.sortedIndexOf=ku,L.sortedLastIndex=cu,L.sortedLastIndexBy=bu,L.sortedLastIndexOf=pu,L.startCase=Lg,L.startsWith=mg,L.subtract=Bd,L.sum=Md,L.sumBy=wd,L.template=_g,L.times=Zd,L.toFinite=t8,L.toInteger=o0,L.toLength=FM,L.toLower=Cg,L.toNumber=L4,L.toSafeInteger=Ch,L.toString=L1,L.toUpper=jg,L.trim=Og,L.trimEnd=Rg,L.trimStart=Sg,L.truncate=Ig,L.unescape=vg,L.uniqueId=Qd,L.upperCase=Ag,L.upperFirst=P$,L.each=XM,L.eachRight=qM,L.first=ZM,_$(L,function(){var K={};return G8(L,function(V,G){if(!O1.call(L.prototype,G))K[G]=V}),K}(),{chain:!1}),L.VERSION=x,M4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){L[K].placeholder=L}),M4(["drop","take"],function(K,V){J1.prototype[K]=function(G){G=G===Z?1:O2(o0(G),0);var M=this.__filtered__&&!V?new J1(this):this.clone();if(M.__filtered__)M.__takeCount__=J3(G,M.__takeCount__);else M.__views__.push({size:J3(G,t0),type:K+(M.__dir__<0?"Right":"")});return M},J1.prototype[K+"Right"]=function(G){return this.reverse()[K](G).reverse()}}),M4(["filter","map","takeWhile"],function(K,V){var G=V+1,M=G==A0||G==s0;J1.prototype[K]=function(D){var m=this.clone();return m.__iteratees__.push({iteratee:S0(D,3),type:G}),m.__filtered__=m.__filtered__||M,m}}),M4(["head","last"],function(K,V){var G="take"+(V?"Right":"");J1.prototype[K]=function(){return this[G](1).value()[0]}}),M4(["initial","tail"],function(K,V){var G="drop"+(V?"":"Right");J1.prototype[K]=function(){return this.__filtered__?new J1(this):this[G](1)}}),J1.prototype.compact=function(){return this.filter(E3)},J1.prototype.find=function(K){return this.filter(K).head()},J1.prototype.findLast=function(K){return this.reverse().find(K)},J1.prototype.invokeMap=a0(function(K,V){if(typeof K=="function")return new J1(this);return this.map(function(G){return QZ(G,K,V)})}),J1.prototype.reject=function(K){return this.filter(sQ(S0(K)))},J1.prototype.slice=function(K,V){K=o0(K);var G=this;if(G.__filtered__&&(K>0||V<0))return new J1(G);if(K<0)G=G.takeRight(-K);else if(K)G=G.drop(K);if(V!==Z)V=o0(V),G=V<0?G.dropRight(-V):G.take(V-K);return G},J1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},J1.prototype.toArray=function(){return this.take(t0)},G8(J1.prototype,function(K,V){var G=/^(?:filter|find|map|reject)|While$/.test(V),M=/^(?:head|last)$/.test(V),D=L[M?"take"+(V=="last"?"Right":""):V],m=M||/^find/.test(V);if(!D)return;L.prototype[V]=function(){var j=this.__wrapped__,I=M?[1]:arguments,p=j instanceof J1,t=I[0],e=p||g0(j),J0=function(x1){var q1=D.apply(L,_6([x1],I));return M&&B0?q1[0]:q1};if(e&&G&&typeof t=="function"&&t.length!=1)p=e=!1;var B0=this.__chain__,P0=!!this.__actions__.length,f0=m&&!B0,n0=p&&!P0;if(!m&&e){j=n0?j:new J1(this);var T0=K.apply(j,I);return T0.__actions__.push({func:dQ,args:[J0],thisArg:Z}),new F4(T0,B0)}if(f0&&n0)return K.apply(this,I);return T0=this.thru(J0),f0?M?T0.value()[0]:T0.value():T0}}),M4(["pop","push","shift","sort","splice","unshift"],function(K){var V=MQ[K],G=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",M=/^(?:pop|shift)$/.test(K);L.prototype[K]=function(){var D=arguments;if(M&&!this.__chain__){var m=this.value();return V.apply(g0(m)?m:[],D)}return this[G](function(j){return V.apply(g0(j)?j:[],D)})}}),G8(J1.prototype,function(K,V){var G=L[V];if(G){var M=G.name+"";if(!O1.call(m5,M))m5[M]=[];m5[M].push({name:V,func:G})}}),m5[cQ(Z,P).name]=[{name:"wrapper",func:Z}],J1.prototype.clone=vb,J1.prototype.reverse=Ab,J1.prototype.value=Eb,L.prototype.at=Ky,L.prototype.chain=zy,L.prototype.commit=Vy,L.prototype.next=Wy,L.prototype.plant=Gy,L.prototype.reverse=Uy,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=By,L.prototype.first=L.prototype.head,n9)L.prototype[n9]=Hy;return L},j6=Vb();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)f2._=j6,define(function(){return j6});else if(U7)(U7.exports=j6)._=j6,mY._=j6;else f2._=j6}).call(gx)});var AM="0.4.0";var rM=m7(aM(),1),{program:pL0,createCommand:uL0,createArgument:yL0,createOption:hL0,CommanderError:gL0,InvalidArgumentError:dL0,InvalidOptionArgumentError:iL0,Command:m4,Argument:lL0,Option:oL0,Help:sL0}=rM.default;import x00 from"fs";var c$=(Z,x,Q)=>{let J=Z instanceof RegExp?tM(Z,Q):Z,X=x instanceof RegExp?tM(x,Q):x,q=J!==null&&X!=null&&Ui(J,X,Q);return q&&{start:q[0],end:q[1],pre:Q.slice(0,q[0]),body:Q.slice(q[0]+J.length,q[1]),post:Q.slice(q[1]+X.length)}},tM=(Z,x)=>{let Q=x.match(Z);return Q?Q[0]:null},Ui=(Z,x,Q)=>{let J,X,q,Y=void 0,$,z=Q.indexOf(Z),W=Q.indexOf(x,z+1),H=z;if(z>=0&&W>0){if(Z===x)return[z,W];J=[],q=Q.length;while(H>=0&&!$){if(H===z)J.push(H),z=Q.indexOf(Z,H+1);else if(J.length===1){let U=J.pop();if(U!==void 0)$=[U,W]}else{if(X=J.pop(),X!==void 0&&X<q)q=X,Y=W;W=Q.indexOf(x,H+1)}H=z<W&&z>=0?z:W}if(J.length&&Y!==void 0)$=[q,Y]}return $};var eM="\x00SLASH"+Math.random()+"\x00",Zw="\x00OPEN"+Math.random()+"\x00",p$="\x00CLOSE"+Math.random()+"\x00",xw="\x00COMMA"+Math.random()+"\x00",Qw="\x00PERIOD"+Math.random()+"\x00",Bi=new RegExp(eM,"g"),Mi=new RegExp(Zw,"g"),wi=new RegExp(p$,"g"),Fi=new RegExp(xw,"g"),Di=new RegExp(Qw,"g"),Ni=/\\\\/g,Pi=/\\{/g,Li=/\\}/g,mi=/\\,/g,_i=/\\./g;function b$(Z){return!isNaN(Z)?parseInt(Z,10):Z.charCodeAt(0)}function Ci(Z){return Z.replace(Ni,eM).replace(Pi,Zw).replace(Li,p$).replace(mi,xw).replace(_i,Qw)}function ji(Z){return Z.replace(Bi,"\\").replace(Mi,"{").replace(wi,"}").replace(Fi,",").replace(Di,".")}function Jw(Z){if(!Z)return[""];let x=[],Q=c$("{","}",Z);if(!Q)return Z.split(",");let{pre:J,body:X,post:q}=Q,Y=J.split(",");Y[Y.length-1]+="{"+X+"}";let $=Jw(q);if(q.length)Y[Y.length-1]+=$.shift(),Y.push.apply(Y,$);return x.push.apply(x,Y),x}function Xw(Z){if(!Z)return[];if(Z.slice(0,2)==="{}")Z="\\{\\}"+Z.slice(2);return VZ(Ci(Z),!0).map(ji)}function Oi(Z){return"{"+Z+"}"}function Ri(Z){return/^-?0\d/.test(Z)}function Si(Z,x){return Z<=x}function Ii(Z,x){return Z>=x}function VZ(Z,x){let Q=[],J=c$("{","}",Z);if(!J)return[Z];let X=J.pre,q=J.post.length?VZ(J.post,!1):[""];if(/\$$/.test(J.pre))for(let Y=0;Y<q.length;Y++){let $=X+"{"+J.body+"}"+q[Y];Q.push($)}else{let Y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(J.body),$=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(J.body),z=Y||$,W=J.body.indexOf(",")>=0;if(!z&&!W){if(J.post.match(/,(?!,).*\}/))return Z=J.pre+"{"+J.body+p$+J.post,VZ(Z);return[Z]}let H;if(z)H=J.body.split(/\.\./);else if(H=Jw(J.body),H.length===1&&H[0]!==void 0){if(H=VZ(H[0],!1).map(Oi),H.length===1)return q.map((B)=>J.pre+H[0]+B)}let U;if(z&&H[0]!==void 0&&H[1]!==void 0){let B=b$(H[0]),w=b$(H[1]),F=Math.max(H[0].length,H[1].length),P=H.length===3&&H[2]!==void 0?Math.abs(b$(H[2])):1,_=Si;if(w<B)P*=-1,_=Ii;let u=H.some(Ri);U=[];for(let d=B;_(d,w);d+=P){let n;if($){if(n=String.fromCharCode(d),n==="\\")n=""}else if(n=String(d),u){let r=F-n.length;if(r>0){let W0=new Array(r+1).join("0");if(d<0)n="-"+W0+n.slice(1);else n=W0+n}}U.push(n)}}else{U=[];for(let B=0;B<H.length;B++)U.push.apply(U,VZ(H[B],!1))}for(let B=0;B<U.length;B++)for(let w=0;w<q.length;w++){let F=X+U[B]+q[w];if(!x||z||F)Q.push(F)}}return Q}var WZ=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var vi={"[: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]},HZ=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),Ai=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qw=(Z)=>Z.join(""),Yw=(Z,x)=>{let Q=x;if(Z.charAt(Q)!=="[")throw new Error("not in a brace expression");let J=[],X=[],q=Q+1,Y=!1,$=!1,z=!1,W=!1,H=Q,U="";Z:while(q<Z.length){let P=Z.charAt(q);if((P==="!"||P==="^")&&q===Q+1){W=!0,q++;continue}if(P==="]"&&Y&&!z){H=q+1;break}if(Y=!0,P==="\\"){if(!z){z=!0,q++;continue}}if(P==="["&&!z){for(let[_,[C,u,d]]of Object.entries(vi))if(Z.startsWith(_,q)){if(U)return["$.",!1,Z.length-Q,!0];if(q+=_.length,d)X.push(C);else J.push(C);$=$||u;continue Z}}if(z=!1,U){if(P>U)J.push(HZ(U)+"-"+HZ(P));else if(P===U)J.push(HZ(P));U="",q++;continue}if(Z.startsWith("-]",q+1)){J.push(HZ(P+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){U=P,q+=2;continue}J.push(HZ(P)),q++}if(H<q)return["",!1,0,!1];if(!J.length&&!X.length)return["$.",!1,Z.length-Q,!0];if(X.length===0&&J.length===1&&/^\\?.$/.test(J[0])&&!W){let P=J[0].length===2?J[0].slice(-1):J[0];return[Ai(P),!1,H-Q,!1]}let B="["+(W?"^":"")+qw(J)+"]",w="["+(W?"":"^")+qw(X)+"]";return[J.length&&X.length?"("+B+"|"+w+")":J.length?B:w,$,H-Q,!0]};var n4=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/\[([^\/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var Ei=new Set(["!","?","+","*","@"]),$w=(Z)=>Ei.has(Z),fi="(?!(?:^|/)\\.\\.?(?:$|/))",ZJ="(?!\\.)",Ti=new Set(["[","."]),ki=new Set(["..","."]),ci=new Set("().*{}+?[]^$\\!"),bi=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u$="[^/]",Kw=u$+"*?",zw=u$+"+?";class s2{type;#Z;#x;#q=!1;#X=[];#Y;#N;#w;#$=!1;#W;#K;#z=!1;constructor(Z,x,Q={}){if(this.type=Z,Z)this.#x=!0;if(this.#Y=x,this.#Z=this.#Y?this.#Y.#Z:this,this.#W=this.#Z===this?Q:this.#Z.#W,this.#w=this.#Z===this?[]:this.#Z.#w,Z==="!"&&!this.#Z.#$)this.#w.push(this);this.#N=this.#Y?this.#Y.#X.length:0}get hasMagic(){if(this.#x!==void 0)return this.#x;for(let Z of this.#X){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#x=!0}return this.#x}toString(){if(this.#K!==void 0)return this.#K;if(!this.type)return this.#K=this.#X.map((Z)=>String(Z)).join("");else return this.#K=this.type+"("+this.#X.map((Z)=>String(Z)).join("|")+")"}#Q(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#$)return this;this.toString(),this.#$=!0;let Z;while(Z=this.#w.pop()){if(Z.type!=="!")continue;let x=Z,Q=x.#Y;while(Q){for(let J=x.#N+1;!Q.type&&J<Q.#X.length;J++)for(let X of Z.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(Q.#X[J])}x=Q,Q=x.#Y}}return this}push(...Z){for(let x of Z){if(x==="")continue;if(typeof x!=="string"&&!(x instanceof s2&&x.#Y===this))throw new Error("invalid part: "+x);this.#X.push(x)}}toJSON(){let Z=this.type===null?this.#X.slice().map((x)=>typeof x==="string"?x:x.toJSON()):[this.type,...this.#X.map((x)=>x.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#$&&this.#Y?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#Y?.isStart())return!1;if(this.#N===0)return!0;let Z=this.#Y;for(let x=0;x<this.#N;x++){let Q=Z.#X[x];if(!(Q instanceof s2&&Q.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#Y?.type==="!")return!0;if(!this.#Y?.isEnd())return!1;if(!this.type)return this.#Y?.isEnd();let Z=this.#Y?this.#Y.#X.length:0;return this.#N===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let x=new s2(this.type,Z);for(let Q of this.#X)x.copyIn(Q);return x}static#H(Z,x,Q,J){let X=!1,q=!1,Y=-1,$=!1;if(x.type===null){let B=Q,w="";while(B<Z.length){let F=Z.charAt(B++);if(X||F==="\\"){X=!X,w+=F;continue}if(q){if(B===Y+1){if(F==="^"||F==="!")$=!0}else if(F==="]"&&!(B===Y+2&&$))q=!1;w+=F;continue}else if(F==="["){q=!0,Y=B,$=!1,w+=F;continue}if(!J.noext&&$w(F)&&Z.charAt(B)==="("){x.push(w),w="";let P=new s2(F,x);B=s2.#H(Z,P,B,J),x.push(P);continue}w+=F}return x.push(w),B}let z=Q+1,W=new s2(null,x),H=[],U="";while(z<Z.length){let B=Z.charAt(z++);if(X||B==="\\"){X=!X,U+=B;continue}if(q){if(z===Y+1){if(B==="^"||B==="!")$=!0}else if(B==="]"&&!(z===Y+2&&$))q=!1;U+=B;continue}else if(B==="["){q=!0,Y=z,$=!1,U+=B;continue}if($w(B)&&Z.charAt(z)==="("){W.push(U),U="";let w=new s2(B,W);W.push(w),z=s2.#H(Z,w,z,J);continue}if(B==="|"){W.push(U),U="",H.push(W),W=new s2(null,x);continue}if(B===")"){if(U===""&&x.#X.length===0)x.#z=!0;return W.push(U),U="",x.push(...H,W),z}U+=B}return x.type=null,x.#x=void 0,x.#X=[Z.substring(Q-1)],z}static fromGlob(Z,x={}){let Q=new s2(null,void 0,x);return s2.#H(Z,Q,0,x),Q}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[x,Q,J,X]=this.toRegExpSource();if(!(J||this.#x||this.#W.nocase&&!this.#W.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return Q;let Y=(this.#W.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${x}$`,Y),{_src:x,_glob:Z})}get options(){return this.#W}toRegExpSource(Z){let x=Z??!!this.#W.dot;if(this.#Z===this)this.#Q();if(!this.type){let $=this.isStart()&&this.isEnd(),z=this.#X.map((B)=>{let[w,F,P,_]=typeof B==="string"?s2.#U(B,this.#x,$):B.toRegExpSource(Z);return this.#x=this.#x||P,this.#q=this.#q||_,w}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&ki.has(this.#X[0]))){let w=Ti,F=x&&w.has(z.charAt(0))||z.startsWith("\\.")&&w.has(z.charAt(2))||z.startsWith("\\.\\.")&&w.has(z.charAt(4)),P=!x&&!Z&&w.has(z.charAt(0));W=F?fi:P?ZJ:""}}}let H="";if(this.isEnd()&&this.#Z.#$&&this.#Y?.type==="!")H="(?:$|\\/)";return[W+z+H,n4(z),this.#x=!!this.#x,this.#q]}let Q=this.type==="*"||this.type==="+",J=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#F(x);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let $=this.toString();return this.#X=[$],this.type=null,this.#x=void 0,[$,n4(this.toString()),!1,!1]}let q=!Q||Z||x||!ZJ?"":this.#F(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let Y="";if(this.type==="!"&&this.#z)Y=(this.isStart()&&!x?ZJ:"")+zw;else{let $=this.type==="!"?"))"+(this.isStart()&&!x&&!Z?ZJ:"")+Kw+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Y=J+X+$}return[Y,n4(X),this.#x=!!this.#x,this.#q]}#F(Z){return this.#X.map((x)=>{if(typeof x==="string")throw new Error("string type in extglob ast??");let[Q,J,X,q]=x.toRegExpSource(Z);return this.#q=this.#q||q,Q}).filter((x)=>!(this.isStart()&&this.isEnd())||!!x).join("|")}static#U(Z,x,Q=!1){let J=!1,X="",q=!1;for(let Y=0;Y<Z.length;Y++){let $=Z.charAt(Y);if(J){J=!1,X+=(ci.has($)?"\\":"")+$;continue}if($==="\\"){if(Y===Z.length-1)X+="\\\\";else J=!0;continue}if($==="["){let[z,W,H,U]=Yw(Z,Y);if(H){X+=z,q=q||W,Y+=H-1,x=x||U;continue}}if($==="*"){if(Q&&Z==="*")X+=zw;else X+=Kw;x=!0;continue}if($==="?"){X+=u$,x=!0;continue}X+=bi($)}return[X,n4(Z),!!x,q]}}var I5=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var P3=(Z,x,Q={})=>{if(WZ(x),!Q.nocomment&&x.charAt(0)==="#")return!1;return new C4(x,Q).match(Z)},pi=/^\*+([^+@!?\*\[\(]*)$/,ui=(Z)=>(x)=>!x.startsWith(".")&&x.endsWith(Z),yi=(Z)=>(x)=>x.endsWith(Z),hi=(Z)=>{return Z=Z.toLowerCase(),(x)=>!x.startsWith(".")&&x.toLowerCase().endsWith(Z)},gi=(Z)=>{return Z=Z.toLowerCase(),(x)=>x.toLowerCase().endsWith(Z)},di=/^\*+\.\*+$/,ii=(Z)=>!Z.startsWith(".")&&Z.includes("."),li=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),oi=/^\.\*+$/,si=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),ni=/^\*+$/,ai=(Z)=>Z.length!==0&&!Z.startsWith("."),ri=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",ti=/^\?+([^+@!?\*\[\(]*)?$/,ei=([Z,x=""])=>{let Q=Hw([Z]);if(!x)return Q;return x=x.toLowerCase(),(J)=>Q(J)&&J.toLowerCase().endsWith(x)},Zl=([Z,x=""])=>{let Q=Gw([Z]);if(!x)return Q;return x=x.toLowerCase(),(J)=>Q(J)&&J.toLowerCase().endsWith(x)},xl=([Z,x=""])=>{let Q=Gw([Z]);return!x?Q:(J)=>Q(J)&&J.endsWith(x)},Ql=([Z,x=""])=>{let Q=Hw([Z]);return!x?Q:(J)=>Q(J)&&J.endsWith(x)},Hw=([Z])=>{let x=Z.length;return(Q)=>Q.length===x&&!Q.startsWith(".")},Gw=([Z])=>{let x=Z.length;return(Q)=>Q.length===x&&Q!=="."&&Q!==".."},Uw=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vw={win32:{sep:"\\"},posix:{sep:"/"}},Jl=Uw==="win32"?Vw.win32.sep:Vw.posix.sep;P3.sep=Jl;var n2=Symbol("globstar **");P3.GLOBSTAR=n2;var Xl="[^/]",ql=Xl+"*?",Yl="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$l="(?:(?!(?:\\/|^)\\.).)*?",Kl=(Z,x={})=>(Q)=>P3(Q,Z,x);P3.filter=Kl;var _4=(Z,x={})=>Object.assign({},Z,x),zl=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return P3;let x=P3;return Object.assign((J,X,q={})=>x(J,X,_4(Z,q)),{Minimatch:class J extends x.Minimatch{constructor(X,q={}){super(X,_4(Z,q))}static defaults(X){return x.defaults(_4(Z,X)).Minimatch}},AST:class J extends x.AST{constructor(X,q,Y={}){super(X,q,_4(Z,Y))}static fromGlob(X,q={}){return x.AST.fromGlob(X,_4(Z,q))}},unescape:(J,X={})=>x.unescape(J,_4(Z,X)),escape:(J,X={})=>x.escape(J,_4(Z,X)),filter:(J,X={})=>x.filter(J,_4(Z,X)),defaults:(J)=>x.defaults(_4(Z,J)),makeRe:(J,X={})=>x.makeRe(J,_4(Z,X)),braceExpand:(J,X={})=>x.braceExpand(J,_4(Z,X)),match:(J,X,q={})=>x.match(J,X,_4(Z,q)),sep:x.sep,GLOBSTAR:n2})};P3.defaults=zl;var Bw=(Z,x={})=>{if(WZ(Z),x.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return Xw(Z)};P3.braceExpand=Bw;var Vl=(Z,x={})=>new C4(Z,x).makeRe();P3.makeRe=Vl;var Wl=(Z,x,Q={})=>{let J=new C4(x,Q);if(Z=Z.filter((X)=>J.match(X)),J.options.nonull&&!Z.length)Z.push(x);return Z};P3.match=Wl;var Ww=/[?*]|[+@!]\(.*?\)|\[|\]/,Hl=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class C4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(Z,x={}){if(WZ(Z),x=x||{},this.options=x,this.pattern=Z,this.platform=x.platform||Uw,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!x.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!x.nonegate,this.comment=!1,this.empty=!1,this.partial=!!x.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=x.windowsNoMagicRoot!==void 0?x.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let x of Z)if(typeof x!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,x=this.options;if(!x.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],x.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let Q=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(Q),this.debug(this.pattern,this.globParts);let J=this.globParts.map((X,q,Y)=>{if(this.isWindows&&this.windowsNoMagicRoot){let $=X[0]===""&&X[1]===""&&(X[2]==="?"||!Ww.test(X[2]))&&!Ww.test(X[3]),z=/^[a-z]:/i.test(X[0]);if($)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(z)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map(($)=>this.parse($))});if(this.debug(this.pattern,J),this.set=J.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let Q=0;Q<Z.length;Q++)for(let J=0;J<Z[Q].length;J++)if(Z[Q][J]==="**")Z[Q][J]="*"}let{optimizationLevel:x=1}=this.options;if(x>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(x>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((x)=>{let Q=-1;while((Q=x.indexOf("**",Q+1))!==-1){let J=Q;while(x[J+1]==="**")J++;if(J!==Q)x.splice(Q,J-Q)}return x})}levelOneOptimize(Z){return Z.map((x)=>{return x=x.reduce((Q,J)=>{let X=Q[Q.length-1];if(J==="**"&&X==="**")return Q;if(J===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return Q.pop(),Q}return Q.push(J),Q},[]),x.length===0?[""]:x})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let x=!1;do{if(x=!1,!this.preserveMultipleSlashes){for(let J=1;J<Z.length-1;J++){let X=Z[J];if(J===1&&X===""&&Z[0]==="")continue;if(X==="."||X==="")x=!0,Z.splice(J,1),J--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))x=!0,Z.pop()}let Q=0;while((Q=Z.indexOf("..",Q+1))!==-1){let J=Z[Q-1];if(J&&J!=="."&&J!==".."&&J!=="**")x=!0,Z.splice(Q-1,2),Q-=2}}while(x);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let x=!1;do{x=!1;for(let Q of Z){let J=-1;while((J=Q.indexOf("**",J+1))!==-1){let q=J;while(Q[q+1]==="**")q++;if(q>J)Q.splice(J+1,q-J);let Y=Q[J+1],$=Q[J+2],z=Q[J+3];if(Y!=="..")continue;if(!$||$==="."||$===".."||!z||z==="."||z==="..")continue;x=!0,Q.splice(J,1);let W=Q.slice(0);W[J]="**",Z.push(W),J--}if(!this.preserveMultipleSlashes){for(let q=1;q<Q.length-1;q++){let Y=Q[q];if(q===1&&Y===""&&Q[0]==="")continue;if(Y==="."||Y==="")x=!0,Q.splice(q,1),q--}if(Q[0]==="."&&Q.length===2&&(Q[1]==="."||Q[1]===""))x=!0,Q.pop()}let X=0;while((X=Q.indexOf("..",X+1))!==-1){let q=Q[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){x=!0;let $=X===1&&Q[X+1]==="**"?["."]:[];if(Q.splice(X-1,2,...$),Q.length===0)Q.push("");X-=2}}}}while(x);return Z}secondPhasePreProcess(Z){for(let x=0;x<Z.length-1;x++)for(let Q=x+1;Q<Z.length;Q++){let J=this.partsMatch(Z[x],Z[Q],!this.preserveMultipleSlashes);if(J){Z[x]=[],Z[Q]=J;break}}return Z.filter((x)=>x.length)}partsMatch(Z,x,Q=!1){let J=0,X=0,q=[],Y="";while(J<Z.length&&X<x.length)if(Z[J]===x[X])q.push(Y==="b"?x[X]:Z[J]),J++,X++;else if(Q&&Z[J]==="**"&&x[X]===Z[J+1])q.push(Z[J]),J++;else if(Q&&x[X]==="**"&&Z[J]===x[X+1])q.push(x[X]),X++;else if(Z[J]==="*"&&x[X]&&(this.options.dot||!x[X].startsWith("."))&&x[X]!=="**"){if(Y==="b")return!1;Y="a",q.push(Z[J]),J++,X++}else if(x[X]==="*"&&Z[J]&&(this.options.dot||!Z[J].startsWith("."))&&Z[J]!=="**"){if(Y==="a")return!1;Y="b",q.push(x[X]),J++,X++}else return!1;return Z.length===x.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,x=!1,Q=0;for(let J=0;J<Z.length&&Z.charAt(J)==="!";J++)x=!x,Q++;if(Q)this.pattern=Z.slice(Q);this.negate=x}matchOne(Z,x,Q=!1){let J=this.options;if(this.isWindows){let F=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),P=!F&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),_=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),C=!_&&x[0]===""&&x[1]===""&&x[2]==="?"&&typeof x[3]==="string"&&/^[a-z]:$/i.test(x[3]),u=P?3:F?0:void 0,d=C?3:_?0:void 0;if(typeof u==="number"&&typeof d==="number"){let[n,r]=[Z[u],x[d]];if(n.toLowerCase()===r.toLowerCase()){if(x[d]=n,d>u)x=x.slice(d);else if(u>d)Z=Z.slice(u)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.levelTwoFileOptimize(Z);this.debug("matchOne",this,{file:Z,pattern:x}),this.debug("matchOne",Z.length,x.length);for(var q=0,Y=0,$=Z.length,z=x.length;q<$&&Y<z;q++,Y++){this.debug("matchOne loop");var W=x[Y],H=Z[q];if(this.debug(x,W,H),W===!1)return!1;if(W===n2){this.debug("GLOBSTAR",[x,W,H]);var U=q,B=Y+1;if(B===z){this.debug("** at the end");for(;q<$;q++)if(Z[q]==="."||Z[q]===".."||!J.dot&&Z[q].charAt(0)===".")return!1;return!0}while(U<$){var w=Z[U];if(this.debug(`
86
+ }`;var n0=RM(function(){return M1(m,P0+"return "+J0).apply(Z,j)});if(n0.source=J0,w$(n0))throw n0;return n0}function Cg(K){return L1(K).toLowerCase()}function jg(K){return L1(K).toUpperCase()}function Og(K,V,G){if(K=L1(K),K&&(G||V===Z))return cU(K);if(!K||!(V=o3(V)))return K;var M=d4(K),D=d4(V),m=bU(M,D),j=pU(M,D)+1;return v6(M,m,j).join("")}function Rg(K,V,G){if(K=L1(K),K&&(G||V===Z))return K.slice(0,yU(K)+1);if(!K||!(V=o3(V)))return K;var M=d4(K),D=pU(M,d4(V))+1;return v6(M,0,D).join("")}function Sg(K,V,G){if(K=L1(K),K&&(G||V===Z))return K.replace(wY,"");if(!K||!(V=o3(V)))return K;var M=d4(K),D=bU(M,d4(V));return v6(M,D).join("")}function Ig(K,V){var G=v,M=b;if(r1(V)){var D="separator"in V?V.separator:D;G="length"in V?o0(V.length):G,M="omission"in V?o3(V.omission):M}K=L1(K);var m=K.length;if(D5(K)){var j=d4(K);m=j.length}if(G>=m)return K;var I=G-N5(M);if(I<1)return M;var p=j?v6(j,0,I).join(""):K.slice(0,I);if(D===Z)return p+M;if(j)I+=p.length-I;if(F$(D)){if(K.slice(I).search(D)){var t,e=p;if(!D.global)D=fY(D.source,L1(qU.exec(D))+"g");D.lastIndex=0;while(t=D.exec(e))var J0=t.index;p=p.slice(0,J0===Z?I:J0)}}else if(K.indexOf(o3(D),I)!=I){var B0=p.lastIndexOf(D);if(B0>-1)p=p.slice(0,B0)}return p+M}function vg(K){return K=L1(K),K&&hk.test(K)?K.replace(QU,Yb):K}var Ag=j5(function(K,V,G){return K+(G?" ":"")+V.toUpperCase()}),P$=SB("toUpperCase");function OM(K,V,G){if(K=L1(K),V=G?Z:V,V===Z)return xb(K)?zb(K):lc(K);return K.match(V)||[]}var RM=a0(function(K,V){try{return i3(K,Z,V)}catch(G){return w$(G)?G:new h0(G)}}),Eg=n8(function(K,V){return M4(V,function(G){G=B8(G),o8(K,G,B$(K[G],K))}),K});function fg(K){var V=K==null?0:K.length,G=S0();return K=!V?[]:s1(K,function(M){if(typeof M[1]!="function")throw new w4(X);return[G(M[0]),M[1]]}),a0(function(M){var D=-1;while(++D<V){var m=K[D];if(i3(m[0],this,M))return i3(m[1],this,M)}})}function Tg(K){return Yp(D4(K,W))}function L$(K){return function(){return K}}function kg(K,V){return K==null||K!==K?V:K}var cg=vB(),bg=vB(!0);function E3(K){return K}function m$(K){return $B(typeof K=="function"?K:D4(K,W))}function pg(K){return zB(D4(K,W))}function ug(K,V){return VB(K,D4(V,W))}var yg=a0(function(K,V){return function(G){return QZ(G,K,V)}}),hg=a0(function(K,V){return function(G){return QZ(K,G,V)}});function _$(K,V,G){var M=T2(V),D=AQ(V,M);if(G==null&&!(r1(V)&&(D.length||!M.length)))G=V,V=K,K=this,D=AQ(V,T2(V));var m=!(r1(G)&&("chain"in G))||!!G.chain,j=r8(K);return M4(D,function(I){var p=V[I];if(K[I]=p,j)K.prototype[I]=function(){var t=this.__chain__;if(m||t){var e=K(this.__wrapped__),J0=e.__actions__=I3(this.__actions__);return J0.push({func:p,args:arguments,thisArg:K}),e.__chain__=t,e}return p.apply(K,_6([this.value()],arguments))}}),K}function gg(){if(f2._===this)f2._=Bb;return this}function C$(){}function dg(K){return K=o0(K),a0(function(V){return WB(V,K)})}var ig=Q$(s1),lg=Q$(AU),og=Q$(OY);function SM(K){return z$(K)?RY(B8(K)):mp(K)}function sg(K){return function(V){return K==null?Z:D7(K,V)}}var ng=EB(),ag=EB(!0);function j$(){return[]}function O$(){return!1}function rg(){return{}}function tg(){return""}function eg(){return!0}function Zd(K,V){if(K=o0(K),K<1||K>s)return[];var G=t0,M=J3(K,t0);V=S0(V),K-=t0;var D=vY(M,V);while(++G<K)V(G);return D}function xd(K){if(g0(K))return s1(K,B8);return s3(K)?[K]:I3(nB(L1(K)))}function Qd(K){var V=++Gb;return L1(K)+V}var Jd=bQ(function(K,V){return K+V},0),Xd=J$("ceil"),qd=bQ(function(K,V){return K/V},1),Yd=J$("floor");function $d(K){return K&&K.length?vQ(K,E3,hY):Z}function Kd(K,V){return K&&K.length?vQ(K,S0(V,2),hY):Z}function zd(K){return TU(K,E3)}function Vd(K,V){return TU(K,S0(V,2))}function Wd(K){return K&&K.length?vQ(K,E3,lY):Z}function Hd(K,V){return K&&K.length?vQ(K,S0(V,2),lY):Z}var Gd=bQ(function(K,V){return K*V},1),Ud=J$("round"),Bd=bQ(function(K,V){return K-V},0);function Md(K){return K&&K.length?IY(K,E3):0}function wd(K,V){return K&&K.length?IY(K,S0(V,2)):0}if(L.after=py,L.ary=YM,L.assign=jh,L.assignIn=NM,L.assignInWith=rQ,L.assignWith=Oh,L.at=Rh,L.before=$M,L.bind=B$,L.bindAll=Eg,L.bindKey=KM,L.castArray=ry,L.chain=JM,L.chunk=Yu,L.compact=$u,L.concat=Ku,L.cond=fg,L.conforms=Tg,L.constant=L$,L.countBy=My,L.create=Sh,L.curry=zM,L.curryRight=VM,L.debounce=WM,L.defaults=Ih,L.defaultsDeep=vh,L.defer=uy,L.delay=yy,L.difference=zu,L.differenceBy=Vu,L.differenceWith=Wu,L.drop=Hu,L.dropRight=Gu,L.dropRightWhile=Uu,L.dropWhile=Bu,L.fill=Mu,L.filter=Fy,L.flatMap=Py,L.flatMapDeep=Ly,L.flatMapDepth=my,L.flatten=eB,L.flattenDeep=wu,L.flattenDepth=Fu,L.flip=hy,L.flow=cg,L.flowRight=bg,L.fromPairs=Du,L.functions=bh,L.functionsIn=ph,L.groupBy=_y,L.initial=Pu,L.intersection=Lu,L.intersectionBy=mu,L.intersectionWith=_u,L.invert=yh,L.invertBy=hh,L.invokeMap=jy,L.iteratee=m$,L.keyBy=Oy,L.keys=T2,L.keysIn=A3,L.map=iQ,L.mapKeys=dh,L.mapValues=ih,L.matches=pg,L.matchesProperty=ug,L.memoize=oQ,L.merge=lh,L.mergeWith=PM,L.method=yg,L.methodOf=hg,L.mixin=_$,L.negate=sQ,L.nthArg=dg,L.omit=oh,L.omitBy=sh,L.once=gy,L.orderBy=Ry,L.over=ig,L.overArgs=dy,L.overEvery=lg,L.overSome=og,L.partial=M$,L.partialRight=HM,L.partition=Sy,L.pick=nh,L.pickBy=LM,L.property=SM,L.propertyOf=sg,L.pull=Ru,L.pullAll=xM,L.pullAllBy=Su,L.pullAllWith=Iu,L.pullAt=vu,L.range=ng,L.rangeRight=ag,L.rearg=iy,L.reject=Ay,L.remove=Au,L.rest=ly,L.reverse=G$,L.sampleSize=fy,L.set=rh,L.setWith=th,L.shuffle=Ty,L.slice=Eu,L.sortBy=by,L.sortedUniq=uu,L.sortedUniqBy=yu,L.split=Pg,L.spread=oy,L.tail=hu,L.take=gu,L.takeRight=du,L.takeRightWhile=iu,L.takeWhile=lu,L.tap=$y,L.throttle=sy,L.thru=dQ,L.toArray=wM,L.toPairs=mM,L.toPairsIn=_M,L.toPath=xd,L.toPlainObject=DM,L.transform=eh,L.unary=ny,L.union=ou,L.unionBy=su,L.unionWith=nu,L.uniq=au,L.uniqBy=ru,L.uniqWith=tu,L.unset=Zg,L.unzip=U$,L.unzipWith=QM,L.update=xg,L.updateWith=Qg,L.values=S5,L.valuesIn=Jg,L.without=eu,L.words=OM,L.wrap=ay,L.xor=Zy,L.xorBy=xy,L.xorWith=Qy,L.zip=Jy,L.zipObject=Xy,L.zipObjectDeep=qy,L.zipWith=Yy,L.entries=mM,L.entriesIn=_M,L.extend=NM,L.extendWith=rQ,_$(L,L),L.add=Jd,L.attempt=RM,L.camelCase=$g,L.capitalize=CM,L.ceil=Xd,L.clamp=Xg,L.clone=ty,L.cloneDeep=Zh,L.cloneDeepWith=xh,L.cloneWith=ey,L.conformsTo=Qh,L.deburr=jM,L.defaultTo=kg,L.divide=qd,L.endsWith=Kg,L.eq=l4,L.escape=zg,L.escapeRegExp=Vg,L.every=wy,L.find=Dy,L.findIndex=rB,L.findKey=Ah,L.findLast=Ny,L.findLastIndex=tB,L.findLastKey=Eh,L.floor=Yd,L.forEach=XM,L.forEachRight=qM,L.forIn=fh,L.forInRight=Th,L.forOwn=kh,L.forOwnRight=ch,L.get=D$,L.gt=Jh,L.gte=Xh,L.has=uh,L.hasIn=N$,L.head=ZM,L.identity=E3,L.includes=Cy,L.indexOf=Nu,L.inRange=qg,L.invoke=gh,L.isArguments=L7,L.isArray=g0,L.isArrayBuffer=qh,L.isArrayLike=v3,L.isArrayLikeObject=z2,L.isBoolean=Yh,L.isBuffer=A6,L.isDate=$h,L.isElement=Kh,L.isEmpty=zh,L.isEqual=Vh,L.isEqualWith=Wh,L.isError=w$,L.isFinite=Hh,L.isFunction=r8,L.isInteger=GM,L.isLength=nQ,L.isMap=UM,L.isMatch=Gh,L.isMatchWith=Uh,L.isNaN=Bh,L.isNative=Mh,L.isNil=Fh,L.isNull=wh,L.isNumber=BM,L.isObject=r1,L.isObjectLike=Q2,L.isPlainObject=KZ,L.isRegExp=F$,L.isSafeInteger=Dh,L.isSet=MM,L.isString=aQ,L.isSymbol=s3,L.isTypedArray=R5,L.isUndefined=Nh,L.isWeakMap=Ph,L.isWeakSet=Lh,L.join=Cu,L.kebabCase=Wg,L.last=P4,L.lastIndexOf=ju,L.lowerCase=Hg,L.lowerFirst=Gg,L.lt=mh,L.lte=_h,L.max=$d,L.maxBy=Kd,L.mean=zd,L.meanBy=Vd,L.min=Wd,L.minBy=Hd,L.stubArray=j$,L.stubFalse=O$,L.stubObject=rg,L.stubString=tg,L.stubTrue=eg,L.multiply=Gd,L.nth=Ou,L.noConflict=gg,L.noop=C$,L.now=lQ,L.pad=Ug,L.padEnd=Bg,L.padStart=Mg,L.parseInt=wg,L.random=Yg,L.reduce=Iy,L.reduceRight=vy,L.repeat=Fg,L.replace=Dg,L.result=ah,L.round=Ud,L.runInContext=T,L.sample=Ey,L.size=ky,L.snakeCase=Ng,L.some=cy,L.sortedIndex=fu,L.sortedIndexBy=Tu,L.sortedIndexOf=ku,L.sortedLastIndex=cu,L.sortedLastIndexBy=bu,L.sortedLastIndexOf=pu,L.startCase=Lg,L.startsWith=mg,L.subtract=Bd,L.sum=Md,L.sumBy=wd,L.template=_g,L.times=Zd,L.toFinite=t8,L.toInteger=o0,L.toLength=FM,L.toLower=Cg,L.toNumber=L4,L.toSafeInteger=Ch,L.toString=L1,L.toUpper=jg,L.trim=Og,L.trimEnd=Rg,L.trimStart=Sg,L.truncate=Ig,L.unescape=vg,L.uniqueId=Qd,L.upperCase=Ag,L.upperFirst=P$,L.each=XM,L.eachRight=qM,L.first=ZM,_$(L,function(){var K={};return G8(L,function(V,G){if(!O1.call(L.prototype,G))K[G]=V}),K}(),{chain:!1}),L.VERSION=x,M4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){L[K].placeholder=L}),M4(["drop","take"],function(K,V){J1.prototype[K]=function(G){G=G===Z?1:O2(o0(G),0);var M=this.__filtered__&&!V?new J1(this):this.clone();if(M.__filtered__)M.__takeCount__=J3(G,M.__takeCount__);else M.__views__.push({size:J3(G,t0),type:K+(M.__dir__<0?"Right":"")});return M},J1.prototype[K+"Right"]=function(G){return this.reverse()[K](G).reverse()}}),M4(["filter","map","takeWhile"],function(K,V){var G=V+1,M=G==A0||G==s0;J1.prototype[K]=function(D){var m=this.clone();return m.__iteratees__.push({iteratee:S0(D,3),type:G}),m.__filtered__=m.__filtered__||M,m}}),M4(["head","last"],function(K,V){var G="take"+(V?"Right":"");J1.prototype[K]=function(){return this[G](1).value()[0]}}),M4(["initial","tail"],function(K,V){var G="drop"+(V?"":"Right");J1.prototype[K]=function(){return this.__filtered__?new J1(this):this[G](1)}}),J1.prototype.compact=function(){return this.filter(E3)},J1.prototype.find=function(K){return this.filter(K).head()},J1.prototype.findLast=function(K){return this.reverse().find(K)},J1.prototype.invokeMap=a0(function(K,V){if(typeof K=="function")return new J1(this);return this.map(function(G){return QZ(G,K,V)})}),J1.prototype.reject=function(K){return this.filter(sQ(S0(K)))},J1.prototype.slice=function(K,V){K=o0(K);var G=this;if(G.__filtered__&&(K>0||V<0))return new J1(G);if(K<0)G=G.takeRight(-K);else if(K)G=G.drop(K);if(V!==Z)V=o0(V),G=V<0?G.dropRight(-V):G.take(V-K);return G},J1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},J1.prototype.toArray=function(){return this.take(t0)},G8(J1.prototype,function(K,V){var G=/^(?:filter|find|map|reject)|While$/.test(V),M=/^(?:head|last)$/.test(V),D=L[M?"take"+(V=="last"?"Right":""):V],m=M||/^find/.test(V);if(!D)return;L.prototype[V]=function(){var j=this.__wrapped__,I=M?[1]:arguments,p=j instanceof J1,t=I[0],e=p||g0(j),J0=function(x1){var q1=D.apply(L,_6([x1],I));return M&&B0?q1[0]:q1};if(e&&G&&typeof t=="function"&&t.length!=1)p=e=!1;var B0=this.__chain__,P0=!!this.__actions__.length,f0=m&&!B0,n0=p&&!P0;if(!m&&e){j=n0?j:new J1(this);var T0=K.apply(j,I);return T0.__actions__.push({func:dQ,args:[J0],thisArg:Z}),new F4(T0,B0)}if(f0&&n0)return K.apply(this,I);return T0=this.thru(J0),f0?M?T0.value()[0]:T0.value():T0}}),M4(["pop","push","shift","sort","splice","unshift"],function(K){var V=MQ[K],G=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",M=/^(?:pop|shift)$/.test(K);L.prototype[K]=function(){var D=arguments;if(M&&!this.__chain__){var m=this.value();return V.apply(g0(m)?m:[],D)}return this[G](function(j){return V.apply(g0(j)?j:[],D)})}}),G8(J1.prototype,function(K,V){var G=L[V];if(G){var M=G.name+"";if(!O1.call(m5,M))m5[M]=[];m5[M].push({name:V,func:G})}}),m5[cQ(Z,P).name]=[{name:"wrapper",func:Z}],J1.prototype.clone=vb,J1.prototype.reverse=Ab,J1.prototype.value=Eb,L.prototype.at=Ky,L.prototype.chain=zy,L.prototype.commit=Vy,L.prototype.next=Wy,L.prototype.plant=Gy,L.prototype.reverse=Uy,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=By,L.prototype.first=L.prototype.head,n9)L.prototype[n9]=Hy;return L},j6=Vb();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)f2._=j6,define(function(){return j6});else if(U7)(U7.exports=j6)._=j6,mY._=j6;else f2._=j6}).call(gx)});var AM="0.4.1";var rM=m7(aM(),1),{program:pL0,createCommand:uL0,createArgument:yL0,createOption:hL0,CommanderError:gL0,InvalidArgumentError:dL0,InvalidOptionArgumentError:iL0,Command:m4,Argument:lL0,Option:oL0,Help:sL0}=rM.default;import x00 from"fs";var c$=(Z,x,Q)=>{let J=Z instanceof RegExp?tM(Z,Q):Z,X=x instanceof RegExp?tM(x,Q):x,q=J!==null&&X!=null&&Ui(J,X,Q);return q&&{start:q[0],end:q[1],pre:Q.slice(0,q[0]),body:Q.slice(q[0]+J.length,q[1]),post:Q.slice(q[1]+X.length)}},tM=(Z,x)=>{let Q=x.match(Z);return Q?Q[0]:null},Ui=(Z,x,Q)=>{let J,X,q,Y=void 0,$,z=Q.indexOf(Z),W=Q.indexOf(x,z+1),H=z;if(z>=0&&W>0){if(Z===x)return[z,W];J=[],q=Q.length;while(H>=0&&!$){if(H===z)J.push(H),z=Q.indexOf(Z,H+1);else if(J.length===1){let U=J.pop();if(U!==void 0)$=[U,W]}else{if(X=J.pop(),X!==void 0&&X<q)q=X,Y=W;W=Q.indexOf(x,H+1)}H=z<W&&z>=0?z:W}if(J.length&&Y!==void 0)$=[q,Y]}return $};var eM="\x00SLASH"+Math.random()+"\x00",Zw="\x00OPEN"+Math.random()+"\x00",p$="\x00CLOSE"+Math.random()+"\x00",xw="\x00COMMA"+Math.random()+"\x00",Qw="\x00PERIOD"+Math.random()+"\x00",Bi=new RegExp(eM,"g"),Mi=new RegExp(Zw,"g"),wi=new RegExp(p$,"g"),Fi=new RegExp(xw,"g"),Di=new RegExp(Qw,"g"),Ni=/\\\\/g,Pi=/\\{/g,Li=/\\}/g,mi=/\\,/g,_i=/\\./g;function b$(Z){return!isNaN(Z)?parseInt(Z,10):Z.charCodeAt(0)}function Ci(Z){return Z.replace(Ni,eM).replace(Pi,Zw).replace(Li,p$).replace(mi,xw).replace(_i,Qw)}function ji(Z){return Z.replace(Bi,"\\").replace(Mi,"{").replace(wi,"}").replace(Fi,",").replace(Di,".")}function Jw(Z){if(!Z)return[""];let x=[],Q=c$("{","}",Z);if(!Q)return Z.split(",");let{pre:J,body:X,post:q}=Q,Y=J.split(",");Y[Y.length-1]+="{"+X+"}";let $=Jw(q);if(q.length)Y[Y.length-1]+=$.shift(),Y.push.apply(Y,$);return x.push.apply(x,Y),x}function Xw(Z){if(!Z)return[];if(Z.slice(0,2)==="{}")Z="\\{\\}"+Z.slice(2);return VZ(Ci(Z),!0).map(ji)}function Oi(Z){return"{"+Z+"}"}function Ri(Z){return/^-?0\d/.test(Z)}function Si(Z,x){return Z<=x}function Ii(Z,x){return Z>=x}function VZ(Z,x){let Q=[],J=c$("{","}",Z);if(!J)return[Z];let X=J.pre,q=J.post.length?VZ(J.post,!1):[""];if(/\$$/.test(J.pre))for(let Y=0;Y<q.length;Y++){let $=X+"{"+J.body+"}"+q[Y];Q.push($)}else{let Y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(J.body),$=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(J.body),z=Y||$,W=J.body.indexOf(",")>=0;if(!z&&!W){if(J.post.match(/,(?!,).*\}/))return Z=J.pre+"{"+J.body+p$+J.post,VZ(Z);return[Z]}let H;if(z)H=J.body.split(/\.\./);else if(H=Jw(J.body),H.length===1&&H[0]!==void 0){if(H=VZ(H[0],!1).map(Oi),H.length===1)return q.map((B)=>J.pre+H[0]+B)}let U;if(z&&H[0]!==void 0&&H[1]!==void 0){let B=b$(H[0]),w=b$(H[1]),F=Math.max(H[0].length,H[1].length),P=H.length===3&&H[2]!==void 0?Math.abs(b$(H[2])):1,_=Si;if(w<B)P*=-1,_=Ii;let u=H.some(Ri);U=[];for(let d=B;_(d,w);d+=P){let n;if($){if(n=String.fromCharCode(d),n==="\\")n=""}else if(n=String(d),u){let r=F-n.length;if(r>0){let W0=new Array(r+1).join("0");if(d<0)n="-"+W0+n.slice(1);else n=W0+n}}U.push(n)}}else{U=[];for(let B=0;B<H.length;B++)U.push.apply(U,VZ(H[B],!1))}for(let B=0;B<U.length;B++)for(let w=0;w<q.length;w++){let F=X+U[B]+q[w];if(!x||z||F)Q.push(F)}}return Q}var WZ=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var vi={"[: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]},HZ=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),Ai=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qw=(Z)=>Z.join(""),Yw=(Z,x)=>{let Q=x;if(Z.charAt(Q)!=="[")throw new Error("not in a brace expression");let J=[],X=[],q=Q+1,Y=!1,$=!1,z=!1,W=!1,H=Q,U="";Z:while(q<Z.length){let P=Z.charAt(q);if((P==="!"||P==="^")&&q===Q+1){W=!0,q++;continue}if(P==="]"&&Y&&!z){H=q+1;break}if(Y=!0,P==="\\"){if(!z){z=!0,q++;continue}}if(P==="["&&!z){for(let[_,[C,u,d]]of Object.entries(vi))if(Z.startsWith(_,q)){if(U)return["$.",!1,Z.length-Q,!0];if(q+=_.length,d)X.push(C);else J.push(C);$=$||u;continue Z}}if(z=!1,U){if(P>U)J.push(HZ(U)+"-"+HZ(P));else if(P===U)J.push(HZ(P));U="",q++;continue}if(Z.startsWith("-]",q+1)){J.push(HZ(P+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){U=P,q+=2;continue}J.push(HZ(P)),q++}if(H<q)return["",!1,0,!1];if(!J.length&&!X.length)return["$.",!1,Z.length-Q,!0];if(X.length===0&&J.length===1&&/^\\?.$/.test(J[0])&&!W){let P=J[0].length===2?J[0].slice(-1):J[0];return[Ai(P),!1,H-Q,!1]}let B="["+(W?"^":"")+qw(J)+"]",w="["+(W?"":"^")+qw(X)+"]";return[J.length&&X.length?"("+B+"|"+w+")":J.length?B:w,$,H-Q,!0]};var n4=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/\[([^\/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var Ei=new Set(["!","?","+","*","@"]),$w=(Z)=>Ei.has(Z),fi="(?!(?:^|/)\\.\\.?(?:$|/))",ZJ="(?!\\.)",Ti=new Set(["[","."]),ki=new Set(["..","."]),ci=new Set("().*{}+?[]^$\\!"),bi=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u$="[^/]",Kw=u$+"*?",zw=u$+"+?";class s2{type;#Z;#x;#q=!1;#X=[];#Y;#N;#w;#$=!1;#W;#K;#z=!1;constructor(Z,x,Q={}){if(this.type=Z,Z)this.#x=!0;if(this.#Y=x,this.#Z=this.#Y?this.#Y.#Z:this,this.#W=this.#Z===this?Q:this.#Z.#W,this.#w=this.#Z===this?[]:this.#Z.#w,Z==="!"&&!this.#Z.#$)this.#w.push(this);this.#N=this.#Y?this.#Y.#X.length:0}get hasMagic(){if(this.#x!==void 0)return this.#x;for(let Z of this.#X){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#x=!0}return this.#x}toString(){if(this.#K!==void 0)return this.#K;if(!this.type)return this.#K=this.#X.map((Z)=>String(Z)).join("");else return this.#K=this.type+"("+this.#X.map((Z)=>String(Z)).join("|")+")"}#Q(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#$)return this;this.toString(),this.#$=!0;let Z;while(Z=this.#w.pop()){if(Z.type!=="!")continue;let x=Z,Q=x.#Y;while(Q){for(let J=x.#N+1;!Q.type&&J<Q.#X.length;J++)for(let X of Z.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(Q.#X[J])}x=Q,Q=x.#Y}}return this}push(...Z){for(let x of Z){if(x==="")continue;if(typeof x!=="string"&&!(x instanceof s2&&x.#Y===this))throw new Error("invalid part: "+x);this.#X.push(x)}}toJSON(){let Z=this.type===null?this.#X.slice().map((x)=>typeof x==="string"?x:x.toJSON()):[this.type,...this.#X.map((x)=>x.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#$&&this.#Y?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#Y?.isStart())return!1;if(this.#N===0)return!0;let Z=this.#Y;for(let x=0;x<this.#N;x++){let Q=Z.#X[x];if(!(Q instanceof s2&&Q.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#Y?.type==="!")return!0;if(!this.#Y?.isEnd())return!1;if(!this.type)return this.#Y?.isEnd();let Z=this.#Y?this.#Y.#X.length:0;return this.#N===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let x=new s2(this.type,Z);for(let Q of this.#X)x.copyIn(Q);return x}static#H(Z,x,Q,J){let X=!1,q=!1,Y=-1,$=!1;if(x.type===null){let B=Q,w="";while(B<Z.length){let F=Z.charAt(B++);if(X||F==="\\"){X=!X,w+=F;continue}if(q){if(B===Y+1){if(F==="^"||F==="!")$=!0}else if(F==="]"&&!(B===Y+2&&$))q=!1;w+=F;continue}else if(F==="["){q=!0,Y=B,$=!1,w+=F;continue}if(!J.noext&&$w(F)&&Z.charAt(B)==="("){x.push(w),w="";let P=new s2(F,x);B=s2.#H(Z,P,B,J),x.push(P);continue}w+=F}return x.push(w),B}let z=Q+1,W=new s2(null,x),H=[],U="";while(z<Z.length){let B=Z.charAt(z++);if(X||B==="\\"){X=!X,U+=B;continue}if(q){if(z===Y+1){if(B==="^"||B==="!")$=!0}else if(B==="]"&&!(z===Y+2&&$))q=!1;U+=B;continue}else if(B==="["){q=!0,Y=z,$=!1,U+=B;continue}if($w(B)&&Z.charAt(z)==="("){W.push(U),U="";let w=new s2(B,W);W.push(w),z=s2.#H(Z,w,z,J);continue}if(B==="|"){W.push(U),U="",H.push(W),W=new s2(null,x);continue}if(B===")"){if(U===""&&x.#X.length===0)x.#z=!0;return W.push(U),U="",x.push(...H,W),z}U+=B}return x.type=null,x.#x=void 0,x.#X=[Z.substring(Q-1)],z}static fromGlob(Z,x={}){let Q=new s2(null,void 0,x);return s2.#H(Z,Q,0,x),Q}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[x,Q,J,X]=this.toRegExpSource();if(!(J||this.#x||this.#W.nocase&&!this.#W.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return Q;let Y=(this.#W.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${x}$`,Y),{_src:x,_glob:Z})}get options(){return this.#W}toRegExpSource(Z){let x=Z??!!this.#W.dot;if(this.#Z===this)this.#Q();if(!this.type){let $=this.isStart()&&this.isEnd(),z=this.#X.map((B)=>{let[w,F,P,_]=typeof B==="string"?s2.#U(B,this.#x,$):B.toRegExpSource(Z);return this.#x=this.#x||P,this.#q=this.#q||_,w}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&ki.has(this.#X[0]))){let w=Ti,F=x&&w.has(z.charAt(0))||z.startsWith("\\.")&&w.has(z.charAt(2))||z.startsWith("\\.\\.")&&w.has(z.charAt(4)),P=!x&&!Z&&w.has(z.charAt(0));W=F?fi:P?ZJ:""}}}let H="";if(this.isEnd()&&this.#Z.#$&&this.#Y?.type==="!")H="(?:$|\\/)";return[W+z+H,n4(z),this.#x=!!this.#x,this.#q]}let Q=this.type==="*"||this.type==="+",J=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#F(x);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let $=this.toString();return this.#X=[$],this.type=null,this.#x=void 0,[$,n4(this.toString()),!1,!1]}let q=!Q||Z||x||!ZJ?"":this.#F(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let Y="";if(this.type==="!"&&this.#z)Y=(this.isStart()&&!x?ZJ:"")+zw;else{let $=this.type==="!"?"))"+(this.isStart()&&!x&&!Z?ZJ:"")+Kw+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;Y=J+X+$}return[Y,n4(X),this.#x=!!this.#x,this.#q]}#F(Z){return this.#X.map((x)=>{if(typeof x==="string")throw new Error("string type in extglob ast??");let[Q,J,X,q]=x.toRegExpSource(Z);return this.#q=this.#q||q,Q}).filter((x)=>!(this.isStart()&&this.isEnd())||!!x).join("|")}static#U(Z,x,Q=!1){let J=!1,X="",q=!1;for(let Y=0;Y<Z.length;Y++){let $=Z.charAt(Y);if(J){J=!1,X+=(ci.has($)?"\\":"")+$;continue}if($==="\\"){if(Y===Z.length-1)X+="\\\\";else J=!0;continue}if($==="["){let[z,W,H,U]=Yw(Z,Y);if(H){X+=z,q=q||W,Y+=H-1,x=x||U;continue}}if($==="*"){if(Q&&Z==="*")X+=zw;else X+=Kw;x=!0;continue}if($==="?"){X+=u$,x=!0;continue}X+=bi($)}return[X,n4(Z),!!x,q]}}var I5=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var P3=(Z,x,Q={})=>{if(WZ(x),!Q.nocomment&&x.charAt(0)==="#")return!1;return new C4(x,Q).match(Z)},pi=/^\*+([^+@!?\*\[\(]*)$/,ui=(Z)=>(x)=>!x.startsWith(".")&&x.endsWith(Z),yi=(Z)=>(x)=>x.endsWith(Z),hi=(Z)=>{return Z=Z.toLowerCase(),(x)=>!x.startsWith(".")&&x.toLowerCase().endsWith(Z)},gi=(Z)=>{return Z=Z.toLowerCase(),(x)=>x.toLowerCase().endsWith(Z)},di=/^\*+\.\*+$/,ii=(Z)=>!Z.startsWith(".")&&Z.includes("."),li=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),oi=/^\.\*+$/,si=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),ni=/^\*+$/,ai=(Z)=>Z.length!==0&&!Z.startsWith("."),ri=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",ti=/^\?+([^+@!?\*\[\(]*)?$/,ei=([Z,x=""])=>{let Q=Hw([Z]);if(!x)return Q;return x=x.toLowerCase(),(J)=>Q(J)&&J.toLowerCase().endsWith(x)},Zl=([Z,x=""])=>{let Q=Gw([Z]);if(!x)return Q;return x=x.toLowerCase(),(J)=>Q(J)&&J.toLowerCase().endsWith(x)},xl=([Z,x=""])=>{let Q=Gw([Z]);return!x?Q:(J)=>Q(J)&&J.endsWith(x)},Ql=([Z,x=""])=>{let Q=Hw([Z]);return!x?Q:(J)=>Q(J)&&J.endsWith(x)},Hw=([Z])=>{let x=Z.length;return(Q)=>Q.length===x&&!Q.startsWith(".")},Gw=([Z])=>{let x=Z.length;return(Q)=>Q.length===x&&Q!=="."&&Q!==".."},Uw=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vw={win32:{sep:"\\"},posix:{sep:"/"}},Jl=Uw==="win32"?Vw.win32.sep:Vw.posix.sep;P3.sep=Jl;var n2=Symbol("globstar **");P3.GLOBSTAR=n2;var Xl="[^/]",ql=Xl+"*?",Yl="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$l="(?:(?!(?:\\/|^)\\.).)*?",Kl=(Z,x={})=>(Q)=>P3(Q,Z,x);P3.filter=Kl;var _4=(Z,x={})=>Object.assign({},Z,x),zl=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return P3;let x=P3;return Object.assign((J,X,q={})=>x(J,X,_4(Z,q)),{Minimatch:class J extends x.Minimatch{constructor(X,q={}){super(X,_4(Z,q))}static defaults(X){return x.defaults(_4(Z,X)).Minimatch}},AST:class J extends x.AST{constructor(X,q,Y={}){super(X,q,_4(Z,Y))}static fromGlob(X,q={}){return x.AST.fromGlob(X,_4(Z,q))}},unescape:(J,X={})=>x.unescape(J,_4(Z,X)),escape:(J,X={})=>x.escape(J,_4(Z,X)),filter:(J,X={})=>x.filter(J,_4(Z,X)),defaults:(J)=>x.defaults(_4(Z,J)),makeRe:(J,X={})=>x.makeRe(J,_4(Z,X)),braceExpand:(J,X={})=>x.braceExpand(J,_4(Z,X)),match:(J,X,q={})=>x.match(J,X,_4(Z,q)),sep:x.sep,GLOBSTAR:n2})};P3.defaults=zl;var Bw=(Z,x={})=>{if(WZ(Z),x.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return Xw(Z)};P3.braceExpand=Bw;var Vl=(Z,x={})=>new C4(Z,x).makeRe();P3.makeRe=Vl;var Wl=(Z,x,Q={})=>{let J=new C4(x,Q);if(Z=Z.filter((X)=>J.match(X)),J.options.nonull&&!Z.length)Z.push(x);return Z};P3.match=Wl;var Ww=/[?*]|[+@!]\(.*?\)|\[|\]/,Hl=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class C4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(Z,x={}){if(WZ(Z),x=x||{},this.options=x,this.pattern=Z,this.platform=x.platform||Uw,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!x.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!x.nonegate,this.comment=!1,this.empty=!1,this.partial=!!x.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=x.windowsNoMagicRoot!==void 0?x.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let x of Z)if(typeof x!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,x=this.options;if(!x.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],x.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let Q=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(Q),this.debug(this.pattern,this.globParts);let J=this.globParts.map((X,q,Y)=>{if(this.isWindows&&this.windowsNoMagicRoot){let $=X[0]===""&&X[1]===""&&(X[2]==="?"||!Ww.test(X[2]))&&!Ww.test(X[3]),z=/^[a-z]:/i.test(X[0]);if($)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(z)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map(($)=>this.parse($))});if(this.debug(this.pattern,J),this.set=J.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let Q=0;Q<Z.length;Q++)for(let J=0;J<Z[Q].length;J++)if(Z[Q][J]==="**")Z[Q][J]="*"}let{optimizationLevel:x=1}=this.options;if(x>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(x>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((x)=>{let Q=-1;while((Q=x.indexOf("**",Q+1))!==-1){let J=Q;while(x[J+1]==="**")J++;if(J!==Q)x.splice(Q,J-Q)}return x})}levelOneOptimize(Z){return Z.map((x)=>{return x=x.reduce((Q,J)=>{let X=Q[Q.length-1];if(J==="**"&&X==="**")return Q;if(J===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return Q.pop(),Q}return Q.push(J),Q},[]),x.length===0?[""]:x})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let x=!1;do{if(x=!1,!this.preserveMultipleSlashes){for(let J=1;J<Z.length-1;J++){let X=Z[J];if(J===1&&X===""&&Z[0]==="")continue;if(X==="."||X==="")x=!0,Z.splice(J,1),J--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))x=!0,Z.pop()}let Q=0;while((Q=Z.indexOf("..",Q+1))!==-1){let J=Z[Q-1];if(J&&J!=="."&&J!==".."&&J!=="**")x=!0,Z.splice(Q-1,2),Q-=2}}while(x);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let x=!1;do{x=!1;for(let Q of Z){let J=-1;while((J=Q.indexOf("**",J+1))!==-1){let q=J;while(Q[q+1]==="**")q++;if(q>J)Q.splice(J+1,q-J);let Y=Q[J+1],$=Q[J+2],z=Q[J+3];if(Y!=="..")continue;if(!$||$==="."||$===".."||!z||z==="."||z==="..")continue;x=!0,Q.splice(J,1);let W=Q.slice(0);W[J]="**",Z.push(W),J--}if(!this.preserveMultipleSlashes){for(let q=1;q<Q.length-1;q++){let Y=Q[q];if(q===1&&Y===""&&Q[0]==="")continue;if(Y==="."||Y==="")x=!0,Q.splice(q,1),q--}if(Q[0]==="."&&Q.length===2&&(Q[1]==="."||Q[1]===""))x=!0,Q.pop()}let X=0;while((X=Q.indexOf("..",X+1))!==-1){let q=Q[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){x=!0;let $=X===1&&Q[X+1]==="**"?["."]:[];if(Q.splice(X-1,2,...$),Q.length===0)Q.push("");X-=2}}}}while(x);return Z}secondPhasePreProcess(Z){for(let x=0;x<Z.length-1;x++)for(let Q=x+1;Q<Z.length;Q++){let J=this.partsMatch(Z[x],Z[Q],!this.preserveMultipleSlashes);if(J){Z[x]=[],Z[Q]=J;break}}return Z.filter((x)=>x.length)}partsMatch(Z,x,Q=!1){let J=0,X=0,q=[],Y="";while(J<Z.length&&X<x.length)if(Z[J]===x[X])q.push(Y==="b"?x[X]:Z[J]),J++,X++;else if(Q&&Z[J]==="**"&&x[X]===Z[J+1])q.push(Z[J]),J++;else if(Q&&x[X]==="**"&&Z[J]===x[X+1])q.push(x[X]),X++;else if(Z[J]==="*"&&x[X]&&(this.options.dot||!x[X].startsWith("."))&&x[X]!=="**"){if(Y==="b")return!1;Y="a",q.push(Z[J]),J++,X++}else if(x[X]==="*"&&Z[J]&&(this.options.dot||!Z[J].startsWith("."))&&Z[J]!=="**"){if(Y==="a")return!1;Y="b",q.push(x[X]),J++,X++}else return!1;return Z.length===x.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,x=!1,Q=0;for(let J=0;J<Z.length&&Z.charAt(J)==="!";J++)x=!x,Q++;if(Q)this.pattern=Z.slice(Q);this.negate=x}matchOne(Z,x,Q=!1){let J=this.options;if(this.isWindows){let F=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),P=!F&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),_=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),C=!_&&x[0]===""&&x[1]===""&&x[2]==="?"&&typeof x[3]==="string"&&/^[a-z]:$/i.test(x[3]),u=P?3:F?0:void 0,d=C?3:_?0:void 0;if(typeof u==="number"&&typeof d==="number"){let[n,r]=[Z[u],x[d]];if(n.toLowerCase()===r.toLowerCase()){if(x[d]=n,d>u)x=x.slice(d);else if(u>d)Z=Z.slice(u)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.levelTwoFileOptimize(Z);this.debug("matchOne",this,{file:Z,pattern:x}),this.debug("matchOne",Z.length,x.length);for(var q=0,Y=0,$=Z.length,z=x.length;q<$&&Y<z;q++,Y++){this.debug("matchOne loop");var W=x[Y],H=Z[q];if(this.debug(x,W,H),W===!1)return!1;if(W===n2){this.debug("GLOBSTAR",[x,W,H]);var U=q,B=Y+1;if(B===z){this.debug("** at the end");for(;q<$;q++)if(Z[q]==="."||Z[q]===".."||!J.dot&&Z[q].charAt(0)===".")return!1;return!0}while(U<$){var w=Z[U];if(this.debug(`
87
87
  globstar while`,Z,U,x,B,w),this.matchOne(Z.slice(U),x.slice(B),Q))return this.debug("globstar found match!",U,$,w),!0;else{if(w==="."||w===".."||!J.dot&&w.charAt(0)==="."){this.debug("dot detected!",Z,U,x,B);break}this.debug("globstar swallow a segment, and continue"),U++}}if(Q){if(this.debug(`
88
88
  >>> no match, partial?`,Z,U,x,B),U===$)return!0}return!1}let F;if(typeof W==="string")F=H===W,this.debug("string match",W,H,F);else F=W.test(H),this.debug("pattern match",W,H,F);if(!F)return!1}if(q===$&&Y===z)return!0;else if(q===$)return Q;else if(Y===z)return q===$-1&&Z[q]==="";else throw new Error("wtf?")}braceExpand(){return Bw(this.pattern,this.options)}parse(Z){WZ(Z);let x=this.options;if(Z==="**")return n2;if(Z==="")return"";let Q,J=null;if(Q=Z.match(ni))J=x.dot?ri:ai;else if(Q=Z.match(pi))J=(x.nocase?x.dot?gi:hi:x.dot?yi:ui)(Q[1]);else if(Q=Z.match(ti))J=(x.nocase?x.dot?Zl:ei:x.dot?xl:Ql)(Q);else if(Q=Z.match(di))J=x.dot?li:ii;else if(Q=Z.match(oi))J=si;let X=s2.fromGlob(Z,this.options).toMMPattern();if(J&&typeof X==="object")Reflect.defineProperty(X,"test",{value:J});return X}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let Z=this.set;if(!Z.length)return this.regexp=!1,this.regexp;let x=this.options,Q=x.noglobstar?ql:x.dot?Yl:$l,J=new Set(x.nocase?["i"]:[]),X=Z.map(($)=>{let z=$.map((W)=>{if(W instanceof RegExp)for(let H of W.flags.split(""))J.add(H);return typeof W==="string"?Hl(W):W===n2?n2:W._src});return z.forEach((W,H)=>{let U=z[H+1],B=z[H-1];if(W!==n2||B===n2)return;if(B===void 0)if(U!==void 0&&U!==n2)z[H+1]="(?:\\/|"+Q+"\\/)?"+U;else z[H]=Q;else if(U===void 0)z[H-1]=B+"(?:\\/|"+Q+")?";else if(U!==n2)z[H-1]=B+"(?:\\/|\\/"+Q+"\\/)"+U,z[H+1]=n2}),z.filter((W)=>W!==n2).join("/")}).join("|"),[q,Y]=Z.length>1?["(?:",")"]:["",""];if(X="^"+q+X+Y+"$",this.negate)X="^(?!"+X+").+$";try{this.regexp=new RegExp(X,[...J].join(""))}catch($){this.regexp=!1}return this.regexp}slashSplit(Z){if(this.preserveMultipleSlashes)return Z.split("/");else if(this.isWindows&&/^\/\/[^\/]+/.test(Z))return["",...Z.split(/\/+/)];else return Z.split(/\/+/)}match(Z,x=this.partial){if(this.debug("match",Z,this.pattern),this.comment)return!1;if(this.empty)return Z==="";if(Z==="/"&&x)return!0;let Q=this.options;if(this.isWindows)Z=Z.split("\\").join("/");let J=this.slashSplit(Z);this.debug(this.pattern,"split",J);let X=this.set;this.debug(this.pattern,"set",X);let q=J[J.length-1];if(!q)for(let Y=J.length-2;!q&&Y>=0;Y--)q=J[Y];for(let Y=0;Y<X.length;Y++){let $=X[Y],z=J;if(Q.matchBase&&$.length===1)z=[q];if(this.matchOne(z,$,x)){if(Q.flipNegate)return!0;return!this.negate}}if(Q.flipNegate)return!1;return this.negate}static defaults(Z){return P3.defaults(Z).Minimatch}}P3.AST=s2;P3.Minimatch=C4;P3.escape=I5;P3.unescape=n4;import{fileURLToPath as dl}from"node:url";var v5=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,ww=new Set,y$=typeof process==="object"&&!!process?process:{},Fw=(Z,x,Q,J)=>{typeof y$.emitWarning==="function"?y$.emitWarning(Z,x,Q,J):console.error(`[${Q}] ${x}: ${Z}`)},xJ=globalThis.AbortController,Mw=globalThis.AbortSignal;if(typeof xJ==="undefined"){Mw=class Q{onabort;_onabort=[];reason;aborted=!1;addEventListener(J,X){this._onabort.push(X)}},xJ=class Q{constructor(){x()}signal=new Mw;abort(J){if(this.signal.aborted)return;this.signal.reason=J,this.signal.aborted=!0;for(let X of this.signal._onabort)X(J);this.signal.onabort?.(J)}};let Z=y$.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",x=()=>{if(!Z)return;Z=!1,Fw("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",x)}}var Gl=(Z)=>!ww.has(Z),Bm0=Symbol("type"),E6=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),Dw=(Z)=>!E6(Z)?null:Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?GZ:null;class GZ extends Array{constructor(Z){super(Z);this.fill(0)}}class A5{heap;length;static#Z=!1;static create(Z){let x=Dw(Z);if(!x)return[];A5.#Z=!0;let Q=new A5(Z,x);return A5.#Z=!1,Q}constructor(Z,x){if(!A5.#Z)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new x(Z),this.length=0}push(Z){this.heap[this.length++]=Z}pop(){return this.heap[--this.length]}}class UZ{#Z;#x;#q;#X;#Y;#N;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#$;#W;#K;#z;#Q;#H;#F;#U;#B;#O;#M;#R;#L;#P;#D;#C;#G;#I;static unsafeExposeInternals(Z){return{starts:Z.#L,ttls:Z.#P,sizes:Z.#R,keyMap:Z.#K,keyList:Z.#z,valList:Z.#Q,next:Z.#H,prev:Z.#F,get head(){return Z.#U},get tail(){return Z.#B},free:Z.#O,isBackgroundFetch:(x)=>Z.#V(x),backgroundFetch:(x,Q,J,X)=>Z.#T(x,Q,J,X),moveToTail:(x)=>Z.#b(x),indexes:(x)=>Z.#j(x),rindexes:(x)=>Z.#S(x),isStale:(x)=>Z.#_(x)}}get max(){return this.#Z}get maxSize(){return this.#x}get calculatedSize(){return this.#W}get size(){return this.#$}get fetchMethod(){return this.#N}get memoMethod(){return this.#w}get dispose(){return this.#q}get onInsert(){return this.#X}get disposeAfter(){return this.#Y}constructor(Z){let{max:x=0,ttl:Q,ttlResolution:J=1,ttlAutopurge:X,updateAgeOnGet:q,updateAgeOnHas:Y,allowStale:$,dispose:z,onInsert:W,disposeAfter:H,noDisposeOnSet:U,noUpdateTTL:B,maxSize:w=0,maxEntrySize:F=0,sizeCalculation:P,fetchMethod:_,memoMethod:C,noDeleteOnFetchRejection:u,noDeleteOnStaleGet:d,allowStaleOnFetchRejection:n,allowStaleOnFetchAbort:r,ignoreFetchAbort:W0}=Z;if(x!==0&&!E6(x))throw new TypeError("max option must be a nonnegative integer");let Y0=x?Dw(x):Array;if(!Y0)throw new Error("invalid max value: "+x);if(this.#Z=x,this.#x=w,this.maxEntrySize=F||this.#x,this.sizeCalculation=P,this.sizeCalculation){if(!this.#x&&!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(C!==void 0&&typeof C!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=C,_!==void 0&&typeof _!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#N=_,this.#C=!!_,this.#K=new Map,this.#z=new Array(x).fill(void 0),this.#Q=new Array(x).fill(void 0),this.#H=new Y0(x),this.#F=new Y0(x),this.#U=0,this.#B=0,this.#O=A5.create(x),this.#$=0,this.#W=0,typeof z==="function")this.#q=z;if(typeof W==="function")this.#X=W;if(typeof H==="function")this.#Y=H,this.#M=[];else this.#Y=void 0,this.#M=void 0;if(this.#D=!!this.#q,this.#I=!!this.#X,this.#G=!!this.#Y,this.noDisposeOnSet=!!U,this.noUpdateTTL=!!B,this.noDeleteOnFetchRejection=!!u,this.allowStaleOnFetchRejection=!!n,this.allowStaleOnFetchAbort=!!r,this.ignoreFetchAbort=!!W0,this.maxEntrySize!==0){if(this.#x!==0){if(!E6(this.#x))throw new TypeError("maxSize must be a positive integer if specified")}if(!E6(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#u()}if(this.allowStale=!!$,this.noDeleteOnStaleGet=!!d,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!Y,this.ttlResolution=E6(J)||J===0?J:1,this.ttlAutopurge=!!X,this.ttl=Q||0,this.ttl){if(!E6(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#J()}if(this.#Z===0&&this.ttl===0&&this.#x===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#Z&&!this.#x){if(Gl("LRU_CACHE_UNBOUNDED"))ww.add("LRU_CACHE_UNBOUNDED"),Fw("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",UZ)}}getRemainingTTL(Z){return this.#K.has(Z)?1/0:0}#J(){let Z=new GZ(this.#Z),x=new GZ(this.#Z);this.#P=Z,this.#L=x,this.#v=(X,q,Y=v5.now())=>{if(x[X]=q!==0?Y:0,Z[X]=q,q!==0&&this.ttlAutopurge){let $=setTimeout(()=>{if(this.#_(X))this.#A(this.#z[X],"expire")},q+1);if($.unref)$.unref()}},this.#E=(X)=>{x[X]=Z[X]!==0?v5.now():0},this.#m=(X,q)=>{if(Z[q]){let Y=Z[q],$=x[q];if(!Y||!$)return;X.ttl=Y,X.start=$,X.now=Q||J();let z=X.now-$;X.remainingTTL=Y-z}};let Q=0,J=()=>{let X=v5.now();if(this.ttlResolution>0){Q=X;let q=setTimeout(()=>Q=0,this.ttlResolution);if(q.unref)q.unref()}return X};this.getRemainingTTL=(X)=>{let q=this.#K.get(X);if(q===void 0)return 0;let Y=Z[q],$=x[q];if(!Y||!$)return 1/0;let z=(Q||J())-$;return Y-z},this.#_=(X)=>{let q=x[X],Y=Z[X];return!!Y&&!!q&&(Q||J())-q>Y}}#E=()=>{};#m=()=>{};#v=()=>{};#_=()=>!1;#u(){let Z=new GZ(this.#Z);this.#W=0,this.#R=Z,this.#f=(x)=>{this.#W-=Z[x],Z[x]=0},this.#y=(x,Q,J,X)=>{if(this.#V(Q))return 0;if(!E6(J))if(X){if(typeof X!=="function")throw new TypeError("sizeCalculation must be a function");if(J=X(Q,x),!E6(J))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 J},this.#k=(x,Q,J)=>{if(Z[x]=Q,this.#x){let X=this.#x-Z[x];while(this.#W>X)this.#c(!0)}if(this.#W+=Z[x],J)J.entrySize=Q,J.totalCalculatedSize=this.#W}}#f=(Z)=>{};#k=(Z,x,Q)=>{};#y=(Z,x,Q,J)=>{if(Q||J)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#j({allowStale:Z=this.allowStale}={}){if(this.#$)for(let x=this.#B;;){if(!this.#h(x))break;if(Z||!this.#_(x))yield x;if(x===this.#U)break;else x=this.#F[x]}}*#S({allowStale:Z=this.allowStale}={}){if(this.#$)for(let x=this.#U;;){if(!this.#h(x))break;if(Z||!this.#_(x))yield x;if(x===this.#B)break;else x=this.#H[x]}}#h(Z){return Z!==void 0&&this.#K.get(this.#z[Z])===Z}*entries(){for(let Z of this.#j())if(this.#Q[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#Q[Z]))yield[this.#z[Z],this.#Q[Z]]}*rentries(){for(let Z of this.#S())if(this.#Q[Z]!==void 0&&this.#z[Z]!==void 0&&!this.#V(this.#Q[Z]))yield[this.#z[Z],this.#Q[Z]]}*keys(){for(let Z of this.#j()){let x=this.#z[Z];if(x!==void 0&&!this.#V(this.#Q[Z]))yield x}}*rkeys(){for(let Z of this.#S()){let x=this.#z[Z];if(x!==void 0&&!this.#V(this.#Q[Z]))yield x}}*values(){for(let Z of this.#j())if(this.#Q[Z]!==void 0&&!this.#V(this.#Q[Z]))yield this.#Q[Z]}*rvalues(){for(let Z of this.#S())if(this.#Q[Z]!==void 0&&!this.#V(this.#Q[Z]))yield this.#Q[Z]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Z,x={}){for(let Q of this.#j()){let J=this.#Q[Q],X=this.#V(J)?J.__staleWhileFetching:J;if(X===void 0)continue;if(Z(X,this.#z[Q],this))return this.get(this.#z[Q],x)}}forEach(Z,x=this){for(let Q of this.#j()){let J=this.#Q[Q],X=this.#V(J)?J.__staleWhileFetching:J;if(X===void 0)continue;Z.call(x,X,this.#z[Q],this)}}rforEach(Z,x=this){for(let Q of this.#S()){let J=this.#Q[Q],X=this.#V(J)?J.__staleWhileFetching:J;if(X===void 0)continue;Z.call(x,X,this.#z[Q],this)}}purgeStale(){let Z=!1;for(let x of this.#S({allowStale:!0}))if(this.#_(x))this.#A(this.#z[x],"expire"),Z=!0;return Z}info(Z){let x=this.#K.get(Z);if(x===void 0)return;let Q=this.#Q[x],J=this.#V(Q)?Q.__staleWhileFetching:Q;if(J===void 0)return;let X={value:J};if(this.#P&&this.#L){let q=this.#P[x],Y=this.#L[x];if(q&&Y){let $=q-(v5.now()-Y);X.ttl=$,X.start=Date.now()}}if(this.#R)X.size=this.#R[x];return X}dump(){let Z=[];for(let x of this.#j({allowStale:!0})){let Q=this.#z[x],J=this.#Q[x],X=this.#V(J)?J.__staleWhileFetching:J;if(X===void 0||Q===void 0)continue;let q={value:X};if(this.#P&&this.#L){q.ttl=this.#P[x];let Y=v5.now()-this.#L[x];q.start=Math.floor(Date.now()-Y)}if(this.#R)q.size=this.#R[x];Z.unshift([Q,q])}return Z}load(Z){this.clear();for(let[x,Q]of Z){if(Q.start){let J=Date.now()-Q.start;Q.start=v5.now()-J}this.set(x,Q.value,Q)}}set(Z,x,Q={}){if(x===void 0)return this.delete(Z),this;let{ttl:J=this.ttl,start:X,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:Y=this.sizeCalculation,status:$}=Q,{noUpdateTTL:z=this.noUpdateTTL}=Q,W=this.#y(Z,x,Q.size||0,Y);if(this.maxEntrySize&&W>this.maxEntrySize){if($)$.set="miss",$.maxEntrySizeExceeded=!0;return this.#A(Z,"set"),this}let H=this.#$===0?void 0:this.#K.get(Z);if(H===void 0){if(H=this.#$===0?this.#B:this.#O.length!==0?this.#O.pop():this.#$===this.#Z?this.#c(!1):this.#$,this.#z[H]=Z,this.#Q[H]=x,this.#K.set(Z,H),this.#H[this.#B]=H,this.#F[H]=this.#B,this.#B=H,this.#$++,this.#k(H,W,$),$)$.set="add";if(z=!1,this.#I)this.#X?.(x,Z,"add")}else{this.#b(H);let U=this.#Q[H];if(x!==U){if(this.#C&&this.#V(U)){U.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:B}=U;if(B!==void 0&&!q){if(this.#D)this.#q?.(B,Z,"set");if(this.#G)this.#M?.push([B,Z,"set"])}}else if(!q){if(this.#D)this.#q?.(U,Z,"set");if(this.#G)this.#M?.push([U,Z,"set"])}if(this.#f(H),this.#k(H,W,$),this.#Q[H]=x,$){$.set="replace";let B=U&&this.#V(U)?U.__staleWhileFetching:U;if(B!==void 0)$.oldValue=B}}else if($)$.set="update";if(this.#I)this.onInsert?.(x,Z,x===U?"update":"replace")}if(J!==0&&!this.#P)this.#J();if(this.#P){if(!z)this.#v(H,J,X);if($)this.#m($,H)}if(!q&&this.#G&&this.#M){let U=this.#M,B;while(B=U?.shift())this.#Y?.(...B)}return this}pop(){try{while(this.#$){let Z=this.#Q[this.#U];if(this.#c(!0),this.#V(Z)){if(Z.__staleWhileFetching)return Z.__staleWhileFetching}else if(Z!==void 0)return Z}}finally{if(this.#G&&this.#M){let Z=this.#M,x;while(x=Z?.shift())this.#Y?.(...x)}}}#c(Z){let x=this.#U,Q=this.#z[x],J=this.#Q[x];if(this.#C&&this.#V(J))J.__abortController.abort(new Error("evicted"));else if(this.#D||this.#G){if(this.#D)this.#q?.(J,Q,"evict");if(this.#G)this.#M?.push([J,Q,"evict"])}if(this.#f(x),Z)this.#z[x]=void 0,this.#Q[x]=void 0,this.#O.push(x);if(this.#$===1)this.#U=this.#B=0,this.#O.length=0;else this.#U=this.#H[x];return this.#K.delete(Q),this.#$--,x}has(Z,x={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:J}=x,X=this.#K.get(Z);if(X!==void 0){let q=this.#Q[X];if(this.#V(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#_(X)){if(Q)this.#E(X);if(J)J.has="hit",this.#m(J,X);return!0}else if(J)J.has="stale",this.#m(J,X)}else if(J)J.has="miss";return!1}peek(Z,x={}){let{allowStale:Q=this.allowStale}=x,J=this.#K.get(Z);if(J===void 0||!Q&&this.#_(J))return;let X=this.#Q[J];return this.#V(X)?X.__staleWhileFetching:X}#T(Z,x,Q,J){let X=x===void 0?void 0:this.#Q[x];if(this.#V(X))return X;let q=new xJ,{signal:Y}=Q;Y?.addEventListener("abort",()=>q.abort(Y.reason),{signal:q.signal});let $={signal:q.signal,options:Q,context:J},z=(F,P=!1)=>{let{aborted:_}=q.signal,C=Q.ignoreFetchAbort&&F!==void 0;if(Q.status)if(_&&!P){if(Q.status.fetchAborted=!0,Q.status.fetchError=q.signal.reason,C)Q.status.fetchAbortIgnored=!0}else Q.status.fetchResolved=!0;if(_&&!C&&!P)return H(q.signal.reason);let u=B;if(this.#Q[x]===B)if(F===void 0)if(u.__staleWhileFetching)this.#Q[x]=u.__staleWhileFetching;else this.#A(Z,"fetch");else{if(Q.status)Q.status.fetchUpdated=!0;this.set(Z,F,$.options)}return F},W=(F)=>{if(Q.status)Q.status.fetchRejected=!0,Q.status.fetchError=F;return H(F)},H=(F)=>{let{aborted:P}=q.signal,_=P&&Q.allowStaleOnFetchAbort,C=_||Q.allowStaleOnFetchRejection,u=C||Q.noDeleteOnFetchRejection,d=B;if(this.#Q[x]===B){if(!u||d.__staleWhileFetching===void 0)this.#A(Z,"fetch");else if(!_)this.#Q[x]=d.__staleWhileFetching}if(C){if(Q.status&&d.__staleWhileFetching!==void 0)Q.status.returnedStale=!0;return d.__staleWhileFetching}else if(d.__returned===d)throw F},U=(F,P)=>{let _=this.#N?.(Z,X,$);if(_&&_ instanceof Promise)_.then((C)=>F(C===void 0?void 0:C),P);q.signal.addEventListener("abort",()=>{if(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort){if(F(void 0),Q.allowStaleOnFetchAbort)F=(C)=>z(C,!0)}})};if(Q.status)Q.status.fetchDispatched=!0;let B=new Promise(U).then(z,W),w=Object.assign(B,{__abortController:q,__staleWhileFetching:X,__returned:void 0});if(x===void 0)this.set(Z,w,{...$.options,status:void 0}),x=this.#K.get(Z);else this.#Q[x]=w;return w}#V(Z){if(!this.#C)return!1;let x=Z;return!!x&&x instanceof Promise&&x.hasOwnProperty("__staleWhileFetching")&&x.__abortController instanceof xJ}async fetch(Z,x={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:Y=this.noDisposeOnSet,size:$=0,sizeCalculation:z=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:H=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:U=this.allowStaleOnFetchRejection,ignoreFetchAbort:B=this.ignoreFetchAbort,allowStaleOnFetchAbort:w=this.allowStaleOnFetchAbort,context:F,forceRefresh:P=!1,status:_,signal:C}=x;if(!this.#C){if(_)_.fetch="get";return this.get(Z,{allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:X,status:_})}let u={allowStale:Q,updateAgeOnGet:J,noDeleteOnStaleGet:X,ttl:q,noDisposeOnSet:Y,size:$,sizeCalculation:z,noUpdateTTL:W,noDeleteOnFetchRejection:H,allowStaleOnFetchRejection:U,allowStaleOnFetchAbort:w,ignoreFetchAbort:B,status:_,signal:C},d=this.#K.get(Z);if(d===void 0){if(_)_.fetch="miss";let n=this.#T(Z,d,u,F);return n.__returned=n}else{let n=this.#Q[d];if(this.#V(n)){let b=Q&&n.__staleWhileFetching!==void 0;if(_){if(_.fetch="inflight",b)_.returnedStale=!0}return b?n.__staleWhileFetching:n.__returned=n}let r=this.#_(d);if(!P&&!r){if(_)_.fetch="hit";if(this.#b(d),J)this.#E(d);if(_)this.#m(_,d);return n}let W0=this.#T(Z,d,u,F),v=W0.__staleWhileFetching!==void 0&&Q;if(_){if(_.fetch=r?"stale":"refresh",v&&r)_.returnedStale=!0}return v?W0.__staleWhileFetching:W0.__returned=W0}}async forceFetch(Z,x={}){let Q=await this.fetch(Z,x);if(Q===void 0)throw new Error("fetch() returned undefined");return Q}memo(Z,x={}){let Q=this.#w;if(!Q)throw new Error("no memoMethod provided to constructor");let{context:J,forceRefresh:X,...q}=x,Y=this.get(Z,q);if(!X&&Y!==void 0)return Y;let $=Q(Z,Y,{options:q,context:J});return this.set(Z,$,q),$}get(Z,x={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,status:q}=x,Y=this.#K.get(Z);if(Y!==void 0){let $=this.#Q[Y],z=this.#V($);if(q)this.#m(q,Y);if(this.#_(Y)){if(q)q.get="stale";if(!z){if(!X)this.#A(Z,"expire");if(q&&Q)q.returnedStale=!0;return Q?$:void 0}else{if(q&&Q&&$.__staleWhileFetching!==void 0)q.returnedStale=!0;return Q?$.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(z)return $.__staleWhileFetching;if(this.#b(Y),J)this.#E(Y);return $}}else if(q)q.get="miss"}#g(Z,x){this.#F[x]=Z,this.#H[Z]=x}#b(Z){if(Z!==this.#B){if(Z===this.#U)this.#U=this.#H[Z];else this.#g(this.#F[Z],this.#H[Z]);this.#g(this.#B,Z),this.#B=Z}}delete(Z){return this.#A(Z,"delete")}#A(Z,x){let Q=!1;if(this.#$!==0){let J=this.#K.get(Z);if(J!==void 0)if(Q=!0,this.#$===1)this.#p(x);else{this.#f(J);let X=this.#Q[J];if(this.#V(X))X.__abortController.abort(new Error("deleted"));else if(this.#D||this.#G){if(this.#D)this.#q?.(X,Z,x);if(this.#G)this.#M?.push([X,Z,x])}if(this.#K.delete(Z),this.#z[J]=void 0,this.#Q[J]=void 0,J===this.#B)this.#B=this.#F[J];else if(J===this.#U)this.#U=this.#H[J];else{let q=this.#F[J];this.#H[q]=this.#H[J];let Y=this.#H[J];this.#F[Y]=this.#F[J]}this.#$--,this.#O.push(J)}}if(this.#G&&this.#M?.length){let J=this.#M,X;while(X=J?.shift())this.#Y?.(...X)}return Q}clear(){return this.#p("delete")}#p(Z){for(let x of this.#S({allowStale:!0})){let Q=this.#Q[x];if(this.#V(Q))Q.__abortController.abort(new Error("deleted"));else{let J=this.#z[x];if(this.#D)this.#q?.(Q,J,Z);if(this.#G)this.#M?.push([Q,J,Z])}}if(this.#K.clear(),this.#Q.fill(void 0),this.#z.fill(void 0),this.#P&&this.#L)this.#P.fill(0),this.#L.fill(0);if(this.#R)this.#R.fill(0);if(this.#U=0,this.#B=0,this.#O.length=0,this.#W=0,this.#$=0,this.#G&&this.#M){let x=this.#M,Q;while(Q=x?.shift())this.#Y?.(...Q)}}}import{posix as _l,win32 as r$}from"node:path";import{fileURLToPath as Cl}from"node:url";import{lstatSync as jl,readdir as Ol,readdirSync as Rl,readlinkSync as Sl,realpathSync as Il}from"fs";import*as vl from"node:fs";import{lstat as El,readdir as fl,readlink as Tl,realpath as kl}from"node:fs/promises";import{EventEmitter as o$}from"node:events";import _w from"node:stream";import{StringDecoder as Ul}from"node:string_decoder";var Nw=typeof process==="object"&&process?process:{stdout:null,stderr:null},Bl=(Z)=>!!Z&&typeof Z==="object"&&(Z instanceof C7||Z instanceof _w||Ml(Z)||wl(Z)),Ml=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof o$&&typeof Z.pipe==="function"&&Z.pipe!==_w.Writable.prototype.pipe,wl=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof o$&&typeof Z.write==="function"&&typeof Z.end==="function",x6=Symbol("EOF"),Q6=Symbol("maybeEmitEnd"),f6=Symbol("emittedEnd"),QJ=Symbol("emittingEnd"),BZ=Symbol("emittedError"),JJ=Symbol("closed"),Pw=Symbol("read"),XJ=Symbol("flush"),Lw=Symbol("flushChunk"),a4=Symbol("encoding"),E5=Symbol("decoder"),k2=Symbol("flowing"),MZ=Symbol("paused"),f5=Symbol("resume"),c2=Symbol("buffer"),L3=Symbol("pipes"),b2=Symbol("bufferLength"),h$=Symbol("bufferPush"),qJ=Symbol("bufferShift"),q3=Symbol("objectMode"),W2=Symbol("destroyed"),g$=Symbol("error"),d$=Symbol("emitData"),mw=Symbol("emitEnd"),i$=Symbol("emitEnd2"),M8=Symbol("async"),l$=Symbol("abort"),YJ=Symbol("aborted"),wZ=Symbol("signal"),_7=Symbol("dataListeners"),t3=Symbol("discarded"),FZ=(Z)=>Promise.resolve().then(Z),Fl=(Z)=>Z(),Dl=(Z)=>Z==="end"||Z==="finish"||Z==="prefinish",Nl=(Z)=>Z instanceof ArrayBuffer||!!Z&&typeof Z==="object"&&Z.constructor&&Z.constructor.name==="ArrayBuffer"&&Z.byteLength>=0,Pl=(Z)=>!Buffer.isBuffer(Z)&&ArrayBuffer.isView(Z);class s${src;dest;opts;ondrain;constructor(Z,x,Q){this.src=Z,this.dest=x,this.opts=Q,this.ondrain=()=>Z[f5](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(Z){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class Cw extends s${unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(Z,x,Q){super(Z,x,Q);this.proxyErrors=(J)=>x.emit("error",J),Z.on("error",this.proxyErrors)}}var Ll=(Z)=>!!Z.objectMode,ml=(Z)=>!Z.objectMode&&!!Z.encoding&&Z.encoding!=="buffer";class C7 extends o${[k2]=!1;[MZ]=!1;[L3]=[];[c2]=[];[q3];[a4];[M8];[E5];[x6]=!1;[f6]=!1;[QJ]=!1;[JJ]=!1;[BZ]=null;[b2]=0;[W2]=!1;[wZ];[YJ]=!1;[_7]=0;[t3]=!1;writable=!0;readable=!0;constructor(...Z){let x=Z[0]||{};super();if(x.objectMode&&typeof x.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(Ll(x))this[q3]=!0,this[a4]=null;else if(ml(x))this[a4]=x.encoding,this[q3]=!1;else this[q3]=!1,this[a4]=null;if(this[M8]=!!x.async,this[E5]=this[a4]?new Ul(this[a4]):null,x&&x.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[c2]});if(x&&x.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[L3]});let{signal:Q}=x;if(Q)if(this[wZ]=Q,Q.aborted)this[l$]();else Q.addEventListener("abort",()=>this[l$]())}get bufferLength(){return this[b2]}get encoding(){return this[a4]}set encoding(Z){throw new Error("Encoding must be set at instantiation time")}setEncoding(Z){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[q3]}set objectMode(Z){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[M8]}set["async"](Z){this[M8]=this[M8]||!!Z}[l$](){this[YJ]=!0,this.emit("abort",this[wZ]?.reason),this.destroy(this[wZ]?.reason)}get aborted(){return this[YJ]}set aborted(Z){}write(Z,x,Q){if(this[YJ])return!1;if(this[x6])throw new Error("write after end");if(this[W2])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof x==="function")Q=x,x="utf8";if(!x)x="utf8";let J=this[M8]?FZ:Fl;if(!this[q3]&&!Buffer.isBuffer(Z)){if(Pl(Z))Z=Buffer.from(Z.buffer,Z.byteOffset,Z.byteLength);else if(Nl(Z))Z=Buffer.from(Z);else if(typeof Z!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[q3]){if(this[k2]&&this[b2]!==0)this[XJ](!0);if(this[k2])this.emit("data",Z);else this[h$](Z);if(this[b2]!==0)this.emit("readable");if(Q)J(Q);return this[k2]}if(!Z.length){if(this[b2]!==0)this.emit("readable");if(Q)J(Q);return this[k2]}if(typeof Z==="string"&&!(x===this[a4]&&!this[E5]?.lastNeed))Z=Buffer.from(Z,x);if(Buffer.isBuffer(Z)&&this[a4])Z=this[E5].write(Z);if(this[k2]&&this[b2]!==0)this[XJ](!0);if(this[k2])this.emit("data",Z);else this[h$](Z);if(this[b2]!==0)this.emit("readable");if(Q)J(Q);return this[k2]}read(Z){if(this[W2])return null;if(this[t3]=!1,this[b2]===0||Z===0||Z&&Z>this[b2])return this[Q6](),null;if(this[q3])Z=null;if(this[c2].length>1&&!this[q3])this[c2]=[this[a4]?this[c2].join(""):Buffer.concat(this[c2],this[b2])];let x=this[Pw](Z||null,this[c2][0]);return this[Q6](),x}[Pw](Z,x){if(this[q3])this[qJ]();else{let Q=x;if(Z===Q.length||Z===null)this[qJ]();else if(typeof Q==="string")this[c2][0]=Q.slice(Z),x=Q.slice(0,Z),this[b2]-=Z;else this[c2][0]=Q.subarray(Z),x=Q.subarray(0,Z),this[b2]-=Z}if(this.emit("data",x),!this[c2].length&&!this[x6])this.emit("drain");return x}end(Z,x,Q){if(typeof Z==="function")Q=Z,Z=void 0;if(typeof x==="function")Q=x,x="utf8";if(Z!==void 0)this.write(Z,x);if(Q)this.once("end",Q);if(this[x6]=!0,this.writable=!1,this[k2]||!this[MZ])this[Q6]();return this}[f5](){if(this[W2])return;if(!this[_7]&&!this[L3].length)this[t3]=!0;if(this[MZ]=!1,this[k2]=!0,this.emit("resume"),this[c2].length)this[XJ]();else if(this[x6])this[Q6]();else this.emit("drain")}resume(){return this[f5]()}pause(){this[k2]=!1,this[MZ]=!0,this[t3]=!1}get destroyed(){return this[W2]}get flowing(){return this[k2]}get paused(){return this[MZ]}[h$](Z){if(this[q3])this[b2]+=1;else this[b2]+=Z.length;this[c2].push(Z)}[qJ](){if(this[q3])this[b2]-=1;else this[b2]-=this[c2][0].length;return this[c2].shift()}[XJ](Z=!1){do;while(this[Lw](this[qJ]())&&this[c2].length);if(!Z&&!this[c2].length&&!this[x6])this.emit("drain")}[Lw](Z){return this.emit("data",Z),this[k2]}pipe(Z,x){if(this[W2])return Z;this[t3]=!1;let Q=this[f6];if(x=x||{},Z===Nw.stdout||Z===Nw.stderr)x.end=!1;else x.end=x.end!==!1;if(x.proxyErrors=!!x.proxyErrors,Q){if(x.end)Z.end()}else if(this[L3].push(!x.proxyErrors?new s$(this,Z,x):new Cw(this,Z,x)),this[M8])FZ(()=>this[f5]());else this[f5]();return Z}unpipe(Z){let x=this[L3].find((Q)=>Q.dest===Z);if(x){if(this[L3].length===1){if(this[k2]&&this[_7]===0)this[k2]=!1;this[L3]=[]}else this[L3].splice(this[L3].indexOf(x),1);x.unpipe()}}addListener(Z,x){return this.on(Z,x)}on(Z,x){let Q=super.on(Z,x);if(Z==="data"){if(this[t3]=!1,this[_7]++,!this[L3].length&&!this[k2])this[f5]()}else if(Z==="readable"&&this[b2]!==0)super.emit("readable");else if(Dl(Z)&&this[f6])super.emit(Z),this.removeAllListeners(Z);else if(Z==="error"&&this[BZ]){let J=x;if(this[M8])FZ(()=>J.call(this,this[BZ]));else J.call(this,this[BZ])}return Q}removeListener(Z,x){return this.off(Z,x)}off(Z,x){let Q=super.off(Z,x);if(Z==="data"){if(this[_7]=this.listeners("data").length,this[_7]===0&&!this[t3]&&!this[L3].length)this[k2]=!1}return Q}removeAllListeners(Z){let x=super.removeAllListeners(Z);if(Z==="data"||Z===void 0){if(this[_7]=0,!this[t3]&&!this[L3].length)this[k2]=!1}return x}get emittedEnd(){return this[f6]}[Q6](){if(!this[QJ]&&!this[f6]&&!this[W2]&&this[c2].length===0&&this[x6]){if(this[QJ]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[JJ])this.emit("close");this[QJ]=!1}}emit(Z,...x){let Q=x[0];if(Z!=="error"&&Z!=="close"&&Z!==W2&&this[W2])return!1;else if(Z==="data")return!this[q3]&&!Q?!1:this[M8]?(FZ(()=>this[d$](Q)),!0):this[d$](Q);else if(Z==="end")return this[mw]();else if(Z==="close"){if(this[JJ]=!0,!this[f6]&&!this[W2])return!1;let X=super.emit("close");return this.removeAllListeners("close"),X}else if(Z==="error"){this[BZ]=Q,super.emit(g$,Q);let X=!this[wZ]||this.listeners("error").length?super.emit("error",Q):!1;return this[Q6](),X}else if(Z==="resume"){let X=super.emit("resume");return this[Q6](),X}else if(Z==="finish"||Z==="prefinish"){let X=super.emit(Z);return this.removeAllListeners(Z),X}let J=super.emit(Z,...x);return this[Q6](),J}[d$](Z){for(let Q of this[L3])if(Q.dest.write(Z)===!1)this.pause();let x=this[t3]?!1:super.emit("data",Z);return this[Q6](),x}[mw](){if(this[f6])return!1;return this[f6]=!0,this.readable=!1,this[M8]?(FZ(()=>this[i$]()),!0):this[i$]()}[i$](){if(this[E5]){let x=this[E5].end();if(x){for(let Q of this[L3])Q.dest.write(x);if(!this[t3])super.emit("data",x)}}for(let x of this[L3])x.end();let Z=super.emit("end");return this.removeAllListeners("end"),Z}async collect(){let Z=Object.assign([],{dataLength:0});if(!this[q3])Z.dataLength=0;let x=this.promise();return this.on("data",(Q)=>{if(Z.push(Q),!this[q3])Z.dataLength+=Q.length}),await x,Z}async concat(){if(this[q3])throw new Error("cannot concat in objectMode");let Z=await this.collect();return this[a4]?Z.join(""):Buffer.concat(Z,Z.dataLength)}async promise(){return new Promise((Z,x)=>{this.on(W2,()=>x(new Error("stream destroyed"))),this.on("error",(Q)=>x(Q)),this.on("end",()=>Z())})}[Symbol.asyncIterator](){this[t3]=!1;let Z=!1,x=async()=>{return this.pause(),Z=!0,{value:void 0,done:!0}};return{next:()=>{if(Z)return x();let J=this.read();if(J!==null)return Promise.resolve({done:!1,value:J});if(this[x6])return x();let X,q,Y=(H)=>{this.off("data",$),this.off("end",z),this.off(W2,W),x(),q(H)},$=(H)=>{this.off("error",Y),this.off("end",z),this.off(W2,W),this.pause(),X({value:H,done:!!this[x6]})},z=()=>{this.off("error",Y),this.off("data",$),this.off(W2,W),x(),X({done:!0,value:void 0})},W=()=>Y(new Error("stream destroyed"));return new Promise((H,U)=>{q=U,X=H,this.once(W2,W),this.once("error",Y),this.once("end",z),this.once("data",$)})},throw:x,return:x,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[t3]=!1;let Z=!1,x=()=>{return this.pause(),this.off(g$,x),this.off(W2,x),this.off("end",x),Z=!0,{done:!0,value:void 0}},Q=()=>{if(Z)return x();let J=this.read();return J===null?x():{done:!1,value:J}};return this.once("end",x),this.once(g$,x),this.once(W2,x),{next:Q,throw:x,return:x,[Symbol.iterator](){return this}}}destroy(Z){if(this[W2]){if(Z)this.emit("error",Z);else this.emit(W2);return this}this[W2]=!0,this[t3]=!0,this[c2].length=0,this[b2]=0;let x=this;if(typeof x.close==="function"&&!this[JJ])x.close();if(Z)this.emit("error",Z);else this.emit(W2);return this}static get isStream(){return Bl}}var Al=Il.native,NZ={lstatSync:jl,readdir:Ol,readdirSync:Rl,readlinkSync:Sl,realpathSync:Al,promises:{lstat:El,readdir:fl,readlink:Tl,realpath:kl}},Iw=(Z)=>!Z||Z===NZ||Z===vl?NZ:{...NZ,...Z,promises:{...NZ.promises,...Z.promises||{}}},vw=/^\\\\\?\\([a-z]:)\\?$/i,cl=(Z)=>Z.replace(/\//g,"\\").replace(vw,"$1\\"),bl=/[\\\/]/,O4=0,Aw=1,Ew=2,w8=4,fw=6,Tw=8,j7=10,kw=12,j4=15,DZ=~j4,n$=16,jw=32,PZ=64,r4=128,$J=256,zJ=512,Ow=PZ|r4|zJ,pl=1023,a$=(Z)=>Z.isFile()?Tw:Z.isDirectory()?w8:Z.isSymbolicLink()?j7:Z.isCharacterDevice()?Ew:Z.isBlockDevice()?fw:Z.isSocket()?kw:Z.isFIFO()?Aw:O4,Rw=new Map,LZ=(Z)=>{let x=Rw.get(Z);if(x)return x;let Q=Z.normalize("NFKD");return Rw.set(Z,Q),Q},Sw=new Map,KJ=(Z)=>{let x=Sw.get(Z);if(x)return x;let Q=LZ(Z.toLowerCase());return Sw.set(Z,Q),Q};class t$ extends UZ{constructor(){super({max:256})}}class cw extends UZ{constructor(Z=16384){super({maxSize:Z,sizeCalculation:(x)=>x.length+1})}}var bw=Symbol("PathScurry setAsCwd");class m3{name;root;roots;parent;nocase;isCWD=!1;#Z;#x;get dev(){return this.#x}#q;get mode(){return this.#q}#X;get nlink(){return this.#X}#Y;get uid(){return this.#Y}#N;get gid(){return this.#N}#w;get rdev(){return this.#w}#$;get blksize(){return this.#$}#W;get ino(){return this.#W}#K;get size(){return this.#K}#z;get blocks(){return this.#z}#Q;get atimeMs(){return this.#Q}#H;get mtimeMs(){return this.#H}#F;get ctimeMs(){return this.#F}#U;get birthtimeMs(){return this.#U}#B;get atime(){return this.#B}#O;get mtime(){return this.#O}#M;get ctime(){return this.#M}#R;get birthtime(){return this.#R}#L;#P;#D;#C;#G;#I;#J;#E;#m;#v;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(Z,x=O4,Q,J,X,q,Y){if(this.name=Z,this.#L=X?KJ(Z):LZ(Z),this.#J=x&pl,this.nocase=X,this.roots=J,this.root=Q||this,this.#E=q,this.#D=Y.fullpath,this.#G=Y.relative,this.#I=Y.relativePosix,this.parent=Y.parent,this.parent)this.#Z=this.parent.#Z;else this.#Z=Iw(Y.fs)}depth(){if(this.#P!==void 0)return this.#P;if(!this.parent)return this.#P=0;return this.#P=this.parent.depth()+1}childrenCache(){return this.#E}resolve(Z){if(!Z)return this;let x=this.getRootString(Z),J=Z.substring(x.length).split(this.splitSep);return x?this.getRoot(x).#_(J):this.#_(J)}#_(Z){let x=this;for(let Q of Z)x=x.child(Q);return x}children(){let Z=this.#E.get(this);if(Z)return Z;let x=Object.assign([],{provisional:0});return this.#E.set(this,x),this.#J&=~n$,x}child(Z,x){if(Z===""||Z===".")return this;if(Z==="..")return this.parent||this;let Q=this.children(),J=this.nocase?KJ(Z):LZ(Z);for(let $ of Q)if($.#L===J)return $;let X=this.parent?this.sep:"",q=this.#D?this.#D+X+Z:void 0,Y=this.newChild(Z,O4,{...x,parent:this,fullpath:q});if(!this.canReaddir())Y.#J|=r4;return Q.push(Y),Y}relative(){if(this.isCWD)return"";if(this.#G!==void 0)return this.#G;let Z=this.name,x=this.parent;if(!x)return this.#G=this.name;let Q=x.relative();return Q+(!Q||!x.parent?"":this.sep)+Z}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let Z=this.name,x=this.parent;if(!x)return this.#I=this.fullpathPosix();let Q=x.relativePosix();return Q+(!Q||!x.parent?"":"/")+Z}fullpath(){if(this.#D!==void 0)return this.#D;let Z=this.name,x=this.parent;if(!x)return this.#D=this.name;let J=x.fullpath()+(!x.parent?"":this.sep)+Z;return this.#D=J}fullpathPosix(){if(this.#C!==void 0)return this.#C;if(this.sep==="/")return this.#C=this.fullpath();if(!this.parent){let J=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(J))return this.#C=`//?/${J}`;else return this.#C=J}let Z=this.parent,x=Z.fullpathPosix(),Q=x+(!x||!Z.parent?"":"/")+this.name;return this.#C=Q}isUnknown(){return(this.#J&j4)===O4}isType(Z){return this[`is${Z}`]()}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.#J&j4)===Tw}isDirectory(){return(this.#J&j4)===w8}isCharacterDevice(){return(this.#J&j4)===Ew}isBlockDevice(){return(this.#J&j4)===fw}isFIFO(){return(this.#J&j4)===Aw}isSocket(){return(this.#J&j4)===kw}isSymbolicLink(){return(this.#J&j7)===j7}lstatCached(){return this.#J&jw?this:void 0}readlinkCached(){return this.#m}realpathCached(){return this.#v}readdirCached(){let Z=this.children();return Z.slice(0,Z.provisional)}canReadlink(){if(this.#m)return!0;if(!this.parent)return!1;let Z=this.#J&j4;return!(Z!==O4&&Z!==j7||this.#J&$J||this.#J&r4)}calledReaddir(){return!!(this.#J&n$)}isENOENT(){return!!(this.#J&r4)}isNamed(Z){return!this.nocase?this.#L===LZ(Z):this.#L===KJ(Z)}async readlink(){let Z=this.#m;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let x=await this.#Z.promises.readlink(this.fullpath()),Q=(await this.parent.realpath())?.resolve(x);if(Q)return this.#m=Q}catch(x){this.#c(x.code);return}}readlinkSync(){let Z=this.#m;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let x=this.#Z.readlinkSync(this.fullpath()),Q=this.parent.realpathSync()?.resolve(x);if(Q)return this.#m=Q}catch(x){this.#c(x.code);return}}#u(Z){this.#J|=n$;for(let x=Z.provisional;x<Z.length;x++){let Q=Z[x];if(Q)Q.#f()}}#f(){if(this.#J&r4)return;this.#J=(this.#J|r4)&DZ,this.#k()}#k(){let Z=this.children();Z.provisional=0;for(let x of Z)x.#f()}#y(){this.#J|=zJ,this.#j()}#j(){if(this.#J&PZ)return;let Z=this.#J;if((Z&j4)===w8)Z&=DZ;this.#J=Z|PZ,this.#k()}#S(Z=""){if(Z==="ENOTDIR"||Z==="EPERM")this.#j();else if(Z==="ENOENT")this.#f();else this.children().provisional=0}#h(Z=""){if(Z==="ENOTDIR")this.parent.#j();else if(Z==="ENOENT")this.#f()}#c(Z=""){let x=this.#J;if(x|=$J,Z==="ENOENT")x|=r4;if(Z==="EINVAL"||Z==="UNKNOWN")x&=DZ;if(this.#J=x,Z==="ENOTDIR"&&this.parent)this.parent.#j()}#T(Z,x){return this.#g(Z,x)||this.#V(Z,x)}#V(Z,x){let Q=a$(Z),J=this.newChild(Z.name,Q,{parent:this}),X=J.#J&j4;if(X!==w8&&X!==j7&&X!==O4)J.#J|=PZ;return x.unshift(J),x.provisional++,J}#g(Z,x){for(let Q=x.provisional;Q<x.length;Q++){let J=x[Q];if((this.nocase?KJ(Z.name):LZ(Z.name))!==J.#L)continue;return this.#b(Z,J,Q,x)}}#b(Z,x,Q,J){let X=x.name;if(x.#J=x.#J&DZ|a$(Z),X!==Z.name)x.name=Z.name;if(Q!==J.provisional){if(Q===J.length-1)J.pop();else J.splice(Q,1);J.unshift(x)}return J.provisional++,x}async lstat(){if((this.#J&r4)===0)try{return this.#A(await this.#Z.promises.lstat(this.fullpath())),this}catch(Z){this.#h(Z.code)}}lstatSync(){if((this.#J&r4)===0)try{return this.#A(this.#Z.lstatSync(this.fullpath())),this}catch(Z){this.#h(Z.code)}}#A(Z){let{atime:x,atimeMs:Q,birthtime:J,birthtimeMs:X,blksize:q,blocks:Y,ctime:$,ctimeMs:z,dev:W,gid:H,ino:U,mode:B,mtime:w,mtimeMs:F,nlink:P,rdev:_,size:C,uid:u}=Z;this.#B=x,this.#Q=Q,this.#R=J,this.#U=X,this.#$=q,this.#z=Y,this.#M=$,this.#F=z,this.#x=W,this.#N=H,this.#W=U,this.#q=B,this.#O=w,this.#H=F,this.#X=P,this.#w=_,this.#K=C,this.#Y=u;let d=a$(Z);if(this.#J=this.#J&DZ|d|jw,d!==O4&&d!==w8&&d!==j7)this.#J|=PZ}#p=[];#i=!1;#l(Z){this.#i=!1;let x=this.#p.slice();this.#p.length=0,x.forEach((Q)=>Q(null,Z))}readdirCB(Z,x=!1){if(!this.canReaddir()){if(x)Z(null,[]);else queueMicrotask(()=>Z(null,[]));return}let Q=this.children();if(this.calledReaddir()){let X=Q.slice(0,Q.provisional);if(x)Z(null,X);else queueMicrotask(()=>Z(null,X));return}if(this.#p.push(Z),this.#i)return;this.#i=!0;let J=this.fullpath();this.#Z.readdir(J,{withFileTypes:!0},(X,q)=>{if(X)this.#S(X.code),Q.provisional=0;else{for(let Y of q)this.#T(Y,Q);this.#u(Q)}this.#l(Q.slice(0,Q.provisional));return})}#d;async readdir(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let x=this.fullpath();if(this.#d)await this.#d;else{let Q=()=>{};this.#d=new Promise((J)=>Q=J);try{for(let J of await this.#Z.promises.readdir(x,{withFileTypes:!0}))this.#T(J,Z);this.#u(Z)}catch(J){this.#S(J.code),Z.provisional=0}this.#d=void 0,Q()}return Z.slice(0,Z.provisional)}readdirSync(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let x=this.fullpath();try{for(let Q of this.#Z.readdirSync(x,{withFileTypes:!0}))this.#T(Q,Z);this.#u(Z)}catch(Q){this.#S(Q.code),Z.provisional=0}return Z.slice(0,Z.provisional)}canReaddir(){if(this.#J&Ow)return!1;let Z=j4&this.#J;if(!(Z===O4||Z===w8||Z===j7))return!1;return!0}shouldWalk(Z,x){return(this.#J&w8)===w8&&!(this.#J&Ow)&&!Z.has(this)&&(!x||x(this))}async realpath(){if(this.#v)return this.#v;if((zJ|$J|r4)&this.#J)return;try{let Z=await this.#Z.promises.realpath(this.fullpath());return this.#v=this.resolve(Z)}catch(Z){this.#y()}}realpathSync(){if(this.#v)return this.#v;if((zJ|$J|r4)&this.#J)return;try{let Z=this.#Z.realpathSync(this.fullpath());return this.#v=this.resolve(Z)}catch(Z){this.#y()}}[bw](Z){if(Z===this)return;Z.isCWD=!1,this.isCWD=!0;let x=new Set([]),Q=[],J=this;while(J&&J.parent)x.add(J),J.#G=Q.join(this.sep),J.#I=Q.join("/"),J=J.parent,Q.push("..");J=Z;while(J&&J.parent&&!x.has(J))J.#G=void 0,J.#I=void 0,J=J.parent}}class VJ extends m3{sep="\\";splitSep=bl;constructor(Z,x=O4,Q,J,X,q,Y){super(Z,x,Q,J,X,q,Y)}newChild(Z,x=O4,Q={}){return new VJ(Z,x,this.root,this.roots,this.nocase,this.childrenCache(),Q)}getRootString(Z){return r$.parse(Z).root}getRoot(Z){if(Z=cl(Z.toUpperCase()),Z===this.root.name)return this.root;for(let[x,Q]of Object.entries(this.roots))if(this.sameRoot(Z,x))return this.roots[Z]=Q;return this.roots[Z]=new mZ(Z,this).root}sameRoot(Z,x=this.root.name){return Z=Z.toUpperCase().replace(/\//g,"\\").replace(vw,"$1\\"),Z===x}}class WJ extends m3{splitSep="/";sep="/";constructor(Z,x=O4,Q,J,X,q,Y){super(Z,x,Q,J,X,q,Y)}getRootString(Z){return Z.startsWith("/")?"/":""}getRoot(Z){return this.root}newChild(Z,x=O4,Q={}){return new WJ(Z,x,this.root,this.roots,this.nocase,this.childrenCache(),Q)}}class e${root;rootPath;roots;cwd;#Z;#x;#q;nocase;#X;constructor(Z=process.cwd(),x,Q,{nocase:J,childrenCacheSize:X=16384,fs:q=NZ}={}){if(this.#X=Iw(q),Z instanceof URL||Z.startsWith("file://"))Z=Cl(Z);let Y=x.resolve(Z);this.roots=Object.create(null),this.rootPath=this.parseRootPath(Y),this.#Z=new t$,this.#x=new t$,this.#q=new cw(X);let $=Y.substring(this.rootPath.length).split(Q);if($.length===1&&!$[0])$.pop();if(J===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=J,this.root=this.newRoot(this.#X),this.roots[this.rootPath]=this.root;let z=this.root,W=$.length-1,H=x.sep,U=this.rootPath,B=!1;for(let w of $){let F=W--;z=z.child(w,{relative:new Array(F).fill("..").join(H),relativePosix:new Array(F).fill("..").join("/"),fullpath:U+=(B?"":H)+w}),B=!0}this.cwd=z}depth(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.depth()}childrenCache(){return this.#q}resolve(...Z){let x="";for(let X=Z.length-1;X>=0;X--){let q=Z[X];if(!q||q===".")continue;if(x=x?`${q}/${x}`:q,this.isAbsolute(q))break}let Q=this.#Z.get(x);if(Q!==void 0)return Q;let J=this.cwd.resolve(x).fullpath();return this.#Z.set(x,J),J}resolvePosix(...Z){let x="";for(let X=Z.length-1;X>=0;X--){let q=Z[X];if(!q||q===".")continue;if(x=x?`${q}/${x}`:q,this.isAbsolute(q))break}let Q=this.#x.get(x);if(Q!==void 0)return Q;let J=this.cwd.resolve(x).fullpathPosix();return this.#x.set(x,J),J}relative(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relative()}relativePosix(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relativePosix()}basename(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.name}dirname(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return(Z.parent||Z).fullpath()}async readdir(Z=this.cwd,x={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q}=x;if(!Z.canReaddir())return[];else{let J=await Z.readdir();return Q?J:J.map((X)=>X.name)}}readdirSync(Z=this.cwd,x={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0}=x;if(!Z.canReaddir())return[];else if(Q)return Z.readdirSync();else return Z.readdirSync().map((J)=>J.name)}async lstat(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstat()}lstatSync(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstatSync()}async readlink(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z.withFileTypes,Z=this.cwd;let Q=await Z.readlink();return x?Q:Q?.fullpath()}readlinkSync(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z.withFileTypes,Z=this.cwd;let Q=Z.readlinkSync();return x?Q:Q?.fullpath()}async realpath(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z.withFileTypes,Z=this.cwd;let Q=await Z.realpath();return x?Q:Q?.fullpath()}realpathSync(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z.withFileTypes,Z=this.cwd;let Q=Z.realpathSync();return x?Q:Q?.fullpath()}async walk(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0,follow:J=!1,filter:X,walkFilter:q}=x,Y=[];if(!X||X(Z))Y.push(Q?Z:Z.fullpath());let $=new Set,z=(H,U)=>{$.add(H),H.readdirCB((B,w)=>{if(B)return U(B);let F=w.length;if(!F)return U();let P=()=>{if(--F===0)U()};for(let _ of w){if(!X||X(_))Y.push(Q?_:_.fullpath());if(J&&_.isSymbolicLink())_.realpath().then((C)=>C?.isUnknown()?C.lstat():C).then((C)=>C?.shouldWalk($,q)?z(C,P):P());else if(_.shouldWalk($,q))z(_,P);else P()}},!0)},W=Z;return new Promise((H,U)=>{z(W,(B)=>{if(B)return U(B);H(Y)})})}walkSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0,follow:J=!1,filter:X,walkFilter:q}=x,Y=[];if(!X||X(Z))Y.push(Q?Z:Z.fullpath());let $=new Set([Z]);for(let z of $){let W=z.readdirSync();for(let H of W){if(!X||X(H))Y.push(Q?H:H.fullpath());let U=H;if(H.isSymbolicLink()){if(!(J&&(U=H.realpathSync())))continue;if(U.isUnknown())U.lstatSync()}if(U.shouldWalk($,q))$.add(U)}}return Y}[Symbol.asyncIterator](){return this.iterate()}iterate(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;return this.stream(Z,x)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0,follow:J=!1,filter:X,walkFilter:q}=x;if(!X||X(Z))yield Q?Z:Z.fullpath();let Y=new Set([Z]);for(let $ of Y){let z=$.readdirSync();for(let W of z){if(!X||X(W))yield Q?W:W.fullpath();let H=W;if(W.isSymbolicLink()){if(!(J&&(H=W.realpathSync())))continue;if(H.isUnknown())H.lstatSync()}if(H.shouldWalk(Y,q))Y.add(H)}}}stream(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0,follow:J=!1,filter:X,walkFilter:q}=x,Y=new C7({objectMode:!0});if(!X||X(Z))Y.write(Q?Z:Z.fullpath());let $=new Set,z=[Z],W=0,H=()=>{let U=!1;while(!U){let B=z.shift();if(!B){if(W===0)Y.end();return}W++,$.add(B);let w=(P,_,C=!1)=>{if(P)return Y.emit("error",P);if(J&&!C){let u=[];for(let d of _)if(d.isSymbolicLink())u.push(d.realpath().then((n)=>n?.isUnknown()?n.lstat():n));if(u.length){Promise.all(u).then(()=>w(null,_,!0));return}}for(let u of _)if(u&&(!X||X(u))){if(!Y.write(Q?u:u.fullpath()))U=!0}W--;for(let u of _){let d=u.realpathCached()||u;if(d.shouldWalk($,q))z.push(d)}if(U&&!Y.flowing)Y.once("drain",H);else if(!F)H()},F=!0;B.readdirCB(w,!0),F=!1}};return H(),Y}streamSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof m3))x=Z,Z=this.cwd;let{withFileTypes:Q=!0,follow:J=!1,filter:X,walkFilter:q}=x,Y=new C7({objectMode:!0}),$=new Set;if(!X||X(Z))Y.write(Q?Z:Z.fullpath());let z=[Z],W=0,H=()=>{let U=!1;while(!U){let B=z.shift();if(!B){if(W===0)Y.end();return}W++,$.add(B);let w=B.readdirSync();for(let F of w)if(!X||X(F)){if(!Y.write(Q?F:F.fullpath()))U=!0}W--;for(let F of w){let P=F;if(F.isSymbolicLink()){if(!(J&&(P=F.realpathSync())))continue;if(P.isUnknown())P.lstatSync()}if(P.shouldWalk($,q))z.push(P)}}if(U&&!Y.flowing)Y.once("drain",H)};return H(),Y}chdir(Z=this.cwd){let x=this.cwd;this.cwd=typeof Z==="string"?this.cwd.resolve(Z):Z,this.cwd[bw](x)}}class mZ extends e${sep="\\";constructor(Z=process.cwd(),x={}){let{nocase:Q=!0}=x;super(Z,r$,"\\",{...x,nocase:Q});this.nocase=Q;for(let J=this.cwd;J;J=J.parent)J.nocase=this.nocase}parseRootPath(Z){return r$.parse(Z).root.toUpperCase()}newRoot(Z){return new VJ(this.rootPath,w8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")||Z.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(Z)}}class _Z extends e${sep="/";constructor(Z=process.cwd(),x={}){let{nocase:Q=!1}=x;super(Z,_l,"/",{...x,nocase:Q});this.nocase=Q}parseRootPath(Z){return"/"}newRoot(Z){return new WJ(this.rootPath,w8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")}}class HJ extends _Z{constructor(Z=process.cwd(),x={}){let{nocase:Q=!0}=x;super(Z,{...x,nocase:Q})}}var Om0=process.platform==="win32"?VJ:WJ,pw=process.platform==="win32"?mZ:process.platform==="darwin"?HJ:_Z;var ul=(Z)=>Z.length>=1,yl=(Z)=>Z.length>=1;class T5{#Z;#x;#q;length;#X;#Y;#N;#w;#$;#W;#K=!0;constructor(Z,x,Q,J){if(!ul(Z))throw new TypeError("empty pattern list");if(!yl(x))throw new TypeError("empty glob list");if(x.length!==Z.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=Z.length,Q<0||Q>=this.length)throw new TypeError("index out of range");if(this.#Z=Z,this.#x=x,this.#q=Q,this.#X=J,this.#q===0){if(this.isUNC()){let[X,q,Y,$,...z]=this.#Z,[W,H,U,B,...w]=this.#x;if(z[0]==="")z.shift(),w.shift();let F=[X,q,Y,$,""].join("/"),P=[W,H,U,B,""].join("/");this.#Z=[F,...z],this.#x=[P,...w],this.length=this.#Z.length}else if(this.isDrive()||this.isAbsolute()){let[X,...q]=this.#Z,[Y,...$]=this.#x;if(q[0]==="")q.shift(),$.shift();let z=X+"/",W=Y+"/";this.#Z=[z,...q],this.#x=[W,...$],this.length=this.#Z.length}}}pattern(){return this.#Z[this.#q]}isString(){return typeof this.#Z[this.#q]==="string"}isGlobstar(){return this.#Z[this.#q]===n2}isRegExp(){return this.#Z[this.#q]instanceof RegExp}globString(){return this.#N=this.#N||(this.#q===0?this.isAbsolute()?this.#x[0]+this.#x.slice(1).join("/"):this.#x.join("/"):this.#x.slice(this.#q).join("/"))}hasMore(){return this.length>this.#q+1}rest(){if(this.#Y!==void 0)return this.#Y;if(!this.hasMore())return this.#Y=null;return this.#Y=new T5(this.#Z,this.#x,this.#q+1,this.#X),this.#Y.#W=this.#W,this.#Y.#$=this.#$,this.#Y.#w=this.#w,this.#Y}isUNC(){let Z=this.#Z;return this.#$!==void 0?this.#$:this.#$=this.#X==="win32"&&this.#q===0&&Z[0]===""&&Z[1]===""&&typeof Z[2]==="string"&&!!Z[2]&&typeof Z[3]==="string"&&!!Z[3]}isDrive(){let Z=this.#Z;return this.#w!==void 0?this.#w:this.#w=this.#X==="win32"&&this.#q===0&&this.length>1&&typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0])}isAbsolute(){let Z=this.#Z;return this.#W!==void 0?this.#W:this.#W=Z[0]===""&&Z.length>1||this.isDrive()||this.isUNC()}root(){let Z=this.#Z[0];return typeof Z==="string"&&this.isAbsolute()&&this.#q===0?Z:""}checkFollowGlobstar(){return!(this.#q===0||!this.isGlobstar()||!this.#K)}markFollowGlobstar(){if(this.#q===0||!this.isGlobstar()||!this.#K)return!1;return this.#K=!1,!0}}var hl=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class CZ{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(Z,{nobrace:x,nocase:Q,noext:J,noglobstar:X,platform:q=hl}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:x,nocase:Q,noext:J,noglobstar:X,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let Y of Z)this.add(Y)}add(Z){let x=new C4(Z,this.mmopts);for(let Q=0;Q<x.set.length;Q++){let J=x.set[Q],X=x.globParts[Q];if(!J||!X)throw new Error("invalid pattern object");while(J[0]==="."&&X[0]===".")J.shift(),X.shift();let q=new T5(J,X,0,this.platform),Y=new C4(q.globString(),this.mmopts),$=X[X.length-1]==="**",z=q.isAbsolute();if(z)this.absolute.push(Y);else this.relative.push(Y);if($)if(z)this.absoluteChildren.push(Y);else this.relativeChildren.push(Y)}}ignored(Z){let x=Z.fullpath(),Q=`${x}/`,J=Z.relative()||".",X=`${J}/`;for(let q of this.relative)if(q.match(J)||q.match(X))return!0;for(let q of this.absolute)if(q.match(x)||q.match(Q))return!0;return!1}childrenIgnored(Z){let x=Z.fullpath()+"/",Q=(Z.relative()||".")+"/";for(let J of this.relativeChildren)if(J.match(Q))return!0;for(let J of this.absoluteChildren)if(J.match(x))return!0;return!1}}class ZK{store;constructor(Z=new Map){this.store=Z}copy(){return new ZK(new Map(this.store))}hasWalked(Z,x){return this.store.get(Z.fullpath())?.has(x.globString())}storeWalked(Z,x){let Q=Z.fullpath(),J=this.store.get(Q);if(J)J.add(x.globString());else this.store.set(Q,new Set([x.globString()]))}}class uw{store=new Map;add(Z,x,Q){let J=(x?2:0)|(Q?1:0),X=this.store.get(Z);this.store.set(Z,X===void 0?J:J&X)}entries(){return[...this.store.entries()].map(([Z,x])=>[Z,!!(x&2),!!(x&1)])}}class yw{store=new Map;add(Z,x){if(!Z.canReaddir())return;let Q=this.store.get(Z);if(Q){if(!Q.find((J)=>J.globString()===x.globString()))Q.push(x)}else this.store.set(Z,[x])}get(Z){let x=this.store.get(Z);if(!x)throw new Error("attempting to walk unknown path");return x}entries(){return this.keys().map((Z)=>[Z,this.store.get(Z)])}keys(){return[...this.store.keys()].filter((Z)=>Z.canReaddir())}}class jZ{hasWalkedCache;matches=new uw;subwalks=new yw;patterns;follow;dot;opts;constructor(Z,x){this.opts=Z,this.follow=!!Z.follow,this.dot=!!Z.dot,this.hasWalkedCache=x?x.copy():new ZK}processPatterns(Z,x){this.patterns=x;let Q=x.map((J)=>[Z,J]);for(let[J,X]of Q){this.hasWalkedCache.storeWalked(J,X);let q=X.root(),Y=X.isAbsolute()&&this.opts.absolute!==!1;if(q){J=J.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let H=X.rest();if(!H){this.matches.add(J,!0,!1);continue}else X=H}if(J.isENOENT())continue;let $,z,W=!1;while(typeof($=X.pattern())==="string"&&(z=X.rest()))J=J.resolve($),X=z,W=!0;if($=X.pattern(),z=X.rest(),W){if(this.hasWalkedCache.hasWalked(J,X))continue;this.hasWalkedCache.storeWalked(J,X)}if(typeof $==="string"){let H=$===".."||$===""||$===".";this.matches.add(J.resolve($),Y,H);continue}else if($===n2){if(!J.isSymbolicLink()||this.follow||X.checkFollowGlobstar())this.subwalks.add(J,X);let H=z?.pattern(),U=z?.rest();if(!z||(H===""||H===".")&&!U)this.matches.add(J,Y,H===""||H===".");else if(H===".."){let B=J.parent||J;if(!U)this.matches.add(B,Y,!0);else if(!this.hasWalkedCache.hasWalked(B,U))this.subwalks.add(B,U)}}else if($ instanceof RegExp)this.subwalks.add(J,X)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new jZ(this.opts,this.hasWalkedCache)}filterEntries(Z,x){let Q=this.subwalks.get(Z),J=this.child();for(let X of x)for(let q of Q){let Y=q.isAbsolute(),$=q.pattern(),z=q.rest();if($===n2)J.testGlobstar(X,q,z,Y);else if($ instanceof RegExp)J.testRegExp(X,$,z,Y);else J.testString(X,$,z,Y)}return J}testGlobstar(Z,x,Q,J){if(this.dot||!Z.name.startsWith(".")){if(!x.hasMore())this.matches.add(Z,J,!1);if(Z.canReaddir()){if(this.follow||!Z.isSymbolicLink())this.subwalks.add(Z,x);else if(Z.isSymbolicLink()){if(Q&&x.checkFollowGlobstar())this.subwalks.add(Z,Q);else if(x.markFollowGlobstar())this.subwalks.add(Z,x)}}}if(Q){let X=Q.pattern();if(typeof X==="string"&&X!==".."&&X!==""&&X!==".")this.testString(Z,X,Q.rest(),J);else if(X===".."){let q=Z.parent||Z;this.subwalks.add(q,Q)}else if(X instanceof RegExp)this.testRegExp(Z,X,Q.rest(),J)}}testRegExp(Z,x,Q,J){if(!x.test(Z.name))return;if(!Q)this.matches.add(Z,J,!1);else this.subwalks.add(Z,Q)}testString(Z,x,Q,J){if(!Z.isNamed(x))return;if(!Q)this.matches.add(Z,J,!1);else this.subwalks.add(Z,Q)}}var gl=(Z,x)=>typeof Z==="string"?new CZ([Z],x):Array.isArray(Z)?new CZ(Z,x):Z;class xK{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#Z=[];#x;#q;signal;maxDepth;includeChildMatches;constructor(Z,x,Q){if(this.patterns=Z,this.path=x,this.opts=Q,this.#q=!Q.posix&&Q.platform==="win32"?"\\":"/",this.includeChildMatches=Q.includeChildMatches!==!1,Q.ignore||!this.includeChildMatches){if(this.#x=gl(Q.ignore??[],Q),!this.includeChildMatches&&typeof this.#x.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=Q.maxDepth||1/0,Q.signal)this.signal=Q.signal,this.signal.addEventListener("abort",()=>{this.#Z.length=0})}#X(Z){return this.seen.has(Z)||!!this.#x?.ignored?.(Z)}#Y(Z){return!!this.#x?.childrenIgnored?.(Z)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let Z=void 0;while(!this.paused&&(Z=this.#Z.shift()))Z()}onResume(Z){if(this.signal?.aborted)return;if(!this.paused)Z();else this.#Z.push(Z)}async matchCheck(Z,x){if(x&&this.opts.nodir)return;let Q;if(this.opts.realpath){if(Q=Z.realpathCached()||await Z.realpath(),!Q)return;Z=Q}let X=Z.isUnknown()||this.opts.stat?await Z.lstat():Z;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=await X.realpath();if(q&&(q.isUnknown()||this.opts.stat))await q.lstat()}return this.matchCheckTest(X,x)}matchCheckTest(Z,x){return Z&&(this.maxDepth===1/0||Z.depth()<=this.maxDepth)&&(!x||Z.canReaddir())&&(!this.opts.nodir||!Z.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!Z.isSymbolicLink()||!Z.realpathCached()?.isDirectory())&&!this.#X(Z)?Z:void 0}matchCheckSync(Z,x){if(x&&this.opts.nodir)return;let Q;if(this.opts.realpath){if(Q=Z.realpathCached()||Z.realpathSync(),!Q)return;Z=Q}let X=Z.isUnknown()||this.opts.stat?Z.lstatSync():Z;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=X.realpathSync();if(q&&(q?.isUnknown()||this.opts.stat))q.lstatSync()}return this.matchCheckTest(X,x)}matchFinish(Z,x){if(this.#X(Z))return;if(!this.includeChildMatches&&this.#x?.add){let X=`${Z.relativePosix()}/**`;this.#x.add(X)}let Q=this.opts.absolute===void 0?x:this.opts.absolute;this.seen.add(Z);let J=this.opts.mark&&Z.isDirectory()?this.#q:"";if(this.opts.withFileTypes)this.matchEmit(Z);else if(Q){let X=this.opts.posix?Z.fullpathPosix():Z.fullpath();this.matchEmit(X+J)}else{let X=this.opts.posix?Z.relativePosix():Z.relative(),q=this.opts.dotRelative&&!X.startsWith(".."+this.#q)?"."+this.#q:"";this.matchEmit(!X?"."+J:q+X+J)}}async match(Z,x,Q){let J=await this.matchCheck(Z,Q);if(J)this.matchFinish(J,x)}matchSync(Z,x,Q){let J=this.matchCheckSync(Z,Q);if(J)this.matchFinish(J,x)}walkCB(Z,x,Q){if(this.signal?.aborted)Q();this.walkCB2(Z,x,new jZ(this.opts),Q)}walkCB2(Z,x,Q,J){if(this.#Y(Z))return J();if(this.signal?.aborted)J();if(this.paused){this.onResume(()=>this.walkCB2(Z,x,Q,J));return}Q.processPatterns(Z,x);let X=1,q=()=>{if(--X===0)J()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;X++,this.match(Y,$,z).then(()=>q())}for(let Y of Q.subwalkTargets()){if(this.maxDepth!==1/0&&Y.depth()>=this.maxDepth)continue;X++;let $=Y.readdirCached();if(Y.calledReaddir())this.walkCB3(Y,$,Q,q);else Y.readdirCB((z,W)=>this.walkCB3(Y,W,Q,q),!0)}q()}walkCB3(Z,x,Q,J){Q=Q.filterEntries(Z,x);let X=1,q=()=>{if(--X===0)J()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;X++,this.match(Y,$,z).then(()=>q())}for(let[Y,$]of Q.subwalks.entries())X++,this.walkCB2(Y,$,Q.child(),q);q()}walkCBSync(Z,x,Q){if(this.signal?.aborted)Q();this.walkCB2Sync(Z,x,new jZ(this.opts),Q)}walkCB2Sync(Z,x,Q,J){if(this.#Y(Z))return J();if(this.signal?.aborted)J();if(this.paused){this.onResume(()=>this.walkCB2Sync(Z,x,Q,J));return}Q.processPatterns(Z,x);let X=1,q=()=>{if(--X===0)J()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;this.matchSync(Y,$,z)}for(let Y of Q.subwalkTargets()){if(this.maxDepth!==1/0&&Y.depth()>=this.maxDepth)continue;X++;let $=Y.readdirSync();this.walkCB3Sync(Y,$,Q,q)}q()}walkCB3Sync(Z,x,Q,J){Q=Q.filterEntries(Z,x);let X=1,q=()=>{if(--X===0)J()};for(let[Y,$,z]of Q.matches.entries()){if(this.#X(Y))continue;this.matchSync(Y,$,z)}for(let[Y,$]of Q.subwalks.entries())X++,this.walkCB2Sync(Y,$,Q.child(),q);q()}}class GJ extends xK{matches=new Set;constructor(Z,x,Q){super(Z,x,Q)}matchEmit(Z){this.matches.add(Z)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((Z,x)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)x(this.signal.reason);else Z(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}}class UJ extends xK{results;constructor(Z,x,Q){super(Z,x,Q);this.results=new C7({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(Z){if(this.results.write(Z),!this.results.flowing)this.pause()}stream(){let Z=this.path;if(Z.isUnknown())Z.lstat().then(()=>{this.walkCB(Z,this.patterns,()=>this.results.end())});else this.walkCB(Z,this.patterns,()=>this.results.end());return this.results}streamSync(){if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}var il=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class F8{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(Z,x){if(!x)throw new TypeError("glob options required");if(this.withFileTypes=!!x.withFileTypes,this.signal=x.signal,this.follow=!!x.follow,this.dot=!!x.dot,this.dotRelative=!!x.dotRelative,this.nodir=!!x.nodir,this.mark=!!x.mark,!x.cwd)this.cwd="";else if(x.cwd instanceof URL||x.cwd.startsWith("file://"))x.cwd=dl(x.cwd);if(this.cwd=x.cwd||"",this.root=x.root,this.magicalBraces=!!x.magicalBraces,this.nobrace=!!x.nobrace,this.noext=!!x.noext,this.realpath=!!x.realpath,this.absolute=x.absolute,this.includeChildMatches=x.includeChildMatches!==!1,this.noglobstar=!!x.noglobstar,this.matchBase=!!x.matchBase,this.maxDepth=typeof x.maxDepth==="number"?x.maxDepth:1/0,this.stat=!!x.stat,this.ignore=x.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof Z==="string")Z=[Z];if(this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)Z=Z.map(($)=>$.replace(/\\/g,"/"));if(this.matchBase){if(x.noglobstar)throw new TypeError("base matching requires globstar");Z=Z.map(($)=>$.includes("/")?$:`./**/${$}`)}if(this.pattern=Z,this.platform=x.platform||il,this.opts={...x,platform:this.platform},x.scurry){if(this.scurry=x.scurry,x.nocase!==void 0&&x.nocase!==x.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let $=x.platform==="win32"?mZ:x.platform==="darwin"?HJ:x.platform?_Z:pw;this.scurry=new $(this.cwd,{nocase:x.nocase,fs:x.fs})}this.nocase=this.scurry.nocase;let Q=this.platform==="darwin"||this.platform==="win32",J={...x,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:Q,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},X=this.pattern.map(($)=>new C4($,J)),[q,Y]=X.reduce(($,z)=>{return $[0].push(...z.set),$[1].push(...z.globParts),$},[[],[]]);this.patterns=q.map(($,z)=>{let W=Y[z];if(!W)throw new Error("invalid pattern object");return new T5($,W,0,this.platform)})}async walk(){return[...await new GJ(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 GJ(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 UJ(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 UJ(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 QK=(Z,x={})=>{if(!Array.isArray(Z))Z=[Z];for(let Q of Z)if(new C4(Q,x).hasMagic())return!0;return!1};function MJ(Z,x={}){return new F8(Z,x).streamSync()}function gw(Z,x={}){return new F8(Z,x).stream()}function dw(Z,x={}){return new F8(Z,x).walkSync()}async function hw(Z,x={}){return new F8(Z,x).walk()}function wJ(Z,x={}){return new F8(Z,x).iterateSync()}function iw(Z,x={}){return new F8(Z,x).iterate()}var ll=MJ,ol=Object.assign(gw,{sync:MJ}),sl=wJ,nl=Object.assign(iw,{sync:wJ}),al=Object.assign(dw,{stream:MJ,iterate:wJ}),BJ=Object.assign(hw,{glob:hw,globSync:dw,sync:al,globStream:gw,stream:ol,globStreamSync:MJ,streamSync:ll,globIterate:iw,iterate:nl,globIterateSync:wJ,iterateSync:sl,Glob:F8,hasMagic:QK,escape:I5,unescape:n4});BJ.glob=BJ;var CL=m7(CK(),1);import re from"fs";import te from"path";function vZ(Z,x){return function Q(){return Z.apply(x,arguments)}}var{toString:us}=Object.prototype,{getPrototypeOf:OK}=Object,{iterator:SJ,toStringTag:aD}=Symbol,IJ=((Z)=>(x)=>{let Q=us.call(x);return Z[Q]||(Z[Q]=Q.slice(8,-1).toLowerCase())})(Object.create(null)),e4=(Z)=>{return Z=Z.toLowerCase(),(x)=>IJ(x)===Z},vJ=(Z)=>(x)=>typeof x===Z,{isArray:u5}=Array,AZ=vJ("undefined");function EZ(Z){return Z!==null&&!AZ(Z)&&Z.constructor!==null&&!AZ(Z.constructor)&&f3(Z.constructor.isBuffer)&&Z.constructor.isBuffer(Z)}var rD=e4("ArrayBuffer");function ys(Z){let x;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)x=ArrayBuffer.isView(Z);else x=Z&&Z.buffer&&rD(Z.buffer);return x}var hs=vJ("string"),f3=vJ("function"),tD=vJ("number"),fZ=(Z)=>Z!==null&&typeof Z==="object",gs=(Z)=>Z===!0||Z===!1,RJ=(Z)=>{if(IJ(Z)!=="object")return!1;let x=OK(Z);return(x===null||x===Object.prototype||Object.getPrototypeOf(x)===null)&&!(aD in Z)&&!(SJ in Z)},ds=(Z)=>{if(!fZ(Z)||EZ(Z))return!1;try{return Object.keys(Z).length===0&&Object.getPrototypeOf(Z)===Object.prototype}catch(x){return!1}},is=e4("Date"),ls=e4("File"),os=e4("Blob"),ss=e4("FileList"),ns=(Z)=>fZ(Z)&&f3(Z.pipe),as=(Z)=>{let x;return Z&&(typeof FormData==="function"&&Z instanceof FormData||f3(Z.append)&&((x=IJ(Z))==="formdata"||x==="object"&&f3(Z.toString)&&Z.toString()==="[object FormData]"))},rs=e4("URLSearchParams"),[ts,es,Zn,xn]=["ReadableStream","Request","Response","Headers"].map(e4),Qn=(Z)=>Z.trim?Z.trim():Z.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function TZ(Z,x,{allOwnKeys:Q=!1}={}){if(Z===null||typeof Z==="undefined")return;let J,X;if(typeof Z!=="object")Z=[Z];if(u5(Z))for(J=0,X=Z.length;J<X;J++)x.call(null,Z[J],J,Z);else{if(EZ(Z))return;let q=Q?Object.getOwnPropertyNames(Z):Object.keys(Z),Y=q.length,$;for(J=0;J<Y;J++)$=q[J],x.call(null,Z[$],$,Z)}}function eD(Z,x){if(EZ(Z))return null;x=x.toLowerCase();let Q=Object.keys(Z),J=Q.length,X;while(J-- >0)if(X=Q[J],x===X.toLowerCase())return X;return null}var R7=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),ZN=(Z)=>!AZ(Z)&&Z!==R7;function jK(){let{caseless:Z}=ZN(this)&&this||{},x={},Q=(J,X)=>{let q=Z&&eD(x,X)||X;if(RJ(x[q])&&RJ(J))x[q]=jK(x[q],J);else if(RJ(J))x[q]=jK({},J);else if(u5(J))x[q]=J.slice();else x[q]=J};for(let J=0,X=arguments.length;J<X;J++)arguments[J]&&TZ(arguments[J],Q);return x}var Jn=(Z,x,Q,{allOwnKeys:J}={})=>{return TZ(x,(X,q)=>{if(Q&&f3(X))Z[q]=vZ(X,Q);else Z[q]=X},{allOwnKeys:J}),Z},Xn=(Z)=>{if(Z.charCodeAt(0)===65279)Z=Z.slice(1);return Z},qn=(Z,x,Q,J)=>{Z.prototype=Object.create(x.prototype,J),Z.prototype.constructor=Z,Object.defineProperty(Z,"super",{value:x.prototype}),Q&&Object.assign(Z.prototype,Q)},Yn=(Z,x,Q,J)=>{let X,q,Y,$={};if(x=x||{},Z==null)return x;do{X=Object.getOwnPropertyNames(Z),q=X.length;while(q-- >0)if(Y=X[q],(!J||J(Y,Z,x))&&!$[Y])x[Y]=Z[Y],$[Y]=!0;Z=Q!==!1&&OK(Z)}while(Z&&(!Q||Q(Z,x))&&Z!==Object.prototype);return x},$n=(Z,x,Q)=>{if(Z=String(Z),Q===void 0||Q>Z.length)Q=Z.length;Q-=x.length;let J=Z.indexOf(x,Q);return J!==-1&&J===Q},Kn=(Z)=>{if(!Z)return null;if(u5(Z))return Z;let x=Z.length;if(!tD(x))return null;let Q=new Array(x);while(x-- >0)Q[x]=Z[x];return Q},zn=((Z)=>{return(x)=>{return Z&&x instanceof Z}})(typeof Uint8Array!=="undefined"&&OK(Uint8Array)),Vn=(Z,x)=>{let J=(Z&&Z[SJ]).call(Z),X;while((X=J.next())&&!X.done){let q=X.value;x.call(Z,q[0],q[1])}},Wn=(Z,x)=>{let Q,J=[];while((Q=Z.exec(x))!==null)J.push(Q);return J},Hn=e4("HTMLFormElement"),Gn=(Z)=>{return Z.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function x(Q,J,X){return J.toUpperCase()+X})},nD=(({hasOwnProperty:Z})=>(x,Q)=>Z.call(x,Q))(Object.prototype),Un=e4("RegExp"),xN=(Z,x)=>{let Q=Object.getOwnPropertyDescriptors(Z),J={};TZ(Q,(X,q)=>{let Y;if((Y=x(X,q,Z))!==!1)J[q]=Y||X}),Object.defineProperties(Z,J)},Bn=(Z)=>{xN(Z,(x,Q)=>{if(f3(Z)&&["arguments","caller","callee"].indexOf(Q)!==-1)return!1;let J=Z[Q];if(!f3(J))return;if(x.enumerable=!1,"writable"in x){x.writable=!1;return}if(!x.set)x.set=()=>{throw Error("Can not rewrite read-only method '"+Q+"'")}})},Mn=(Z,x)=>{let Q={},J=(X)=>{X.forEach((q)=>{Q[q]=!0})};return u5(Z)?J(Z):J(String(Z).split(x)),Q},wn=()=>{},Fn=(Z,x)=>{return Z!=null&&Number.isFinite(Z=+Z)?Z:x};function Dn(Z){return!!(Z&&f3(Z.append)&&Z[aD]==="FormData"&&Z[SJ])}var Nn=(Z)=>{let x=new Array(10),Q=(J,X)=>{if(fZ(J)){if(x.indexOf(J)>=0)return;if(EZ(J))return J;if(!("toJSON"in J)){x[X]=J;let q=u5(J)?[]:{};return TZ(J,(Y,$)=>{let z=Q(Y,X+1);!AZ(z)&&(q[$]=z)}),x[X]=void 0,q}}return J};return Q(Z,0)},Pn=e4("AsyncFunction"),Ln=(Z)=>Z&&(fZ(Z)||f3(Z))&&f3(Z.then)&&f3(Z.catch),QN=((Z,x)=>{if(Z)return setImmediate;return x?((Q,J)=>{return R7.addEventListener("message",({source:X,data:q})=>{if(X===R7&&q===Q)J.length&&J.shift()()},!1),(X)=>{J.push(X),R7.postMessage(Q,"*")}})(`axios@${Math.random()}`,[]):(Q)=>setTimeout(Q)})(typeof setImmediate==="function",f3(R7.postMessage)),mn=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(R7):typeof process!=="undefined"&&process.nextTick||QN,_n=(Z)=>Z!=null&&f3(Z[SJ]),A={isArray:u5,isArrayBuffer:rD,isBuffer:EZ,isFormData:as,isArrayBufferView:ys,isString:hs,isNumber:tD,isBoolean:gs,isObject:fZ,isPlainObject:RJ,isEmptyObject:ds,isReadableStream:ts,isRequest:es,isResponse:Zn,isHeaders:xn,isUndefined:AZ,isDate:is,isFile:ls,isBlob:os,isRegExp:Un,isFunction:f3,isStream:ns,isURLSearchParams:rs,isTypedArray:zn,isFileList:ss,forEach:TZ,merge:jK,extend:Jn,trim:Qn,stripBOM:Xn,inherits:qn,toFlatObject:Yn,kindOf:IJ,kindOfTest:e4,endsWith:$n,toArray:Kn,forEachEntry:Vn,matchAll:Wn,isHTMLForm:Hn,hasOwnProperty:nD,hasOwnProp:nD,reduceDescriptors:xN,freezeMethods:Bn,toObjectSet:Mn,toCamelCase:Gn,noop:wn,toFiniteNumber:Fn,findKey:eD,global:R7,isContextDefined:ZN,isSpecCompliantForm:Dn,toJSONObject:Nn,isAsyncFn:Pn,isThenable:Ln,setImmediate:QN,asap:mn,isIterable:_n};function y5(Z,x,Q,J,X){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=new Error().stack;if(this.message=Z,this.name="AxiosError",x&&(this.code=x),Q&&(this.config=Q),J&&(this.request=J),X)this.response=X,this.status=X.status?X.status:null}A.inherits(y5,Error,{toJSON:function Z(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}});var JN=y5.prototype,XN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((Z)=>{XN[Z]={value:Z}});Object.defineProperties(y5,XN);Object.defineProperty(JN,"isAxiosError",{value:!0});y5.from=(Z,x,Q,J,X,q)=>{let Y=Object.create(JN);return A.toFlatObject(Z,Y,function $(z){return z!==Error.prototype},($)=>{return $!=="isAxiosError"}),y5.call(Y,Z.message,x,Q,J,X),Y.cause=Z,Y.name=Z.name,q&&Object.assign(Y,q),Y};var M0=y5;var qN=m7(CK(),1),AJ=qN.default;function RK(Z){return A.isPlainObject(Z)||A.isArray(Z)}function $N(Z){return A.endsWith(Z,"[]")?Z.slice(0,-2):Z}function YN(Z,x,Q){if(!Z)return x;return Z.concat(x).map(function J(X,q){return X=$N(X),!Q&&q?"["+X+"]":X}).join(Q?".":"")}function Cn(Z){return A.isArray(Z)&&!Z.some(RK)}var jn=A.toFlatObject(A,{},null,function Z(x){return/^is[A-Z]/.test(x)});function On(Z,x,Q){if(!A.isObject(Z))throw new TypeError("target must be an object");x=x||new(AJ||FormData),Q=A.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function F(P,_){return!A.isUndefined(_[P])});let J=Q.metaTokens,X=Q.visitor||H,q=Q.dots,Y=Q.indexes,z=(Q.Blob||typeof Blob!=="undefined"&&Blob)&&A.isSpecCompliantForm(x);if(!A.isFunction(X))throw new TypeError("visitor must be a function");function W(F){if(F===null)return"";if(A.isDate(F))return F.toISOString();if(A.isBoolean(F))return F.toString();if(!z&&A.isBlob(F))throw new M0("Blob is not supported. Use a Buffer instead.");if(A.isArrayBuffer(F)||A.isTypedArray(F))return z&&typeof Blob==="function"?new Blob([F]):Buffer.from(F);return F}function H(F,P,_){let C=F;if(F&&!_&&typeof F==="object"){if(A.endsWith(P,"{}"))P=J?P:P.slice(0,-2),F=JSON.stringify(F);else if(A.isArray(F)&&Cn(F)||(A.isFileList(F)||A.endsWith(P,"[]"))&&(C=A.toArray(F)))return P=$N(P),C.forEach(function u(d,n){!(A.isUndefined(d)||d===null)&&x.append(Y===!0?YN([P],n,q):Y===null?P:P+"[]",W(d))}),!1}if(RK(F))return!0;return x.append(YN(_,P,q),W(F)),!1}let U=[],B=Object.assign(jn,{defaultVisitor:H,convertValue:W,isVisitable:RK});function w(F,P){if(A.isUndefined(F))return;if(U.indexOf(F)!==-1)throw Error("Circular reference detected in "+P.join("."));U.push(F),A.forEach(F,function _(C,u){if((!(A.isUndefined(C)||C===null)&&X.call(x,C,A.isString(u)?u.trim():u,P,B))===!0)w(C,P?P.concat(u):[u])}),U.pop()}if(!A.isObject(Z))throw new TypeError("data must be an object");return w(Z),x}var k6=On;function KN(Z){let x={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(Z).replace(/[!'()~]|%20|%00/g,function Q(J){return x[J]})}function zN(Z,x){this._pairs=[],Z&&k6(Z,this,x)}var VN=zN.prototype;VN.append=function Z(x,Q){this._pairs.push([x,Q])};VN.toString=function Z(x){let Q=x?function(J){return x.call(this,J,KN)}:KN;return this._pairs.map(function J(X){return Q(X[0])+"="+Q(X[1])},"").join("&")};var WN=zN;function Rn(Z){return encodeURIComponent(Z).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S7(Z,x,Q){if(!x)return Z;let J=Q&&Q.encode||Rn;if(A.isFunction(Q))Q={serialize:Q};let X=Q&&Q.serialize,q;if(X)q=X(x,Q);else q=A.isURLSearchParams(x)?x.toString():new WN(x,Q).toString(J);if(q){let Y=Z.indexOf("#");if(Y!==-1)Z=Z.slice(0,Y);Z+=(Z.indexOf("?")===-1?"?":"&")+q}return Z}class HN{constructor(){this.handlers=[]}use(Z,x,Q){return this.handlers.push({fulfilled:Z,rejected:x,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(Z){if(this.handlers[Z])this.handlers[Z]=null}clear(){if(this.handlers)this.handlers=[]}forEach(Z){A.forEach(this.handlers,function x(Q){if(Q!==null)Z(Q)})}}var SK=HN;var h5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import In from"crypto";import Sn from"url";var GN=Sn.URLSearchParams;var IK="abcdefghijklmnopqrstuvwxyz",UN="0123456789",BN={DIGIT:UN,ALPHA:IK,ALPHA_DIGIT:IK+IK.toUpperCase()+UN},vn=(Z=16,x=BN.ALPHA_DIGIT)=>{let Q="",{length:J}=x,X=new Uint32Array(Z);In.randomFillSync(X);for(let q=0;q<Z;q++)Q+=x[X[q]%J];return Q},MN={isNode:!0,classes:{URLSearchParams:GN,FormData:AJ,Blob:typeof Blob!=="undefined"&&Blob||null},ALPHABET:BN,generateString:vn,protocols:["http","https","file","data"]};var EK={};vM(EK,{origin:()=>fn,navigator:()=>vK,hasStandardBrowserWebWorkerEnv:()=>En,hasStandardBrowserEnv:()=>An,hasBrowserEnv:()=>AK});var AK=typeof window!=="undefined"&&typeof document!=="undefined",vK=typeof navigator==="object"&&navigator||void 0,An=AK&&(!vK||["ReactNative","NativeScript","NS"].indexOf(vK.product)<0),En=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),fn=AK&&window.location.href||"http://localhost";var H1={...EK,...MN};function fK(Z,x){return k6(Z,new H1.classes.URLSearchParams,{visitor:function(Q,J,X,q){if(H1.isNode&&A.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return q.defaultVisitor.apply(this,arguments)},...x})}function Tn(Z){return A.matchAll(/\w+|\[(\w*)]/g,Z).map((x)=>{return x[0]==="[]"?"":x[1]||x[0]})}function kn(Z){let x={},Q=Object.keys(Z),J,X=Q.length,q;for(J=0;J<X;J++)q=Q[J],x[q]=Z[q];return x}function cn(Z){function x(Q,J,X,q){let Y=Q[q++];if(Y==="__proto__")return!0;let $=Number.isFinite(+Y),z=q>=Q.length;if(Y=!Y&&A.isArray(X)?X.length:Y,z){if(A.hasOwnProp(X,Y))X[Y]=[X[Y],J];else X[Y]=J;return!$}if(!X[Y]||!A.isObject(X[Y]))X[Y]=[];if(x(Q,J,X[Y],q)&&A.isArray(X[Y]))X[Y]=kn(X[Y]);return!$}if(A.isFormData(Z)&&A.isFunction(Z.entries)){let Q={};return A.forEachEntry(Z,(J,X)=>{x(Tn(J),X,Q,0)}),Q}return null}var EJ=cn;function bn(Z,x,Q){if(A.isString(Z))try{return(x||JSON.parse)(Z),A.trim(Z)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(Z)}var TK={transitional:h5,adapter:["xhr","http","fetch"],transformRequest:[function Z(x,Q){let J=Q.getContentType()||"",X=J.indexOf("application/json")>-1,q=A.isObject(x);if(q&&A.isHTMLForm(x))x=new FormData(x);if(A.isFormData(x))return X?JSON.stringify(EJ(x)):x;if(A.isArrayBuffer(x)||A.isBuffer(x)||A.isStream(x)||A.isFile(x)||A.isBlob(x)||A.isReadableStream(x))return x;if(A.isArrayBufferView(x))return x.buffer;if(A.isURLSearchParams(x))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),x.toString();let $;if(q){if(J.indexOf("application/x-www-form-urlencoded")>-1)return fK(x,this.formSerializer).toString();if(($=A.isFileList(x))||J.indexOf("multipart/form-data")>-1){let z=this.env&&this.env.FormData;return k6($?{"files[]":x}:x,z&&new z,this.formSerializer)}}if(q||X)return Q.setContentType("application/json",!1),bn(x);return x}],transformResponse:[function Z(x){let Q=this.transitional||TK.transitional,J=Q&&Q.forcedJSONParsing,X=this.responseType==="json";if(A.isResponse(x)||A.isReadableStream(x))return x;if(x&&A.isString(x)&&(J&&!this.responseType||X)){let Y=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse(x)}catch($){if(Y){if($.name==="SyntaxError")throw M0.from($,M0.ERR_BAD_RESPONSE,this,null,this.response);throw $}}}return x}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:H1.classes.FormData,Blob:H1.classes.Blob},validateStatus:function Z(x){return x>=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],(Z)=>{TK.headers[Z]={}});var g5=TK;var pn=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wN=(Z)=>{let x={},Q,J,X;return Z&&Z.split(`
89
89
  `).forEach(function q(Y){if(X=Y.indexOf(":"),Q=Y.substring(0,X).trim().toLowerCase(),J=Y.substring(X+1).trim(),!Q||x[Q]&&pn[Q])return;if(Q==="set-cookie")if(x[Q])x[Q].push(J);else x[Q]=[J];else x[Q]=x[Q]?x[Q]+", "+J:J}),x};var FN=Symbol("internals");function kZ(Z){return Z&&String(Z).trim().toLowerCase()}function fJ(Z){if(Z===!1||Z==null)return Z;return A.isArray(Z)?Z.map(fJ):String(Z)}function un(Z){let x=Object.create(null),Q=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,J;while(J=Q.exec(Z))x[J[1]]=J[2];return x}var yn=(Z)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Z.trim());function kK(Z,x,Q,J,X){if(A.isFunction(J))return J.call(this,x,Q);if(X)x=Q;if(!A.isString(x))return;if(A.isString(J))return x.indexOf(J)!==-1;if(A.isRegExp(J))return J.test(x)}function hn(Z){return Z.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(x,Q,J)=>{return Q.toUpperCase()+J})}function gn(Z,x){let Q=A.toCamelCase(" "+x);["get","set","has"].forEach((J)=>{Object.defineProperty(Z,J+Q,{value:function(X,q,Y){return this[J].call(this,x,X,q,Y)},configurable:!0})})}class cZ{constructor(Z){Z&&this.set(Z)}set(Z,x,Q){let J=this;function X(Y,$,z){let W=kZ($);if(!W)throw new Error("header name must be a non-empty string");let H=A.findKey(J,W);if(!H||J[H]===void 0||z===!0||z===void 0&&J[H]!==!1)J[H||$]=fJ(Y)}let q=(Y,$)=>A.forEach(Y,(z,W)=>X(z,W,$));if(A.isPlainObject(Z)||Z instanceof this.constructor)q(Z,x);else if(A.isString(Z)&&(Z=Z.trim())&&!yn(Z))q(wN(Z),x);else if(A.isObject(Z)&&A.isIterable(Z)){let Y={},$,z;for(let W of Z){if(!A.isArray(W))throw TypeError("Object iterator must return a key-value pair");Y[z=W[0]]=($=Y[z])?A.isArray($)?[...$,W[1]]:[$,W[1]]:W[1]}q(Y,x)}else Z!=null&&X(x,Z,Q);return this}get(Z,x){if(Z=kZ(Z),Z){let Q=A.findKey(this,Z);if(Q){let J=this[Q];if(!x)return J;if(x===!0)return un(J);if(A.isFunction(x))return x.call(this,J,Q);if(A.isRegExp(x))return x.exec(J);throw new TypeError("parser must be boolean|regexp|function")}}}has(Z,x){if(Z=kZ(Z),Z){let Q=A.findKey(this,Z);return!!(Q&&this[Q]!==void 0&&(!x||kK(this,this[Q],Q,x)))}return!1}delete(Z,x){let Q=this,J=!1;function X(q){if(q=kZ(q),q){let Y=A.findKey(Q,q);if(Y&&(!x||kK(Q,Q[Y],Y,x)))delete Q[Y],J=!0}}if(A.isArray(Z))Z.forEach(X);else X(Z);return J}clear(Z){let x=Object.keys(this),Q=x.length,J=!1;while(Q--){let X=x[Q];if(!Z||kK(this,this[X],X,Z,!0))delete this[X],J=!0}return J}normalize(Z){let x=this,Q={};return A.forEach(this,(J,X)=>{let q=A.findKey(Q,X);if(q){x[q]=fJ(J),delete x[X];return}let Y=Z?hn(X):String(X).trim();if(Y!==X)delete x[X];x[Y]=fJ(J),Q[Y]=!0}),this}concat(...Z){return this.constructor.concat(this,...Z)}toJSON(Z){let x=Object.create(null);return A.forEach(this,(Q,J)=>{Q!=null&&Q!==!1&&(x[J]=Z&&A.isArray(Q)?Q.join(", "):Q)}),x}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([Z,x])=>Z+": "+x).join(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@holistics/cli-core",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "files": [
6
6
  "dist"
7
7
  ],